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
e06f7c98
Commit
e06f7c98
authored
Mar 16, 2010
by
jwage
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[2.0] Updating Symfony Yaml component to PHP 5.3 version
parent
a25c7042
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
9 additions
and
35 deletions
+9
-35
YamlDriver.php
lib/Doctrine/ORM/Mapping/Driver/YamlDriver.php
+1
-8
ConvertMappingTask.php
lib/Doctrine/ORM/Tools/Cli/Tasks/ConvertMappingTask.php
+1
-8
ConvertDoctrine1Schema.php
lib/Doctrine/ORM/Tools/ConvertDoctrine1Schema.php
+2
-9
YamlExporter.php
lib/Doctrine/ORM/Tools/Export/Driver/YamlExporter.php
+1
-8
TestInit.php
tests/Doctrine/Tests/TestInit.php
+4
-2
No files found.
lib/Doctrine/ORM/Mapping/Driver/YamlDriver.php
View file @
e06f7c98
...
...
@@ -24,13 +24,6 @@ namespace Doctrine\ORM\Mapping\Driver;
use
Doctrine\ORM\Mapping\ClassMetadataInfo
,
Doctrine\ORM\Mapping\MappingException
;
if
(
!
class_exists
(
'sfYaml'
,
false
))
{
require_once
__DIR__
.
'/../../../../vendor/sfYaml/sfYaml.class.php'
;
require_once
__DIR__
.
'/../../../../vendor/sfYaml/sfYamlDumper.class.php'
;
require_once
__DIR__
.
'/../../../../vendor/sfYaml/sfYamlInline.class.php'
;
require_once
__DIR__
.
'/../../../../vendor/sfYaml/sfYamlParser.class.php'
;
}
/**
* The YamlDriver reads the mapping metadata from yaml schema files.
*
...
...
@@ -434,6 +427,6 @@ class YamlDriver extends AbstractFileDriver
*/
protected
function
_loadMappingFile
(
$file
)
{
return
\
sf
Yaml
::
load
(
$file
);
return
\
Symfony\Components\Yaml\
Yaml
::
load
(
$file
);
}
}
\ No newline at end of file
lib/Doctrine/ORM/Tools/Cli/Tasks/ConvertMappingTask.php
View file @
e06f7c98
...
...
@@ -180,17 +180,10 @@ class ConvertMappingTask extends AbstractTask
private
function
_isDoctrine1Schema
(
array
$from
)
{
if
(
!
class_exists
(
'sfYaml'
,
false
))
{
require_once
__DIR__
.
'/../../../../../vendor/sfYaml/sfYaml.class.php'
;
require_once
__DIR__
.
'/../../../../../vendor/sfYaml/sfYamlDumper.class.php'
;
require_once
__DIR__
.
'/../../../../../vendor/sfYaml/sfYamlInline.class.php'
;
require_once
__DIR__
.
'/../../../../../vendor/sfYaml/sfYamlParser.class.php'
;
}
$files
=
glob
(
current
(
$from
)
.
'/*.yml'
);
if
(
$files
)
{
$array
=
\
sf
Yaml
::
load
(
$files
[
0
]);
$array
=
\
Symfony\Components\Yaml\
Yaml
::
load
(
$files
[
0
]);
$first
=
current
(
$array
);
// We're dealing with a Doctrine 1 schema if you have
...
...
lib/Doctrine/ORM/Tools/ConvertDoctrine1Schema.php
View file @
e06f7c98
...
...
@@ -25,13 +25,6 @@ use Doctrine\ORM\Mapping\ClassMetadataInfo,
Doctrine\ORM\Tools\Export\Driver\AbstractExporter
,
Doctrine\Common\Util\Inflector
;
if
(
!
class_exists
(
'sfYaml'
,
false
))
{
require_once
__DIR__
.
'/../../../vendor/sfYaml/sfYaml.class.php'
;
require_once
__DIR__
.
'/../../../vendor/sfYaml/sfYamlDumper.class.php'
;
require_once
__DIR__
.
'/../../../vendor/sfYaml/sfYamlInline.class.php'
;
require_once
__DIR__
.
'/../../../vendor/sfYaml/sfYamlParser.class.php'
;
}
/**
* Class to help with converting Doctrine 1 schema files to Doctrine 2 mapping files
*
...
...
@@ -76,10 +69,10 @@ class ConvertDoctrine1Schema
if
(
is_dir
(
$path
))
{
$files
=
glob
(
$path
.
'/*.yml'
);
foreach
(
$files
as
$file
)
{
$schema
=
array_merge
(
$schema
,
(
array
)
\
sf
Yaml
::
load
(
$file
));
$schema
=
array_merge
(
$schema
,
(
array
)
\
Symfony\Components\Yaml\
Yaml
::
load
(
$file
));
}
}
else
{
$schema
=
array_merge
(
$schema
,
(
array
)
\
sf
Yaml
::
load
(
$path
));
$schema
=
array_merge
(
$schema
,
(
array
)
\
Symfony\Components\Yaml\
Yaml
::
load
(
$path
));
}
}
...
...
lib/Doctrine/ORM/Tools/Export/Driver/YamlExporter.php
View file @
e06f7c98
...
...
@@ -27,13 +27,6 @@ use Doctrine\ORM\Mapping\ClassMetadataInfo,
Doctrine\ORM\Mapping\OneToManyMapping
,
Doctrine\ORM\Mapping\ManyToManyMapping
;
if
(
!
class_exists
(
'sfYaml'
,
false
))
{
require_once
__DIR__
.
'/../../../../../vendor/sfYaml/sfYaml.class.php'
;
require_once
__DIR__
.
'/../../../../../vendor/sfYaml/sfYamlDumper.class.php'
;
require_once
__DIR__
.
'/../../../../../vendor/sfYaml/sfYamlInline.class.php'
;
require_once
__DIR__
.
'/../../../../../vendor/sfYaml/sfYamlParser.class.php'
;
}
/**
* ClassMetadata exporter for Doctrine YAML mapping files
*
...
...
@@ -184,6 +177,6 @@ class YamlExporter extends AbstractExporter
}
}
return
\
sf
Yaml
::
dump
(
array
(
$metadata
->
name
=>
$array
),
10
);
return
\
Symfony\Components\Yaml\
Yaml
::
dump
(
array
(
$metadata
->
name
=>
$array
),
10
);
}
}
\ No newline at end of file
tests/Doctrine/Tests/TestInit.php
View file @
e06f7c98
...
...
@@ -13,9 +13,11 @@ require_once __DIR__ . '/../../../lib/Doctrine/Common/ClassLoader.php';
$classLoader
=
new
\Doctrine\Common\ClassLoader
(
'Doctrine'
);
$classLoader
->
register
();
$classLoader
=
new
\Doctrine\Common\ClassLoader
(
'Symfony'
,
__DIR__
.
'/../../../lib/vendor'
);
$classLoader
->
register
();
set_include_path
(
__DIR__
.
DIRECTORY_SEPARATOR
.
'..'
.
DIRECTORY_SEPARATOR
.
'..'
.
DIRECTORY_SEPARATOR
.
'..'
.
DIRECTORY_SEPARATOR
.
'lib'
.
PATH_SEPARATOR
.
get_include_path
()
);
);
\ 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