Pārlūkot izejas kodu

Switch require_once to require for autoload_static as the once variant seems unnecessary

Jordi Boggiano 5 gadi atpakaļ
vecāks
revīzija
7049bbb714

+ 1 - 1
src/Composer/Autoload/AutoloadGenerator.php

@@ -742,7 +742,7 @@ INCLUDE_PATH;
         $file .= <<<STATIC_INIT
         \$useStaticLoader = PHP_VERSION_ID >= $staticPhpVersion && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
         if (\$useStaticLoader) {
-            require_once __DIR__ . '/autoload_static.php';
+            require __DIR__ . '/autoload_static.php';
 
             call_user_func(\Composer\Autoload\ComposerStaticInit$suffix::getInitializer(\$loader));
         } else {

+ 1 - 1
tests/Composer/Test/Autoload/Fixtures/autoload_real_files_by_dependency.php

@@ -30,7 +30,7 @@ class ComposerAutoloaderInitFilesAutoloadOrder
 
         $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
         if ($useStaticLoader) {
-            require_once __DIR__ . '/autoload_static.php';
+            require __DIR__ . '/autoload_static.php';
 
             call_user_func(\Composer\Autoload\ComposerStaticInitFilesAutoloadOrder::getInitializer($loader));
         } else {

+ 1 - 1
tests/Composer/Test/Autoload/Fixtures/autoload_real_functions.php

@@ -30,7 +30,7 @@ class ComposerAutoloaderInitFilesAutoload
 
         $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
         if ($useStaticLoader) {
-            require_once __DIR__ . '/autoload_static.php';
+            require __DIR__ . '/autoload_static.php';
 
             call_user_func(\Composer\Autoload\ComposerStaticInitFilesAutoload::getInitializer($loader));
         } else {

+ 1 - 1
tests/Composer/Test/Autoload/Fixtures/autoload_real_functions_with_include_paths.php

@@ -34,7 +34,7 @@ class ComposerAutoloaderInitFilesAutoload
 
         $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
         if ($useStaticLoader) {
-            require_once __DIR__ . '/autoload_static.php';
+            require __DIR__ . '/autoload_static.php';
 
             call_user_func(\Composer\Autoload\ComposerStaticInitFilesAutoload::getInitializer($loader));
         } else {

+ 1 - 1
tests/Composer/Test/Autoload/Fixtures/autoload_real_functions_with_removed_include_paths_and_autolad_files.php

@@ -30,7 +30,7 @@ class ComposerAutoloaderInitFilesAutoload
 
         $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
         if ($useStaticLoader) {
-            require_once __DIR__ . '/autoload_static.php';
+            require __DIR__ . '/autoload_static.php';
 
             call_user_func(\Composer\Autoload\ComposerStaticInitFilesAutoload::getInitializer($loader));
         } else {

+ 1 - 1
tests/Composer/Test/Autoload/Fixtures/autoload_real_include_path.php

@@ -30,7 +30,7 @@ class ComposerAutoloaderInitIncludePath
 
         $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
         if ($useStaticLoader) {
-            require_once __DIR__ . '/autoload_static.php';
+            require __DIR__ . '/autoload_static.php';
 
             call_user_func(\Composer\Autoload\ComposerStaticInitIncludePath::getInitializer($loader));
         } else {

+ 1 - 1
tests/Composer/Test/Autoload/Fixtures/autoload_real_target_dir.php

@@ -30,7 +30,7 @@ class ComposerAutoloaderInitTargetDir
 
         $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
         if ($useStaticLoader) {
-            require_once __DIR__ . '/autoload_static.php';
+            require __DIR__ . '/autoload_static.php';
 
             call_user_func(\Composer\Autoload\ComposerStaticInitTargetDir::getInitializer($loader));
         } else {