Merge branch '2.3'

* 2.3:
  fixed phpdoc
  Fix some annotates
  [FrameworkBundle] made sure that the debug event dispatcher is used everywhere
  [HttpKernel] remove unneeded strtoupper
  updated the composer install command to reflect changes in Composer

Conflicts:
	src/Symfony/Component/Serializer/Encoder/XmlEncoder.php
This commit is contained in:
Fabien Potencier 2013-09-19 11:47:34 +02:00
commit 51c6d7696c
77 changed files with 118 additions and 60 deletions

View File

@ -14,6 +14,7 @@ namespace Symfony\Bridge\Doctrine\Form\ChoiceList;
use Symfony\Component\Form\Exception\UnexpectedTypeException;
use Doctrine\ORM\QueryBuilder;
use Doctrine\DBAL\Connection;
use Doctrine\ORM\EntityManager;
/**
* Getting Entities through the ORM QueryBuilder

View File

@ -10,5 +10,5 @@ Resources
You can run the unit tests with the following command:
$ cd path/to/Symfony/Bridge/Doctrine/
$ composer.phar install --dev
$ composer.phar install
$ phpunit

View File

@ -9,5 +9,5 @@ Resources
You can run the unit tests with the following command:
$ cd path/to/Symfony/Bridge/Monolog/
$ composer.phar install --dev
$ composer.phar install
$ phpunit

View File

@ -9,5 +9,5 @@ Resources
You can run the unit tests with the following command:
$ cd path/to/Symfony/Bridge/Propel1/
$ composer.phar install --dev
$ composer.phar install
$ phpunit

View File

@ -47,8 +47,8 @@ class PropelUserProvider implements UserProviderInterface
/**
* Default constructor
*
* @param $class The User model class.
* @param $property The property to use to retrieve a user.
* @param string $class The User model class.
* @param string|null $property The property to use to retrieve a user.
*/
public function __construct($class, $property = null)
{

View File

@ -11,5 +11,5 @@ If you want to run the unit tests, install dev dependencies before
running PHPUnit:
$ cd path/to/Symfony/Bridge/Twig/
$ composer.phar install --dev
$ composer.phar install
$ phpunit

View File

@ -54,12 +54,14 @@ class FrameworkExtension extends Extension
if ($container->getParameter('kernel.debug')) {
$loader->load('debug.xml');
// only HttpKernel needs the debug event dispatcher
$definition = $container->findDefinition('http_kernel');
$arguments = $definition->getArguments();
$arguments[0] = new Reference('debug.event_dispatcher');
$arguments[2] = new Reference('debug.controller_resolver');
$definition->setArguments($arguments);
$definition->replaceArgument(2, new Reference('debug.controller_resolver'));
// replace the regular event_dispatcher service with the debug one
$definition = $container->findDefinition('event_dispatcher');
$definition->setPublic(false);
$container->setDefinition('debug.event_dispatcher.parent', $definition);
$container->setAlias('event_dispatcher', 'debug.event_dispatcher');
}
$configuration = $this->getConfiguration($configs, $container);

View File

@ -16,7 +16,7 @@
<service id="debug.event_dispatcher" class="%debug.event_dispatcher.class%">
<tag name="monolog.logger" channel="event" />
<argument type="service" id="event_dispatcher" />
<argument type="service" id="debug.event_dispatcher.parent" />
<argument type="service" id="debug.stopwatch" />
<argument type="service" id="logger" on-invalid="null" />
<call method="setProfiler"><argument type="service" id="profiler" on-invalid="null" /></call>

View File

@ -15,6 +15,7 @@ use Symfony\Bundle\FrameworkBundle\Controller\ControllerNameParser;
use Symfony\Component\Config\Loader\DelegatingLoader as BaseDelegatingLoader;
use Symfony\Component\Config\Loader\LoaderResolverInterface;
use Psr\Log\LoggerInterface;
use Symfony\Component\Routing\RouteCollection;
/**
* DelegatingLoader delegates route loading to other loaders using a loader resolver.

View File

@ -13,6 +13,7 @@ namespace Symfony\Bundle\FrameworkBundle\Templating\Asset;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Templating\Asset\PackageInterface;
/**
* Creates packages based on whether the current request is secure.

View File

@ -13,6 +13,7 @@ namespace Symfony\Bundle\TwigBundle\Loader;
use Symfony\Component\Templating\TemplateNameParserInterface;
use Symfony\Component\Config\FileLocatorInterface;
use Symfony\Component\Templating\TemplateReferenceInterface;
/**
* FilesystemLoader extends the default Twig filesystem loader

View File

@ -19,5 +19,5 @@ provided by the HttpKernel component.
You can run the unit tests with the following command:
$ cd path/to/Symfony/Component/BrowserKit/
$ composer.phar install --dev
$ composer.phar install
$ phpunit

View File

@ -39,7 +39,7 @@ class ClassMapGenerator
/**
* Iterate over all files in the given directory searching for classes
*
* @param Iterator|string $dir The directory to search in or an iterator
* @param \Iterator|string $dir The directory to search in or an iterator
*
* @return array A class map array
*/

View File

@ -65,5 +65,5 @@ Resources
You can run the unit tests with the following command:
$ cd path/to/Symfony/Component/ClassLoader/
$ composer.phar install --dev
$ composer.phar install
$ phpunit

View File

@ -10,6 +10,7 @@
*/
namespace Symfony\Component\Config\Definition\Builder;
use Symfony\Component\Config\Definition\Exception\UnsetKeyException;
/**

View File

@ -12,6 +12,6 @@ Resources
You can run the unit tests with the following command:
$ cd path/to/Symfony/Component/Config/
$ composer.phar install --dev
$ composer.phar install
$ phpunit

View File

@ -664,7 +664,7 @@ class Application
/**
* Renders a caught exception.
*
* @param Exception $e An exception instance
* @param \Exception $e An exception instance
* @param OutputInterface $output An OutputInterface instance
*/
public function renderException($e, $output)

View File

@ -45,7 +45,7 @@ class OutputFormatter implements OutputFormatterInterface
* Initializes console output formatter.
*
* @param Boolean $decorated Whether this formatter should actually decorate strings
* @param FormatterStyle[] $styles Array of "name => FormatterStyle" instances
* @param OutputFormatterStyleInterface[] $styles Array of "name => FormatterStyle" instances
*
* @api
*/

View File

@ -46,7 +46,7 @@ Tests
You can run the unit tests with the following command:
$ cd path/to/Symfony/Component/Console/
$ composer.phar install --dev
$ composer.phar install
$ phpunit
Third Party

View File

@ -14,6 +14,8 @@ namespace Symfony\Component\Console\Tester;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\ArrayInput;
use Symfony\Component\Console\Output\StreamOutput;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
/**
* Eases the testing of console commands.

View File

@ -11,6 +11,9 @@
namespace Symfony\Component\CssSelector\Node;
use Symfony\Component\CssSelector\XPathExpr;
use Symfony\Component\CssSelector\Exception\ParseException;
/**
* Interface for nodes.
*

View File

@ -40,5 +40,5 @@ Current code is a port of https://github.com/SimonSapin/cssselect@v0.7.1
You can run the unit tests with the following command:
$ cd path/to/Symfony/Component/CssSelector/
$ composer.phar install --dev
$ composer.phar install
$ phpunit

View File

@ -61,7 +61,7 @@ class ErrorHandler
* @param integer $level The level at which the conversion to Exception is done (null to use the error_reporting() value and 0 to disable)
* @param Boolean $displayErrors Display errors (for dev environment) or just log they (production usage)
*
* @return The registered error handler
* @return ErrorHandler The registered error handler
*/
public static function register($level = null, $displayErrors = true)
{

View File

@ -28,7 +28,7 @@ interface ExtensionInterface
* @param array $config An array of configuration values
* @param ContainerBuilder $container A ContainerBuilder instance
*
* @throws InvalidArgumentException When provided tag is not defined in this extension
* @throws \InvalidArgumentException When provided tag is not defined in this extension
*
* @api
*/

View File

@ -69,5 +69,5 @@ Resources
You can run the unit tests with the following command:
$ cd path/to/Symfony/Component/DependencyInjection/
$ composer.phar install --dev
$ composer.phar install
$ phpunit

View File

@ -28,5 +28,5 @@ Resources
You can run the unit tests with the following command:
$ cd path/to/Symfony/Component/DomCrawler/
$ composer.phar install --dev
$ composer.phar install
$ phpunit

View File

@ -21,5 +21,5 @@ Resources
You can run the unit tests with the following command:
$ cd path/to/Symfony/Component/EventDispatcher/
$ composer.phar install --dev
$ composer.phar install
$ phpunit

View File

@ -41,5 +41,5 @@ Resources
You can run the unit tests with the following command:
$ cd path/to/Symfony/Component/Filesystem/
$ composer.phar install --dev
$ composer.phar install
$ phpunit

View File

@ -36,6 +36,6 @@ Resources
You can run the unit tests with the following command:
$ cd path/to/Symfony/Component/Finder/
$ composer.phar install --dev
$ composer.phar install
$ phpunit

View File

@ -11,6 +11,9 @@
namespace Symfony\Component\Form;
use Symfony\Component\Form\Exception\UnexpectedTypeException;
use Symfony\Component\Form\Exception\TransformationFailedException;
class CallbackTransformer implements DataTransformerInterface
{
/**

View File

@ -22,5 +22,5 @@ Resources
You can run the unit tests with the following command:
$ cd path/to/Symfony/Component/Form/
$ composer.phar install --dev
$ composer.phar install
$ phpunit

View File

@ -34,7 +34,7 @@ class BinaryFileResponse extends Response
/**
* Constructor.
*
* @param SplFileInfo|string $file The file to stream
* @param \SplFileInfo|string $file The file to stream
* @param integer $status The response status code
* @param array $headers An array of response headers
* @param boolean $public Files are public by default
@ -64,7 +64,7 @@ class BinaryFileResponse extends Response
/**
* Sets the file to stream.
*
* @param SplFileInfo|string $file The file to stream
* @param \SplFileInfo|string $file The file to stream
* @param string $contentDisposition
* @param Boolean $autoEtag
* @param Boolean $autoLastModified

View File

@ -44,5 +44,5 @@ Resources
You can run the unit tests with the following command:
$ cd path/to/Symfony/Component/HttpFoundation/
$ composer.phar install --dev
$ composer.phar install
$ phpunit

View File

@ -21,6 +21,7 @@ use Symfony\Component\BrowserKit\Cookie as DomCookie;
use Symfony\Component\BrowserKit\History;
use Symfony\Component\BrowserKit\CookieJar;
use Symfony\Component\HttpKernel\TerminableInterface;
use Symfony\Component\HttpFoundation\Response;
/**
* Client simulates a browser and makes requests to a Kernel object.

View File

@ -50,11 +50,11 @@ class RegisterListenersPass implements CompilerPassInterface
public function process(ContainerBuilder $container)
{
if (!$container->hasDefinition($this->dispatcherService)) {
if (!$container->hasDefinition($this->dispatcherService) && !$container->hasAlias($this->dispatcherService)) {
return;
}
$definition = $container->getDefinition($this->dispatcherService);
$definition = $container->findDefinition($this->dispatcherService);
foreach ($container->findTaggedServiceIds($this->listenerTag) as $id => $events) {
$def = $container->getDefinition($id);

View File

@ -56,7 +56,7 @@ class GetResponseForControllerResultEvent extends GetResponseEvent
/**
* Assigns the return value of the controller.
*
* @param mixed The controller return value
* @param mixed $controllerResult The controller return value
*
* @api
*/

View File

@ -143,7 +143,7 @@ class RouterListener implements EventSubscriberInterface
throw new NotFoundHttpException($message, $e);
} catch (MethodNotAllowedException $e) {
$message = sprintf('No route found for "%s %s": Method Not Allowed (Allow: %s)', $request->getMethod(), $request->getPathInfo(), strtoupper(implode(', ', $e->getAllowedMethods())));
$message = sprintf('No route found for "%s %s": Method Not Allowed (Allow: %s)', $request->getMethod(), $request->getPathInfo(), implode(', ', $e->getAllowedMethods()));
throw new MethodNotAllowedHttpException($e->getAllowedMethods(), $message, $e);
}

View File

@ -13,6 +13,7 @@ namespace Symfony\Component\HttpKernel\Fragment;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpKernel\Controller\ControllerReference;
use Symfony\Component\HttpFoundation\Response;
/**
* Interface implemented by all rendering strategies.

View File

@ -11,7 +11,6 @@
namespace Symfony\Component\HttpKernel\Profiler;
use Redis;
/**
* RedisProfilerStorage stores profiling information in Redis.
@ -32,7 +31,7 @@ class RedisProfilerStorage implements ProfilerStorageInterface
protected $lifetime;
/**
* @var Redis
* @var \Redis
*/
private $redis;
@ -199,7 +198,7 @@ class RedisProfilerStorage implements ProfilerStorageInterface
/**
* Internal convenience method that returns the instance of Redis.
*
* @return Redis
* @return \Redis
*
* @throws \RuntimeException
*/
@ -216,7 +215,7 @@ class RedisProfilerStorage implements ProfilerStorageInterface
throw new \RuntimeException('RedisProfilerStorage requires that the redis extension is loaded.');
}
$redis = new Redis;
$redis = new \Redis;
$redis->connect($data['host'], $data['port']);
if (isset($data['path'])) {
@ -238,7 +237,7 @@ class RedisProfilerStorage implements ProfilerStorageInterface
/**
* Set instance of the Redis
*
* @param Redis $redis
* @param \Redis $redis
*/
public function setRedis($redis)
{

View File

@ -85,5 +85,5 @@ Resources
You can run the unit tests with the following command:
$ cd path/to/Symfony/Component/HttpKernel/
$ composer.phar install --dev
$ composer.phar install
$ phpunit

View File

@ -84,6 +84,10 @@ class RegisterListenersPassTest extends \PHPUnit_Framework_TestCase
->method('getDefinition')
->will($this->returnValue($definition));
$builder->expects($this->atLeastOnce())
->method('findDefinition')
->will($this->returnValue($definition));
$registerListenersPass = new RegisterListenersPass();
$registerListenersPass->process($builder);
}

View File

@ -64,6 +64,7 @@ class Locale extends \Locale
* Returns all available country codes
*
* @return array The country codes
*
* @throws \RuntimeException When the resource bundles cannot be loaded
*/
public static function getCountries()
@ -93,7 +94,11 @@ class Locale extends \Locale
* Returns all available language codes
*
* @return array The language codes
<<<<<<< HEAD
* @throws \RuntimeException When the resource bundles cannot be loaded
=======
* @throws \RuntimeException When the resource bundles cannot be loaded
>>>>>>> 2.2
*/
public static function getLanguages()
{
@ -122,7 +127,11 @@ class Locale extends \Locale
* Returns all available locale codes
*
* @return array The locale codes
<<<<<<< HEAD
* @throws \RuntimeException When the resource bundles cannot be loaded
=======
* @throws \RuntimeException When the resource bundles cannot be loaded
>>>>>>> 2.2
*/
public static function getLocales()
{
@ -173,9 +182,14 @@ class Locale extends \Locale
/**
* Returns the fallback locale for a given locale, if any
*
<<<<<<< HEAD
* @param string $locale The locale to find the fallback for.
*
* @return string|null The fallback locale, or null if no parent exists
=======
* @param string $locale The locale to find the fallback for
* @return string|null The fallback locale, or null if no parent exists
>>>>>>> 2.2
*/
protected static function getFallbackLocale($locale)
{

View File

@ -103,5 +103,5 @@ Resources
You can run the unit tests with the following command:
$ cd path/to/Symfony/Component/OptionsResolver/
$ composer.phar install --dev
$ composer.phar install
$ phpunit

View File

@ -43,5 +43,5 @@ Resources
You can run the unit tests with the following command:
$ cd path/to/Symfony/Component/XXX/
$ composer.phar install --dev
$ composer.phar install
$ phpunit

View File

@ -10,5 +10,5 @@ Resources
You can run the unit tests with the following command:
$ cd path/to/Symfony/Component/PropertyAccess/
$ composer.phar install --dev
$ composer.phar install
$ phpunit

View File

@ -11,6 +11,8 @@
namespace Symfony\Component\Routing\Matcher\Dumper;
use Symfony\Component\Routing\RouteCollection;
/**
* MatcherDumperInterface is the interface that all matcher dumper classes must implement.
*

View File

@ -30,5 +30,5 @@ Resources
You can run the unit tests with the following command:
$ cd path/to/Symfony/Component/Routing/
$ composer.phar install --dev
$ composer.phar install
$ phpunit

View File

@ -14,6 +14,7 @@ namespace Symfony\Component\Security\Acl\Domain;
use Symfony\Component\Security\Acl\Model\AclProviderInterface;
use Symfony\Component\Security\Acl\Model\ObjectIdentityRetrievalStrategyInterface;
use Symfony\Component\Security\Acl\Model\SecurityIdentityRetrievalStrategyInterface;
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
/**
* This service caches ACLs for an entire collection of objects.

View File

@ -11,6 +11,8 @@
namespace Symfony\Component\Security\Acl\Model;
use Symfony\Component\Security\Acl\Exception\NoAceFoundException;
/**
* This interface represents an access control list (ACL) for a domain object.
* Each domain object can have exactly one associated ACL.

View File

@ -11,6 +11,8 @@
namespace Symfony\Component\Security\Acl\Model;
use Symfony\Component\Security\Acl\Exception\AclNotFoundException;
/**
* Provides a common interface for retrieving ACLs.
*

View File

@ -372,7 +372,7 @@ class MutableAclProviderTest extends \PHPUnit_Framework_TestCase
* @param AclProvider $provider
* @param array $data
* @throws \InvalidArgumentException
* @throws Exception
* @throws \Exception
*/
protected function importAcls(AclProvider $provider, array $data)
{

View File

@ -100,7 +100,7 @@ final class PersistentToken implements PersistentTokenInterface
/**
* Returns the time the token was last used
*
* @return DateTime
* @return \DateTime
*/
public function getLastUsed()
{

View File

@ -11,6 +11,8 @@
namespace Symfony\Component\Security\Core\Authentication\RememberMe;
use Symfony\Component\Security\Core\Exception\TokenNotFoundException;
/**
* Interface for TokenProviders
*

View File

@ -11,6 +11,8 @@
namespace Symfony\Component\Security\Core\Authentication\Token;
use Symfony\Component\Security\Core\Role\RoleInterface;
/**
* AnonymousToken represents an anonymous token.
*

View File

@ -11,6 +11,8 @@
namespace Symfony\Component\Security\Core\Authentication\Token;
use Symfony\Component\Security\Core\Role\RoleInterface;
/**
* UsernamePasswordToken implements a username and password token.
*

View File

@ -11,6 +11,8 @@
namespace Symfony\Component\Security\Core\User;
use Symfony\Component\Security\Core\Role\Role;
/**
* Represents the interface that all user classes must implement.
*

View File

@ -13,6 +13,7 @@ namespace Symfony\Component\Security\Http\Authentication;
use Symfony\Component\Security\Core\Exception\AuthenticationException;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
/**
* Interface for custom authentication failure handlers.

View File

@ -13,6 +13,7 @@ namespace Symfony\Component\Security\Http\Authentication;
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
/**
* Interface for a custom authentication success handler

View File

@ -13,6 +13,7 @@ namespace Symfony\Component\Security\Http\Authorization;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Security\Core\Exception\AccessDeniedException;
use Symfony\Component\HttpFoundation\Response;
/**
* This is used by the ExceptionListener to translate an AccessDeniedException

View File

@ -13,6 +13,7 @@ namespace Symfony\Component\Security\Http\EntryPoint;
use Symfony\Component\Security\Core\Exception\AuthenticationException;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
/**
* AuthenticationEntryPointInterface is the interface used to start the

View File

@ -20,6 +20,7 @@ use Symfony\Component\Security\Core\Exception\LogoutException;
use Symfony\Component\Security\Http\HttpUtils;
use Symfony\Component\Security\Http\Logout\LogoutHandlerInterface;
use Symfony\Component\Security\Http\Logout\LogoutSuccessHandlerInterface;
use Symfony\Component\Security\Core\Exception\InvalidCsrfTokenException;
/**
* LogoutListener logout users.

View File

@ -20,6 +20,7 @@ use Symfony\Component\Routing\Matcher\RequestMatcherInterface;
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
use Symfony\Component\Routing\Exception\MethodNotAllowedException;
use Symfony\Component\Routing\Exception\ResourceNotFoundException;
use Symfony\Component\HttpFoundation\Response;
/**
* Encapsulates the logic needed to create sub-requests, redirect the user, and match URLs.

View File

@ -12,6 +12,7 @@
namespace Symfony\Component\Security\Http\Logout;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
/**
* LogoutSuccesshandlerInterface.

View File

@ -14,7 +14,6 @@ namespace Symfony\Component\Security\Http\Tests\RememberMe;
use Symfony\Component\Security\Http\RememberMe\RememberMeServicesInterface;
use Symfony\Component\Security\Core\Authentication\Token\RememberMeToken;
use Symfony\Component\Security\Core\Authentication\Token\Token;
use Symfony\Component\Security\Core\Exception\UsernameNotFoundException;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;

View File

@ -19,5 +19,5 @@ Tests
You can run the unit tests with the following command:
$ cd path/to/Symfony/Component/Security/
$ composer.phar install --dev
$ composer.phar install
$ phpunit

View File

@ -11,5 +11,5 @@ Resources
You can run the unit tests with the following command:
$ cd path/to/Symfony/Component/Serializer/
$ composer.phar install --dev
$ composer.phar install
$ phpunit

View File

@ -9,5 +9,5 @@ Resources
You can run the unit tests with the following command:
$ cd path/to/Symfony/Component/Stopwatch/
$ composer.phar install --dev
$ composer.phar install
$ phpunit

View File

@ -11,7 +11,7 @@
namespace Symfony\Component\Templating\Loader;
use Symfony\Component\Templating\Storage;
use Symfony\Component\Templating\Storage\Storage;
use Symfony\Component\Templating\TemplateReferenceInterface;
/**

View File

@ -12,6 +12,7 @@
namespace Symfony\Component\Templating\Loader;
use Symfony\Component\Templating\TemplateReferenceInterface;
use Symfony\Component\Templating\Storage\Storage;
/**
* LoaderInterface is the interface all loaders must implement.

View File

@ -14,5 +14,5 @@ Resources
You can run the unit tests with the following command:
$ cd path/to/Symfony/Component/Templating/
$ composer.phar install --dev
$ composer.phar install
$ phpunit

View File

@ -13,6 +13,7 @@ namespace Symfony\Component\Translation\Loader;
use Symfony\Component\Translation\MessageCatalogue;
use Symfony\Component\Translation\Exception\InvalidResourceException;
use Symfony\Component\Translation\Exception\NotFoundResourceException;
/**
* LoaderInterface is the interface implemented by all translation loaders.

View File

@ -31,5 +31,5 @@ http://symfony.com/doc/2.4/book/translation.html
You can run the unit tests with the following command:
$ cd path/to/Symfony/Component/Translation/
$ composer.phar install --dev
$ composer.phar install
$ phpunit

View File

@ -12,6 +12,7 @@
namespace Symfony\Component\Validator\Mapping\Loader;
use Symfony\Component\Validator\Exception\MappingException;
use Symfony\Component\Validator\Constraint;
abstract class AbstractLoader implements LoaderInterface
{

View File

@ -116,5 +116,5 @@ http://jcp.org/en/jsr/detail?id=303
You can run the unit tests with the following command:
$ cd path/to/Symfony/Component/Validator/
$ composer.phar install --dev
$ composer.phar install
$ phpunit

View File

@ -32,9 +32,9 @@ class ParseException extends RuntimeException
* @param integer $parsedLine The line where the error occurred
* @param integer $snippet The snippet of code near the problem
* @param string $parsedFile The file name where the error occurred
* @param Exception $previous The previous exception
* @param \Exception $previous The previous exception
*/
public function __construct($message, $parsedLine = -1, $snippet = null, $parsedFile = null, Exception $previous = null)
public function __construct($message, $parsedLine = -1, $snippet = null, $parsedFile = null, \Exception $previous = null)
{
$this->parsedFile = $parsedFile;
$this->parsedLine = $parsedLine;

View File

@ -15,5 +15,5 @@ Resources
You can run the unit tests with the following command:
$ cd path/to/Symfony/Component/Yaml/
$ composer.phar install --dev
$ composer.phar install
$ phpunit

View File

@ -130,7 +130,7 @@ class Unescaper
*
* @return string The string with the new encoding
*
* @throws RuntimeException if no suitable encoding function is found (iconv or mbstring)
* @throws \RuntimeException if no suitable encoding function is found (iconv or mbstring)
*/
private function convertEncoding($value, $to, $from)
{
@ -140,6 +140,6 @@ class Unescaper
return iconv($from, $to, $value);
}
throw new RuntimeException('No suitable convert encoding function (install the iconv or mbstring extension).');
throw new \RuntimeException('No suitable convert encoding function (install the iconv or mbstring extension).');
}
}