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
09fbd8f1
Commit
09fbd8f1
authored
Apr 14, 2010
by
Guilherme Blanco
Browse files
Options
Browse Files
Download
Plain Diff
Merge commit 'upstream/master'
parents
955dc09c
c6d784ab
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
22 additions
and
14 deletions
+22
-14
ConvertDoctrine1SchemaCommand.php
...M/Tools/Console/Command/ConvertDoctrine1SchemaCommand.php
+4
-4
ConvertMappingCommand.php
...trine/ORM/Tools/Console/Command/ConvertMappingCommand.php
+6
-6
ConvertDoctrine1Schema.php
lib/Doctrine/ORM/Tools/ConvertDoctrine1Schema.php
+3
-1
EntityRepositoryGenerator.php
lib/Doctrine/ORM/Tools/EntityRepositoryGenerator.php
+3
-1
ToolsException.php
lib/Doctrine/ORM/Tools/ToolsException.php
+6
-2
No files found.
lib/Doctrine/ORM/Tools/Console/Command/ConvertDoctrine1SchemaCommand.php
View file @
09fbd8f1
...
...
@@ -134,16 +134,16 @@ EOT
}
$converter
=
new
ConvertDoctrine1Schema
(
$fromPaths
);
$metadata
s
=
$converter
->
getMetadatas
();
$metadata
=
$converter
->
getMetadata
();
if
(
$metadatas
)
{
$output
->
write
(
PHP_EOL
);
foreach
(
$metadata
s
as
$metadata
)
{
$output
->
write
(
sprintf
(
'Processing entity "<info>%s</info>"'
,
$
metadata
->
name
)
.
PHP_EOL
);
foreach
(
$metadata
as
$class
)
{
$output
->
write
(
sprintf
(
'Processing entity "<info>%s</info>"'
,
$
class
->
name
)
.
PHP_EOL
);
}
$exporter
->
setMetadata
s
(
$metadatas
);
$exporter
->
setMetadata
(
$metadata
);
$exporter
->
export
();
$output
->
write
(
PHP_EOL
.
sprintf
(
...
...
lib/Doctrine/ORM/Tools/Console/Command/ConvertMappingCommand.php
View file @
09fbd8f1
...
...
@@ -97,8 +97,8 @@ EOT
}
$cmf
=
new
DisconnectedClassMetadataFactory
(
$em
);
$metadata
s
=
$cmf
->
getAllMetadata
();
$metadata
s
=
MetadataFilter
::
filter
(
$metadatas
,
$input
->
getOption
(
'filter'
));
$metadata
=
$cmf
->
getAllMetadata
();
$metadata
=
MetadataFilter
::
filter
(
$metadata
,
$input
->
getOption
(
'filter'
));
// Process destination directory
if
(
!
is_dir
(
$destPath
=
$input
->
getArgument
(
'dest-path'
)))
{
...
...
@@ -132,12 +132,12 @@ EOT
}
}
if
(
count
(
$metadata
s
))
{
foreach
(
$metadata
s
as
$metadata
)
{
$output
->
write
(
sprintf
(
'Processing entity "<info>%s</info>"'
,
$
metadata
->
name
)
.
PHP_EOL
);
if
(
count
(
$metadata
))
{
foreach
(
$metadata
as
$class
)
{
$output
->
write
(
sprintf
(
'Processing entity "<info>%s</info>"'
,
$
class
->
name
)
.
PHP_EOL
);
}
$exporter
->
setMetadata
s
(
$metadatas
);
$exporter
->
setMetadata
(
$metadata
);
$exporter
->
export
();
$output
->
write
(
PHP_EOL
.
sprintf
(
...
...
lib/Doctrine/ORM/Tools/ConvertDoctrine1Schema.php
View file @
09fbd8f1
...
...
@@ -41,7 +41,8 @@ class ConvertDoctrine1Schema
private
$_legacyTypeMap
=
array
(
// TODO: This list may need to be updated
'clob'
=>
'text'
,
'timestamp'
=>
'datetime'
'timestamp'
=>
'datetime'
,
'enum'
=>
'string'
);
/**
...
...
@@ -238,6 +239,7 @@ class ConvertDoctrine1Schema
if
(
isset
(
$relation
[
'refClass'
]))
{
$type
=
'many'
;
$foreignType
=
'many'
;
$joinColumns
=
array
();
}
else
{
$type
=
isset
(
$relation
[
'type'
])
?
$relation
[
'type'
]
:
'one'
;
$foreignType
=
isset
(
$relation
[
'foreignType'
])
?
$relation
[
'foreignType'
]
:
'many'
;
...
...
lib/Doctrine/ORM/Tools/EntityRepositoryGenerator.php
View file @
09fbd8f1
...
...
@@ -76,6 +76,8 @@ class <className> extends EntityRepository
mkdir
(
$dir
,
0777
,
true
);
}
file_put_contents
(
$path
,
$code
);
if
(
!
file_exists
(
$path
))
{
file_put_contents
(
$path
,
$code
);
}
}
}
\ No newline at end of file
lib/Doctrine/ORM/Tools/ToolsException.php
View file @
09fbd8f1
...
...
@@ -2,8 +2,12 @@
namespace
Doctrine\ORM\Tools
;
class
ToolsException
extends
ORMException
{
public
static
function
couldNotMapDoctrine1Type
(
$type
)
{
use
Doctrine\ORM\ORMException
;
class
ToolsException
extends
ORMException
{
public
static
function
couldNotMapDoctrine1Type
(
$type
)
{
return
new
self
(
"Could not map doctrine 1 type '
$type
'!"
);
}
}
\ 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