From 8cfa5b3fdb956572959dba11d5b138503c4f1b42 Mon Sep 17 00:00:00 2001 From: connor Date: Thu, 4 Apr 2024 15:41:53 +0200 Subject: [PATCH] removed includes --- lib/command/cli.php | 1 - lib/task/generator/skeleton/app/web/index.php | 1 + lib/task/generator/skeleton/project/symfony | 3 ++- lib/task/plugin/sfPluginAddChannelTask.class.php | 2 -- lib/task/plugin/sfPluginInstallTask.class.php | 2 -- lib/task/plugin/sfPluginListTask.class.php | 2 -- lib/task/plugin/sfPluginPublishAssetsTask.class.php | 2 -- lib/task/plugin/sfPluginUninstallTask.class.php | 2 -- lib/task/plugin/sfPluginUpgradeTask.class.php | 2 -- lib/task/symfony/sfSymfonyTestTask.class.php | 4 ---- lib/task/test/sfLimeHarness.class.php | 2 -- lib/task/test/sfTestAllTask.class.php | 2 -- lib/task/test/sfTestCoverageTask.class.php | 2 -- lib/task/test/sfTestFunctionalTask.class.php | 2 -- lib/task/test/sfTestPluginTask.class.php | 2 -- lib/task/test/sfTestUnitTask.class.php | 2 -- lib/test/sfTestBrowser.class.php | 2 -- lib/test/sfTestFunctionalBase.class.php | 2 -- 18 files changed, 3 insertions(+), 34 deletions(-) diff --git a/lib/command/cli.php b/lib/command/cli.php index ab87dac10..986ff4c43 100644 --- a/lib/command/cli.php +++ b/lib/command/cli.php @@ -17,7 +17,6 @@ // Fall back to classic Symfony loading if (!file_exists($autoload)) { - require_once __DIR__.'/../autoload/sfCoreAutoload.class.php'; sfCoreAutoload::register(); } else { require_once $autoload; diff --git a/lib/task/generator/skeleton/app/web/index.php b/lib/task/generator/skeleton/app/web/index.php index abf55a39c..d8fa036a7 100644 --- a/lib/task/generator/skeleton/app/web/index.php +++ b/lib/task/generator/skeleton/app/web/index.php @@ -2,6 +2,7 @@ ##IP_CHECK## require_once(__DIR__.'/../config/ProjectConfiguration.class.php'); +require_once(__DIR__.'/../vendor/autoload.php'); $configuration = ProjectConfiguration::getApplicationConfiguration('##APP_NAME##', '##ENVIRONMENT##', ##IS_DEBUG##); sfContext::createInstance($configuration)->dispatch(); diff --git a/lib/task/generator/skeleton/project/symfony b/lib/task/generator/skeleton/project/symfony index 5ce2281d8..d57618a06 100644 --- a/lib/task/generator/skeleton/project/symfony +++ b/lib/task/generator/skeleton/project/symfony @@ -4,11 +4,12 @@ /* * This file is part of the symfony package. * (c) Fabien Potencier - * + * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ chdir(__DIR__); require_once(__DIR__.'/config/ProjectConfiguration.class.php'); +require_once(__DIR__.'/vendor/autoload.php'); include(sfCoreAutoload::getInstance()->getBaseDir().'/command/cli.php'); diff --git a/lib/task/plugin/sfPluginAddChannelTask.class.php b/lib/task/plugin/sfPluginAddChannelTask.class.php index bdc20a878..6d68bd0e7 100644 --- a/lib/task/plugin/sfPluginAddChannelTask.class.php +++ b/lib/task/plugin/sfPluginAddChannelTask.class.php @@ -8,8 +8,6 @@ * file that was distributed with this source code. */ -require_once __DIR__.'/sfPluginBaseTask.class.php'; - /** * Installs a plugin. * diff --git a/lib/task/plugin/sfPluginInstallTask.class.php b/lib/task/plugin/sfPluginInstallTask.class.php index 670668bdd..9142b5458 100644 --- a/lib/task/plugin/sfPluginInstallTask.class.php +++ b/lib/task/plugin/sfPluginInstallTask.class.php @@ -8,8 +8,6 @@ * file that was distributed with this source code. */ -require_once __DIR__.'/sfPluginBaseTask.class.php'; - /** * Installs a plugin. * diff --git a/lib/task/plugin/sfPluginListTask.class.php b/lib/task/plugin/sfPluginListTask.class.php index a97619ada..108d9f230 100644 --- a/lib/task/plugin/sfPluginListTask.class.php +++ b/lib/task/plugin/sfPluginListTask.class.php @@ -8,8 +8,6 @@ * file that was distributed with this source code. */ -require_once __DIR__.'/sfPluginBaseTask.class.php'; - /** * Lists installed plugins. * diff --git a/lib/task/plugin/sfPluginPublishAssetsTask.class.php b/lib/task/plugin/sfPluginPublishAssetsTask.class.php index 94be862e0..5772f722e 100644 --- a/lib/task/plugin/sfPluginPublishAssetsTask.class.php +++ b/lib/task/plugin/sfPluginPublishAssetsTask.class.php @@ -8,8 +8,6 @@ * file that was distributed with this source code. */ -require_once __DIR__.'/sfPluginBaseTask.class.php'; - /** * Publishes Web Assets for Core and third party plugins. * diff --git a/lib/task/plugin/sfPluginUninstallTask.class.php b/lib/task/plugin/sfPluginUninstallTask.class.php index 115205ed1..9c036a0a0 100644 --- a/lib/task/plugin/sfPluginUninstallTask.class.php +++ b/lib/task/plugin/sfPluginUninstallTask.class.php @@ -8,8 +8,6 @@ * file that was distributed with this source code. */ -require_once __DIR__.'/sfPluginBaseTask.class.php'; - /** * Uninstall a plugin. * diff --git a/lib/task/plugin/sfPluginUpgradeTask.class.php b/lib/task/plugin/sfPluginUpgradeTask.class.php index 6520a744f..f146e2a60 100644 --- a/lib/task/plugin/sfPluginUpgradeTask.class.php +++ b/lib/task/plugin/sfPluginUpgradeTask.class.php @@ -8,8 +8,6 @@ * file that was distributed with this source code. */ -require_once __DIR__.'/sfPluginBaseTask.class.php'; - /** * Upgrades a plugin. * diff --git a/lib/task/symfony/sfSymfonyTestTask.class.php b/lib/task/symfony/sfSymfonyTestTask.class.php index db036b206..3991505f3 100644 --- a/lib/task/symfony/sfSymfonyTestTask.class.php +++ b/lib/task/symfony/sfSymfonyTestTask.class.php @@ -43,12 +43,9 @@ protected function configure() */ protected function execute($arguments = [], $options = []) { - require_once __DIR__.'/../../vendor/lime/lime.php'; - require_once __DIR__.'/lime_symfony.php'; // cleanup - require_once __DIR__.'/../../util/sfToolkit.class.php'; if ($files = glob(sys_get_temp_dir().DIRECTORY_SEPARATOR.'/sf_autoload_unit_*')) { foreach ($files as $file) { unlink($file); @@ -57,7 +54,6 @@ protected function execute($arguments = [], $options = []) // update sfCoreAutoload if ($options['update-autoloader']) { - require_once __DIR__.'/../../autoload/sfCoreAutoload.class.php'; sfCoreAutoload::make(); } diff --git a/lib/task/test/sfLimeHarness.class.php b/lib/task/test/sfLimeHarness.class.php index c53c6a141..c604deaeb 100644 --- a/lib/task/test/sfLimeHarness.class.php +++ b/lib/task/test/sfLimeHarness.class.php @@ -1,7 +1,5 @@ isset($options['color']) && $options['color'], 'verbose' => isset($options['trace']) && $options['trace'], diff --git a/lib/task/test/sfTestCoverageTask.class.php b/lib/task/test/sfTestCoverageTask.class.php index ae486eaf5..4e206006b 100644 --- a/lib/task/test/sfTestCoverageTask.class.php +++ b/lib/task/test/sfTestCoverageTask.class.php @@ -52,8 +52,6 @@ protected function configure() */ protected function execute($arguments = [], $options = []) { - require_once sfConfig::get('sf_symfony_lib_dir').'/vendor/lime/lime.php'; - $coverage = $this->getCoverage($this->getTestHarness(['force_colors' => isset($options['color']) && $options['color']]), $options['detailed']); $testFiles = $this->getFiles(sfConfig::get('sf_root_dir').'/'.$arguments['test_name']); diff --git a/lib/task/test/sfTestFunctionalTask.class.php b/lib/task/test/sfTestFunctionalTask.class.php index 469f89b2b..98aac102c 100644 --- a/lib/task/test/sfTestFunctionalTask.class.php +++ b/lib/task/test/sfTestFunctionalTask.class.php @@ -87,8 +87,6 @@ protected function execute($arguments = [], $options = []) return 1; } } else { - require_once __DIR__.'/sfLimeHarness.class.php'; - $h = new sfLimeHarness([ 'force_colors' => isset($options['color']) && $options['color'], 'verbose' => isset($options['trace']) && $options['trace'], diff --git a/lib/task/test/sfTestPluginTask.class.php b/lib/task/test/sfTestPluginTask.class.php index a06f54252..3dd4587d7 100644 --- a/lib/task/test/sfTestPluginTask.class.php +++ b/lib/task/test/sfTestPluginTask.class.php @@ -59,8 +59,6 @@ protected function execute($arguments = [], $options = []) throw new sfCommandException(sprintf('The --only option must be either "unit" or "functional" ("%s" given)', $options['only'])); } - require_once sfConfig::get('sf_symfony_lib_dir').'/vendor/lime/lime.php'; - $h = new lime_harness(new lime_output_color()); $h->base_dir = sfConfig::get('sf_plugins_dir').'/'.$arguments['plugin'].'/test/'.$options['only']; diff --git a/lib/task/test/sfTestUnitTask.class.php b/lib/task/test/sfTestUnitTask.class.php index e9943a9e1..daae12fdd 100644 --- a/lib/task/test/sfTestUnitTask.class.php +++ b/lib/task/test/sfTestUnitTask.class.php @@ -80,8 +80,6 @@ protected function execute($arguments = [], $options = []) $this->logSection('test', 'no tests found', null, 'ERROR'); } } else { - require_once __DIR__.'/sfLimeHarness.class.php'; - $h = new sfLimeHarness([ 'force_colors' => isset($options['color']) && $options['color'], 'verbose' => isset($options['trace']) && $options['trace'], diff --git a/lib/test/sfTestBrowser.class.php b/lib/test/sfTestBrowser.class.php index b4b18bf1e..229290677 100644 --- a/lib/test/sfTestBrowser.class.php +++ b/lib/test/sfTestBrowser.class.php @@ -1,7 +1,5 @@ diff --git a/lib/test/sfTestFunctionalBase.class.php b/lib/test/sfTestFunctionalBase.class.php index d9feef311..2dd1d00a7 100644 --- a/lib/test/sfTestFunctionalBase.class.php +++ b/lib/test/sfTestFunctionalBase.class.php @@ -1,7 +1,5 @@