diff --git a/core/CHANGELOG.txt b/core/CHANGELOG.txt index 19963ef..eadf5d4 100644 --- a/core/CHANGELOG.txt +++ b/core/CHANGELOG.txt @@ -3,7 +3,6 @@ Drupal 8.0, xxxx-xx-xx (development version) ---------------------- - Included the HTML5 Shiv library to support HTML5 elements in IE 8 and below. - Included the following Symfony2 components: - * ClassLoader - PSR-0-compatible autoload routines. * HttpFoundation - Abstraction objects for HTTP requests and responses. - Removed modules from core * The following modules have been removed from core, because contributed diff --git a/core/composer.json b/core/composer.json new file mode 100644 index 0000000..67c1ca7 --- /dev/null +++ b/core/composer.json @@ -0,0 +1,11 @@ +{ + "require": { + "symfony/http-foundation": "2.0.10" + }, + "autoload": { + "psr-0": { + "Drupal\\Core": "lib/", + "Drupal\\Component": "lib/" + } + } +} diff --git a/core/includes/bootstrap.inc b/core/includes/bootstrap.inc index 39bc55c..409b17c 100644 --- a/core/includes/bootstrap.inc +++ b/core/includes/bootstrap.inc @@ -2302,24 +2302,8 @@ function _drupal_bootstrap_configuration() { // Initialize the configuration, including variables from settings.php. drupal_settings_initialize(); - // Include and activate the class loader. - $loader = drupal_classloader(); - - // Register explicit vendor namespaces. - $loader->registerNamespaces(array( - // All Symfony-borrowed code lives in /core/vendor/Symfony. - 'Symfony' => DRUPAL_ROOT . '/core/vendor', - )); - // Register the Drupal namespace for classes in core as a fallback. - // This allows to register additional namespaces within the Drupal namespace - // (e.g., for modules) and avoids an additional file_exists() on the Drupal - // core namespace, since the class loader can already determine the best - // namespace match based on a string comparison. It further allows modules to - // register/overload namespaces in Drupal core. - $loader->registerNamespaceFallbacks(array( - // All Drupal-namespaced code in core lives in /core/lib/Drupal. - 'Drupal' => DRUPAL_ROOT . '/core/lib', - )); + // Initialize the class loader. + drupal_classloader(); } /** @@ -3052,41 +3036,34 @@ function drupal_get_complete_schema($rebuild = FALSE) { * Initializes and returns the class loader. * * The class loader is responsible for lazy-loading all PSR-0 compatible - * classes, interfaces, and traits (PHP 5.4 and later). Its only dependencies - * are DRUPAL_ROOT and variable_get(). Otherwise it may be called as early as - * possible. + * classes, interfaces, and traits (PHP 5.4 and later). Its only dependency is + * DRUPAL_ROOT, otherwise it may be called as early as possible. Calling this + * function will register Drupal\Core, Drupal\Components and Symfony's provided + * components, and return the instance of the ClassLoader that was used to + * register the namespaces. + * + * Example: + * @code + * // Register MyModule's PSR-0 class namespace. + * $loader = drupal_classloader(); + * $path = drupal_get_path('module', 'mymodule') . '/lib/'; + * $loader->add("Drupal\\MyModule", $path); + * $loader->register(); + * @endcode * - * @return Symfony\Component\ClassLoader\UniversalClassLoader - * A UniversalClassLoader class instance (or extension thereof). + * @return Composer\Autoload\ClassLoader + * A class instance, which allows registering namespaces to file system paths. */ function drupal_classloader() { - // Include the Symfony ClassLoader for loading PSR-0-compatible classes. - require_once DRUPAL_ROOT . '/core/vendor/Symfony/Component/ClassLoader/UniversalClassLoader.php'; - - // By default, use the UniversalClassLoader which is best for development, - // as it does not break when code is moved on the file system. However, as it - // is slow, allow to use the APC class loader in production. static $loader; if (!isset($loader)) { - // @todo Use a cleaner way than variable_get() to switch autoloaders. - switch (variable_get('autoloader_mode', 'default')) { - case 'apc': - if (function_exists('apc_store')) { - require_once DRUPAL_ROOT . '/core/vendor/Symfony/Component/ClassLoader/ApcUniversalClassLoader.php'; - $loader = new ApcUniversalClassLoader('drupal.' . $GLOBALS['drupal_hash_salt']); - break; - } - // Fall through to the default loader if APC was not loaded, so that the - // site does not fail completely. - case 'dev': - case 'default': - default: - $loader = new UniversalClassLoader(); - break; - } - $loader->register(); + // Drupal Core's classes are auto-loaded by autoload.php, and the class + // instance used to register the namespaces is returned. This file is + // auto-generated by Composer during the build process of composer.json. + $loader = require DRUPAL_ROOT . '/core/vendor/.composer/autoload.php'; } + return $loader; } diff --git a/core/vendor/.composer/ClassLoader.php b/core/vendor/.composer/ClassLoader.php new file mode 100644 index 0000000..d4f21bf --- /dev/null +++ b/core/vendor/.composer/ClassLoader.php @@ -0,0 +1,181 @@ + + * Jordi Boggiano + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Composer\Autoload; + +/** + * ClassLoader implements an PSR-0 class loader + * + * See https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md + * + * $loader = new ComposerClassLoader(); + * + * // register classes with namespaces + * $loader->add('Symfony\Component', __DIR__.'/component'); + * $loader->add('Symfony', __DIR__.'/framework'); + * + * // activate the autoloader + * $loader->register(); + * + * // to enable searching the include path (eg. for PEAR packages) + * $loader->setUseIncludePath(true); + * + * In this example, if you try to use a class in the Symfony\Component + * namespace or one of its children (Symfony\Component\Console for instance), + * the autoloader will first look for the class under the component/ + * directory, and it will then fallback to the framework/ directory if not + * found before giving up. + * + * This class is loosely based on the Symfony UniversalClassLoader. + * + * @author Fabien Potencier + * @author Jordi Boggiano + */ +class ClassLoader +{ + private $prefixes = array(); + private $fallbackDirs = array(); + private $useIncludePath = false; + + public function getPrefixes() + { + return $this->prefixes; + } + + public function getFallbackDirs() + { + return $this->fallbackDirs; + } + + /** + * Registers a set of classes + * + * @param string $prefix The classes prefix + * @param array|string $paths The location(s) of the classes + */ + public function add($prefix, $paths) + { + if (!$prefix) { + foreach ((array) $paths as $path) { + $this->fallbackDirs[] = $path; + } + return; + } + if (isset($this->prefixes[$prefix])) { + $this->prefixes[$prefix] = array_merge( + $this->prefixes[$prefix], + (array) $paths + ); + } else { + $this->prefixes[$prefix] = (array) $paths; + } + } + + /** + * Turns on searching the include for class files. + * + * @param Boolean $useIncludePath + */ + public function setUseIncludePath($useIncludePath) + { + $this->useIncludePath = $useIncludePath; + } + + /** + * Can be used to check if the autoloader uses the include path to check + * for classes. + * + * @return Boolean + */ + public function getUseIncludePath() + { + return $this->useIncludePath; + } + + /** + * Registers this instance as an autoloader. + * + * @param Boolean $prepend Whether to prepend the autoloader or not + */ + public function register($prepend = false) + { + spl_autoload_register(array($this, 'loadClass'), true, $prepend); + } + + /** + * Unregisters this instance as an autoloader. + */ + public function unregister() + { + spl_autoload_unregister(array($this, 'loadClass')); + } + + /** + * Loads the given class or interface. + * + * @param string $class The name of the class + * @return Boolean|null True, if loaded + */ + public function loadClass($class) + { + if ($file = $this->findFile($class)) { + require $file; + return true; + } + } + + /** + * Finds the path to the file where the class is defined. + * + * @param string $class The name of the class + * + * @return string|null The path, if found + */ + public function findFile($class) + { + if ('\\' == $class[0]) { + $class = substr($class, 1); + } + + if (false !== $pos = strrpos($class, '\\')) { + // namespaced class name + $classPath = str_replace('\\', DIRECTORY_SEPARATOR, substr($class, 0, $pos)) . DIRECTORY_SEPARATOR; + $className = substr($class, $pos + 1); + } else { + // PEAR-like class name + $classPath = null; + $className = $class; + } + + $classPath .= str_replace('_', DIRECTORY_SEPARATOR, $className) . '.php'; + + foreach ($this->prefixes as $prefix => $dirs) { + foreach ($dirs as $dir) { + if (0 === strpos($class, $prefix)) { + if (file_exists($dir . DIRECTORY_SEPARATOR . $classPath)) { + return $dir . DIRECTORY_SEPARATOR . $classPath; + } + } + } + } + + foreach ($this->fallbackDirs as $dir) { + if (file_exists($dir . DIRECTORY_SEPARATOR . $classPath)) { + return $dir . DIRECTORY_SEPARATOR . $classPath; + } + } + + if ($this->useIncludePath && $file = stream_resolve_include_path($classPath)) { + return $file; + } + } +} diff --git a/core/vendor/.composer/autoload.php b/core/vendor/.composer/autoload.php new file mode 100644 index 0000000..2ed2a11 --- /dev/null +++ b/core/vendor/.composer/autoload.php @@ -0,0 +1,20 @@ + $path) { + $loader->add($namespace, $path); + } + + $loader->register(); + + return $loader; +}); diff --git a/core/vendor/.composer/autoload_namespaces.php b/core/vendor/.composer/autoload_namespaces.php new file mode 100644 index 0000000..465a49e --- /dev/null +++ b/core/vendor/.composer/autoload_namespaces.php @@ -0,0 +1,11 @@ + $vendorDir . '/symfony/http-foundation/', + 'Drupal\\Core' => dirname($vendorDir) . '/lib/', + 'Drupal\\Component' => dirname($vendorDir) . '/lib/', +); diff --git a/core/vendor/Symfony/Component/ClassLoader/ApcUniversalClassLoader.php b/core/vendor/Symfony/Component/ClassLoader/ApcUniversalClassLoader.php deleted file mode 100644 index 1295d0a..0000000 --- a/core/vendor/Symfony/Component/ClassLoader/ApcUniversalClassLoader.php +++ /dev/null @@ -1,96 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\ClassLoader; - -/** - * ApcUniversalClassLoader implements a "universal" autoloader cached in APC for PHP 5.3. - * - * It is able to load classes that use either: - * - * * The technical interoperability standards for PHP 5.3 namespaces and - * class names (https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md); - * - * * The PEAR naming convention for classes (http://pear.php.net/). - * - * Classes from a sub-namespace or a sub-hierarchy of PEAR classes can be - * looked for in a list of locations to ease the vendoring of a sub-set of - * classes for large projects. - * - * Example usage: - * - * require 'vendor/symfony/src/Symfony/Component/ClassLoader/UniversalClassLoader.php'; - * require 'vendor/symfony/src/Symfony/Component/ClassLoader/ApcUniversalClassLoader.php'; - * - * use Symfony\Component\ClassLoader\ApcUniversalClassLoader; - * - * $loader = new ApcUniversalClassLoader('apc.prefix.'); - * - * // register classes with namespaces - * $loader->registerNamespaces(array( - * 'Symfony\Component' => __DIR__.'/component', - * 'Symfony' => __DIR__.'/framework', - * 'Sensio' => array(__DIR__.'/src', __DIR__.'/vendor'), - * )); - * - * // register a library using the PEAR naming convention - * $loader->registerPrefixes(array( - * 'Swift_' => __DIR__.'/Swift', - * )); - * - * // activate the autoloader - * $loader->register(); - * - * In this example, if you try to use a class in the Symfony\Component - * namespace or one of its children (Symfony\Component\Console for instance), - * the autoloader will first look for the class under the component/ - * directory, and it will then fallback to the framework/ directory if not - * found before giving up. - * - * @author Fabien Potencier - * @author Kris Wallsmith - * - * @api - */ -class ApcUniversalClassLoader extends UniversalClassLoader -{ - private $prefix; - - /** - * Constructor. - * - * @param string $prefix A prefix to create a namespace in APC - * - * @api - */ - public function __construct($prefix) - { - if (!extension_loaded('apc')) { - throw new \RuntimeException('Unable to use ApcUniversalClassLoader as APC is not enabled.'); - } - - $this->prefix = $prefix; - } - - /** - * Finds a file by class name while caching lookups to APC. - * - * @param string $class A class name to resolve to file - */ - public function findFile($class) - { - if (false === $file = apc_fetch($this->prefix.$class)) { - apc_store($this->prefix.$class, $file = parent::findFile($class)); - } - - return $file; - } -} diff --git a/core/vendor/Symfony/Component/ClassLoader/ClassCollectionLoader.php b/core/vendor/Symfony/Component/ClassLoader/ClassCollectionLoader.php deleted file mode 100644 index da777f2..0000000 --- a/core/vendor/Symfony/Component/ClassLoader/ClassCollectionLoader.php +++ /dev/null @@ -1,222 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\ClassLoader; - -/** - * ClassCollectionLoader. - * - * @author Fabien Potencier - */ -class ClassCollectionLoader -{ - static private $loaded; - - /** - * Loads a list of classes and caches them in one big file. - * - * @param array $classes An array of classes to load - * @param string $cacheDir A cache directory - * @param string $name The cache name prefix - * @param Boolean $autoReload Whether to flush the cache when the cache is stale or not - * @param Boolean $adaptive Whether to remove already declared classes or not - * @param string $extension File extension of the resulting file - * - * @throws \InvalidArgumentException When class can't be loaded - */ - static public function load($classes, $cacheDir, $name, $autoReload, $adaptive = false, $extension = '.php') - { - // each $name can only be loaded once per PHP process - if (isset(self::$loaded[$name])) { - return; - } - - self::$loaded[$name] = true; - - if ($adaptive) { - // don't include already declared classes - $classes = array_diff($classes, get_declared_classes(), get_declared_interfaces()); - - // the cache is different depending on which classes are already declared - $name = $name.'-'.substr(md5(implode('|', $classes)), 0, 5); - } - - $cache = $cacheDir.'/'.$name.$extension; - - // auto-reload - $reload = false; - if ($autoReload) { - $metadata = $cacheDir.'/'.$name.$extension.'.meta'; - if (!file_exists($metadata) || !file_exists($cache)) { - $reload = true; - } else { - $time = filemtime($cache); - $meta = unserialize(file_get_contents($metadata)); - - if ($meta[1] != $classes) { - $reload = true; - } else { - foreach ($meta[0] as $resource) { - if (!file_exists($resource) || filemtime($resource) > $time) { - $reload = true; - - break; - } - } - } - } - } - - if (!$reload && file_exists($cache)) { - require_once $cache; - - return; - } - - $files = array(); - $content = ''; - foreach ($classes as $class) { - if (!class_exists($class) && !interface_exists($class) && (!function_exists('trait_exists') || !trait_exists($class))) { - throw new \InvalidArgumentException(sprintf('Unable to load class "%s"', $class)); - } - - $r = new \ReflectionClass($class); - $files[] = $r->getFileName(); - - $c = preg_replace(array('/^\s*<\?php/', '/\?>\s*$/'), '', file_get_contents($r->getFileName())); - - // add namespace declaration for global code - if (!$r->inNamespace()) { - $c = "\nnamespace\n{\n".self::stripComments($c)."\n}\n"; - } else { - $c = self::fixNamespaceDeclarations(' - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\ClassLoader; - -/** - * Checks that the class is actually declared in the included file. - * - * @author Fabien Potencier - */ -class DebugUniversalClassLoader extends UniversalClassLoader -{ - /** - * Replaces all regular UniversalClassLoader instances by a DebugUniversalClassLoader ones. - */ - static public function enable() - { - if (!is_array($functions = spl_autoload_functions())) { - return; - } - - foreach ($functions as $function) { - spl_autoload_unregister($function); - } - - foreach ($functions as $function) { - if (is_array($function) && $function[0] instanceof UniversalClassLoader) { - $loader = new static(); - $loader->registerNamespaceFallbacks($function[0]->getNamespaceFallbacks()); - $loader->registerPrefixFallbacks($function[0]->getPrefixFallbacks()); - $loader->registerNamespaces($function[0]->getNamespaces()); - $loader->registerPrefixes($function[0]->getPrefixes()); - - $function[0] = $loader; - } - - spl_autoload_register($function); - } - } - - /** - * {@inheritDoc} - */ - public function loadClass($class) - { - if ($file = $this->findFile($class)) { - require $file; - - if (!class_exists($class, false) && !interface_exists($class, false) && (!function_exists('trait_exists') || !trait_exists($class, false))) { - throw new \RuntimeException(sprintf('The autoloader expected class "%s" to be defined in file "%s". The file was found but the class was not in it, the class name or namespace probably has a typo.', $class, $file)); - } - } - } -} diff --git a/core/vendor/Symfony/Component/ClassLoader/MapClassLoader.php b/core/vendor/Symfony/Component/ClassLoader/MapClassLoader.php deleted file mode 100644 index cf17d42..0000000 --- a/core/vendor/Symfony/Component/ClassLoader/MapClassLoader.php +++ /dev/null @@ -1,76 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\ClassLoader; - -/** - * A class loader that uses a mapping file to look up paths. - * - * @author Fabien Potencier - */ -class MapClassLoader -{ - private $map = array(); - - /** - * Constructor. - * - * @param array $map A map where keys are classes and values the absolute file path - */ - public function __construct(array $map) - { - $this->map = $map; - } - - /** - * Registers this instance as an autoloader. - * - * @param Boolean $prepend Whether to prepend the autoloader or not - */ - public function register($prepend = false) - { - spl_autoload_register(array($this, 'loadClass'), true, $prepend); - } - - /** - * Loads the given class or interface. - * - * @param string $class The name of the class - */ - public function loadClass($class) - { - if ('\\' === $class[0]) { - $class = substr($class, 1); - } - - if (isset($this->map[$class])) { - require $this->map[$class]; - } - } - - /** - * Finds the path to the file where the class is defined. - * - * @param string $class The name of the class - * - * @return string|null The path, if found - */ - public function findFile($class) - { - if ('\\' === $class[0]) { - $class = substr($class, 1); - } - - if (isset($this->map[$class])) { - return $this->map[$class]; - } - } -} diff --git a/core/vendor/Symfony/Component/ClassLoader/UniversalClassLoader.php b/core/vendor/Symfony/Component/ClassLoader/UniversalClassLoader.php deleted file mode 100644 index babf950..0000000 --- a/core/vendor/Symfony/Component/ClassLoader/UniversalClassLoader.php +++ /dev/null @@ -1,265 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\ClassLoader; - -/** - * UniversalClassLoader implements a "universal" autoloader for PHP 5.3. - * - * It is able to load classes that use either: - * - * * The technical interoperability standards for PHP 5.3 namespaces and - * class names (https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md); - * - * * The PEAR naming convention for classes (http://pear.php.net/). - * - * Classes from a sub-namespace or a sub-hierarchy of PEAR classes can be - * looked for in a list of locations to ease the vendoring of a sub-set of - * classes for large projects. - * - * Example usage: - * - * $loader = new UniversalClassLoader(); - * - * // register classes with namespaces - * $loader->registerNamespaces(array( - * 'Symfony\Component' => __DIR__.'/component', - * 'Symfony' => __DIR__.'/framework', - * 'Sensio' => array(__DIR__.'/src', __DIR__.'/vendor'), - * )); - * - * // register a library using the PEAR naming convention - * $loader->registerPrefixes(array( - * 'Swift_' => __DIR__.'/Swift', - * )); - * - * // activate the autoloader - * $loader->register(); - * - * In this example, if you try to use a class in the Symfony\Component - * namespace or one of its children (Symfony\Component\Console for instance), - * the autoloader will first look for the class under the component/ - * directory, and it will then fallback to the framework/ directory if not - * found before giving up. - * - * @author Fabien Potencier - * - * @api - */ -class UniversalClassLoader -{ - private $namespaces = array(); - private $prefixes = array(); - private $namespaceFallbacks = array(); - private $prefixFallbacks = array(); - - /** - * Gets the configured namespaces. - * - * @return array A hash with namespaces as keys and directories as values - */ - public function getNamespaces() - { - return $this->namespaces; - } - - /** - * Gets the configured class prefixes. - * - * @return array A hash with class prefixes as keys and directories as values - */ - public function getPrefixes() - { - return $this->prefixes; - } - - /** - * Gets the directory(ies) to use as a fallback for namespaces. - * - * @return array An array of directories - */ - public function getNamespaceFallbacks() - { - return $this->namespaceFallbacks; - } - - /** - * Gets the directory(ies) to use as a fallback for class prefixes. - * - * @return array An array of directories - */ - public function getPrefixFallbacks() - { - return $this->prefixFallbacks; - } - - /** - * Registers the directory to use as a fallback for namespaces. - * - * @param array $dirs An array of directories - * - * @api - */ - public function registerNamespaceFallbacks(array $dirs) - { - $this->namespaceFallbacks = $dirs; - } - - /** - * Registers the directory to use as a fallback for class prefixes. - * - * @param array $dirs An array of directories - * - * @api - */ - public function registerPrefixFallbacks(array $dirs) - { - $this->prefixFallbacks = $dirs; - } - - /** - * Registers an array of namespaces - * - * @param array $namespaces An array of namespaces (namespaces as keys and locations as values) - * - * @api - */ - public function registerNamespaces(array $namespaces) - { - foreach ($namespaces as $namespace => $locations) { - $this->namespaces[$namespace] = (array) $locations; - } - } - - /** - * Registers a namespace. - * - * @param string $namespace The namespace - * @param array|string $paths The location(s) of the namespace - * - * @api - */ - public function registerNamespace($namespace, $paths) - { - $this->namespaces[$namespace] = (array) $paths; - } - - /** - * Registers an array of classes using the PEAR naming convention. - * - * @param array $classes An array of classes (prefixes as keys and locations as values) - * - * @api - */ - public function registerPrefixes(array $classes) - { - foreach ($classes as $prefix => $locations) { - $this->prefixes[$prefix] = (array) $locations; - } - } - - /** - * Registers a set of classes using the PEAR naming convention. - * - * @param string $prefix The classes prefix - * @param array|string $paths The location(s) of the classes - * - * @api - */ - public function registerPrefix($prefix, $paths) - { - $this->prefixes[$prefix] = (array) $paths; - } - - /** - * Registers this instance as an autoloader. - * - * @param Boolean $prepend Whether to prepend the autoloader or not - * - * @api - */ - public function register($prepend = false) - { - spl_autoload_register(array($this, 'loadClass'), true, $prepend); - } - - /** - * Loads the given class or interface. - * - * @param string $class The name of the class - */ - public function loadClass($class) - { - if ($file = $this->findFile($class)) { - require $file; - } - } - - /** - * Finds the path to the file where the class is defined. - * - * @param string $class The name of the class - * - * @return string|null The path, if found - */ - public function findFile($class) - { - if ('\\' == $class[0]) { - $class = substr($class, 1); - } - - if (false !== $pos = strrpos($class, '\\')) { - // namespaced class name - $namespace = substr($class, 0, $pos); - foreach ($this->namespaces as $ns => $dirs) { - if (0 !== strpos($namespace, $ns)) { - continue; - } - - foreach ($dirs as $dir) { - $className = substr($class, $pos + 1); - $file = $dir.DIRECTORY_SEPARATOR.str_replace('\\', DIRECTORY_SEPARATOR, $namespace).DIRECTORY_SEPARATOR.str_replace('_', DIRECTORY_SEPARATOR, $className).'.php'; - if (file_exists($file)) { - return $file; - } - } - } - - foreach ($this->namespaceFallbacks as $dir) { - $file = $dir.DIRECTORY_SEPARATOR.str_replace('\\', DIRECTORY_SEPARATOR, $class).'.php'; - if (file_exists($file)) { - return $file; - } - } - } else { - // PEAR-like class name - foreach ($this->prefixes as $prefix => $dirs) { - if (0 !== strpos($class, $prefix)) { - continue; - } - - foreach ($dirs as $dir) { - $file = $dir.DIRECTORY_SEPARATOR.str_replace('_', DIRECTORY_SEPARATOR, $class).'.php'; - if (file_exists($file)) { - return $file; - } - } - } - - foreach ($this->prefixFallbacks as $dir) { - $file = $dir.DIRECTORY_SEPARATOR.str_replace('_', DIRECTORY_SEPARATOR, $class).'.php'; - if (file_exists($file)) { - return $file; - } - } - } - } -} diff --git a/core/vendor/Symfony/Component/ClassLoader/composer.json b/core/vendor/Symfony/Component/ClassLoader/composer.json deleted file mode 100644 index f8bde98..0000000 --- a/core/vendor/Symfony/Component/ClassLoader/composer.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "name": "symfony/class-loader", - "type": "library", - "description": "Symfony ClassLoader Component", - "keywords": [], - "homepage": "http://symfony.com", - "license": "MIT", - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - } - ], - "require": { - "php": ">=5.3.2" - }, - "autoload": { - "psr-0": { "Symfony\\Component\\ClassLoader": "" } - }, - "target-dir": "Symfony/Component/ClassLoader" -} diff --git a/core/vendor/Symfony/Component/HttpFoundation/ApacheRequest.php b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/ApacheRequest.php similarity index 100% copy from core/vendor/Symfony/Component/HttpFoundation/ApacheRequest.php copy to core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/ApacheRequest.php diff --git a/core/vendor/Symfony/Component/HttpFoundation/Cookie.php b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Cookie.php similarity index 100% copy from core/vendor/Symfony/Component/HttpFoundation/Cookie.php copy to core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Cookie.php diff --git a/core/vendor/Symfony/Component/HttpFoundation/File/Exception/AccessDeniedException.php b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/Exception/AccessDeniedException.php similarity index 100% copy from core/vendor/Symfony/Component/HttpFoundation/File/Exception/AccessDeniedException.php copy to core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/Exception/AccessDeniedException.php diff --git a/core/vendor/Symfony/Component/HttpFoundation/File/Exception/FileException.php b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/Exception/FileException.php similarity index 100% copy from core/vendor/Symfony/Component/HttpFoundation/File/Exception/FileException.php copy to core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/Exception/FileException.php diff --git a/core/vendor/Symfony/Component/HttpFoundation/File/Exception/FileNotFoundException.php b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/Exception/FileNotFoundException.php similarity index 100% copy from core/vendor/Symfony/Component/HttpFoundation/File/Exception/FileNotFoundException.php copy to core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/Exception/FileNotFoundException.php diff --git a/core/vendor/Symfony/Component/HttpFoundation/File/Exception/UnexpectedTypeException.php b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/Exception/UnexpectedTypeException.php similarity index 100% copy from core/vendor/Symfony/Component/HttpFoundation/File/Exception/UnexpectedTypeException.php copy to core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/Exception/UnexpectedTypeException.php diff --git a/core/vendor/Symfony/Component/HttpFoundation/File/Exception/UploadException.php b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/Exception/UploadException.php similarity index 100% copy from core/vendor/Symfony/Component/HttpFoundation/File/Exception/UploadException.php copy to core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/Exception/UploadException.php diff --git a/core/vendor/Symfony/Component/HttpFoundation/File/File.php b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/File.php similarity index 100% copy from core/vendor/Symfony/Component/HttpFoundation/File/File.php copy to core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/File.php diff --git a/core/vendor/Symfony/Component/HttpFoundation/File/MimeType/ContentTypeMimeTypeGuesser.php b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/MimeType/ContentTypeMimeTypeGuesser.php similarity index 100% copy from core/vendor/Symfony/Component/HttpFoundation/File/MimeType/ContentTypeMimeTypeGuesser.php copy to core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/MimeType/ContentTypeMimeTypeGuesser.php diff --git a/core/vendor/Symfony/Component/HttpFoundation/File/MimeType/FileBinaryMimeTypeGuesser.php b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/MimeType/FileBinaryMimeTypeGuesser.php similarity index 100% copy from core/vendor/Symfony/Component/HttpFoundation/File/MimeType/FileBinaryMimeTypeGuesser.php copy to core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/MimeType/FileBinaryMimeTypeGuesser.php diff --git a/core/vendor/Symfony/Component/HttpFoundation/File/MimeType/FileinfoMimeTypeGuesser.php b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/MimeType/FileinfoMimeTypeGuesser.php similarity index 100% copy from core/vendor/Symfony/Component/HttpFoundation/File/MimeType/FileinfoMimeTypeGuesser.php copy to core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/MimeType/FileinfoMimeTypeGuesser.php diff --git a/core/vendor/Symfony/Component/HttpFoundation/File/MimeType/MimeTypeGuesser.php b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/MimeType/MimeTypeGuesser.php similarity index 100% copy from core/vendor/Symfony/Component/HttpFoundation/File/MimeType/MimeTypeGuesser.php copy to core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/MimeType/MimeTypeGuesser.php diff --git a/core/vendor/Symfony/Component/HttpFoundation/File/MimeType/MimeTypeGuesserInterface.php b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/MimeType/MimeTypeGuesserInterface.php similarity index 100% copy from core/vendor/Symfony/Component/HttpFoundation/File/MimeType/MimeTypeGuesserInterface.php copy to core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/MimeType/MimeTypeGuesserInterface.php diff --git a/core/vendor/Symfony/Component/HttpFoundation/File/UploadedFile.php b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/UploadedFile.php similarity index 100% copy from core/vendor/Symfony/Component/HttpFoundation/File/UploadedFile.php copy to core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/UploadedFile.php diff --git a/core/vendor/Symfony/Component/HttpFoundation/FileBag.php b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/FileBag.php similarity index 100% copy from core/vendor/Symfony/Component/HttpFoundation/FileBag.php copy to core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/FileBag.php diff --git a/core/vendor/Symfony/Component/HttpFoundation/HeaderBag.php b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/HeaderBag.php similarity index 100% copy from core/vendor/Symfony/Component/HttpFoundation/HeaderBag.php copy to core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/HeaderBag.php diff --git a/core/vendor/Symfony/Component/ClassLoader/LICENSE b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/LICENSE similarity index 100% rename from core/vendor/Symfony/Component/ClassLoader/LICENSE rename to core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/LICENSE diff --git a/core/vendor/Symfony/Component/HttpFoundation/ParameterBag.php b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/ParameterBag.php similarity index 100% copy from core/vendor/Symfony/Component/HttpFoundation/ParameterBag.php copy to core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/ParameterBag.php diff --git a/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/README.md b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/README.md new file mode 100644 index 0000000..67823e7 --- /dev/null +++ b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/README.md @@ -0,0 +1,36 @@ +HttpFoundation Component +======================== + +HttpFoundation defines an object-oriented layer for the HTTP specification. + +It provides an abstraction for requests, responses, uploaded files, cookies, +sessions, ... + +In this example, we get a Request object from the current PHP global +variables: + + use Symfony\Component\HttpFoundation\Request; + use Symfony\Component\HttpFoundation\Response; + + $request = Request::createFromGlobals(); + echo $request->getPathInfo(); + +You can also create a Request directly -- that's interesting for unit testing: + + $request = Request::create('/?foo=bar', 'GET'); + echo $request->getPathInfo(); + +And here is how to create and send a Response: + + $response = new Response('Not Found', 404, array('Content-Type' => 'text/plain')); + $response->send(); + +The Request and the Response classes have many other methods that implement +the HTTP specification. + +Resources +--------- + +Unit tests: + +https://github.com/symfony/symfony/tree/master/tests/Symfony/Tests/Component/HttpFoundation diff --git a/core/vendor/Symfony/Component/HttpFoundation/RedirectResponse.php b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/RedirectResponse.php similarity index 100% copy from core/vendor/Symfony/Component/HttpFoundation/RedirectResponse.php copy to core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/RedirectResponse.php diff --git a/core/vendor/Symfony/Component/HttpFoundation/Request.php b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Request.php similarity index 100% copy from core/vendor/Symfony/Component/HttpFoundation/Request.php copy to core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Request.php diff --git a/core/vendor/Symfony/Component/HttpFoundation/RequestMatcher.php b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/RequestMatcher.php similarity index 100% copy from core/vendor/Symfony/Component/HttpFoundation/RequestMatcher.php copy to core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/RequestMatcher.php diff --git a/core/vendor/Symfony/Component/HttpFoundation/RequestMatcherInterface.php b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/RequestMatcherInterface.php similarity index 100% copy from core/vendor/Symfony/Component/HttpFoundation/RequestMatcherInterface.php copy to core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/RequestMatcherInterface.php diff --git a/core/vendor/Symfony/Component/HttpFoundation/Response.php b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Response.php similarity index 100% copy from core/vendor/Symfony/Component/HttpFoundation/Response.php copy to core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Response.php diff --git a/core/vendor/Symfony/Component/HttpFoundation/ResponseHeaderBag.php b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/ResponseHeaderBag.php similarity index 100% copy from core/vendor/Symfony/Component/HttpFoundation/ResponseHeaderBag.php copy to core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/ResponseHeaderBag.php diff --git a/core/vendor/Symfony/Component/HttpFoundation/ServerBag.php b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/ServerBag.php similarity index 100% copy from core/vendor/Symfony/Component/HttpFoundation/ServerBag.php copy to core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/ServerBag.php diff --git a/core/vendor/Symfony/Component/HttpFoundation/Session.php b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Session.php similarity index 100% copy from core/vendor/Symfony/Component/HttpFoundation/Session.php copy to core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Session.php diff --git a/core/vendor/Symfony/Component/HttpFoundation/SessionStorage/ArraySessionStorage.php b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/SessionStorage/ArraySessionStorage.php similarity index 100% copy from core/vendor/Symfony/Component/HttpFoundation/SessionStorage/ArraySessionStorage.php copy to core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/SessionStorage/ArraySessionStorage.php diff --git a/core/vendor/Symfony/Component/HttpFoundation/SessionStorage/FilesystemSessionStorage.php b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/SessionStorage/FilesystemSessionStorage.php similarity index 100% copy from core/vendor/Symfony/Component/HttpFoundation/SessionStorage/FilesystemSessionStorage.php copy to core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/SessionStorage/FilesystemSessionStorage.php diff --git a/core/vendor/Symfony/Component/HttpFoundation/SessionStorage/NativeSessionStorage.php b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/SessionStorage/NativeSessionStorage.php similarity index 100% copy from core/vendor/Symfony/Component/HttpFoundation/SessionStorage/NativeSessionStorage.php copy to core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/SessionStorage/NativeSessionStorage.php diff --git a/core/vendor/Symfony/Component/HttpFoundation/SessionStorage/PdoSessionStorage.php b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/SessionStorage/PdoSessionStorage.php similarity index 100% copy from core/vendor/Symfony/Component/HttpFoundation/SessionStorage/PdoSessionStorage.php copy to core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/SessionStorage/PdoSessionStorage.php diff --git a/core/vendor/Symfony/Component/HttpFoundation/SessionStorage/SessionStorageInterface.php b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/SessionStorage/SessionStorageInterface.php similarity index 100% copy from core/vendor/Symfony/Component/HttpFoundation/SessionStorage/SessionStorageInterface.php copy to core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/SessionStorage/SessionStorageInterface.php diff --git a/core/vendor/Symfony/Component/HttpFoundation/composer.json b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/composer.json similarity index 100% copy from core/vendor/Symfony/Component/HttpFoundation/composer.json copy to core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/composer.json diff --git a/core/vendor/Symfony/Component/HttpFoundation/ApacheRequest.php b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/symfony-HttpFoundation-7796f42/ApacheRequest.php similarity index 100% rename from core/vendor/Symfony/Component/HttpFoundation/ApacheRequest.php rename to core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/symfony-HttpFoundation-7796f42/ApacheRequest.php diff --git a/core/vendor/Symfony/Component/HttpFoundation/Cookie.php b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/symfony-HttpFoundation-7796f42/Cookie.php similarity index 100% rename from core/vendor/Symfony/Component/HttpFoundation/Cookie.php rename to core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/symfony-HttpFoundation-7796f42/Cookie.php diff --git a/core/vendor/Symfony/Component/HttpFoundation/File/Exception/AccessDeniedException.php b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/symfony-HttpFoundation-7796f42/File/Exception/AccessDeniedException.php similarity index 100% rename from core/vendor/Symfony/Component/HttpFoundation/File/Exception/AccessDeniedException.php rename to core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/symfony-HttpFoundation-7796f42/File/Exception/AccessDeniedException.php diff --git a/core/vendor/Symfony/Component/HttpFoundation/File/Exception/FileException.php b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/symfony-HttpFoundation-7796f42/File/Exception/FileException.php similarity index 100% rename from core/vendor/Symfony/Component/HttpFoundation/File/Exception/FileException.php rename to core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/symfony-HttpFoundation-7796f42/File/Exception/FileException.php diff --git a/core/vendor/Symfony/Component/HttpFoundation/File/Exception/FileNotFoundException.php b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/symfony-HttpFoundation-7796f42/File/Exception/FileNotFoundException.php similarity index 100% rename from core/vendor/Symfony/Component/HttpFoundation/File/Exception/FileNotFoundException.php rename to core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/symfony-HttpFoundation-7796f42/File/Exception/FileNotFoundException.php diff --git a/core/vendor/Symfony/Component/HttpFoundation/File/Exception/UnexpectedTypeException.php b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/symfony-HttpFoundation-7796f42/File/Exception/UnexpectedTypeException.php similarity index 100% rename from core/vendor/Symfony/Component/HttpFoundation/File/Exception/UnexpectedTypeException.php rename to core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/symfony-HttpFoundation-7796f42/File/Exception/UnexpectedTypeException.php diff --git a/core/vendor/Symfony/Component/HttpFoundation/File/Exception/UploadException.php b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/symfony-HttpFoundation-7796f42/File/Exception/UploadException.php similarity index 100% rename from core/vendor/Symfony/Component/HttpFoundation/File/Exception/UploadException.php rename to core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/symfony-HttpFoundation-7796f42/File/Exception/UploadException.php diff --git a/core/vendor/Symfony/Component/HttpFoundation/File/File.php b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/symfony-HttpFoundation-7796f42/File/File.php similarity index 100% rename from core/vendor/Symfony/Component/HttpFoundation/File/File.php rename to core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/symfony-HttpFoundation-7796f42/File/File.php diff --git a/core/vendor/Symfony/Component/HttpFoundation/File/MimeType/ContentTypeMimeTypeGuesser.php b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/symfony-HttpFoundation-7796f42/File/MimeType/ContentTypeMimeTypeGuesser.php similarity index 100% rename from core/vendor/Symfony/Component/HttpFoundation/File/MimeType/ContentTypeMimeTypeGuesser.php rename to core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/symfony-HttpFoundation-7796f42/File/MimeType/ContentTypeMimeTypeGuesser.php diff --git a/core/vendor/Symfony/Component/HttpFoundation/File/MimeType/FileBinaryMimeTypeGuesser.php b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/symfony-HttpFoundation-7796f42/File/MimeType/FileBinaryMimeTypeGuesser.php similarity index 100% rename from core/vendor/Symfony/Component/HttpFoundation/File/MimeType/FileBinaryMimeTypeGuesser.php rename to core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/symfony-HttpFoundation-7796f42/File/MimeType/FileBinaryMimeTypeGuesser.php diff --git a/core/vendor/Symfony/Component/HttpFoundation/File/MimeType/FileinfoMimeTypeGuesser.php b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/symfony-HttpFoundation-7796f42/File/MimeType/FileinfoMimeTypeGuesser.php similarity index 100% rename from core/vendor/Symfony/Component/HttpFoundation/File/MimeType/FileinfoMimeTypeGuesser.php rename to core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/symfony-HttpFoundation-7796f42/File/MimeType/FileinfoMimeTypeGuesser.php diff --git a/core/vendor/Symfony/Component/HttpFoundation/File/MimeType/MimeTypeGuesser.php b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/symfony-HttpFoundation-7796f42/File/MimeType/MimeTypeGuesser.php similarity index 100% rename from core/vendor/Symfony/Component/HttpFoundation/File/MimeType/MimeTypeGuesser.php rename to core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/symfony-HttpFoundation-7796f42/File/MimeType/MimeTypeGuesser.php diff --git a/core/vendor/Symfony/Component/HttpFoundation/File/MimeType/MimeTypeGuesserInterface.php b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/symfony-HttpFoundation-7796f42/File/MimeType/MimeTypeGuesserInterface.php similarity index 100% rename from core/vendor/Symfony/Component/HttpFoundation/File/MimeType/MimeTypeGuesserInterface.php rename to core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/symfony-HttpFoundation-7796f42/File/MimeType/MimeTypeGuesserInterface.php diff --git a/core/vendor/Symfony/Component/HttpFoundation/File/UploadedFile.php b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/symfony-HttpFoundation-7796f42/File/UploadedFile.php similarity index 100% rename from core/vendor/Symfony/Component/HttpFoundation/File/UploadedFile.php rename to core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/symfony-HttpFoundation-7796f42/File/UploadedFile.php diff --git a/core/vendor/Symfony/Component/HttpFoundation/FileBag.php b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/symfony-HttpFoundation-7796f42/FileBag.php similarity index 100% rename from core/vendor/Symfony/Component/HttpFoundation/FileBag.php rename to core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/symfony-HttpFoundation-7796f42/FileBag.php diff --git a/core/vendor/Symfony/Component/HttpFoundation/HeaderBag.php b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/symfony-HttpFoundation-7796f42/HeaderBag.php similarity index 100% rename from core/vendor/Symfony/Component/HttpFoundation/HeaderBag.php rename to core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/symfony-HttpFoundation-7796f42/HeaderBag.php diff --git a/core/vendor/Symfony/Component/HttpFoundation/LICENSE b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/symfony-HttpFoundation-7796f42/LICENSE similarity index 100% rename from core/vendor/Symfony/Component/HttpFoundation/LICENSE rename to core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/symfony-HttpFoundation-7796f42/LICENSE diff --git a/core/vendor/Symfony/Component/HttpFoundation/ParameterBag.php b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/symfony-HttpFoundation-7796f42/ParameterBag.php similarity index 100% rename from core/vendor/Symfony/Component/HttpFoundation/ParameterBag.php rename to core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/symfony-HttpFoundation-7796f42/ParameterBag.php diff --git a/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/symfony-HttpFoundation-7796f42/README.md b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/symfony-HttpFoundation-7796f42/README.md new file mode 100644 index 0000000..67823e7 --- /dev/null +++ b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/symfony-HttpFoundation-7796f42/README.md @@ -0,0 +1,36 @@ +HttpFoundation Component +======================== + +HttpFoundation defines an object-oriented layer for the HTTP specification. + +It provides an abstraction for requests, responses, uploaded files, cookies, +sessions, ... + +In this example, we get a Request object from the current PHP global +variables: + + use Symfony\Component\HttpFoundation\Request; + use Symfony\Component\HttpFoundation\Response; + + $request = Request::createFromGlobals(); + echo $request->getPathInfo(); + +You can also create a Request directly -- that's interesting for unit testing: + + $request = Request::create('/?foo=bar', 'GET'); + echo $request->getPathInfo(); + +And here is how to create and send a Response: + + $response = new Response('Not Found', 404, array('Content-Type' => 'text/plain')); + $response->send(); + +The Request and the Response classes have many other methods that implement +the HTTP specification. + +Resources +--------- + +Unit tests: + +https://github.com/symfony/symfony/tree/master/tests/Symfony/Tests/Component/HttpFoundation diff --git a/core/vendor/Symfony/Component/HttpFoundation/RedirectResponse.php b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/symfony-HttpFoundation-7796f42/RedirectResponse.php similarity index 100% rename from core/vendor/Symfony/Component/HttpFoundation/RedirectResponse.php rename to core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/symfony-HttpFoundation-7796f42/RedirectResponse.php diff --git a/core/vendor/Symfony/Component/HttpFoundation/Request.php b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/symfony-HttpFoundation-7796f42/Request.php similarity index 100% rename from core/vendor/Symfony/Component/HttpFoundation/Request.php rename to core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/symfony-HttpFoundation-7796f42/Request.php diff --git a/core/vendor/Symfony/Component/HttpFoundation/RequestMatcher.php b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/symfony-HttpFoundation-7796f42/RequestMatcher.php similarity index 100% rename from core/vendor/Symfony/Component/HttpFoundation/RequestMatcher.php rename to core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/symfony-HttpFoundation-7796f42/RequestMatcher.php diff --git a/core/vendor/Symfony/Component/HttpFoundation/RequestMatcherInterface.php b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/symfony-HttpFoundation-7796f42/RequestMatcherInterface.php similarity index 100% rename from core/vendor/Symfony/Component/HttpFoundation/RequestMatcherInterface.php rename to core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/symfony-HttpFoundation-7796f42/RequestMatcherInterface.php diff --git a/core/vendor/Symfony/Component/HttpFoundation/Response.php b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/symfony-HttpFoundation-7796f42/Response.php similarity index 100% rename from core/vendor/Symfony/Component/HttpFoundation/Response.php rename to core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/symfony-HttpFoundation-7796f42/Response.php diff --git a/core/vendor/Symfony/Component/HttpFoundation/ResponseHeaderBag.php b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/symfony-HttpFoundation-7796f42/ResponseHeaderBag.php similarity index 100% rename from core/vendor/Symfony/Component/HttpFoundation/ResponseHeaderBag.php rename to core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/symfony-HttpFoundation-7796f42/ResponseHeaderBag.php diff --git a/core/vendor/Symfony/Component/HttpFoundation/ServerBag.php b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/symfony-HttpFoundation-7796f42/ServerBag.php similarity index 100% rename from core/vendor/Symfony/Component/HttpFoundation/ServerBag.php rename to core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/symfony-HttpFoundation-7796f42/ServerBag.php diff --git a/core/vendor/Symfony/Component/HttpFoundation/Session.php b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/symfony-HttpFoundation-7796f42/Session.php similarity index 100% rename from core/vendor/Symfony/Component/HttpFoundation/Session.php rename to core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/symfony-HttpFoundation-7796f42/Session.php diff --git a/core/vendor/Symfony/Component/HttpFoundation/SessionStorage/ArraySessionStorage.php b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/symfony-HttpFoundation-7796f42/SessionStorage/ArraySessionStorage.php similarity index 100% rename from core/vendor/Symfony/Component/HttpFoundation/SessionStorage/ArraySessionStorage.php rename to core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/symfony-HttpFoundation-7796f42/SessionStorage/ArraySessionStorage.php diff --git a/core/vendor/Symfony/Component/HttpFoundation/SessionStorage/FilesystemSessionStorage.php b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/symfony-HttpFoundation-7796f42/SessionStorage/FilesystemSessionStorage.php similarity index 100% rename from core/vendor/Symfony/Component/HttpFoundation/SessionStorage/FilesystemSessionStorage.php rename to core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/symfony-HttpFoundation-7796f42/SessionStorage/FilesystemSessionStorage.php diff --git a/core/vendor/Symfony/Component/HttpFoundation/SessionStorage/NativeSessionStorage.php b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/symfony-HttpFoundation-7796f42/SessionStorage/NativeSessionStorage.php similarity index 100% rename from core/vendor/Symfony/Component/HttpFoundation/SessionStorage/NativeSessionStorage.php rename to core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/symfony-HttpFoundation-7796f42/SessionStorage/NativeSessionStorage.php diff --git a/core/vendor/Symfony/Component/HttpFoundation/SessionStorage/PdoSessionStorage.php b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/symfony-HttpFoundation-7796f42/SessionStorage/PdoSessionStorage.php similarity index 100% rename from core/vendor/Symfony/Component/HttpFoundation/SessionStorage/PdoSessionStorage.php rename to core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/symfony-HttpFoundation-7796f42/SessionStorage/PdoSessionStorage.php diff --git a/core/vendor/Symfony/Component/HttpFoundation/SessionStorage/SessionStorageInterface.php b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/symfony-HttpFoundation-7796f42/SessionStorage/SessionStorageInterface.php similarity index 100% rename from core/vendor/Symfony/Component/HttpFoundation/SessionStorage/SessionStorageInterface.php rename to core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/symfony-HttpFoundation-7796f42/SessionStorage/SessionStorageInterface.php diff --git a/core/vendor/Symfony/Component/HttpFoundation/composer.json b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/symfony-HttpFoundation-7796f42/composer.json similarity index 100% rename from core/vendor/Symfony/Component/HttpFoundation/composer.json rename to core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/symfony-HttpFoundation-7796f42/composer.json