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
c98543c1
Commit
c98543c1
authored
Apr 09, 2010
by
Benjamin Eberlei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix bin/doctrine.php global doctrine binary to work with Symfony components
parent
e4d8efa3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
8 deletions
+34
-8
doctrine.php
bin/doctrine.php
+34
-8
No files found.
bin/doctrine.php
View file @
c98543c1
...
@@ -2,12 +2,15 @@
...
@@ -2,12 +2,15 @@
require_once
'Doctrine/Common/ClassLoader.php'
;
require_once
'Doctrine/Common/ClassLoader.php'
;
$classLoader
=
new
\Doctrine\Common\ClassLoader
(
'Doctrine'
);
$classLoader
=
new
\Doctrine\Common\ClassLoader
(
'Doctrine'
,
__DIR__
.
'/../lib'
);
$classLoader
->
register
();
$classLoader
=
new
\Doctrine\Common\ClassLoader
(
'Symfony'
,
__DIR__
.
'/../lib/vendor'
);
$classLoader
->
register
();
$classLoader
->
register
();
$configFile
=
getcwd
()
.
DIRECTORY_SEPARATOR
.
'cli-config.php'
;
$configFile
=
getcwd
()
.
DIRECTORY_SEPARATOR
.
'cli-config.php'
;
$
configuration
=
null
;
$
helperSet
=
null
;
if
(
file_exists
(
$configFile
))
{
if
(
file_exists
(
$configFile
))
{
if
(
!
is_readable
(
$configFile
))
{
if
(
!
is_readable
(
$configFile
))
{
trigger_error
(
trigger_error
(
...
@@ -17,15 +20,38 @@ if (file_exists($configFile)) {
...
@@ -17,15 +20,38 @@ if (file_exists($configFile)) {
require
$configFile
;
require
$configFile
;
foreach
(
$GLOBALS
as
$
config
Candidate
)
{
foreach
(
$GLOBALS
as
$
helperSet
Candidate
)
{
if
(
$
configCandidate
instanceof
\Doctrine\Common\CLI\Configuration
)
{
if
(
$
helperSetCandidate
instanceof
\Symfony\Components\Console\Helper\HelperSet
)
{
$
configuration
=
$config
Candidate
;
$
helperSet
=
$helperSet
Candidate
;
break
;
break
;
}
}
}
}
}
}
$configuration
=
(
$configuration
)
?:
new
\Doctrine\Common\CLI\Configuration
();
$helperSet
=
(
$helperSet
)
?:
new
\Symfony\Components\Console\Helper\HelperSet
();
$cli
=
new
\Doctrine\Common\CLI\CLIController
(
$configuration
);
$cli
=
new
\Symfony\Components\Console\Application
(
'Doctrine Command Line Interface'
,
Doctrine\Common\Version
::
VERSION
);
$cli
->
run
(
$_SERVER
[
'argv'
]);
$cli
->
setCatchExceptions
(
true
);
\ No newline at end of file
$cli
->
setHelperSet
(
$helperSet
);
$cli
->
addCommands
(
array
(
// DBAL Commands
new
\Doctrine\DBAL\Tools\Console\Command\RunSqlCommand
(),
new
\Doctrine\DBAL\Tools\Console\Command\ImportCommand
(),
// ORM Commands
new
\Doctrine\ORM\Tools\Console\Command\ClearCache\MetadataCommand
(),
new
\Doctrine\ORM\Tools\Console\Command\ClearCache\ResultCommand
(),
new
\Doctrine\ORM\Tools\Console\Command\ClearCache\QueryCommand
(),
new
\Doctrine\ORM\Tools\Console\Command\SchemaTool\CreateCommand
(),
new
\Doctrine\ORM\Tools\Console\Command\SchemaTool\UpdateCommand
(),
new
\Doctrine\ORM\Tools\Console\Command\SchemaTool\DropCommand
(),
new
\Doctrine\ORM\Tools\Console\Command\EnsureProductionSettingsCommand
(),
new
\Doctrine\ORM\Tools\Console\Command\ConvertDoctrine1SchemaCommand
(),
new
\Doctrine\ORM\Tools\Console\Command\GenerateRepositoriesCommand
(),
new
\Doctrine\ORM\Tools\Console\Command\GenerateEntitiesCommand
(),
new
\Doctrine\ORM\Tools\Console\Command\GenerateProxiesCommand
(),
new
\Doctrine\ORM\Tools\Console\Command\ConvertMappingCommand
(),
new
\Doctrine\ORM\Tools\Console\Command\RunDqlCommand
(),
));
$cli
->
run
();
\ No newline at end of file
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