Bläddra i källkod

Merge remote branch 'origin/master' into doctrine

Johannes Schmitt 14 år sedan
förälder
incheckning
4c245e03ea

+ 3 - 3
UPDATE.md

@@ -9,9 +9,9 @@ timeline closely anyway.
 beta1 to beta2
 --------------
 
-* The annotation parsing process has been changed. All annotations which are used
-  in a class must now be imported (just like you import PHP namespaces with the
-  "use" statement):
+* The annotation parsing process has been changed (it now uses Doctrine Common
+  3.0). All annotations which are used in a class must now be imported (just
+  like you import PHP namespaces with the "use" statement):
 
   Before:
 

+ 1 - 1
src/Symfony/Bundle/DoctrineBundle/Mapping/Driver/XmlDriver.php

@@ -40,7 +40,7 @@ class XmlDriver extends BaseXmlDriver
 
         if ($this->_paths) {
             foreach ((array) $this->_paths as $prefix => $path) {
-                if ( ! is_dir($path)) {
+                if (!is_dir($path)) {
                     throw MappingException::fileMappingDriversRequireConfiguredDirectoryPath($path);
                 }
 

+ 1 - 1
src/Symfony/Bundle/DoctrineBundle/Mapping/Driver/YamlDriver.php

@@ -40,7 +40,7 @@ class YamlDriver extends BaseYamlDriver
 
         if ($this->_paths) {
             foreach ((array) $this->_paths as $prefix => $path) {
-                if ( ! is_dir($path)) {
+                if (!is_dir($path)) {
                     throw MappingException::fileMappingDriversRequireConfiguredDirectoryPath($path);
                 }
 

+ 1 - 1
src/Symfony/Component/Form/FormFactory.php

@@ -252,7 +252,7 @@ class FormFactory implements FormFactoryInterface
         }
 
         if (count($diff) > 0) {
-            throw new CreationException(sprintf('The option "%s" does not exist', $diff[0]));
+            throw new CreationException(sprintf('The option "%s" does not exist', current($diff)));
         }
 
         foreach ($optionValues as $option => $allowedValues) {

+ 0 - 2
src/Symfony/Component/Process/PhpExecutableFinder.php

@@ -11,8 +11,6 @@
 
 namespace Symfony\Component\Process;
 
-use Symfony\Component\Process\Exception\RuntimeException;
-
 /**
  * An executable finder specifically designed for the PHP executable.
  *

+ 3 - 1
tests/Symfony/Tests/Component/Process/PhpExecutableFinderTest.php

@@ -48,7 +48,9 @@ class PhpExecutableFinderTest extends \PHPUnit_Framework_TestCase
         $current = $f->find();
         
         //TODO maybe php executable is custom or even windows
-        $this->assertEquals($f->find(), PHP_BINDIR.DIRECTORY_SEPARATOR.'php', '::find() returns the executable php with suffixes');
+        if (false === strstr(PHP_OS, 'WIN')) {
+            $this->assertEquals($current, PHP_BINDIR.DIRECTORY_SEPARATOR.'php', '::find() returns the executable php with suffixes');
+        }
     }
     
     /**