Commit d93ba8d2 authored by catch's avatar catch

Issue #2386585 by hussainweb: Upgrade to Symfony 2.6.1

parent bab6233d
This diff is collapsed.
This diff is collapsed.
......@@ -54,8 +54,8 @@ class ApcClassLoader
/**
* Constructor.
*
* @param string $prefix The APC namespace prefix to use.
* @param object $decorated A class loader object that implements the findFile() method.
* @param string $prefix The APC namespace prefix to use.
* @param object $decorated A class loader object that implements the findFile() method.
*
* @throws \RuntimeException
* @throws \InvalidArgumentException
......@@ -79,7 +79,7 @@ public function __construct($prefix, $decorated)
/**
* Registers this instance as an autoloader.
*
* @param bool $prepend Whether to prepend the autoloader or not
* @param bool $prepend Whether to prepend the autoloader or not
*/
public function register($prepend = false)
{
......@@ -99,7 +99,7 @@ public function unregister()
*
* @param string $class The name of the class
*
* @return bool|null True, if loaded
* @return bool|null True, if loaded
*/
public function loadClass($class)
{
......
......@@ -25,12 +25,12 @@ class ClassCollectionLoader
/**
* 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 bool $autoReload Whether to flush the cache when the cache is stale or not
* @param bool $adaptive Whether to remove already declared classes or not
* @param string $extension File extension of the resulting file
* @param array $classes An array of classes to load
* @param string $cacheDir A cache directory
* @param string $name The cache name prefix
* @param bool $autoReload Whether to flush the cache when the cache is stale or not
* @param bool $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
*/
......@@ -335,10 +335,10 @@ private static function computeTraitDeps(\ReflectionClass $class)
* This function does not check for circular dependencies as it should never
* occur with PHP traits.
*
* @param array $tree The dependency tree
* @param \ReflectionClass $node The node
* @param \ArrayObject $resolved An array of already resolved dependencies
* @param \ArrayObject $unresolved An array of dependencies to be resolved
* @param array $tree The dependency tree
* @param \ReflectionClass $node The node
* @param \ArrayObject $resolved An array of already resolved dependencies
* @param \ArrayObject $unresolved An array of dependencies to be resolved
*
* @return \ArrayObject The dependencies for the given node
*
......
......@@ -103,7 +103,7 @@ public function addPrefix($prefix, $paths)
/**
* Turns on searching the include for class files.
*
* @param bool $useIncludePath
* @param bool $useIncludePath
*/
public function setUseIncludePath($useIncludePath)
{
......@@ -124,7 +124,7 @@ public function getUseIncludePath()
/**
* Registers this instance as an autoloader.
*
* @param bool $prepend Whether to prepend the autoloader or not
* @param bool $prepend Whether to prepend the autoloader or not
*/
public function register($prepend = false)
{
......@@ -144,7 +144,7 @@ public function unregister()
*
* @param string $class The name of the class
*
* @return bool|null True, if loaded
* @return bool|null True, if loaded
*/
public function loadClass($class)
{
......
......@@ -11,10 +11,12 @@
namespace Symfony\Component\ClassLoader;
if (PHP_VERSION_ID >= 50400) {
define('SYMFONY_TRAIT', T_TRAIT);
} else {
define('SYMFONY_TRAIT', 0);
if (!defined('SYMFONY_TRAIT')) {
if (PHP_VERSION_ID >= 50400) {
define('SYMFONY_TRAIT', T_TRAIT);
} else {
define('SYMFONY_TRAIT', 0);
}
}
/**
......
......@@ -98,7 +98,7 @@ public function findFile($class)
*
* @param string $class The name of the class
*
* @return bool|null True, if loaded
* @return bool|null True, if loaded
*
* @throws \RuntimeException
*/
......
......@@ -33,7 +33,7 @@ public function __construct(array $map)
/**
* Registers this instance as an autoloader.
*
* @param bool $prepend Whether to prepend the autoloader or not
* @param bool $prepend Whether to prepend the autoloader or not
*/
public function register($prepend = false)
{
......
......@@ -227,7 +227,7 @@ class WithComments
{
public static \$loaded = true;
}
\$string ='string shoult not be modified {\$string}';
\$string ='string should not be modified {\$string}';
\$heredoc = (<<<HD
......
......@@ -17,7 +17,7 @@ class WithComments
public static $loaded = true;
}
$string = 'string shoult not be modified {$string}';
$string = 'string should not be modified {$string}';
$heredoc = (<<<HD
......
......@@ -70,7 +70,7 @@ class UniversalClassLoader
* Turns on searching the include for class files. Allows easy loading
* of installed PEAR packages
*
* @param bool $useIncludePath
* @param bool $useIncludePath
*/
public function useIncludePath($useIncludePath)
{
......@@ -229,7 +229,7 @@ public function registerPrefix($prefix, $paths)
/**
* Registers this instance as an autoloader.
*
* @param bool $prepend Whether to prepend the autoloader or not
* @param bool $prepend Whether to prepend the autoloader or not
*
* @api
*/
......@@ -243,7 +243,7 @@ public function register($prepend = false)
*
* @param string $class The name of the class
*
* @return bool|null True, if loaded
* @return bool|null True, if loaded
*/
public function loadClass($class)
{
......
......@@ -53,8 +53,8 @@ class WinCacheClassLoader
/**
* Constructor.
*
* @param string $prefix The WinCache namespace prefix to use.
* @param object $decorated A class loader object that implements the findFile() method.
* @param string $prefix The WinCache namespace prefix to use.
* @param object $decorated A class loader object that implements the findFile() method.
*
* @throws \RuntimeException
* @throws \InvalidArgumentException
......@@ -76,7 +76,7 @@ public function __construct($prefix, $decorated)
/**
* Registers this instance as an autoloader.
*
* @param bool $prepend Whether to prepend the autoloader or not
* @param bool $prepend Whether to prepend the autoloader or not
*/
public function register($prepend = false)
{
......@@ -96,7 +96,7 @@ public function unregister()
*
* @param string $class The name of the class
*
* @return bool|null True, if loaded
* @return bool|null True, if loaded
*/
public function loadClass($class)
{
......
......@@ -52,8 +52,8 @@ class XcacheClassLoader
/**
* Constructor.
*
* @param string $prefix The XCache namespace prefix to use.
* @param object $decorated A class loader object that implements the findFile() method.
* @param string $prefix The XCache namespace prefix to use.
* @param object $decorated A class loader object that implements the findFile() method.
*
* @throws \RuntimeException
* @throws \InvalidArgumentException
......@@ -77,7 +77,7 @@ public function __construct($prefix, $decorated)
/**
* Registers this instance as an autoloader.
*
* @param bool $prepend Whether to prepend the autoloader or not
* @param bool $prepend Whether to prepend the autoloader or not
*/
public function register($prepend = false)
{
......@@ -97,7 +97,7 @@ public function unregister()
*
* @param string $class The name of the class
*
* @return bool|null True, if loaded
* @return bool|null True, if loaded
*/
public function loadClass($class)
{
......
......@@ -40,8 +40,8 @@ class CssSelector
* Optionally, a prefix can be added to the resulting XPath
* expression with the $prefix parameter.
*
* @param mixed $cssExpr The CSS expression.
* @param string $prefix An optional prefix for the XPath expression.
* @param mixed $cssExpr The CSS expression.
* @param string $prefix An optional prefix for the XPath expression.
*
* @return string
*
......
......@@ -45,8 +45,8 @@ public function __construct($flags = 0)
}
/**
* @param int $flag
* @param bool $on
* @param int $flag
* @param bool $on
*
* @return NodeExtension
*/
......
......@@ -227,7 +227,7 @@ public function addCombination($combiner, NodeInterface $xpath, NodeInterface $c
}
/**
* @param XPathExpr $xpath
* @param XPathExpr $xpath
* @param FunctionNode $function
*
* @return XPathExpr
......
......@@ -37,10 +37,10 @@ class XPathExpr
private $condition;
/**
* @param string $path
* @param string $element
* @param string $condition
* @param bool $starPrefix
* @param string $path
* @param string $element
* @param string $condition
* @param bool $starPrefix
*/
public function __construct($path = '', $element = '*', $condition = '', $starPrefix = false)
{
......
......@@ -28,8 +28,8 @@ class Debug
* If the Symfony ClassLoader component is available, a special
* class loader is also registered.
*
* @param int $errorReportingLevel The level of error reporting you want
* @param bool $displayErrors Whether to display errors (for development) or just log them (for production)
* @param int $errorReportingLevel The level of error reporting you want
* @param bool $displayErrors Whether to display errors (for development) or just log them (for production)
*/
public static function enable($errorReportingLevel = null, $displayErrors = true)
{
......
......@@ -126,9 +126,9 @@ public function testPrevious(\Exception $exception, $statusCode)
$flattened->setPrevious($flattened2);
$this->assertSame($flattened2,$flattened->getPrevious());
$this->assertSame($flattened2, $flattened->getPrevious());
$this->assertSame(array($flattened2),$flattened->getAllPrevious());
$this->assertSame(array($flattened2), $flattened->getAllPrevious());
}
/**
......@@ -162,7 +162,7 @@ public function testToArray(\Exception $exception, $statusCode)
'message' => 'test',
'class' => 'Exception',
'trace' => array(array(
'namespace' => '', 'short_class' => '', 'class' => '','type' => '','function' => '', 'file' => 'foo.php', 'line' => 123,
'namespace' => '', 'short_class' => '', 'class' => '', 'type' => '', 'function' => '', 'file' => 'foo.php', 'line' => 123,
'args' => array(),
)),
),
......@@ -214,12 +214,12 @@ public function testSetTraceIncompleteClass()
'class' => 'Exception',
'trace' => array(
array(
'namespace' => '', 'short_class' => '', 'class' => '','type' => '','function' => '',
'namespace' => '', 'short_class' => '', 'class' => '', 'type' => '', 'function' => '',
'file' => 'foo.php', 'line' => 123,
'args' => array(),
),
array(
'namespace' => '', 'short_class' => '', 'class' => '','type' => '','function' => 'test',
'namespace' => '', 'short_class' => '', 'class' => '', 'type' => '', 'function' => 'test',
'file' => __FILE__, 'line' => 123,
'args' => array(
array(
......
......@@ -22,8 +22,8 @@ class Alias
/**
* Constructor.
*
* @param string $id Alias identifier
* @param bool $public If this alias is public
* @param string $id Alias identifier
* @param bool $public If this alias is public
*
* @api
*/
......@@ -48,7 +48,7 @@ public function isPublic()
/**
* Sets if this Alias is public.
*
* @param bool $boolean If this Alias should be public
* @param bool $boolean If this Alias should be public
*
* @api
*/
......
......@@ -36,7 +36,7 @@ class AnalyzeServiceReferencesPass implements RepeatablePassInterface
/**
* Constructor.
*
* @param bool $onlyConstructorArguments Sets this Service Reference pass to ignore method calls
* @param bool $onlyConstructorArguments Sets this Service Reference pass to ignore method calls
*/
public function __construct($onlyConstructorArguments = false)
{
......
......@@ -115,7 +115,7 @@ private function inlineArguments(ContainerBuilder $container, array $arguments)
* @param string $id
* @param Definition $definition
*
* @return bool If the definition is inlineable
* @return bool If the definition is inlineable
*/
private function isInlineableDefinition(ContainerBuilder $container, $id, Definition $definition)
{
......
......@@ -69,8 +69,8 @@ public function process(ContainerBuilder $container)
/**
* Processes arguments to determine invalid references.
*
* @param array $arguments An array of Reference objects
* @param bool $inMethodCall
* @param array $arguments An array of Reference objects
* @param bool $inMethodCall
*
* @return array
*
......
......@@ -63,7 +63,7 @@ public function addOutEdge(ServiceReferenceGraphEdge $edge)
/**
* Checks if the value of this node is an Alias.
*
* @return bool True if the value is an Alias instance
* @return bool True if the value is an Alias instance
*/
public function isAlias()
{
......@@ -73,7 +73,7 @@ public function isAlias()
/**
* Checks if the value of this node is a Definition.
*
* @return bool True if the value is a Definition instance
* @return bool True if the value is a Definition instance
*/
public function isDefinition()
{
......
......@@ -110,7 +110,7 @@ public function compile()
/**
* Returns true if the container parameter bag are frozen.
*
* @return bool true if the container parameter bag are frozen, false otherwise
* @return bool true if the container parameter bag are frozen, false otherwise
*
* @api
*/
......@@ -136,7 +136,7 @@ public function getParameterBag()
*
* @param string $name The parameter name
*
* @return mixed The parameter value
* @return mixed The parameter value
*
* @throws InvalidArgumentException if the parameter is not defined
*
......@@ -152,7 +152,7 @@ public function getParameter($name)
*
* @param string $name The parameter name
*
* @return bool The presence of parameter in container
* @return bool The presence of parameter in container
*
* @api
*/
......@@ -184,7 +184,7 @@ public function setParameter($name, $value)
* @param object $service The service instance
* @param string $scope The scope of the service
*
* @throws RuntimeException When trying to set a service in an inactive scope
* @throws RuntimeException When trying to set a service in an inactive scope
* @throws InvalidArgumentException When trying to set a service in the prototype scope
*
* @api
......@@ -231,7 +231,7 @@ public function set($id, $service, $scope = self::SCOPE_CONTAINER)
*
* @param string $id The service identifier
*
* @return bool true if the service is defined, false otherwise
* @return bool true if the service is defined, false otherwise
*
* @api
*/
......@@ -256,8 +256,8 @@ public function has($id)
* If a service is defined both through a set() method and
* with a get{$id}Service() method, the former has always precedence.
*
* @param string $id The service identifier
* @param int $invalidBehavior The behavior when the service does not exist
* @param string $id The service identifier
* @param int $invalidBehavior The behavior when the service does not exist
*
* @return object The associated service
*
......@@ -348,7 +348,7 @@ public function get($id, $invalidBehavior = self::EXCEPTION_ON_INVALID_REFERENCE
*
* @param string $id The service identifier
*
* @return bool true if service has already been initialized, false otherwise
* @return bool true if service has already been initialized, false otherwise
*/
public function initialized($id)
{
......
......@@ -96,7 +96,7 @@ class ContainerBuilder extends Container implements TaggedContainerInterface
* If you are not using the loaders and therefore don't want
* to depend on the Config component, set this flag to false.
*
* @param bool $track true if you want to track resources, false otherwise
* @param bool $track true if you want to track resources, false otherwise
*/
public function setResourceTracking($track)
{
......@@ -106,7 +106,7 @@ public function setResourceTracking($track)
/**
* Checks if resources are tracked.
*
* @return bool true if resources are tracked, false otherwise
* @return bool true if resources are tracked, false otherwise
*/
public function isTrackingResources()
{
......@@ -180,7 +180,7 @@ public function getExtensions()
*
* @param string $name The name of the extension
*
* @return bool If the extension exists
* @return bool If the extension exists
*
* @api
*/
......@@ -285,7 +285,7 @@ public function addClassResource(\ReflectionClass $class)
* @param string $extension The extension alias or namespace
* @param array $values An array of values that customizes the extension
*
* @return ContainerBuilder The current instance
* @return ContainerBuilder The current instance
* @throws BadMethodCallException When this ContainerBuilder is frozen
*
* @throws \LogicException if the container is frozen
......@@ -434,7 +434,7 @@ public function removeDefinition($id)
*
* @param string $id The service identifier
*
* @return bool true if the service is defined, false otherwise
* @return bool true if the service is defined, false otherwise
*
* @api
*/
......@@ -448,8 +448,8 @@ public function has($id)
/**
* Gets a service.
*
* @param string $id The service identifier
* @param int $invalidBehavior The behavior when the service does not exist
* @param string $id The service identifier
* @param int $invalidBehavior The behavior when the service does not exist
*
* @return object The associated service
*
......@@ -574,8 +574,8 @@ public function getExtensionConfig($name)
/**
* Prepends a config array to the configs of the given extension.
*
* @param string $name The name of the extension
* @param array $config The config to set
* @param string $name The name of the extension
* @param array $config The config to set
*/
public function prependExtensionConfig($name, array $config)
{
......@@ -667,8 +667,8 @@ public function setAliases(array $aliases)
/**
* Sets an alias for an existing service.
*
* @param string $alias The alias to create
* @param string|Alias $id The service to alias
* @param string $alias The alias to create
* @param string|Alias $id The service to alias
*
* @throws InvalidArgumentException if the id is not a string or an Alias
* @throws InvalidArgumentException if the alias is for itself
......@@ -711,7 +711,7 @@ public function removeAlias($alias)
*
* @param string $id The service identifier
*
* @return bool true if the alias exists, false otherwise
* @return bool true if the alias exists, false otherwise
*
* @api
*/
......@@ -841,7 +841,7 @@ public function setDefinition($id, Definition $definition)
*
* @param string $id The service identifier
*
* @return bool true if the service definition exists, false otherwise
* @return bool true if the service definition exists, false otherwise
*
* @api
*/
......@@ -903,9 +903,9 @@ public function findDefinition($id)
*
* @return object The service described by the service definition
*
* @throws RuntimeException When the scope is inactive
* @throws RuntimeException When the factory definition is incomplete
* @throws RuntimeException When the service is a synthetic service
* @throws RuntimeException When the scope is inactive
* @throws RuntimeException When the factory definition is incomplete
* @throws RuntimeException When the service is a synthetic service
* @throws InvalidArgumentException When configure callable is not callable
*
* @internal this method is public because of PHP 5.3 limitations, do not use it explicitly in your code
......
......@@ -50,9 +50,9 @@ public function set($id, $service, $scope = self::SCOPE_CONTAINER);
*
* @return object The associated service
*
* @throws InvalidArgumentException if the service is not defined
* @throws InvalidArgumentException if the service is not defined
* @throws ServiceCircularReferenceException When a circular reference is detected
* @throws ServiceNotFoundException When the service is not defined
* @throws ServiceNotFoundException When the service is not defined
*
* @see Reference
*
......@@ -65,7 +65,7 @@ public function get($id, $invalidBehavior = self::EXCEPTION_ON_INVALID_REFERENCE
*
* @param string $id The service identifier