Permalink
Browse files

[mapping] support for common2.2.x and bc for 2.1.x

  • Loading branch information...
l3pp4rd committed Oct 30, 2011
1 parent 29d252d commit 01c5b188481926190ec6925830c86401ec48704f
View
@@ -9,10 +9,22 @@
mkdir(VENDOR_PATH, 0775, true);
}
-$deps = array(
+$deps21x = array(
+ array('doctrine-orm', 'http://github.com/doctrine/doctrine2.git', '550fcbc17fc9d927edf3'),
+ array('doctrine-dbal', 'http://github.com/doctrine/dbal.git', 'eb80a3797e80fbaa024bb0a1ef01c3d81bb68a76'),
+ array('doctrine-common', 'http://github.com/doctrine/common.git', '73b61b50782640358940'),
+ array('doctrine-mongodb', 'http://github.com/doctrine/mongodb.git', '4109734e249a951f270c531999871bfe9eeed843'),
+ array('doctrine-mongodb-odm', 'http://github.com/doctrine/mongodb-odm.git', '8fb97a4740c2c12a2a5a4e7d78f0717847c39691'),
+
+ array('Symfony/Component/ClassLoader', 'http://github.com/symfony/ClassLoader.git', '6894a17bb88831f2d260c7b9897862e5ccf35bae'),
+ array('Symfony/Component/Console', 'http://github.com/symfony/Console.git', '55344823ce1c2a780c9137d86143d9084209a02d'),
+ array('Symfony/Component/Finder', 'http://github.com/symfony/Finder.git', '83d148b10f3acf2a1d1cc427386a1d3d1a125206'),
+ array('Symfony/Component/Yaml', 'http://github.com/symfony/Yaml.git', '2b858b077d1e6748569fd143ae16da44b541d3f3'),
+);
+$deps22x = array(
array('doctrine-orm', 'http://github.com/doctrine/doctrine2.git', '15562d030e'),
array('doctrine-dbal', 'http://github.com/doctrine/dbal.git', '537de7e'),
- array('doctrine-common', 'http://github.com/doctrine/common.git', 'b3b1e62b1c'/*b385ca7708*/),
+ array('doctrine-common', 'http://github.com/doctrine/common.git', 'b3b1e62b1c'),
array('doctrine-mongodb', 'http://github.com/doctrine/mongodb.git', '1674e629f2'),
array('doctrine-mongodb-odm', 'http://github.com/doctrine/mongodb-odm.git', '1674e629f2'),
@@ -22,7 +34,7 @@
array('Symfony/Component/Yaml', 'http://github.com/symfony/Yaml.git', '2b858b077d1e6748569fd143ae16da44b541d3f3'),
);
-foreach ($deps as $dep) {
+foreach ($deps22x as $dep) {
list($name, $url, $rev) = $dep;
echo "> Installing/Updating $name\n";
@@ -27,7 +27,7 @@ public function getDateValue(ClassMetadata $meta, $field)
if (isset($mapping['type']) && $mapping['type'] === 'timestamp') {
return time();
}
- if ($meta->getTypeOfField($field) == 'zenddate') {
+ if (isset($mapping['type']) && $mapping['type'] == 'zenddate') {
return new \Zend_Date();
}
return new \DateTime();
@@ -23,7 +23,7 @@
*/
public function getDateValue(ClassMetadata $meta, $field)
{
- if ($meta->getTypeOfField($field) == 'zenddate') {
+ if (isset($mapping['type']) && $mapping['type'] == 'zenddate') {
return new \Zend_Date();
}
return new \DateTime();

0 comments on commit 01c5b18

Please sign in to comment.