Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
doctrine-dbal
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tomáš Trávníček
doctrine-dbal
Commits
dbe3f17b
Commit
dbe3f17b
authored
May 14, 2014
by
Marco Pivetta
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#598 - Simpler autoloader definition
parent
c17662fa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
11 deletions
+9
-11
doctrine-dbal.php
bin/doctrine-dbal.php
+9
-11
No files found.
bin/doctrine-dbal.php
View file @
dbe3f17b
...
@@ -20,21 +20,19 @@
...
@@ -20,21 +20,19 @@
use
Symfony\Component\Console\Helper\HelperSet
;
use
Symfony\Component\Console\Helper\HelperSet
;
use
Doctrine\DBAL\Tools\Console\ConsoleRunner
;
use
Doctrine\DBAL\Tools\Console\ConsoleRunner
;
function
requireAutoloader
()
{
$files
=
array
(
__DIR__
.
'/../vendor/autoload.php'
,
__DIR__
.
'/../../../autoload.php'
);
$files
=
array
(
__DIR__
.
'/../vendor/autoload.php'
,
__DIR__
.
'/../../../autoload.php'
);
foreach
(
$files
as
$file
)
{
foreach
(
$files
as
$file
)
{
if
(
file_exists
(
$file
))
{
if
(
file_exists
(
$file
))
{
require
$file
;
$loader
=
require
$file
;
return
;
}
}
echo
'vendor/autoload.php could not be found. Did you run `php composer.phar install`?'
.
PHP_EOL
;
break
;
exit
(
1
);
}
}
}
requireAutoloader
();
if
(
!
$loader
)
{
throw
new
RuntimeException
(
'vendor/autoload.php could not be found. Did you run `php composer.phar install`?'
);
}
$directories
=
array
(
getcwd
(),
getcwd
()
.
DIRECTORY_SEPARATOR
.
'config'
);
$directories
=
array
(
getcwd
(),
getcwd
()
.
DIRECTORY_SEPARATOR
.
'config'
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment