فهرست منبع

Removed $loader

Miha Vrhovnik 13 سال پیش
والد
کامیت
2e96039a9e
1فایلهای تغییر یافته به همراه3 افزوده شده و 3 حذف شده
  1. 3 3
      Tests/bootstrap.php

+ 3 - 3
Tests/bootstrap.php

@@ -15,11 +15,11 @@
  * limitations under the License.
  * limitations under the License.
  */
  */
 
 
-$loader = include_once dirname(__DIR__).'/vendor/autoload.php';
+include_once dirname(__DIR__).'/vendor/autoload.php';
 
 
-Doctrine\Common\Annotations\AnnotationRegistry::registerLoader(function($class) use ($loader) {
+Doctrine\Common\Annotations\AnnotationRegistry::registerLoader(function($class) {
     if (0 === strpos(ltrim($class, '/'), 'JMS\SerializerBundle\Annotation')) {
     if (0 === strpos(ltrim($class, '/'), 'JMS\SerializerBundle\Annotation')) {
-        if (file_exists($file = dirname(__DIR__).'/'.substr(str_replace('\\', '/', $class), strlen('JMS\SerializerBundle')).'.php')) {
+        if (file_exists($file = dirname(__DIR__).'/'.substr(str_replace('\\', '/', $class), strlen('JMS\SerializerBundle\\')).'.php')) {
             require_once $file;
             require_once $file;
         }
         }
     }
     }