diff --git a/autoload.php b/autoload.php deleted file mode 100755 index 3f223a024..000000000 --- a/autoload.php +++ /dev/null @@ -1,5 +0,0 @@ - - * + * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ -// project exists? -if (file_exists('config/ProjectConfiguration.class.php')) -{ - require_once('config/ProjectConfiguration.class.php'); - $dir = sfCoreAutoload::getInstance()->getBaseDir(); -} -else -{ - if (is_readable(__DIR__.'/../../lib/autoload/sfCoreAutoload.class.php')) - { - // SVN - $dir = realpath(__DIR__.'/../../lib'); - } - else - { - // PEAR - $dir = '@PEAR-DIR@/symfony'; - - if (!is_dir($dir)) - { - throw new Exception('Unable to find symfony libraries'); - } - } -} - -include($dir.'/command/cli.php'); +include(__DIR__.'/../../lib/command/cli.php'); diff --git a/lib/autoload/sfAutoload.class.php b/lib/autoload/sfAutoload.class.php index de53e724c..5ef0e6cfb 100644 --- a/lib/autoload/sfAutoload.class.php +++ b/lib/autoload/sfAutoload.class.php @@ -9,12 +9,7 @@ */ /** - * sfAutoload class. - * - * This class is a singleton as PHP seems to be unable to register 2 autoloaders that are instances - * of the same class (why?). - * - * @author Fabien Potencier + * @deprecated */ class sfAutoload { @@ -29,9 +24,7 @@ protected function __construct() } /** - * Retrieves the singleton instance of this class. - * - * @return sfAutoload a sfAutoload implementation instance + * @deprecated */ public static function getInstance() { @@ -43,9 +36,7 @@ public static function getInstance() } /** - * Register sfAutoload in spl autoloader. - * - * @throws sfException + * @deprecated */ public static function register() { @@ -57,7 +48,7 @@ public static function register() } /** - * Unregister sfAutoload from spl autoloader. + * @deprecated */ public static function unregister() { @@ -65,10 +56,7 @@ public static function unregister() } /** - * Sets the path for a particular class. - * - * @param string $class A PHP class name - * @param string $path An absolute path + * @deprecated */ public function setClassPath($class, $path) { @@ -80,11 +68,7 @@ public function setClassPath($class, $path) } /** - * Returns the path where a particular class can be found. - * - * @param string $class A PHP class name - * - * @return string|null An absolute path + * @deprecated */ public function getClassPath($class) { @@ -94,11 +78,7 @@ public function getClassPath($class) } /** - * Reloads the autoloader. - * - * @param bool $force Whether to force a reload - * - * @return bool True if the reload was successful, otherwise false + * @deprecated */ public function reloadClasses($force = false) { @@ -139,11 +119,7 @@ public function reloadClasses($force = false) } /** - * Handles autoloading of classes that have been specified in autoload.yml. - * - * @param string $class a class name - * - * @return bool Returns true if the class has been loaded + * @deprecated */ public function autoload($class) { @@ -156,11 +132,7 @@ public function autoload($class) } /** - * Tries to load a class that has been specified in autoload.yml. - * - * @param string $class a class name - * - * @return bool Returns true if the class has been loaded + * @deprecated */ public function loadClass($class) { diff --git a/lib/autoload/sfAutoloadAgain.class.php b/lib/autoload/sfAutoloadAgain.class.php index a2771e604..6331bdc7e 100644 --- a/lib/autoload/sfAutoloadAgain.class.php +++ b/lib/autoload/sfAutoloadAgain.class.php @@ -9,9 +9,7 @@ */ /** - * Autoload again for dev environments. - * - * @author Kris Wallsmith + * @deprecated */ class sfAutoloadAgain { @@ -21,16 +19,14 @@ class sfAutoloadAgain protected $reloaded = false; /** - * Constructor. + * @deprecated */ protected function __construct() { } /** - * Returns the singleton autoloader. - * - * @return sfAutoloadAgain + * @deprecated */ public static function getInstance() { @@ -42,11 +38,7 @@ public static function getInstance() } /** - * Reloads the autoloader. - * - * @param string $class - * - * @return bool + * @deprecated */ public function autoload($class) { @@ -87,9 +79,7 @@ public function autoload($class) } /** - * Returns true if the autoloader is registered. - * - * @return bool + * @deprecated */ public function isRegistered() { @@ -97,7 +87,7 @@ public function isRegistered() } /** - * Registers the autoloader function. + * @deprecated */ public function register() { @@ -108,7 +98,7 @@ public function register() } /** - * Unregisters the autoloader function. + * @deprecated */ public function unregister() { diff --git a/lib/autoload/sfCoreAutoload.class.php b/lib/autoload/sfCoreAutoload.class.php index e13b737c3..b71c98282 100755 --- a/lib/autoload/sfCoreAutoload.class.php +++ b/lib/autoload/sfCoreAutoload.class.php @@ -9,15 +9,9 @@ */ // The current symfony version. -define('SYMFONY_VERSION', '1.5.20-dev'); /** - * sfCoreAutoload class. - * - * This class is a singleton as PHP seems to be unable to register 2 autoloaders that are instances - * of the same class (why?). - * - * @author Fabien Potencier + * @deprecated */ class sfCoreAutoload { @@ -29,366 +23,6 @@ class sfCoreAutoload // Don't edit this property by hand. // To update it, use sfCoreAutoload::make() protected $classes = [ - 'sfaction' => 'action/sfAction.class.php', - 'sfactionstack' => 'action/sfActionStack.class.php', - 'sfactionstackentry' => 'action/sfActionStackEntry.class.php', - 'sfactions' => 'action/sfActions.class.php', - 'sfcomponent' => 'action/sfComponent.class.php', - 'sfcomponents' => 'action/sfComponents.class.php', - 'sfdata' => 'addon/sfData.class.php', - 'sfpager' => 'addon/sfPager.class.php', - 'sfautoload' => 'autoload/sfAutoload.class.php', - 'sfautoloadagain' => 'autoload/sfAutoloadAgain.class.php', - 'sfcoreautoload' => 'autoload/sfCoreAutoload.class.php', - 'sfsimpleautoload' => 'autoload/sfSimpleAutoload.class.php', - 'sfapcucache' => 'cache/sfAPCuCache.class.php', - 'sfcache' => 'cache/sfCache.class.php', - 'sffilecache' => 'cache/sfFileCache.class.php', - 'sffunctioncache' => 'cache/sfFunctionCache.class.php', - 'sfmemcachecache' => 'cache/sfMemcacheCache.class.php', - 'sfnocache' => 'cache/sfNoCache.class.php', - 'sfsqlitecache' => 'cache/sfSQLiteCache.class.php', - 'sfansicolorformatter' => 'command/sfAnsiColorFormatter.class.php', - 'sfcommandapplication' => 'command/sfCommandApplication.class.php', - 'sfcommandargument' => 'command/sfCommandArgument.class.php', - 'sfcommandargumentset' => 'command/sfCommandArgumentSet.class.php', - 'sfcommandargumentsexception' => 'command/sfCommandArgumentsException.class.php', - 'sfcommandexception' => 'command/sfCommandException.class.php', - 'sfcommandlogger' => 'command/sfCommandLogger.class.php', - 'sfcommandmanager' => 'command/sfCommandManager.class.php', - 'sfcommandoption' => 'command/sfCommandOption.class.php', - 'sfcommandoptionset' => 'command/sfCommandOptionSet.class.php', - 'sfformatter' => 'command/sfFormatter.class.php', - 'sfsymfonycommandapplication' => 'command/sfSymfonyCommandApplication.class.php', - 'sfapplicationconfiguration' => 'config/sfApplicationConfiguration.class.php', - 'sfautoloadconfighandler' => 'config/sfAutoloadConfigHandler.class.php', - 'sfcacheconfighandler' => 'config/sfCacheConfigHandler.class.php', - 'sfcompileconfighandler' => 'config/sfCompileConfigHandler.class.php', - 'sfconfig' => 'config/sfConfig.class.php', - 'sfconfigcache' => 'config/sfConfigCache.class.php', - 'sfconfighandler' => 'config/sfConfigHandler.class.php', - 'sfdatabaseconfighandler' => 'config/sfDatabaseConfigHandler.class.php', - 'sfdefineenvironmentconfighandler' => 'config/sfDefineEnvironmentConfigHandler.class.php', - 'sffactoryconfighandler' => 'config/sfFactoryConfigHandler.class.php', - 'sffilterconfighandler' => 'config/sfFilterConfigHandler.class.php', - 'sfgeneratorconfighandler' => 'config/sfGeneratorConfigHandler.class.php', - 'sfpluginconfiguration' => 'config/sfPluginConfiguration.class.php', - 'sfpluginconfigurationgeneric' => 'config/sfPluginConfigurationGeneric.class.php', - 'sfprojectconfiguration' => 'config/sfProjectConfiguration.class.php', - 'sfrootconfighandler' => 'config/sfRootConfigHandler.class.php', - 'sfroutingconfighandler' => 'config/sfRoutingConfigHandler.class.php', - 'sfsecurityconfighandler' => 'config/sfSecurityConfigHandler.class.php', - 'sfserviceconfighandler' => 'config/sfServiceConfigHandler.class.php', - 'sfsimpleyamlconfighandler' => 'config/sfSimpleYamlConfigHandler.class.php', - 'sfviewconfighandler' => 'config/sfViewConfigHandler.class.php', - 'sfyamlconfighandler' => 'config/sfYamlConfigHandler.class.php', - 'sfcontroller' => 'controller/sfController.class.php', - 'sffrontwebcontroller' => 'controller/sfFrontWebController.class.php', - 'sfwebcontroller' => 'controller/sfWebController.class.php', - 'sfdatabase' => 'database/sfDatabase.class.php', - 'sfdatabasemanager' => 'database/sfDatabaseManager.class.php', - 'sfmysqldatabase' => 'database/sfMySQLDatabase.class.php', - 'sfmysqlidatabase' => 'database/sfMySQLiDatabase.class.php', - 'sfpdodatabase' => 'database/sfPDODatabase.class.php', - 'sfpostgresqldatabase' => 'database/sfPostgreSQLDatabase.class.php', - 'sfdebug' => 'debug/sfDebug.class.php', - 'sftimer' => 'debug/sfTimer.class.php', - 'sftimermanager' => 'debug/sfTimerManager.class.php', - 'sfwebdebug' => 'debug/sfWebDebug.class.php', - 'sfwebdebugpanel' => 'debug/sfWebDebugPanel.class.php', - 'sfwebdebugpanelcache' => 'debug/sfWebDebugPanelCache.class.php', - 'sfwebdebugpanelconfig' => 'debug/sfWebDebugPanelConfig.class.php', - 'sfwebdebugpanellogs' => 'debug/sfWebDebugPanelLogs.class.php', - 'sfwebdebugpanelmailer' => 'debug/sfWebDebugPanelMailer.class.php', - 'sfwebdebugpanelmemory' => 'debug/sfWebDebugPanelMemory.class.php', - 'sfwebdebugpanelsymfonyversion' => 'debug/sfWebDebugPanelSymfonyVersion.class.php', - 'sfwebdebugpaneltimer' => 'debug/sfWebDebugPanelTimer.class.php', - 'sfwebdebugpanelview' => 'debug/sfWebDebugPanelView.class.php', - 'sfoutputescaper' => 'escaper/sfOutputEscaper.class.php', - 'sfoutputescaperarraydecorator' => 'escaper/sfOutputEscaperArrayDecorator.class.php', - 'sfoutputescapergetterdecorator' => 'escaper/sfOutputEscaperGetterDecorator.class.php', - 'sfoutputescaperiteratordecorator' => 'escaper/sfOutputEscaperIteratorDecorator.class.php', - 'sfoutputescaperobjectdecorator' => 'escaper/sfOutputEscaperObjectDecorator.class.php', - 'sfoutputescapersafe' => 'escaper/sfOutputEscaperSafe.class.php', - 'sfevent' => 'event/sfEvent.class.php', - 'sfeventdispatcher' => 'event/sfEventDispatcher.class.php', - 'sfcacheexception' => 'exception/sfCacheException.class.php', - 'sfconfigurationexception' => 'exception/sfConfigurationException.class.php', - 'sfcontrollerexception' => 'exception/sfControllerException.class.php', - 'sfdatabaseexception' => 'exception/sfDatabaseException.class.php', - 'sferror404exception' => 'exception/sfError404Exception.class.php', - 'sfexception' => 'exception/sfException.class.php', - 'sffactoryexception' => 'exception/sfFactoryException.class.php', - 'sffileexception' => 'exception/sfFileException.class.php', - 'sffilterexception' => 'exception/sfFilterException.class.php', - 'sfforwardexception' => 'exception/sfForwardException.class.php', - 'sfinitializationexception' => 'exception/sfInitializationException.class.php', - 'sfparseexception' => 'exception/sfParseException.class.php', - 'sfrenderexception' => 'exception/sfRenderException.class.php', - 'sfsecurityexception' => 'exception/sfSecurityException.class.php', - 'sfstopexception' => 'exception/sfStopException.class.php', - 'sfstorageexception' => 'exception/sfStorageException.class.php', - 'sfviewexception' => 'exception/sfViewException.class.php', - 'sfbasicsecurityfilter' => 'filter/sfBasicSecurityFilter.class.php', - 'sfcachefilter' => 'filter/sfCacheFilter.class.php', - 'sfcommonfilter' => 'filter/sfCommonFilter.class.php', - 'sfexecutionfilter' => 'filter/sfExecutionFilter.class.php', - 'sffilter' => 'filter/sfFilter.class.php', - 'sffilterchain' => 'filter/sfFilterChain.class.php', - 'sfrenderingfilter' => 'filter/sfRenderingFilter.class.php', - 'sfformfilter' => 'form/addon/sfFormFilter.class.php', - 'sfformobject' => 'form/addon/sfFormObject.class.php', - 'sfformsymfony' => 'form/addon/sfFormSymfony.class.php', - 'sfform' => 'form/sfForm.class.php', - 'sfformfield' => 'form/sfFormField.class.php', - 'sfformfieldschema' => 'form/sfFormFieldSchema.class.php', - 'sfgenerator' => 'generator/sfGenerator.class.php', - 'sfgeneratormanager' => 'generator/sfGeneratorManager.class.php', - 'sfmodelgenerator' => 'generator/sfModelGenerator.class.php', - 'sfmodelgeneratorconfiguration' => 'generator/sfModelGeneratorConfiguration.class.php', - 'sfmodelgeneratorconfigurationfield' => 'generator/sfModelGeneratorConfigurationField.class.php', - 'sfmodelgeneratorhelper' => 'generator/sfModelGeneratorHelper.class.php', - 'tgettext' => 'i18n/Gettext/TGettext.class.php', - 'sfi18napplicationextract' => 'i18n/extract/sfI18nApplicationExtract.class.php', - 'sfi18nextract' => 'i18n/extract/sfI18nExtract.class.php', - 'sfi18nextractorinterface' => 'i18n/extract/sfI18nExtractorInterface.class.php', - 'sfi18nmoduleextract' => 'i18n/extract/sfI18nModuleExtract.class.php', - 'sfi18nphpextractor' => 'i18n/extract/sfI18nPhpExtractor.class.php', - 'sfi18nyamlextractor' => 'i18n/extract/sfI18nYamlExtractor.class.php', - 'sfi18nyamlgeneratorextractor' => 'i18n/extract/sfI18nYamlGeneratorExtractor.class.php', - 'sfi18nyamlvalidateextractor' => 'i18n/extract/sfI18nYamlValidateExtractor.class.php', - 'sfchoiceformat' => 'i18n/sfChoiceFormat.class.php', - 'sfcultureinfo' => 'i18n/sfCultureInfo.class.php', - 'sfdateformat' => 'i18n/sfDateFormat.class.php', - 'sfdatetimeformatinfo' => 'i18n/sfDateTimeFormatInfo.class.php', - 'sfi18n' => 'i18n/sfI18N.class.php', - 'sfimessagesource' => 'i18n/sfIMessageSource.class.php', - 'sfmessageformat' => 'i18n/sfMessageFormat.class.php', - 'sfmessagesource' => 'i18n/sfMessageSource.class.php', - 'sfmessagesource_aggregate' => 'i18n/sfMessageSource_Aggregate.class.php', - 'sfmessagesource_database' => 'i18n/sfMessageSource_Database.class.php', - 'sfmessagesource_file' => 'i18n/sfMessageSource_File.class.php', - 'sfmessagesource_mysql' => 'i18n/sfMessageSource_MySQL.class.php', - 'sfmessagesource_sqlite' => 'i18n/sfMessageSource_SQLite.class.php', - 'sfmessagesource_sqlite3' => 'i18n/sfMessageSource_SQLite3.class.php', - 'sfmessagesource_xliff' => 'i18n/sfMessageSource_XLIFF.class.php', - 'sfmessagesource_gettext' => 'i18n/sfMessageSource_gettext.class.php', - 'sfnumberformat' => 'i18n/sfNumberFormat.class.php', - 'sfnumberformatinfo' => 'i18n/sfNumberFormatInfo.class.php', - 'sfaggregatelogger' => 'log/sfAggregateLogger.class.php', - 'sfconsolelogger' => 'log/sfConsoleLogger.class.php', - 'sfeventlogger' => 'log/sfEventLogger.class.php', - 'sffilelogger' => 'log/sfFileLogger.class.php', - 'sflogger' => 'log/sfLogger.class.php', - 'sfloggerinterface' => 'log/sfLoggerInterface.class.php', - 'sfloggerwrapper' => 'log/sfLoggerWrapper.class.php', - 'sfnologger' => 'log/sfNoLogger.class.php', - 'sfpsrloggeradapter' => 'log/sfPsrLoggerAdapter.class.php', - 'sfstreamlogger' => 'log/sfStreamLogger.class.php', - 'sfvarlogger' => 'log/sfVarLogger.class.php', - 'sfwebdebuglogger' => 'log/sfWebDebugLogger.class.php', - 'sfmailer' => 'mailer/sfMailer.class.php', - 'sfmailermessageloggerplugin' => 'mailer/sfMailerMessageLoggerPlugin.class.php', - 'sfnomailer' => 'mailer/sfNoMailer.class.php', - 'sfpearconfig' => 'plugin/sfPearConfig.class.php', - 'sfpeardownloader' => 'plugin/sfPearDownloader.class.php', - 'sfpearenvironment' => 'plugin/sfPearEnvironment.class.php', - 'sfpearfrontendplugin' => 'plugin/sfPearFrontendPlugin.class.php', - 'sfpearrest' => 'plugin/sfPearRest.class.php', - 'sfpearrest10' => 'plugin/sfPearRest10.class.php', - 'sfpearrest11' => 'plugin/sfPearRest11.class.php', - 'sfpearrestplugin' => 'plugin/sfPearRestPlugin.class.php', - 'sfplugindependencyexception' => 'plugin/sfPluginDependencyException.class.php', - 'sfpluginexception' => 'plugin/sfPluginException.class.php', - 'sfpluginmanager' => 'plugin/sfPluginManager.class.php', - 'sfpluginrecursivedependencyexception' => 'plugin/sfPluginRecursiveDependencyException.class.php', - 'sfpluginrestexception' => 'plugin/sfPluginRestException.class.php', - 'sfsymfonypluginmanager' => 'plugin/sfSymfonyPluginManager.class.php', - 'sfrequest' => 'request/sfRequest.class.php', - 'sfwebrequest' => 'request/sfWebRequest.class.php', - 'sfresponse' => 'response/sfResponse.class.php', - 'sfwebresponse' => 'response/sfWebResponse.class.php', - 'sfobjectroute' => 'routing/sfObjectRoute.class.php', - 'sfobjectroutecollection' => 'routing/sfObjectRouteCollection.class.php', - 'sfpatternrouting' => 'routing/sfPatternRouting.class.php', - 'sfrequestroute' => 'routing/sfRequestRoute.class.php', - 'sfroute' => 'routing/sfRoute.class.php', - 'sfroutecollection' => 'routing/sfRouteCollection.class.php', - 'sfrouting' => 'routing/sfRouting.class.php', - 'sfservicecontainer' => 'service/sfServiceContainer.class.php', - 'sfservicecontainerbuilder' => 'service/sfServiceContainerBuilder.class.php', - 'sfservicecontainerdumper' => 'service/sfServiceContainerDumper.class.php', - 'sfservicecontainerdumpergraphviz' => 'service/sfServiceContainerDumperGraphviz.class.php', - 'sfservicecontainerdumperinterface' => 'service/sfServiceContainerDumperInterface.class.php', - 'sfservicecontainerdumperphp' => 'service/sfServiceContainerDumperPhp.class.php', - 'sfservicecontainerinterface' => 'service/sfServiceContainerInterface.class.php', - 'sfservicecontainerloader' => 'service/sfServiceContainerLoader.class.php', - 'sfservicecontainerloaderarray' => 'service/sfServiceContainerLoaderArray.class.php', - 'sfservicecontainerloaderinterface' => 'service/sfServiceContainerLoaderInterface.class.php', - 'sfservicedefinition' => 'service/sfServiceDefinition.class.php', - 'sfserviceparameter' => 'service/sfServiceParameter.class.php', - 'sfservicereference' => 'service/sfServiceReference.class.php', - 'sfcachesessionstorage' => 'storage/sfCacheSessionStorage.class.php', - 'sfdatabasesessionstorage' => 'storage/sfDatabaseSessionStorage.class.php', - 'sfmysqlsessionstorage' => 'storage/sfMySQLSessionStorage.class.php', - 'sfmysqlisessionstorage' => 'storage/sfMySQLiSessionStorage.class.php', - 'sfnostorage' => 'storage/sfNoStorage.class.php', - 'sfpdosessionstorage' => 'storage/sfPDOSessionStorage.class.php', - 'sfpostgresqlsessionstorage' => 'storage/sfPostgreSQLSessionStorage.class.php', - 'sfsessionstorage' => 'storage/sfSessionStorage.class.php', - 'sfsessionteststorage' => 'storage/sfSessionTestStorage.class.php', - 'sfstorage' => 'storage/sfStorage.class.php', - 'sfapproutestask' => 'task/app/sfAppRoutesTask.class.php', - 'sfcachecleartask' => 'task/cache/sfCacheClearTask.class.php', - 'sfconfigureauthortask' => 'task/configure/sfConfigureAuthorTask.class.php', - 'sfgenerateapptask' => 'task/generator/sfGenerateAppTask.class.php', - 'sfgeneratemoduletask' => 'task/generator/sfGenerateModuleTask.class.php', - 'sfgenerateprojecttask' => 'task/generator/sfGenerateProjectTask.class.php', - 'sfgeneratetasktask' => 'task/generator/sfGenerateTaskTask.class.php', - 'sfgeneratorbasetask' => 'task/generator/sfGeneratorBaseTask.class.php', - 'sfhelptask' => 'task/help/sfHelpTask.class.php', - 'sflisttask' => 'task/help/sfListTask.class.php', - 'sfi18nextracttask' => 'task/i18n/sfI18nExtractTask.class.php', - 'sfi18nfindtask' => 'task/i18n/sfI18nFindTask.class.php', - 'sflogcleartask' => 'task/log/sfLogClearTask.class.php', - 'sflogrotatetask' => 'task/log/sfLogRotateTask.class.php', - 'sfpluginaddchanneltask' => 'task/plugin/sfPluginAddChannelTask.class.php', - 'sfpluginbasetask' => 'task/plugin/sfPluginBaseTask.class.php', - 'sfplugininstalltask' => 'task/plugin/sfPluginInstallTask.class.php', - 'sfpluginlisttask' => 'task/plugin/sfPluginListTask.class.php', - 'sfpluginpublishassetstask' => 'task/plugin/sfPluginPublishAssetsTask.class.php', - 'sfpluginuninstalltask' => 'task/plugin/sfPluginUninstallTask.class.php', - 'sfpluginupgradetask' => 'task/plugin/sfPluginUpgradeTask.class.php', - 'sfprojectclearcontrollerstask' => 'task/project/sfProjectClearControllersTask.class.php', - 'sfprojectdeploytask' => 'task/project/sfProjectDeployTask.class.php', - 'sfprojectdisabletask' => 'task/project/sfProjectDisableTask.class.php', - 'sfprojectenabletask' => 'task/project/sfProjectEnableTask.class.php', - 'sfprojectoptimizetask' => 'task/project/sfProjectOptimizeTask.class.php', - 'sfprojectpermissionstask' => 'task/project/sfProjectPermissionsTask.class.php', - 'sfprojectsendemailstask' => 'task/project/sfProjectSendEmailsTask.class.php', - 'sfdeprecatedclassesvalidation' => 'task/project/validation/sfDeprecatedClassesValidation.class.php', - 'sfdeprecatedconfigurationfilesvalidation' => 'task/project/validation/sfDeprecatedConfigurationFilesValidation.class.php', - 'sfdeprecatedhelpersvalidation' => 'task/project/validation/sfDeprecatedHelpersValidation.class.php', - 'sfdeprecatedmethodsvalidation' => 'task/project/validation/sfDeprecatedMethodsValidation.class.php', - 'sfdeprecatedpluginsvalidation' => 'task/project/validation/sfDeprecatedPluginsValidation.class.php', - 'sfdeprecatedsettingsvalidation' => 'task/project/validation/sfDeprecatedSettingsValidation.class.php', - 'sfparameterholdervalidation' => 'task/project/validation/sfParameterHolderValidation.class.php', - 'sfvalidation' => 'task/project/validation/sfValidation.class.php', - 'sfbasetask' => 'task/sfBaseTask.class.php', - 'sfcommandapplicationtask' => 'task/sfCommandApplicationTask.class.php', - 'sffilesystem' => 'task/sfFilesystem.class.php', - 'sftask' => 'task/sfTask.class.php', - 'lime_symfony' => 'task/symfony/lime_symfony.php', - 'sfsymfonytesttask' => 'task/symfony/sfSymfonyTestTask.class.php', - 'sflimeharness' => 'task/test/sfLimeHarness.class.php', - 'sftestalltask' => 'task/test/sfTestAllTask.class.php', - 'sftestbasetask' => 'task/test/sfTestBaseTask.class.php', - 'sftestcoveragetask' => 'task/test/sfTestCoverageTask.class.php', - 'sftestfunctionaltask' => 'task/test/sfTestFunctionalTask.class.php', - 'sftestplugintask' => 'task/test/sfTestPluginTask.class.php', - 'sftestunittask' => 'task/test/sfTestUnitTask.class.php', - 'sftestbrowser' => 'test/sfTestBrowser.class.php', - 'sftestfunctional' => 'test/sfTestFunctional.class.php', - 'sftestfunctionalbase' => 'test/sfTestFunctionalBase.class.php', - 'sftester' => 'test/sfTester.class.php', - 'sftesterform' => 'test/sfTesterForm.class.php', - 'sftestermailer' => 'test/sfTesterMailer.class.php', - 'sftesterrequest' => 'test/sfTesterRequest.class.php', - 'sftesterresponse' => 'test/sfTesterResponse.class.php', - 'sftesteruser' => 'test/sfTesterUser.class.php', - 'sftesterviewcache' => 'test/sfTesterViewCache.class.php', - 'sfbasicsecurityuser' => 'user/sfBasicSecurityUser.class.php', - 'sfsecurityuser' => 'user/sfSecurityUser.class.php', - 'sfuser' => 'user/sfUser.class.php', - 'sfbrowser' => 'util/sfBrowser.class.php', - 'sfbrowserbase' => 'util/sfBrowserBase.class.php', - 'sfcallable' => 'util/sfCallable.class.php', - 'sfclassmanipulator' => 'util/sfClassManipulator.class.php', - 'sfcontext' => 'util/sfContext.class.php', - 'sfdomcssselector' => 'util/sfDomCssSelector.class.php', - 'sffinder' => 'util/sfFinder.class.php', - 'sfinflector' => 'util/sfInflector.class.php', - 'sfnamespacedparameterholder' => 'util/sfNamespacedParameterHolder.class.php', - 'sfparameterholder' => 'util/sfParameterHolder.class.php', - 'sftoolkit' => 'util/sfToolkit.class.php', - 'sfvalidatori18nchoicecountry' => 'validator/i18n/sfValidatorI18nChoiceCountry.class.php', - 'sfvalidatori18nchoicelanguage' => 'validator/i18n/sfValidatorI18nChoiceLanguage.class.php', - 'sfvalidatori18nchoicetimezone' => 'validator/i18n/sfValidatorI18nChoiceTimezone.class.php', - 'sfvalidatedfile' => 'validator/sfValidatedFile.class.php', - 'sfvalidatorand' => 'validator/sfValidatorAnd.class.php', - 'sfvalidatorbase' => 'validator/sfValidatorBase.class.php', - 'sfvalidatorboolean' => 'validator/sfValidatorBoolean.class.php', - 'sfvalidatorcsrftoken' => 'validator/sfValidatorCSRFToken.class.php', - 'sfvalidatorcallback' => 'validator/sfValidatorCallback.class.php', - 'sfvalidatorchoice' => 'validator/sfValidatorChoice.class.php', - 'sfvalidatordate' => 'validator/sfValidatorDate.class.php', - 'sfvalidatordaterange' => 'validator/sfValidatorDateRange.class.php', - 'sfvalidatordatetime' => 'validator/sfValidatorDateTime.class.php', - 'sfvalidatordecorator' => 'validator/sfValidatorDecorator.class.php', - 'sfvalidatoremail' => 'validator/sfValidatorEmail.class.php', - 'sfvalidatorequal' => 'validator/sfValidatorEqual.class.php', - 'sfvalidatorerror' => 'validator/sfValidatorError.class.php', - 'sfvalidatorerrorschema' => 'validator/sfValidatorErrorSchema.class.php', - 'sfvalidatorfile' => 'validator/sfValidatorFile.class.php', - 'sfvalidatorfilemulti' => 'validator/sfValidatorFileMulti.class.php', - 'sfvalidatorfromdescription' => 'validator/sfValidatorFromDescription.class.php', - 'sfvalidatorinteger' => 'validator/sfValidatorInteger.class.php', - 'sfvalidatorip' => 'validator/sfValidatorIp.class.php', - 'sfvalidatornumber' => 'validator/sfValidatorNumber.class.php', - 'sfvalidatoror' => 'validator/sfValidatorOr.class.php', - 'sfvalidatorpass' => 'validator/sfValidatorPass.class.php', - 'sfvalidatorregex' => 'validator/sfValidatorRegex.class.php', - 'sfvalidatorschema' => 'validator/sfValidatorSchema.class.php', - 'sfvalidatorschemacompare' => 'validator/sfValidatorSchemaCompare.class.php', - 'sfvalidatorschemafilter' => 'validator/sfValidatorSchemaFilter.class.php', - 'sfvalidatorstring' => 'validator/sfValidatorString.class.php', - 'sfvalidatortime' => 'validator/sfValidatorTime.class.php', - 'sfvalidatorurl' => 'validator/sfValidatorUrl.class.php', - 'sfphpview' => 'view/sfPHPView.class.php', - 'sfpartialview' => 'view/sfPartialView.class.php', - 'sfview' => 'view/sfView.class.php', - 'sfviewcachemanager' => 'view/sfViewCacheManager.class.php', - 'sfviewparameterholder' => 'view/sfViewParameterHolder.class.php', - 'sfwidgetformi18nchoicecountry' => 'widget/i18n/sfWidgetFormI18nChoiceCountry.class.php', - 'sfwidgetformi18nchoicecurrency' => 'widget/i18n/sfWidgetFormI18nChoiceCurrency.class.php', - 'sfwidgetformi18nchoicelanguage' => 'widget/i18n/sfWidgetFormI18nChoiceLanguage.class.php', - 'sfwidgetformi18nchoicetimezone' => 'widget/i18n/sfWidgetFormI18nChoiceTimezone.class.php', - 'sfwidgetformi18ndate' => 'widget/i18n/sfWidgetFormI18nDate.class.php', - 'sfwidgetformi18ndatetime' => 'widget/i18n/sfWidgetFormI18nDateTime.class.php', - 'sfwidgetformi18ntime' => 'widget/i18n/sfWidgetFormI18nTime.class.php', - 'sfwidget' => 'widget/sfWidget.class.php', - 'sfwidgetform' => 'widget/sfWidgetForm.class.php', - 'sfwidgetformchoice' => 'widget/sfWidgetFormChoice.class.php', - 'sfwidgetformchoicebase' => 'widget/sfWidgetFormChoiceBase.class.php', - 'sfwidgetformdate' => 'widget/sfWidgetFormDate.class.php', - 'sfwidgetformdaterange' => 'widget/sfWidgetFormDateRange.class.php', - 'sfwidgetformdatetime' => 'widget/sfWidgetFormDateTime.class.php', - 'sfwidgetformfilterdate' => 'widget/sfWidgetFormFilterDate.class.php', - 'sfwidgetformfilterinput' => 'widget/sfWidgetFormFilterInput.class.php', - 'sfwidgetforminput' => 'widget/sfWidgetFormInput.class.php', - 'sfwidgetforminputcheckbox' => 'widget/sfWidgetFormInputCheckbox.class.php', - 'sfwidgetforminputfile' => 'widget/sfWidgetFormInputFile.class.php', - 'sfwidgetforminputfilemulti' => 'widget/sfWidgetFormInputFileMulti.class.php', - 'sfwidgetforminputfileeditable' => 'widget/sfWidgetFormInputFileEditable.class.php', - 'sfwidgetforminputhidden' => 'widget/sfWidgetFormInputHidden.class.php', - 'sfwidgetforminputpassword' => 'widget/sfWidgetFormInputPassword.class.php', - 'sfwidgetforminputread' => 'widget/sfWidgetFormInputRead.class.php', - 'sfwidgetforminputtext' => 'widget/sfWidgetFormInputText.class.php', - 'sfwidgetformschema' => 'widget/sfWidgetFormSchema.class.php', - 'sfwidgetformschemadecorator' => 'widget/sfWidgetFormSchemaDecorator.class.php', - 'sfwidgetformschemaformatter' => 'widget/sfWidgetFormSchemaFormatter.class.php', - 'sfwidgetformschemaformatterlist' => 'widget/sfWidgetFormSchemaFormatterList.class.php', - 'sfwidgetformschemaformattertable' => 'widget/sfWidgetFormSchemaFormatterTable.class.php', - 'sfwidgetformselect' => 'widget/sfWidgetFormSelect.class.php', - 'sfwidgetformselectcheckbox' => 'widget/sfWidgetFormSelectCheckbox.class.php', - 'sfwidgetformselectmany' => 'widget/sfWidgetFormSelectMany.class.php', - 'sfwidgetformselectradio' => 'widget/sfWidgetFormSelectRadio.class.php', - 'sfwidgetformtextarea' => 'widget/sfWidgetFormTextarea.class.php', - 'sfwidgetformtime' => 'widget/sfWidgetFormTime.class.php', - 'sfyaml' => 'yaml/sfYaml.class.php', - 'sfyamldumper' => 'yaml/sfYamlDumper.class.php', - 'sfyamlinline' => 'yaml/sfYamlInline.class.php', - 'sfyamlparser' => 'yaml/sfYamlParser.class.php', ]; protected function __construct() @@ -397,9 +31,7 @@ protected function __construct() } /** - * Retrieves the singleton instance of this class. - * - * @return sfCoreAutoload a sfCoreAutoload implementation instance + * @deprecated */ public static function getInstance() { @@ -411,12 +43,12 @@ public static function getInstance() } /** - * Register sfCoreAutoload in spl autoloader. - * - * @throws sfException If unable to register SPL autoload function + * @deprecated */ public static function register() { + self::$registered = true; + if (self::$registered) { return; } @@ -430,20 +62,16 @@ public static function register() } /** - * Unregister sfCoreAutoload from spl autoloader. + * @deprecated */ public static function unregister() { - spl_autoload_unregister([self::getInstance(), 'autoload']); + // spl_autoload_unregister([self::getInstance(), 'autoload']); self::$registered = false; } /** - * Handles autoloading of classes. - * - * @param string $class a class name - * - * @return bool Returns true if the class has been loaded + * @deprecated */ public function autoload($class) { @@ -457,11 +85,7 @@ public function autoload($class) } /** - * Returns the filename of the supplied class. - * - * @param string $class The class name (case insensitive) - * - * @return string|null An absolute path or null + * @deprecated */ public function getClassPath($class) { @@ -475,9 +99,7 @@ public function getClassPath($class) } /** - * Returns the base directory this autoloader is working on. - * - * @return string The path to the symfony core lib directory + * @deprecated */ public function getBaseDir() { @@ -485,9 +107,7 @@ public function getBaseDir() } /** - * Rebuilds the association array between class names and paths. - * - * This method overrides this file (__FILE__) + * @deprecated */ public static function make() { diff --git a/lib/autoload/sfSimpleAutoload.class.php b/lib/autoload/sfSimpleAutoload.class.php index 85674e7a0..4d0d63b9c 100755 --- a/lib/autoload/sfSimpleAutoload.class.php +++ b/lib/autoload/sfSimpleAutoload.class.php @@ -9,12 +9,7 @@ */ /** - * sfSimpleAutoload class. - * - * This class is a singleton as PHP seems to be unable to register 2 autoloaders that are instances - * of the same class (why?). - * - * @author Fabien Potencier + * @deprecated */ class sfSimpleAutoload { @@ -39,11 +34,9 @@ protected function __construct($cacheFile = null) } /** - * Retrieves the singleton instance of this class. + * @deprecated * - * @param string $cacheFile The file path to save the cache - * - * @return sfSimpleAutoload a sfSimpleAutoload implementation instance + * @param mixed|null $cacheFile */ public static function getInstance($cacheFile = null) { @@ -55,9 +48,7 @@ public static function getInstance($cacheFile = null) } /** - * Register sfSimpleAutoload in spl autoloader. - * - * @throws sfException + * @deprecated */ public static function register() { @@ -78,7 +69,7 @@ public static function register() } /** - * Unregister sfSimpleAutoload from spl autoloader. + * @deprecated */ public static function unregister() { @@ -87,11 +78,7 @@ public static function unregister() } /** - * Handles autoloading of classes. - * - * @param string $class a class name - * - * @return bool Returns true if the class has been loaded + * @deprecated */ public function autoload($class) { @@ -119,7 +106,7 @@ public function autoload($class) } /** - * Loads the cache. + * @deprecated */ public function loadCache() { @@ -134,7 +121,7 @@ public function loadCache() } /** - * Saves the cache. + * @deprecated */ public function saveCache() { @@ -148,7 +135,7 @@ public function saveCache() } /** - * Reloads cache. + * @deprecated */ public function reload() { @@ -172,7 +159,7 @@ public function reload() } /** - * Removes the cache. + * @deprecated */ public function removeCache() { @@ -180,10 +167,7 @@ public function removeCache() } /** - * Adds a directory to the autoloading system if not yet present and give it the highest possible precedence. - * - * @param string $dir The directory to look for classes - * @param string $ext The extension to look for + * @deprecated */ public function addDirectory($dir, $ext = '.php') { @@ -209,10 +193,7 @@ public function addDirectory($dir, $ext = '.php') } /** - * Adds files to the autoloading system. - * - * @param array $files An array of files - * @param bool $register Whether to register those files as single entities (used when reloading) + * @deprecated */ public function addFiles(array $files, $register = true) { @@ -222,10 +203,7 @@ public function addFiles(array $files, $register = true) } /** - * Adds a file to the autoloading system. - * - * @param string $file A file path - * @param bool $register Whether to register those files as single entities (used when reloading) + * @deprecated */ public function addFile($file, $register = true) { @@ -254,10 +232,7 @@ public function addFile($file, $register = true) } /** - * Sets the path for a particular class. - * - * @param string $class A PHP class name - * @param string $path An absolute path + * @deprecated */ public function setClassPath($class, $path) { @@ -269,11 +244,7 @@ public function setClassPath($class, $path) } /** - * Returns the path where a particular class can be found. - * - * @param string $class A PHP class name - * - * @return string|null An absolute path + * @deprecated */ public function getClassPath($class) { @@ -283,11 +254,7 @@ public function getClassPath($class) } /** - * Loads configuration from the supplied files. - * - * @param array $files An array of autoload.yml files - * - * @see sfAutoloadConfigHandler + * @deprecated */ public function loadConfiguration(array $files) { diff --git a/lib/command/cli.php b/lib/command/cli.php index e5f6904e9..c68d64868 100644 --- a/lib/command/cli.php +++ b/lib/command/cli.php @@ -8,17 +8,16 @@ * file that was distributed with this source code. */ -// Try autoloading using composer if available. -if (!file_exists($autoload = __DIR__.'/../../../../autoload.php')) { - $autoload = __DIR__.'/../../autoload.php'; -} +$composerAutoloadLocations = [ + __DIR__.'/../../../../autoload.php', + __DIR__.'/../../vendor/autoload.php', +]; -// Fall back to classic Symfony loading -if (!file_exists($autoload)) { - require_once __DIR__.'/../autoload/sfCoreAutoload.class.php'; - sfCoreAutoload::register(); -} else { - require_once $autoload; +// Try autoloading using composer if available. +foreach ($composerAutoloadLocations as $composerAutoloadLocation) { + if (file_exists($composerAutoloadLocation) && is_readable($composerAutoloadLocation)) { + require_once $composerAutoloadLocation; + } } try { diff --git a/lib/command/sfSymfonyCommandApplication.class.php b/lib/command/sfSymfonyCommandApplication.class.php index bec81a576..34422c8a8 100644 --- a/lib/command/sfSymfonyCommandApplication.class.php +++ b/lib/command/sfSymfonyCommandApplication.class.php @@ -36,7 +36,7 @@ public function configure() // application $this->setName('symfony'); - $this->setVersion(SYMFONY_VERSION); + $this->setVersion(sfProjectConfiguration::SYMFONY_VERSION); $this->loadTasks($configuration); } diff --git a/lib/config/sfProjectConfiguration.class.php b/lib/config/sfProjectConfiguration.class.php index 68f006e20..baa4e3580 100644 --- a/lib/config/sfProjectConfiguration.class.php +++ b/lib/config/sfProjectConfiguration.class.php @@ -15,6 +15,8 @@ */ class sfProjectConfiguration { + public const SYMFONY_VERSION = '1.5.20-dev'; + /** @var string */ protected $rootDir; diff --git a/lib/debug/sfDebug.class.php b/lib/debug/sfDebug.class.php index e671fe03a..100bd528b 100644 --- a/lib/debug/sfDebug.class.php +++ b/lib/debug/sfDebug.class.php @@ -23,7 +23,7 @@ class sfDebug public static function symfonyInfoAsArray() { return [ - 'version' => SYMFONY_VERSION, + 'version' => sfProjectConfiguration::SYMFONY_VERSION, 'path' => sfConfig::get('sf_symfony_lib_dir'), ]; } diff --git a/lib/debug/sfWebDebugPanelSymfonyVersion.class.php b/lib/debug/sfWebDebugPanelSymfonyVersion.class.php index 872453c52..416a47f83 100644 --- a/lib/debug/sfWebDebugPanelSymfonyVersion.class.php +++ b/lib/debug/sfWebDebugPanelSymfonyVersion.class.php @@ -17,7 +17,7 @@ class sfWebDebugPanelSymfonyVersion extends sfWebDebugPanel { public function getTitle() { - return ''.SYMFONY_VERSION.''; + return ''.sfProjectConfiguration::SYMFONY_VERSION.''; } public function getPanelTitle() diff --git a/lib/exception/data/exception.html.php b/lib/exception/data/exception.html.php index 8e47ef618..f40b71d15 100644 --- a/lib/exception/data/exception.html.php +++ b/lib/exception/data/exception.html.php @@ -56,7 +56,7 @@ function toggle(id) diff --git a/lib/exception/data/exception.txt.php b/lib/exception/data/exception.txt.php index 2e5bea7f0..66d5ca600 100644 --- a/lib/exception/data/exception.txt.php +++ b/lib/exception/data/exception.txt.php @@ -7,5 +7,5 @@ -[symfony] v. (symfony-project.org) +[symfony] v. (symfony-project.org) [PHP] v. diff --git a/lib/plugin/sfPearRest.class.php b/lib/plugin/sfPearRest.class.php index 5b918b617..546b08dbb 100644 --- a/lib/plugin/sfPearRest.class.php +++ b/lib/plugin/sfPearRest.class.php @@ -24,6 +24,6 @@ class sfPearRest extends PEAR_REST */ public function downloadHttp($url, $lastmodified = null, $accept = false, $channel = false) { - return parent::downloadHttp($url, $lastmodified, array_merge(false !== $accept ? $accept : [], ["\r\nX-SYMFONY-VERSION: ".SYMFONY_VERSION])); + return parent::downloadHttp($url, $lastmodified, array_merge(false !== $accept ? $accept : [], ["\r\nX-SYMFONY-VERSION: ".sfProjectConfiguration::SYMFONY_VERSION])); } } diff --git a/lib/plugin/sfSymfonyPluginManager.class.php b/lib/plugin/sfSymfonyPluginManager.class.php index 514ca471a..f36c586c5 100644 --- a/lib/plugin/sfSymfonyPluginManager.class.php +++ b/lib/plugin/sfSymfonyPluginManager.class.php @@ -174,10 +174,10 @@ protected function registerSymfonyPackage() $symfony->setChannel('pear.symfony-project.com'); $symfony->setConfig($this->environment->getConfig()); $symfony->setPackageType('php'); - $symfony->setAPIVersion(preg_replace('/\d+(\-\w+)?$/', '0', SYMFONY_VERSION)); - $symfony->setAPIStability(false === strpos(SYMFONY_VERSION, 'DEV') ? 'stable' : 'beta'); - $symfony->setReleaseVersion(preg_replace('/\-\w+$/', '', SYMFONY_VERSION)); - $symfony->setReleaseStability(false === strpos(SYMFONY_VERSION, 'DEV') ? 'stable' : 'beta'); + $symfony->setAPIVersion(preg_replace('/\d+(\-\w+)?$/', '0', sfProjectConfiguration::SYMFONY_VERSION)); + $symfony->setAPIStability(false === strpos(sfProjectConfiguration::SYMFONY_VERSION, 'DEV') ? 'stable' : 'beta'); + $symfony->setReleaseVersion(preg_replace('/\-\w+$/', '', sfProjectConfiguration::SYMFONY_VERSION)); + $symfony->setReleaseStability(false === strpos(sfProjectConfiguration::SYMFONY_VERSION, 'DEV') ? 'stable' : 'beta'); $symfony->setDate(date('Y-m-d')); $symfony->setDescription('symfony'); $symfony->setSummary('symfony'); 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 @@ diff --git a/test/bin/coverage.php b/test/bin/coverage.php index 409634821..23b6c721f 100644 --- a/test/bin/coverage.php +++ b/test/bin/coverage.php @@ -16,10 +16,6 @@ $verbose = true; } -require_once __DIR__.'/../../lib/vendor/lime/lime.php'; - -require_once __DIR__.'/../../lib/util/sfFinder.class.php'; - $h = new lime_harness(); $h->base_dir = realpath(__DIR__.'/..'); diff --git a/test/bin/loc.php b/test/bin/loc.php index 29dbe7d03..bf3912e78 100755 --- a/test/bin/loc.php +++ b/test/bin/loc.php @@ -2,11 +2,6 @@ $root_dir = realpath(__DIR__.'/../..'); -require_once $root_dir.'/lib/vendor/lime/lime.php'; - -require_once $root_dir.'/lib/util/sfFinder.class.php'; - -require_once $root_dir.'/lib/autoload/sfCoreAutoload.class.php'; $version = SYMFONY_VERSION; printf("symfony LOC (%s)\n", $version); diff --git a/test/bootstrap/functional.php b/test/bootstrap/functional.php index e7fab1c93..f7fef9a12 100644 --- a/test/bootstrap/functional.php +++ b/test/bootstrap/functional.php @@ -8,6 +8,8 @@ * file that was distributed with this source code. */ +require_once __DIR__.'/../../vendor/autoload.php'; + // setup expected test environment (per check_configuration.php) ini_set('magic_quotes_runtime', 'off'); ini_set('session.auto_start', 'off'); diff --git a/test/bootstrap/unit.php b/test/bootstrap/unit.php index fdd036aa5..5ed194d8a 100644 --- a/test/bootstrap/unit.php +++ b/test/bootstrap/unit.php @@ -8,6 +8,8 @@ * file that was distributed with this source code. */ +require_once __DIR__.'/../../vendor/autoload.php'; + // setup expected test environment (per check_configuration.php) ini_set('magic_quotes_runtime', 'off'); ini_set('session.auto_start', 'off'); @@ -16,15 +18,10 @@ $_test_dir = realpath(__DIR__.'/..'); -require_once $_test_dir.'/../lib/vendor/lime/lime.php'; - -require_once $_test_dir.'/../lib/config/sfConfig.class.php'; sfConfig::set('sf_symfony_lib_dir', realpath($_test_dir.'/../lib')); -require_once __DIR__.'/../../lib/autoload/sfCoreAutoload.class.php'; sfCoreAutoload::register(); -require_once __DIR__.'/../../lib/util/sfToolkit.class.php'; sfConfig::set('sf_test_cache_dir', sys_get_temp_dir().'/sf_test_project'); // remove all test cache diff --git a/test/other/tasksTest.php b/test/other/tasksTest.php index 22c88a4a0..2ffc3cf95 100644 --- a/test/other/tasksTest.php +++ b/test/other/tasksTest.php @@ -2,10 +2,6 @@ $_test_dir = realpath(__DIR__.'/..'); -require_once $_test_dir.'/../lib/vendor/lime/lime.php'; - -require_once $_test_dir.'/../lib/util/sfToolkit.class.php'; - define('DS', DIRECTORY_SEPARATOR); class sf_test_project @@ -61,7 +57,6 @@ public function get_fixture_content($file) protected function clearTmpDir() { - require_once __DIR__.'/../../lib/util/sfToolkit.class.php'; sfToolkit::clearDirectory($this->tmp_dir); } } diff --git a/test/unit/autoload/sfCoreAutoloadTest.php b/test/unit/autoload/sfCoreAutoloadTest.php deleted file mode 100644 index 4d86f6902..000000000 --- a/test/unit/autoload/sfCoreAutoloadTest.php +++ /dev/null @@ -1,16 +0,0 @@ - - * - * For the full copyright and license information, please component the LICENSE - * file that was distributed with this source code. - */ - -require_once __DIR__.'/../../bootstrap/unit.php'; - -$t = new lime_test(1); - -$autoload = sfCoreAutoload::getInstance(); -$t->is($autoload->getClassPath('sfaction'), $autoload->getBaseDir().'/action/sfAction.class.php', '"sfCoreAutoload" is case-insensitive'); diff --git a/test/unit/autoload/sfSimpleAutoloadTest.php b/test/unit/autoload/sfSimpleAutoloadTest.php deleted file mode 100644 index a6b02d32b..000000000 --- a/test/unit/autoload/sfSimpleAutoloadTest.php +++ /dev/null @@ -1,19 +0,0 @@ - - * - * For the full copyright and license information, please component the LICENSE - * file that was distributed with this source code. - */ - -require_once __DIR__.'/../../bootstrap/unit.php'; - -$t = new lime_test(1); - -$autoload = sfSimpleAutoload::getInstance(); -$autoload->addFile(__DIR__.'/../sfEventDispatcherTest.class.php'); -$autoload->register(); - -$t->is(class_exists('myeventdispatchertest'), true, '"sfSimpleAutoload" is case insensitive'); diff --git a/test/unit/escaper/sfOutputEscaperArrayDecoratorTest.php b/test/unit/escaper/sfOutputEscaperArrayDecoratorTest.php index f8cf1411d..043275431 100644 --- a/test/unit/escaper/sfOutputEscaperArrayDecoratorTest.php +++ b/test/unit/escaper/sfOutputEscaperArrayDecoratorTest.php @@ -8,22 +8,6 @@ * file that was distributed with this source code. */ -require_once __DIR__.'/../../../lib/vendor/lime/lime.php'; - -require_once __DIR__.'/../../../lib/escaper/sfOutputEscaper.class.php'; - -require_once __DIR__.'/../../../lib/escaper/sfOutputEscaperGetterDecorator.class.php'; - -require_once __DIR__.'/../../../lib/escaper/sfOutputEscaperArrayDecorator.class.php'; - -require_once __DIR__.'/../../../lib/escaper/sfOutputEscaperObjectDecorator.class.php'; - -require_once __DIR__.'/../../../lib/escaper/sfOutputEscaperIteratorDecorator.class.php'; - -require_once __DIR__.'/../../../lib/helper/EscapingHelper.php'; - -require_once __DIR__.'/../../../lib/config/sfConfig.class.php'; - class sfException extends Exception { } diff --git a/test/unit/escaper/sfOutputEscaperObjectDecoratorTest.php b/test/unit/escaper/sfOutputEscaperObjectDecoratorTest.php index aa84eab4b..8bcc5e8b8 100644 --- a/test/unit/escaper/sfOutputEscaperObjectDecoratorTest.php +++ b/test/unit/escaper/sfOutputEscaperObjectDecoratorTest.php @@ -8,22 +8,6 @@ * file that was distributed with this source code. */ -require_once __DIR__.'/../../../lib/vendor/lime/lime.php'; - -require_once __DIR__.'/../../../lib/escaper/sfOutputEscaper.class.php'; - -require_once __DIR__.'/../../../lib/escaper/sfOutputEscaperGetterDecorator.class.php'; - -require_once __DIR__.'/../../../lib/escaper/sfOutputEscaperArrayDecorator.class.php'; - -require_once __DIR__.'/../../../lib/escaper/sfOutputEscaperObjectDecorator.class.php'; - -require_once __DIR__.'/../../../lib/escaper/sfOutputEscaperIteratorDecorator.class.php'; - -require_once __DIR__.'/../../../lib/helper/EscapingHelper.php'; - -require_once __DIR__.'/../../../lib/config/sfConfig.class.php'; - class sfException extends Exception { } diff --git a/test/unit/escaper/sfOutputEscaperSafeTest.php b/test/unit/escaper/sfOutputEscaperSafeTest.php index 49f34b783..8fd32ce2f 100644 --- a/test/unit/escaper/sfOutputEscaperSafeTest.php +++ b/test/unit/escaper/sfOutputEscaperSafeTest.php @@ -8,12 +8,6 @@ * file that was distributed with this source code. */ -require_once __DIR__.'/../../../lib/vendor/lime/lime.php'; - -require_once __DIR__.'/../../../lib/helper/EscapingHelper.php'; - -require_once __DIR__.'/../../../lib/escaper/sfOutputEscaperSafe.class.php'; - $t = new lime_test(13); // ->getValue() diff --git a/test/unit/escaper/sfOutputEscaperTest.php b/test/unit/escaper/sfOutputEscaperTest.php index 74b8fbad7..2e5811077 100644 --- a/test/unit/escaper/sfOutputEscaperTest.php +++ b/test/unit/escaper/sfOutputEscaperTest.php @@ -8,24 +8,6 @@ * file that was distributed with this source code. */ -require_once __DIR__.'/../../../lib/vendor/lime/lime.php'; - -require_once __DIR__.'/../../../lib/escaper/sfOutputEscaper.class.php'; - -require_once __DIR__.'/../../../lib/escaper/sfOutputEscaperGetterDecorator.class.php'; - -require_once __DIR__.'/../../../lib/escaper/sfOutputEscaperArrayDecorator.class.php'; - -require_once __DIR__.'/../../../lib/escaper/sfOutputEscaperObjectDecorator.class.php'; - -require_once __DIR__.'/../../../lib/escaper/sfOutputEscaperIteratorDecorator.class.php'; - -require_once __DIR__.'/../../../lib/escaper/sfOutputEscaperSafe.class.php'; - -require_once __DIR__.'/../../../lib/helper/EscapingHelper.php'; - -require_once __DIR__.'/../../../lib/config/sfConfig.class.php'; - sfConfig::set('sf_charset', 'UTF-8'); $t = new lime_test(39); diff --git a/test/unit/storage/sfCacheSessionStorageTest.php b/test/unit/storage/sfCacheSessionStorageTest.php index 6d54a0c68..fbd359a64 100644 --- a/test/unit/storage/sfCacheSessionStorageTest.php +++ b/test/unit/storage/sfCacheSessionStorageTest.php @@ -16,8 +16,6 @@ $_test_dir = realpath(__DIR__.'/../../'); -require_once $_test_dir.'/../lib/vendor/lime/lime.php'; - sfConfig::set('sf_symfony_lib_dir', realpath($_test_dir.'/../lib')); // setup cache diff --git a/test/unit/storage/sfSessionStorageTest.php b/test/unit/storage/sfSessionStorageTest.php index 1a54e0091..78f854cb2 100644 --- a/test/unit/storage/sfSessionStorageTest.php +++ b/test/unit/storage/sfSessionStorageTest.php @@ -16,8 +16,6 @@ $_test_dir = realpath(__DIR__.'/../../'); -require_once $_test_dir.'/../lib/vendor/lime/lime.php'; - sfConfig::set('sf_symfony_lib_dir', realpath($_test_dir.'/../lib')); $t = new lime_test(8); diff --git a/test/unit/task/sfBaseTaskTest.php b/test/unit/task/sfBaseTaskTest.php index 4815adafa..1e2007a7f 100644 --- a/test/unit/task/sfBaseTaskTest.php +++ b/test/unit/task/sfBaseTaskTest.php @@ -10,8 +10,6 @@ include __DIR__.'/../../bootstrap/unit.php'; -require_once sfConfig::get('sf_symfony_lib_dir').'/vendor/lime/lime.php'; - class TestTask extends sfBaseTask { public function reloadAutoload()