From 10df5d16c12ee8fc4bd6f76e34b831be982b0e5d Mon Sep 17 00:00:00 2001 From: Edvinas Klovas Date: Mon, 29 Dec 2014 15:20:11 +0200 Subject: [PATCH 01/17] Currently if you want to use inline bootstrap form rendering, this is usually enough: 1. Using bootstrap_3_layout.html.twig 2. Rendering form with `{{ form(form, { 'attr': {'class': 'form-inline'} }) }}` Form rendering breaks for buttons as the buttons are rendered in a separate
element without any attributes (this is coming from form_div_layout.html.twig which has this block hard-coded). The rest of the elements render with
which make them compatible with form-inline attribute in the form (`
`). The problem makes buttons render on new lines for inline forms. Extending button_row in bootstrap_3_layout.html.twig template fixes this. Signed-off-by: Edvinas Klovas --- .../Twig/Resources/views/Form/bootstrap_3_layout.html.twig | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Symfony/Bridge/Twig/Resources/views/Form/bootstrap_3_layout.html.twig b/src/Symfony/Bridge/Twig/Resources/views/Form/bootstrap_3_layout.html.twig index 0e4da9d0ee..e934305014 100644 --- a/src/Symfony/Bridge/Twig/Resources/views/Form/bootstrap_3_layout.html.twig +++ b/src/Symfony/Bridge/Twig/Resources/views/Form/bootstrap_3_layout.html.twig @@ -181,6 +181,12 @@
{%- endblock form_row %} +{% block button_row -%} +
+ {{- form_widget(form) -}} +
+{%- endblock button_row %} + {% block choice_row -%} {% set force_error = true %} {{ block('form_row') }} From 1e794ca298f0b6815aaed12fe26679217bfa9616 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Tue, 30 Dec 2014 09:48:40 +0000 Subject: [PATCH 02/17] Check if a field type_class is defined before using it. This make the check consistent with a similar check in this template made further down, and fixes an issue with fields added to the form after the form was built. --- .../Resources/views/Collector/form.html.twig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/form.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/form.html.twig index 619469e415..fda6d599e9 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/form.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/form.html.twig @@ -420,7 +420,7 @@ {% else %}
{% endif %} - {{ name|default('(no name)') }} {% if data.type is not empty %}[{{ data.type }}]{% endif %} + {{ name|default('(no name)') }} {% if data.type_class is defined and data.type is defined %}[{{ data.type }}]{% endif %} {% if data.errors is defined and data.errors|length > 0 %}
{{ data.errors|length }}
{% endif %} @@ -440,7 +440,7 @@

{{ name|default('(no name)') }} - {% if data.type_class is defined %} + {% if data.type_class is defined and data.type is defined %} [{{ data.type }}] {% endif %}

From 559273ec1c8d8b00156a36b13230a82f3d3b554c Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Mon, 29 Dec 2014 13:11:25 +0100 Subject: [PATCH 03/17] use PHP_WINDOWS_VERSION_BUILD to detect Windows This commit unifies the detection of Windows builds across the Symfony codebase. --- src/Symfony/Component/Console/Helper/QuestionHelper.php | 2 +- .../Component/Console/Tests/Helper/QuestionHelperTest.php | 2 +- .../Component/Filesystem/Tests/FilesystemTestCase.php | 8 ++++---- src/Symfony/Component/Process/Process.php | 2 +- src/Symfony/Component/Process/ProcessPipes.php | 2 +- .../Component/Process/Tests/ProcessBuilderTest.php | 4 ++-- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/Symfony/Component/Console/Helper/QuestionHelper.php b/src/Symfony/Component/Console/Helper/QuestionHelper.php index 6a3a22a35e..caa091492c 100644 --- a/src/Symfony/Component/Console/Helper/QuestionHelper.php +++ b/src/Symfony/Component/Console/Helper/QuestionHelper.php @@ -289,7 +289,7 @@ class QuestionHelper extends Helper */ private function getHiddenResponse(OutputInterface $output, $inputStream) { - if (defined('PHP_WINDOWS_VERSION_BUILD')) { + if ('\\' === DIRECTORY_SEPARATOR) { $exe = __DIR__.'/../Resources/bin/hiddeninput.exe'; // handle code running from a phar diff --git a/src/Symfony/Component/Console/Tests/Helper/QuestionHelperTest.php b/src/Symfony/Component/Console/Tests/Helper/QuestionHelperTest.php index ac360241ad..e5499fc086 100644 --- a/src/Symfony/Component/Console/Tests/Helper/QuestionHelperTest.php +++ b/src/Symfony/Component/Console/Tests/Helper/QuestionHelperTest.php @@ -130,7 +130,7 @@ class QuestionHelperTest extends \PHPUnit_Framework_TestCase public function testAskHiddenResponse() { - if (defined('PHP_WINDOWS_VERSION_BUILD')) { + if ('\\' === DIRECTORY_SEPARATOR) { $this->markTestSkipped('This test is not supported on Windows'); } diff --git a/src/Symfony/Component/Filesystem/Tests/FilesystemTestCase.php b/src/Symfony/Component/Filesystem/Tests/FilesystemTestCase.php index d1ae1287f8..305c9435be 100644 --- a/src/Symfony/Component/Filesystem/Tests/FilesystemTestCase.php +++ b/src/Symfony/Component/Filesystem/Tests/FilesystemTestCase.php @@ -22,7 +22,7 @@ class FilesystemTestCase extends \PHPUnit_Framework_TestCase public static function setUpBeforeClass() { - if (defined('PHP_WINDOWS_VERSION_MAJOR')) { + if ('\\' === DIRECTORY_SEPARATOR) { static::$symlinkOnWindows = true; $originDir = tempnam(sys_get_temp_dir(), 'sl'); $targetDir = tempnam(sys_get_temp_dir(), 'sl'); @@ -106,21 +106,21 @@ class FilesystemTestCase extends \PHPUnit_Framework_TestCase $this->markTestSkipped('symlink is not supported'); } - if (defined('PHP_WINDOWS_VERSION_MAJOR') && false === static::$symlinkOnWindows) { + if ('\\' === DIRECTORY_SEPARATOR && false === static::$symlinkOnWindows) { $this->markTestSkipped('symlink requires "Create symbolic links" privilege on windows'); } } protected function markAsSkippedIfChmodIsMissing() { - if (defined('PHP_WINDOWS_VERSION_MAJOR')) { + if ('\\' === DIRECTORY_SEPARATOR) { $this->markTestSkipped('chmod is not supported on windows'); } } protected function markAsSkippedIfPosixIsMissing() { - if (defined('PHP_WINDOWS_VERSION_MAJOR') || !function_exists('posix_isatty')) { + if ('\\' === DIRECTORY_SEPARATOR || !function_exists('posix_isatty')) { $this->markTestSkipped('Posix is not supported'); } } diff --git a/src/Symfony/Component/Process/Process.php b/src/Symfony/Component/Process/Process.php index 79bc072f54..e0324c8b1a 100644 --- a/src/Symfony/Component/Process/Process.php +++ b/src/Symfony/Component/Process/Process.php @@ -1229,7 +1229,7 @@ class Process return $result; } - if (defined('PHP_WINDOWS_VERSION_BUILD')) { + if ('\\' === DIRECTORY_SEPARATOR) { return $result = false; } diff --git a/src/Symfony/Component/Process/ProcessPipes.php b/src/Symfony/Component/Process/ProcessPipes.php index 928b1992f6..87d5f40d22 100644 --- a/src/Symfony/Component/Process/ProcessPipes.php +++ b/src/Symfony/Component/Process/ProcessPipes.php @@ -115,7 +115,7 @@ class ProcessPipes public function getDescriptors() { if ($this->disableOutput) { - $nullstream = fopen(defined('PHP_WINDOWS_VERSION_BUILD') ? 'NUL' : '/dev/null', 'c'); + $nullstream = fopen('\\' === DIRECTORY_SEPARATOR ? 'NUL' : '/dev/null', 'c'); return array( array('pipe', 'r'), diff --git a/src/Symfony/Component/Process/Tests/ProcessBuilderTest.php b/src/Symfony/Component/Process/Tests/ProcessBuilderTest.php index 7e6eea2cf9..68776bfa8e 100644 --- a/src/Symfony/Component/Process/Tests/ProcessBuilderTest.php +++ b/src/Symfony/Component/Process/Tests/ProcessBuilderTest.php @@ -122,14 +122,14 @@ class ProcessBuilderTest extends \PHPUnit_Framework_TestCase $pb->setPrefix(array('/usr/bin/php', 'composer.phar')); $proc = $pb->setArguments(array('-v'))->getProcess(); - if (defined('PHP_WINDOWS_VERSION_BUILD')) { + if ('\\' === DIRECTORY_SEPARATOR) { $this->assertEquals('"/usr/bin/php" "composer.phar" "-v"', $proc->getCommandLine()); } else { $this->assertEquals("'/usr/bin/php' 'composer.phar' '-v'", $proc->getCommandLine()); } $proc = $pb->setArguments(array('-i'))->getProcess(); - if (defined('PHP_WINDOWS_VERSION_BUILD')) { + if ('\\' === DIRECTORY_SEPARATOR) { $this->assertEquals('"/usr/bin/php" "composer.phar" "-i"', $proc->getCommandLine()); } else { $this->assertEquals("'/usr/bin/php' 'composer.phar' '-i'", $proc->getCommandLine()); From 00b429769b1272235a3241db4d9f2eff32acd99d Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Tue, 30 Dec 2014 15:05:42 +0000 Subject: [PATCH 04/17] Clarify a comment. The previous comment was lying since collectViewVariables() doesn't really call the buildPreliminaryFormTree() nor the buildFinalFormTree(). --- .../DataCollector/EventListener/DataCollectorListener.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Symfony/Component/Form/Extension/DataCollector/EventListener/DataCollectorListener.php b/src/Symfony/Component/Form/Extension/DataCollector/EventListener/DataCollectorListener.php index 65ed4abaae..6419af4778 100644 --- a/src/Symfony/Component/Form/Extension/DataCollector/EventListener/DataCollectorListener.php +++ b/src/Symfony/Component/Form/Extension/DataCollector/EventListener/DataCollectorListener.php @@ -76,8 +76,7 @@ class DataCollectorListener implements EventSubscriberInterface $this->dataCollector->collectSubmittedData($event->getForm()); // Assemble a form tree - // This is done again in collectViewVariables(), but that method - // is not guaranteed to be called (i.e. when no view is created) + // This is done again after the view is built, but we need it here as the view is not always created. $this->dataCollector->buildPreliminaryFormTree($event->getForm()); } } From 008f2ea00eed871cdec6f4d7a1947dfa9e203f37 Mon Sep 17 00:00:00 2001 From: Hugo Hamon Date: Tue, 30 Dec 2014 15:25:04 +0100 Subject: [PATCH 05/17] [Debug] fixes ClassNotFoundFatalErrorHandler to correctly handle class not found errors with Symfony ClassLoader component autoloaders. --- .../ClassNotFoundFatalErrorHandler.php | 7 ++- .../ClassNotFoundFatalErrorHandlerTest.php | 56 ++++++++++++++++++- src/Symfony/Component/Debug/composer.json | 1 + 3 files changed, 60 insertions(+), 4 deletions(-) diff --git a/src/Symfony/Component/Debug/FatalErrorHandler/ClassNotFoundFatalErrorHandler.php b/src/Symfony/Component/Debug/FatalErrorHandler/ClassNotFoundFatalErrorHandler.php index 5f7f1f38c1..61ae6ee510 100644 --- a/src/Symfony/Component/Debug/FatalErrorHandler/ClassNotFoundFatalErrorHandler.php +++ b/src/Symfony/Component/Debug/FatalErrorHandler/ClassNotFoundFatalErrorHandler.php @@ -15,7 +15,8 @@ use Symfony\Component\Debug\Exception\ClassNotFoundException; use Symfony\Component\Debug\Exception\FatalErrorException; use Symfony\Component\Debug\DebugClassLoader; use Composer\Autoload\ClassLoader as ComposerClassLoader; -use Symfony\Component\ClassLoader as SymfonyClassLoader; +use Symfony\Component\ClassLoader\ClassLoader as SymfonyClassLoader; +use Symfony\Component\ClassLoader\UniversalClassLoader as SymfonyUniversalClassLoader; /** * ErrorHandler for classes that do not exist. @@ -97,11 +98,11 @@ class ClassNotFoundFatalErrorHandler implements FatalErrorHandlerInterface // find Symfony and Composer autoloaders $classes = array(); + foreach ($functions as $function) { if (!is_array($function)) { continue; } - // get class loaders wrapped by DebugClassLoader if ($function[0] instanceof DebugClassLoader) { $function = $function[0]->getClassLoader(); @@ -116,7 +117,7 @@ class ClassNotFoundFatalErrorHandler implements FatalErrorHandlerInterface } } - if ($function[0] instanceof ComposerClassLoader || $function[0] instanceof SymfonyClassLoader) { + if ($function[0] instanceof ComposerClassLoader || $function[0] instanceof SymfonyClassLoader || $function[0] instanceof SymfonyUniversalClassLoader) { foreach ($function[0]->getPrefixes() as $prefix => $paths) { foreach ($paths as $path) { $classes = array_merge($classes, $this->findClassInPath($path, $class, $prefix)); diff --git a/src/Symfony/Component/Debug/Tests/FatalErrorHandler/ClassNotFoundFatalErrorHandlerTest.php b/src/Symfony/Component/Debug/Tests/FatalErrorHandler/ClassNotFoundFatalErrorHandlerTest.php index be6c74af9c..6490e41bea 100644 --- a/src/Symfony/Component/Debug/Tests/FatalErrorHandler/ClassNotFoundFatalErrorHandlerTest.php +++ b/src/Symfony/Component/Debug/Tests/FatalErrorHandler/ClassNotFoundFatalErrorHandlerTest.php @@ -11,6 +11,8 @@ namespace Symfony\Component\Debug\Tests\FatalErrorHandler; +use Symfony\Component\ClassLoader\ClassLoader as SymfonyClassLoader; +use Symfony\Component\ClassLoader\UniversalClassLoader as SymfonyUniversalClassLoader; use Symfony\Component\Debug\Exception\FatalErrorException; use Symfony\Component\Debug\FatalErrorHandler\ClassNotFoundFatalErrorHandler; @@ -19,11 +21,25 @@ class ClassNotFoundFatalErrorHandlerTest extends \PHPUnit_Framework_TestCase /** * @dataProvider provideClassNotFoundData */ - public function testClassNotFound($error, $translatedMessage) + public function testHandleClassNotFound($error, $translatedMessage, $autoloader = null) { + if ($autoloader) { + // Unregister all autoloaders to ensure the custom provided + // autoloader is the only one to be used during the test run. + $autoloaders = spl_autoload_functions(); + array_map('spl_autoload_unregister', $autoloaders); + spl_autoload_register($autoloader); + } + $handler = new ClassNotFoundFatalErrorHandler(); + $exception = $handler->handleError($error, new FatalErrorException('', 0, $error['type'], $error['file'], $error['line'])); + if ($autoloader) { + spl_autoload_unregister($autoloader); + array_map('spl_autoload_register', $autoloaders); + } + $this->assertInstanceof('Symfony\Component\Debug\Exception\ClassNotFoundException', $exception); $this->assertSame($translatedMessage, $exception->getMessage()); $this->assertSame($error['type'], $exception->getSeverity()); @@ -33,6 +49,14 @@ class ClassNotFoundFatalErrorHandlerTest extends \PHPUnit_Framework_TestCase public function provideClassNotFoundData() { + $prefixes = array('Symfony\Component\Debug\Exception\\' => realpath(__DIR__.'/../../Exception')); + + $symfonyAutoloader = new SymfonyClassLoader(); + $symfonyAutoloader->addPrefixes($prefixes); + + $symfonyUniversalClassLoader = new SymfonyUniversalClassLoader(); + $symfonyUniversalClassLoader->registerPrefixes($prefixes); + return array( array( array( @@ -79,6 +103,36 @@ class ClassNotFoundFatalErrorHandlerTest extends \PHPUnit_Framework_TestCase ), 'Attempted to load class "UndefinedFunctionException" from namespace "Foo\Bar" in foo.php line 12. Do you need to "use" it from another namespace? Perhaps you need to add a use statement for one of the following: Symfony\Component\Debug\Exception\UndefinedFunctionException.', ), + array( + array( + 'type' => 1, + 'line' => 12, + 'file' => 'foo.php', + 'message' => 'Class \'Foo\\Bar\\UndefinedFunctionException\' not found', + ), + 'Attempted to load class "UndefinedFunctionException" from namespace "Foo\Bar" in foo.php line 12. Do you need to "use" it from another namespace? Perhaps you need to add a use statement for one of the following: Symfony\Component\Debug\Exception\UndefinedFunctionException.', + array($symfonyAutoloader, 'loadClass'), + ), + array( + array( + 'type' => 1, + 'line' => 12, + 'file' => 'foo.php', + 'message' => 'Class \'Foo\\Bar\\UndefinedFunctionException\' not found', + ), + 'Attempted to load class "UndefinedFunctionException" from namespace "Foo\Bar" in foo.php line 12. Do you need to "use" it from another namespace? Perhaps you need to add a use statement for one of the following: Symfony\Component\Debug\Exception\UndefinedFunctionException.', + array($symfonyUniversalClassLoader, 'loadClass'), + ), + array( + array( + 'type' => 1, + 'line' => 12, + 'file' => 'foo.php', + 'message' => 'Class \'Foo\\Bar\\UndefinedFunctionException\' not found', + ), + 'Attempted to load class "UndefinedFunctionException" from namespace "Foo\Bar" in foo.php line 12. Do you need to "use" it from another namespace?', + function ($className) { /* do nothing here */ }, + ), ); } diff --git a/src/Symfony/Component/Debug/composer.json b/src/Symfony/Component/Debug/composer.json index f4b944b69b..9c95429b5c 100644 --- a/src/Symfony/Component/Debug/composer.json +++ b/src/Symfony/Component/Debug/composer.json @@ -19,6 +19,7 @@ "php": ">=5.3.3" }, "require-dev": { + "symfony/class-loader": "~2.2", "symfony/http-kernel": "~2.2", "symfony/http-foundation": "~2.1" }, From 625a02c7b68e3c06699a73d5e55b4de441bff56f Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Tue, 30 Dec 2014 22:35:52 +0100 Subject: [PATCH 06/17] force ExpressionLanguage version >= 2.6 The DependencyInjection component requires the ExpressionLanguage component to be present in version 2.6 or higher to be able to use expressions in service configurations since Symfony 2.6. --- src/Symfony/Component/DependencyInjection/composer.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Symfony/Component/DependencyInjection/composer.json b/src/Symfony/Component/DependencyInjection/composer.json index 5de5c0bfda..41746e95e0 100644 --- a/src/Symfony/Component/DependencyInjection/composer.json +++ b/src/Symfony/Component/DependencyInjection/composer.json @@ -23,6 +23,9 @@ "symfony/config": "~2.2", "symfony/expression-language": "~2.6" }, + "conflict": { + "symfony/expression-language": "<2.6" + }, "suggest": { "symfony/yaml": "", "symfony/config": "", From f38a72a2fb8607605ec5d8f7ec5f5c08a30fd799 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Mon, 29 Dec 2014 13:15:05 +0100 Subject: [PATCH 07/17] use value of DIRECTORY_SEPARATOR to detect Windows This commit unifies the detection of Windows builds across the Symfony codebase. --- .../Component/Console/Tests/Helper/ProcessHelperTest.php | 2 +- src/Symfony/Component/Filesystem/Filesystem.php | 2 +- src/Symfony/Component/Filesystem/Tests/FilesystemTest.php | 4 ++-- src/Symfony/Component/Process/Process.php | 2 +- src/Symfony/Component/VarDumper/Dumper/CliDumper.php | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Symfony/Component/Console/Tests/Helper/ProcessHelperTest.php b/src/Symfony/Component/Console/Tests/Helper/ProcessHelperTest.php index 327247c3d8..2e333dc05e 100644 --- a/src/Symfony/Component/Console/Tests/Helper/ProcessHelperTest.php +++ b/src/Symfony/Component/Console/Tests/Helper/ProcessHelperTest.php @@ -84,7 +84,7 @@ EOT; EOT; $errorMessage = 'An error occurred'; - if (defined('PHP_WINDOWS_VERSION_BUILD')) { + if ('\\' === DIRECTORY_SEPARATOR) { $successOutputProcessDebug = str_replace("'", '"', $successOutputProcessDebug); } diff --git a/src/Symfony/Component/Filesystem/Filesystem.php b/src/Symfony/Component/Filesystem/Filesystem.php index f2145e6417..ca2778cf56 100644 --- a/src/Symfony/Component/Filesystem/Filesystem.php +++ b/src/Symfony/Component/Filesystem/Filesystem.php @@ -286,7 +286,7 @@ class Filesystem */ public function symlink($originDir, $targetDir, $copyOnWindows = false) { - if (defined('PHP_WINDOWS_VERSION_MAJOR') && $copyOnWindows) { + if ('\\' === DIRECTORY_SEPARATOR && $copyOnWindows) { $this->mirror($originDir, $targetDir); return; diff --git a/src/Symfony/Component/Filesystem/Tests/FilesystemTest.php b/src/Symfony/Component/Filesystem/Tests/FilesystemTest.php index 2dadb51f20..6d284c0c0a 100644 --- a/src/Symfony/Component/Filesystem/Tests/FilesystemTest.php +++ b/src/Symfony/Component/Filesystem/Tests/FilesystemTest.php @@ -59,7 +59,7 @@ class FilesystemTest extends FilesystemTestCase public function testCopyUnreadableFileFails() { // skip test on Windows; PHP can't easily set file as unreadable on Windows - if (defined('PHP_WINDOWS_VERSION_MAJOR')) { + if ('\\' === DIRECTORY_SEPARATOR) { $this->markTestSkipped('This test cannot run on Windows.'); } @@ -133,7 +133,7 @@ class FilesystemTest extends FilesystemTestCase public function testCopyWithOverrideWithReadOnlyTargetFails() { // skip test on Windows; PHP can't easily set file as unwritable on Windows - if (defined('PHP_WINDOWS_VERSION_MAJOR')) { + if ('\\' === DIRECTORY_SEPARATOR) { $this->markTestSkipped('This test cannot run on Windows.'); } diff --git a/src/Symfony/Component/Process/Process.php b/src/Symfony/Component/Process/Process.php index fb45b00637..1cd801f11e 100644 --- a/src/Symfony/Component/Process/Process.php +++ b/src/Symfony/Component/Process/Process.php @@ -1249,7 +1249,7 @@ class Process */ private function getDescriptors() { - if (defined('PHP_WINDOWS_VERSION_BUILD')) { + if ('\\' === DIRECTORY_SEPARATOR) { $this->processPipes = WindowsPipes::create($this, $this->input); } else { $this->processPipes = UnixPipes::create($this, $this->input); diff --git a/src/Symfony/Component/VarDumper/Dumper/CliDumper.php b/src/Symfony/Component/VarDumper/Dumper/CliDumper.php index 6a171649bf..9b1be7c01b 100644 --- a/src/Symfony/Component/VarDumper/Dumper/CliDumper.php +++ b/src/Symfony/Component/VarDumper/Dumper/CliDumper.php @@ -52,7 +52,7 @@ class CliDumper extends AbstractDumper { parent::__construct($output); - if (defined('PHP_WINDOWS_VERSION_MAJOR') && false !== @getenv('ANSICON')) { + if ('\\' === DIRECTORY_SEPARATOR && false !== @getenv('ANSICON')) { // Use only the base 16 xterm colors when using ANSICON $this->setStyles(array( 'default' => '31', @@ -394,7 +394,7 @@ class CliDumper extends AbstractDumper } } - if (defined('PHP_WINDOWS_VERSION_MAJOR')) { + if ('\\' === DIRECTORY_SEPARATOR) { static::$defaultColors = @(false !== getenv('ANSICON') || 'ON' === getenv('ConEmuANSI')); } elseif (function_exists('posix_isatty')) { $h = stream_get_meta_data($this->outputStream) + array('wrapper_type' => null); From d5ccf018cf97cbc0dd97685630d868393adf2015 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Wed, 31 Dec 2014 09:46:23 +0000 Subject: [PATCH 08/17] [Debug] Update exception messages. --- .../ClassNotFoundFatalErrorHandlerTest.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Symfony/Component/Debug/Tests/FatalErrorHandler/ClassNotFoundFatalErrorHandlerTest.php b/src/Symfony/Component/Debug/Tests/FatalErrorHandler/ClassNotFoundFatalErrorHandlerTest.php index eca24d1801..c77a8760d3 100644 --- a/src/Symfony/Component/Debug/Tests/FatalErrorHandler/ClassNotFoundFatalErrorHandlerTest.php +++ b/src/Symfony/Component/Debug/Tests/FatalErrorHandler/ClassNotFoundFatalErrorHandlerTest.php @@ -110,7 +110,7 @@ class ClassNotFoundFatalErrorHandlerTest extends \PHPUnit_Framework_TestCase 'file' => 'foo.php', 'message' => 'Class \'Foo\\Bar\\UndefinedFunctionException\' not found', ), - 'Attempted to load class "UndefinedFunctionException" from namespace "Foo\Bar" in foo.php line 12. Do you need to "use" it from another namespace? Perhaps you need to add a use statement for one of the following: Symfony\Component\Debug\Exception\UndefinedFunctionException.', + "Attempted to load class \"UndefinedFunctionException\" from namespace \"Foo\Bar\".\nDid you forget a \"use\" statement for \"Symfony\Component\Debug\Exception\UndefinedFunctionException\"?", array($symfonyAutoloader, 'loadClass'), ), array( @@ -120,7 +120,7 @@ class ClassNotFoundFatalErrorHandlerTest extends \PHPUnit_Framework_TestCase 'file' => 'foo.php', 'message' => 'Class \'Foo\\Bar\\UndefinedFunctionException\' not found', ), - 'Attempted to load class "UndefinedFunctionException" from namespace "Foo\Bar" in foo.php line 12. Do you need to "use" it from another namespace? Perhaps you need to add a use statement for one of the following: Symfony\Component\Debug\Exception\UndefinedFunctionException.', + "Attempted to load class \"UndefinedFunctionException\" from namespace \"Foo\Bar\".\nDid you forget a \"use\" statement for \"Symfony\Component\Debug\Exception\UndefinedFunctionException\"?", array($symfonyUniversalClassLoader, 'loadClass'), ), array( @@ -130,7 +130,7 @@ class ClassNotFoundFatalErrorHandlerTest extends \PHPUnit_Framework_TestCase 'file' => 'foo.php', 'message' => 'Class \'Foo\\Bar\\UndefinedFunctionException\' not found', ), - 'Attempted to load class "UndefinedFunctionException" from namespace "Foo\Bar" in foo.php line 12. Do you need to "use" it from another namespace?', + "Attempted to load class \"UndefinedFunctionException\" from namespace \"Foo\\Bar\".\nDid you forget a \"use\" statement for another namespace?", function ($className) { /* do nothing here */ }, ), ); From c40569ccf1098865322fea10069f72f9018fdefd Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Wed, 31 Dec 2014 14:56:49 +0100 Subject: [PATCH 09/17] [VarDumper] increase debug.max_items to 2500 --- .../Bundle/DebugBundle/DependencyInjection/Configuration.php | 2 +- src/Symfony/Component/VarDumper/Cloner/AbstractCloner.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Bundle/DebugBundle/DependencyInjection/Configuration.php b/src/Symfony/Bundle/DebugBundle/DependencyInjection/Configuration.php index 223bc5b299..52cdfa94fe 100644 --- a/src/Symfony/Bundle/DebugBundle/DependencyInjection/Configuration.php +++ b/src/Symfony/Bundle/DebugBundle/DependencyInjection/Configuration.php @@ -34,7 +34,7 @@ class Configuration implements ConfigurationInterface ->integerNode('max_items') ->info('Max number of displayed items past the first level, -1 means no limit') ->min(-1) - ->defaultValue(250) + ->defaultValue(2500) ->end() ->integerNode('max_string_length') ->info('Max length of displayed strings, -1 means no limit') diff --git a/src/Symfony/Component/VarDumper/Cloner/AbstractCloner.php b/src/Symfony/Component/VarDumper/Cloner/AbstractCloner.php index 875c0f9cf5..827c4c7370 100644 --- a/src/Symfony/Component/VarDumper/Cloner/AbstractCloner.php +++ b/src/Symfony/Component/VarDumper/Cloner/AbstractCloner.php @@ -80,7 +80,7 @@ abstract class AbstractCloner implements ClonerInterface ':stream-context' => 'Symfony\Component\VarDumper\Caster\ResourceCaster::castStreamContext', ); - protected $maxItems = 250; + protected $maxItems = 2500; protected $maxString = -1; private $casters = array(); From 5a121df42be456f0dd0e262f50618b12f1293523 Mon Sep 17 00:00:00 2001 From: Saro0h Date: Thu, 1 Jan 2015 01:12:43 +0100 Subject: [PATCH 10/17] Updated copyright to 2015 --- LICENSE | 2 +- src/Symfony/Bridge/Doctrine/LICENSE | 2 +- src/Symfony/Bridge/Monolog/LICENSE | 2 +- src/Symfony/Bridge/Propel1/LICENSE | 2 +- src/Symfony/Bridge/ProxyManager/LICENSE | 2 +- src/Symfony/Bridge/Swiftmailer/LICENSE | 2 +- src/Symfony/Bridge/Twig/LICENSE | 2 +- src/Symfony/Bundle/FrameworkBundle/Resources/meta/LICENSE | 2 +- src/Symfony/Bundle/SecurityBundle/Resources/meta/LICENSE | 2 +- src/Symfony/Bundle/TwigBundle/Resources/meta/LICENSE | 2 +- src/Symfony/Bundle/WebProfilerBundle/Resources/meta/LICENSE | 2 +- src/Symfony/Component/BrowserKit/LICENSE | 2 +- src/Symfony/Component/ClassLoader/LICENSE | 2 +- src/Symfony/Component/Config/LICENSE | 2 +- src/Symfony/Component/Console/LICENSE | 2 +- src/Symfony/Component/CssSelector/LICENSE | 2 +- src/Symfony/Component/Debug/LICENSE | 2 +- src/Symfony/Component/DependencyInjection/LICENSE | 2 +- src/Symfony/Component/DomCrawler/LICENSE | 2 +- src/Symfony/Component/EventDispatcher/LICENSE | 2 +- src/Symfony/Component/Filesystem/LICENSE | 2 +- src/Symfony/Component/Finder/LICENSE | 2 +- src/Symfony/Component/Form/LICENSE | 2 +- src/Symfony/Component/HttpFoundation/LICENSE | 2 +- src/Symfony/Component/HttpKernel/LICENSE | 2 +- src/Symfony/Component/Intl/LICENSE | 2 +- src/Symfony/Component/Locale/LICENSE | 2 +- src/Symfony/Component/OptionsResolver/LICENSE | 2 +- src/Symfony/Component/Process/LICENSE | 2 +- src/Symfony/Component/PropertyAccess/LICENSE | 2 +- src/Symfony/Component/Routing/LICENSE | 2 +- src/Symfony/Component/Security/LICENSE | 2 +- src/Symfony/Component/Serializer/LICENSE | 2 +- src/Symfony/Component/Stopwatch/LICENSE | 2 +- src/Symfony/Component/Templating/LICENSE | 2 +- src/Symfony/Component/Translation/LICENSE | 2 +- src/Symfony/Component/Validator/LICENSE | 2 +- src/Symfony/Component/Yaml/LICENSE | 2 +- 38 files changed, 38 insertions(+), 38 deletions(-) diff --git a/LICENSE b/LICENSE index 0b3292cf90..43028bc600 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2014 Fabien Potencier +Copyright (c) 2004-2015 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/Symfony/Bridge/Doctrine/LICENSE b/src/Symfony/Bridge/Doctrine/LICENSE index 0b3292cf90..43028bc600 100644 --- a/src/Symfony/Bridge/Doctrine/LICENSE +++ b/src/Symfony/Bridge/Doctrine/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2014 Fabien Potencier +Copyright (c) 2004-2015 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/Symfony/Bridge/Monolog/LICENSE b/src/Symfony/Bridge/Monolog/LICENSE index 0b3292cf90..43028bc600 100644 --- a/src/Symfony/Bridge/Monolog/LICENSE +++ b/src/Symfony/Bridge/Monolog/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2014 Fabien Potencier +Copyright (c) 2004-2015 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/Symfony/Bridge/Propel1/LICENSE b/src/Symfony/Bridge/Propel1/LICENSE index 0b3292cf90..43028bc600 100644 --- a/src/Symfony/Bridge/Propel1/LICENSE +++ b/src/Symfony/Bridge/Propel1/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2014 Fabien Potencier +Copyright (c) 2004-2015 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/Symfony/Bridge/ProxyManager/LICENSE b/src/Symfony/Bridge/ProxyManager/LICENSE index 0b3292cf90..43028bc600 100644 --- a/src/Symfony/Bridge/ProxyManager/LICENSE +++ b/src/Symfony/Bridge/ProxyManager/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2014 Fabien Potencier +Copyright (c) 2004-2015 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/Symfony/Bridge/Swiftmailer/LICENSE b/src/Symfony/Bridge/Swiftmailer/LICENSE index 0b3292cf90..43028bc600 100644 --- a/src/Symfony/Bridge/Swiftmailer/LICENSE +++ b/src/Symfony/Bridge/Swiftmailer/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2014 Fabien Potencier +Copyright (c) 2004-2015 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/Symfony/Bridge/Twig/LICENSE b/src/Symfony/Bridge/Twig/LICENSE index 0b3292cf90..43028bc600 100644 --- a/src/Symfony/Bridge/Twig/LICENSE +++ b/src/Symfony/Bridge/Twig/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2014 Fabien Potencier +Copyright (c) 2004-2015 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/Symfony/Bundle/FrameworkBundle/Resources/meta/LICENSE b/src/Symfony/Bundle/FrameworkBundle/Resources/meta/LICENSE index 0b3292cf90..43028bc600 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Resources/meta/LICENSE +++ b/src/Symfony/Bundle/FrameworkBundle/Resources/meta/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2014 Fabien Potencier +Copyright (c) 2004-2015 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/Symfony/Bundle/SecurityBundle/Resources/meta/LICENSE b/src/Symfony/Bundle/SecurityBundle/Resources/meta/LICENSE index 0b3292cf90..43028bc600 100644 --- a/src/Symfony/Bundle/SecurityBundle/Resources/meta/LICENSE +++ b/src/Symfony/Bundle/SecurityBundle/Resources/meta/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2014 Fabien Potencier +Copyright (c) 2004-2015 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/Symfony/Bundle/TwigBundle/Resources/meta/LICENSE b/src/Symfony/Bundle/TwigBundle/Resources/meta/LICENSE index 0b3292cf90..43028bc600 100644 --- a/src/Symfony/Bundle/TwigBundle/Resources/meta/LICENSE +++ b/src/Symfony/Bundle/TwigBundle/Resources/meta/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2014 Fabien Potencier +Copyright (c) 2004-2015 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/meta/LICENSE b/src/Symfony/Bundle/WebProfilerBundle/Resources/meta/LICENSE index 0b3292cf90..43028bc600 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/meta/LICENSE +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/meta/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2014 Fabien Potencier +Copyright (c) 2004-2015 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/Symfony/Component/BrowserKit/LICENSE b/src/Symfony/Component/BrowserKit/LICENSE index 0b3292cf90..43028bc600 100644 --- a/src/Symfony/Component/BrowserKit/LICENSE +++ b/src/Symfony/Component/BrowserKit/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2014 Fabien Potencier +Copyright (c) 2004-2015 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/Symfony/Component/ClassLoader/LICENSE b/src/Symfony/Component/ClassLoader/LICENSE index 0b3292cf90..43028bc600 100644 --- a/src/Symfony/Component/ClassLoader/LICENSE +++ b/src/Symfony/Component/ClassLoader/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2014 Fabien Potencier +Copyright (c) 2004-2015 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/Symfony/Component/Config/LICENSE b/src/Symfony/Component/Config/LICENSE index 0b3292cf90..43028bc600 100644 --- a/src/Symfony/Component/Config/LICENSE +++ b/src/Symfony/Component/Config/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2014 Fabien Potencier +Copyright (c) 2004-2015 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/Symfony/Component/Console/LICENSE b/src/Symfony/Component/Console/LICENSE index 0b3292cf90..43028bc600 100644 --- a/src/Symfony/Component/Console/LICENSE +++ b/src/Symfony/Component/Console/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2014 Fabien Potencier +Copyright (c) 2004-2015 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/Symfony/Component/CssSelector/LICENSE b/src/Symfony/Component/CssSelector/LICENSE index 0b3292cf90..43028bc600 100644 --- a/src/Symfony/Component/CssSelector/LICENSE +++ b/src/Symfony/Component/CssSelector/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2014 Fabien Potencier +Copyright (c) 2004-2015 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/Symfony/Component/Debug/LICENSE b/src/Symfony/Component/Debug/LICENSE index 0b3292cf90..43028bc600 100644 --- a/src/Symfony/Component/Debug/LICENSE +++ b/src/Symfony/Component/Debug/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2014 Fabien Potencier +Copyright (c) 2004-2015 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/Symfony/Component/DependencyInjection/LICENSE b/src/Symfony/Component/DependencyInjection/LICENSE index 0b3292cf90..43028bc600 100644 --- a/src/Symfony/Component/DependencyInjection/LICENSE +++ b/src/Symfony/Component/DependencyInjection/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2014 Fabien Potencier +Copyright (c) 2004-2015 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/Symfony/Component/DomCrawler/LICENSE b/src/Symfony/Component/DomCrawler/LICENSE index 0b3292cf90..43028bc600 100644 --- a/src/Symfony/Component/DomCrawler/LICENSE +++ b/src/Symfony/Component/DomCrawler/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2014 Fabien Potencier +Copyright (c) 2004-2015 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/Symfony/Component/EventDispatcher/LICENSE b/src/Symfony/Component/EventDispatcher/LICENSE index 0b3292cf90..43028bc600 100644 --- a/src/Symfony/Component/EventDispatcher/LICENSE +++ b/src/Symfony/Component/EventDispatcher/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2014 Fabien Potencier +Copyright (c) 2004-2015 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/Symfony/Component/Filesystem/LICENSE b/src/Symfony/Component/Filesystem/LICENSE index 0b3292cf90..43028bc600 100644 --- a/src/Symfony/Component/Filesystem/LICENSE +++ b/src/Symfony/Component/Filesystem/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2014 Fabien Potencier +Copyright (c) 2004-2015 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/Symfony/Component/Finder/LICENSE b/src/Symfony/Component/Finder/LICENSE index 0b3292cf90..43028bc600 100644 --- a/src/Symfony/Component/Finder/LICENSE +++ b/src/Symfony/Component/Finder/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2014 Fabien Potencier +Copyright (c) 2004-2015 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/Symfony/Component/Form/LICENSE b/src/Symfony/Component/Form/LICENSE index 0b3292cf90..43028bc600 100644 --- a/src/Symfony/Component/Form/LICENSE +++ b/src/Symfony/Component/Form/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2014 Fabien Potencier +Copyright (c) 2004-2015 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/Symfony/Component/HttpFoundation/LICENSE b/src/Symfony/Component/HttpFoundation/LICENSE index 0b3292cf90..43028bc600 100644 --- a/src/Symfony/Component/HttpFoundation/LICENSE +++ b/src/Symfony/Component/HttpFoundation/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2014 Fabien Potencier +Copyright (c) 2004-2015 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/Symfony/Component/HttpKernel/LICENSE b/src/Symfony/Component/HttpKernel/LICENSE index 0b3292cf90..43028bc600 100644 --- a/src/Symfony/Component/HttpKernel/LICENSE +++ b/src/Symfony/Component/HttpKernel/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2014 Fabien Potencier +Copyright (c) 2004-2015 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/Symfony/Component/Intl/LICENSE b/src/Symfony/Component/Intl/LICENSE index 0b3292cf90..43028bc600 100644 --- a/src/Symfony/Component/Intl/LICENSE +++ b/src/Symfony/Component/Intl/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2014 Fabien Potencier +Copyright (c) 2004-2015 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/Symfony/Component/Locale/LICENSE b/src/Symfony/Component/Locale/LICENSE index 0b3292cf90..43028bc600 100644 --- a/src/Symfony/Component/Locale/LICENSE +++ b/src/Symfony/Component/Locale/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2014 Fabien Potencier +Copyright (c) 2004-2015 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/Symfony/Component/OptionsResolver/LICENSE b/src/Symfony/Component/OptionsResolver/LICENSE index 0b3292cf90..43028bc600 100644 --- a/src/Symfony/Component/OptionsResolver/LICENSE +++ b/src/Symfony/Component/OptionsResolver/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2014 Fabien Potencier +Copyright (c) 2004-2015 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/Symfony/Component/Process/LICENSE b/src/Symfony/Component/Process/LICENSE index 0b3292cf90..43028bc600 100644 --- a/src/Symfony/Component/Process/LICENSE +++ b/src/Symfony/Component/Process/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2014 Fabien Potencier +Copyright (c) 2004-2015 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/Symfony/Component/PropertyAccess/LICENSE b/src/Symfony/Component/PropertyAccess/LICENSE index 0b3292cf90..43028bc600 100644 --- a/src/Symfony/Component/PropertyAccess/LICENSE +++ b/src/Symfony/Component/PropertyAccess/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2014 Fabien Potencier +Copyright (c) 2004-2015 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/Symfony/Component/Routing/LICENSE b/src/Symfony/Component/Routing/LICENSE index 0b3292cf90..43028bc600 100644 --- a/src/Symfony/Component/Routing/LICENSE +++ b/src/Symfony/Component/Routing/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2014 Fabien Potencier +Copyright (c) 2004-2015 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/Symfony/Component/Security/LICENSE b/src/Symfony/Component/Security/LICENSE index 0b3292cf90..43028bc600 100644 --- a/src/Symfony/Component/Security/LICENSE +++ b/src/Symfony/Component/Security/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2014 Fabien Potencier +Copyright (c) 2004-2015 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/Symfony/Component/Serializer/LICENSE b/src/Symfony/Component/Serializer/LICENSE index 0b3292cf90..43028bc600 100644 --- a/src/Symfony/Component/Serializer/LICENSE +++ b/src/Symfony/Component/Serializer/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2014 Fabien Potencier +Copyright (c) 2004-2015 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/Symfony/Component/Stopwatch/LICENSE b/src/Symfony/Component/Stopwatch/LICENSE index 0b3292cf90..43028bc600 100644 --- a/src/Symfony/Component/Stopwatch/LICENSE +++ b/src/Symfony/Component/Stopwatch/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2014 Fabien Potencier +Copyright (c) 2004-2015 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/Symfony/Component/Templating/LICENSE b/src/Symfony/Component/Templating/LICENSE index 0b3292cf90..43028bc600 100644 --- a/src/Symfony/Component/Templating/LICENSE +++ b/src/Symfony/Component/Templating/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2014 Fabien Potencier +Copyright (c) 2004-2015 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/Symfony/Component/Translation/LICENSE b/src/Symfony/Component/Translation/LICENSE index 0b3292cf90..43028bc600 100644 --- a/src/Symfony/Component/Translation/LICENSE +++ b/src/Symfony/Component/Translation/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2014 Fabien Potencier +Copyright (c) 2004-2015 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/Symfony/Component/Validator/LICENSE b/src/Symfony/Component/Validator/LICENSE index 0b3292cf90..43028bc600 100644 --- a/src/Symfony/Component/Validator/LICENSE +++ b/src/Symfony/Component/Validator/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2014 Fabien Potencier +Copyright (c) 2004-2015 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/Symfony/Component/Yaml/LICENSE b/src/Symfony/Component/Yaml/LICENSE index 0b3292cf90..43028bc600 100644 --- a/src/Symfony/Component/Yaml/LICENSE +++ b/src/Symfony/Component/Yaml/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2014 Fabien Potencier +Copyright (c) 2004-2015 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal From cfa3e71664eae6ab57f12d2372a0f7bc947fe79e Mon Sep 17 00:00:00 2001 From: Saro0h Date: Thu, 1 Jan 2015 01:18:15 +0100 Subject: [PATCH 11/17] Updated copyright to 2015 --- src/Symfony/Component/ExpressionLanguage/LICENSE | 2 +- src/Symfony/Component/Security/Acl/LICENSE | 2 +- src/Symfony/Component/Security/Core/LICENSE | 2 +- src/Symfony/Component/Security/Csrf/LICENSE | 2 +- src/Symfony/Component/Security/Http/LICENSE | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Symfony/Component/ExpressionLanguage/LICENSE b/src/Symfony/Component/ExpressionLanguage/LICENSE index 0b3292cf90..43028bc600 100644 --- a/src/Symfony/Component/ExpressionLanguage/LICENSE +++ b/src/Symfony/Component/ExpressionLanguage/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2014 Fabien Potencier +Copyright (c) 2004-2015 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/Symfony/Component/Security/Acl/LICENSE b/src/Symfony/Component/Security/Acl/LICENSE index 0b3292cf90..43028bc600 100644 --- a/src/Symfony/Component/Security/Acl/LICENSE +++ b/src/Symfony/Component/Security/Acl/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2014 Fabien Potencier +Copyright (c) 2004-2015 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/Symfony/Component/Security/Core/LICENSE b/src/Symfony/Component/Security/Core/LICENSE index 0b3292cf90..43028bc600 100644 --- a/src/Symfony/Component/Security/Core/LICENSE +++ b/src/Symfony/Component/Security/Core/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2014 Fabien Potencier +Copyright (c) 2004-2015 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/Symfony/Component/Security/Csrf/LICENSE b/src/Symfony/Component/Security/Csrf/LICENSE index 0b3292cf90..43028bc600 100644 --- a/src/Symfony/Component/Security/Csrf/LICENSE +++ b/src/Symfony/Component/Security/Csrf/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2014 Fabien Potencier +Copyright (c) 2004-2015 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/Symfony/Component/Security/Http/LICENSE b/src/Symfony/Component/Security/Http/LICENSE index 0b3292cf90..43028bc600 100644 --- a/src/Symfony/Component/Security/Http/LICENSE +++ b/src/Symfony/Component/Security/Http/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2014 Fabien Potencier +Copyright (c) 2004-2015 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal From 48174b195b81567a95b2ffcdb67803bfe3369991 Mon Sep 17 00:00:00 2001 From: Saro0h Date: Thu, 1 Jan 2015 01:22:31 +0100 Subject: [PATCH 12/17] Updated copyright to 2015 --- src/Symfony/Bundle/DebugBundle/Resources/meta/LICENSE | 2 +- src/Symfony/Component/VarDumper/LICENSE | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Bundle/DebugBundle/Resources/meta/LICENSE b/src/Symfony/Bundle/DebugBundle/Resources/meta/LICENSE index 0b3292cf90..43028bc600 100644 --- a/src/Symfony/Bundle/DebugBundle/Resources/meta/LICENSE +++ b/src/Symfony/Bundle/DebugBundle/Resources/meta/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2014 Fabien Potencier +Copyright (c) 2004-2015 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/Symfony/Component/VarDumper/LICENSE b/src/Symfony/Component/VarDumper/LICENSE index 0b3292cf90..43028bc600 100644 --- a/src/Symfony/Component/VarDumper/LICENSE +++ b/src/Symfony/Component/VarDumper/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2014 Fabien Potencier +Copyright (c) 2004-2015 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal From 3c608ebc29f87b0ceac4b89367d9b12256e83fe4 Mon Sep 17 00:00:00 2001 From: Bailey Parker Date: Tue, 30 Dec 2014 19:27:17 -0500 Subject: [PATCH 13/17] Fixes Issue #13184 - incremental output getters now return empty strings --- src/Symfony/Component/Process/Process.php | 10 +++ .../Process/Tests/AbstractProcessTest.php | 62 +++++++++++++++++++ 2 files changed, 72 insertions(+) diff --git a/src/Symfony/Component/Process/Process.php b/src/Symfony/Component/Process/Process.php index 57c3319988..2331b448a6 100644 --- a/src/Symfony/Component/Process/Process.php +++ b/src/Symfony/Component/Process/Process.php @@ -401,6 +401,11 @@ class Process $data = $this->getOutput(); $latest = substr($data, $this->incrementalOutputOffset); + + if (false === $latest) { + return ''; + } + $this->incrementalOutputOffset = strlen($data); return $latest; @@ -442,6 +447,11 @@ class Process $data = $this->getErrorOutput(); $latest = substr($data, $this->incrementalErrorOutputOffset); + + if (false === $latest) { + return ''; + } + $this->incrementalErrorOutputOffset = strlen($data); return $latest; diff --git a/src/Symfony/Component/Process/Tests/AbstractProcessTest.php b/src/Symfony/Component/Process/Tests/AbstractProcessTest.php index 7a4c96c835..1286c107aa 100644 --- a/src/Symfony/Component/Process/Tests/AbstractProcessTest.php +++ b/src/Symfony/Component/Process/Tests/AbstractProcessTest.php @@ -276,6 +276,37 @@ abstract class AbstractProcessTest extends \PHPUnit_Framework_TestCase unlink($lock); } + public function testGetEmptyIncrementalErrorOutput() + { + // use a lock file to toggle between writing ("W") and reading ("R") the + // output stream + $lock = tempnam(sys_get_temp_dir(), get_class($this).'Lock'); + file_put_contents($lock, 'W'); + + $p = $this->getProcess(sprintf('php -r %s', escapeshellarg('$n = 0; while ($n < 3) { if (\'W\' === file_get_contents('.var_export($lock, true).')) { file_put_contents(\'php://stderr\', \'ERROR\'); $n++; file_put_contents('.var_export($lock, true).', \'R\'); } usleep(100); }'))); + + $p->start(); + + $shouldWrite = false; + + while ($p->isRunning()) { + if ('R' === file_get_contents($lock)) { + if (!$shouldWrite) { + $this->assertLessThanOrEqual(1, preg_match_all('/ERROR/', $p->getIncrementalOutput(), $matches)); + $shouldWrite = true; + } else { + $this->assertSame('', $p->getIncrementalOutput()); + + file_put_contents($lock, 'W'); + $shouldWrite = false; + } + } + usleep(100); + } + + unlink($lock); + } + public function testGetOutput() { $p = $this->getProcess(sprintf('php -r %s', escapeshellarg('$n = 0; while ($n < 3) { echo \' foo \'; $n++; }'))); @@ -305,6 +336,37 @@ abstract class AbstractProcessTest extends \PHPUnit_Framework_TestCase unlink($lock); } + public function testGetEmptyIncrementalOutput() + { + // use a lock file to toggle between writing ("W") and reading ("R") the + // output stream + $lock = tempnam(sys_get_temp_dir(), get_class($this).'Lock'); + file_put_contents($lock, 'W'); + + $p = $this->getProcess(sprintf('php -r %s', escapeshellarg('$n = 0; while ($n < 3) { if (\'W\' === file_get_contents('.var_export($lock, true).')) { echo \' foo \'; $n++; file_put_contents('.var_export($lock, true).', \'R\'); } usleep(100); }'))); + + $p->start(); + + $shouldWrite = false; + + while ($p->isRunning()) { + if ('R' === file_get_contents($lock)) { + if (!$shouldWrite) { + $this->assertLessThanOrEqual(1, preg_match_all('/foo/', $p->getIncrementalOutput(), $matches)); + $shouldWrite = true; + } else { + $this->assertSame('', $p->getIncrementalOutput()); + + file_put_contents($lock, 'W'); + $shouldWrite = false; + } + } + usleep(100); + } + + unlink($lock); + } + public function testZeroAsOutput() { if ('\\' === DIRECTORY_SEPARATOR) { From b83da8f742bc0f3268a2b54bcf396c04f2f423a2 Mon Sep 17 00:00:00 2001 From: Hugo Hamon Date: Sun, 21 Dec 2014 17:36:15 +0100 Subject: [PATCH 14/17] Fixes various phpdoc and coding standards. --- .../AbstractDoctrineExtension.php | 6 +- .../Form/ChoiceList/EntityChoiceList.php | 21 ++++--- .../Doctrine/Form/DoctrineOrmExtension.php | 3 +- .../MergeDoctrineCollectionListener.php | 2 +- .../RememberMe/DoctrineTokenProvider.php | 14 ++--- .../Constraints/UniqueEntityValidator.php | 3 - src/Symfony/Bridge/Monolog/Logger.php | 4 +- .../Form/ChoiceList/ModelChoiceList.php | 36 ++++++------ .../Instantiator/RuntimeInstantiator.php | 6 +- .../LazyProxy/PhpDumper/ProxyDumper.php | 4 +- .../Twig/Extension/HttpKernelExtension.php | 4 +- .../CacheWarmer/TemplateFinder.php | 2 +- .../Command/RouterMatchCommand.php | 2 +- .../FrameworkBundle/Controller/Controller.php | 3 +- .../Templating/Helper/ActionsHelper.php | 2 +- .../Templating/Helper/RequestHelper.php | 2 +- .../SecurityBundle/Command/InitAclCommand.php | 2 +- .../DependencyInjection/MainConfiguration.php | 2 +- .../DependencyInjection/SecurityExtension.php | 2 +- .../Form/UserLoginFormType.php | 6 +- .../Twig/Extension/LogoutUrlExtension.php | 13 ++--- .../Bundle/TwigBundle/Command/LintCommand.php | 1 - .../DependencyInjection/Configuration.php | 2 +- .../TwigBundle/Extension/ActionsExtension.php | 5 +- .../Controller/RouterController.php | 6 +- .../DependencyInjection/Configuration.php | 2 +- .../WebProfilerExtension.php | 2 +- src/Symfony/Component/BrowserKit/Client.php | 4 +- .../Component/Console/Command/Command.php | 2 +- .../Component/Console/Input/ArgvInput.php | 4 +- .../Component/Debug/ExceptionHandler.php | 4 +- .../ContainerAwareEventDispatcher.php | 4 +- .../Component/EventDispatcher/Event.php | 2 +- .../EventDispatcher/EventDispatcher.php | 14 ++--- .../Finder/Adapter/AbstractAdapter.php | 2 +- .../Finder/Comparator/NumberComparator.php | 2 +- src/Symfony/Component/Finder/Finder.php | 56 +++++++++++-------- .../Extension/Core/ChoiceList/ChoiceList.php | 2 +- .../Core/ChoiceList/ChoiceListInterface.php | 2 +- .../Component/Form/Tests/FormBuilderTest.php | 4 +- .../HttpFoundation/File/UploadedFile.php | 2 +- .../Component/HttpFoundation/Request.php | 4 +- src/Symfony/Component/HttpKernel/Client.php | 2 +- .../Controller/ControllerReference.php | 5 +- .../Fragment/EsiFragmentRenderer.php | 2 +- .../Fragment/FragmentRendererInterface.php | 2 - .../Command/BarCommand.php | 3 +- .../Intl/NumberFormatter/NumberFormatter.php | 2 +- .../Intl/Resources/stubs/Collator.php | 7 ++- .../Resources/stubs/IntlDateFormatter.php | 6 +- .../Component/Intl/Resources/stubs/Locale.php | 6 +- .../Intl/Resources/stubs/NumberFormatter.php | 6 +- .../Intl/Resources/stubs/functions.php | 8 +-- .../Security/Core/Util/ClassUtils.php | 4 +- src/Symfony/Component/Stopwatch/Stopwatch.php | 2 +- .../ConstraintViolationInterface.php | 2 +- .../GlobalExecutionContextInterface.php | 2 +- .../Validator/Mapping/Loader/FilesLoader.php | 4 +- .../Mapping/Loader/XmlFilesLoader.php | 2 +- .../Mapping/Loader/YamlFilesLoader.php | 2 +- 60 files changed, 168 insertions(+), 164 deletions(-) diff --git a/src/Symfony/Bridge/Doctrine/DependencyInjection/AbstractDoctrineExtension.php b/src/Symfony/Bridge/Doctrine/DependencyInjection/AbstractDoctrineExtension.php index 745a0a87d4..1518361c79 100644 --- a/src/Symfony/Bridge/Doctrine/DependencyInjection/AbstractDoctrineExtension.php +++ b/src/Symfony/Bridge/Doctrine/DependencyInjection/AbstractDoctrineExtension.php @@ -129,11 +129,11 @@ abstract class AbstractDoctrineExtension extends Extension */ protected function setMappingDriverConfig(array $mappingConfig, $mappingName) { - if (is_dir($mappingConfig['dir'])) { - $this->drivers[$mappingConfig['type']][$mappingConfig['prefix']] = realpath($mappingConfig['dir']); - } else { + if (!is_dir($mappingConfig['dir'])) { throw new \InvalidArgumentException(sprintf('Invalid Doctrine mapping path given. Cannot load Doctrine mapping/bundle named "%s".', $mappingName)); } + + $this->drivers[$mappingConfig['type']][$mappingConfig['prefix']] = realpath($mappingConfig['dir']); } /** diff --git a/src/Symfony/Bridge/Doctrine/Form/ChoiceList/EntityChoiceList.php b/src/Symfony/Bridge/Doctrine/Form/ChoiceList/EntityChoiceList.php index fdfd65421e..964fbdc935 100644 --- a/src/Symfony/Bridge/Doctrine/Form/ChoiceList/EntityChoiceList.php +++ b/src/Symfony/Bridge/Doctrine/Form/ChoiceList/EntityChoiceList.php @@ -16,6 +16,7 @@ use Symfony\Component\Form\Exception\StringCastException; use Symfony\Component\Form\Extension\Core\ChoiceList\ObjectChoiceList; use Doctrine\Common\Persistence\ObjectManager; use Symfony\Component\PropertyAccess\PropertyAccessorInterface; +use Doctrine\Common\Persistence\Mapping\ClassMetadata; /** * A choice list presenting a list of Doctrine entities as choices. @@ -35,7 +36,7 @@ class EntityChoiceList extends ObjectChoiceList private $class; /** - * @var \Doctrine\Common\Persistence\Mapping\ClassMetadata + * @var ClassMetadata */ private $classMetadata; @@ -132,7 +133,7 @@ class EntityChoiceList extends ObjectChoiceList * * @return array * - * @see Symfony\Component\Form\Extension\Core\ChoiceList\ChoiceListInterface + * @see ChoiceListInterface */ public function getChoices() { @@ -148,7 +149,7 @@ class EntityChoiceList extends ObjectChoiceList * * @return array * - * @see Symfony\Component\Form\Extension\Core\ChoiceList\ChoiceListInterface + * @see ChoiceListInterface */ public function getValues() { @@ -165,7 +166,7 @@ class EntityChoiceList extends ObjectChoiceList * * @return array * - * @see Symfony\Component\Form\Extension\Core\ChoiceList\ChoiceListInterface + * @see ChoiceListInterface */ public function getPreferredViews() { @@ -182,7 +183,7 @@ class EntityChoiceList extends ObjectChoiceList * * @return array * - * @see Symfony\Component\Form\Extension\Core\ChoiceList\ChoiceListInterface + * @see ChoiceListInterface */ public function getRemainingViews() { @@ -200,7 +201,7 @@ class EntityChoiceList extends ObjectChoiceList * * @return array * - * @see Symfony\Component\Form\Extension\Core\ChoiceList\ChoiceListInterface + * @see ChoiceListInterface */ public function getChoicesForValues(array $values) { @@ -253,7 +254,7 @@ class EntityChoiceList extends ObjectChoiceList * * @return array * - * @see Symfony\Component\Form\Extension\Core\ChoiceList\ChoiceListInterface + * @see ChoiceListInterface */ public function getValuesForChoices(array $entities) { @@ -293,7 +294,7 @@ class EntityChoiceList extends ObjectChoiceList * * @return array * - * @see Symfony\Component\Form\Extension\Core\ChoiceList\ChoiceListInterface + * @see ChoiceListInterface */ public function getIndicesForChoices(array $entities) { @@ -333,7 +334,7 @@ class EntityChoiceList extends ObjectChoiceList * * @return array * - * @see Symfony\Component\Form\Extension\Core\ChoiceList\ChoiceListInterface + * @see ChoiceListInterface */ public function getIndicesForValues(array $values) { @@ -416,6 +417,8 @@ class EntityChoiceList extends ObjectChoiceList /** * Loads the list with entities. + * + * @throws StringCastException */ private function load() { diff --git a/src/Symfony/Bridge/Doctrine/Form/DoctrineOrmExtension.php b/src/Symfony/Bridge/Doctrine/Form/DoctrineOrmExtension.php index 3553b2c4ae..570cc8f189 100644 --- a/src/Symfony/Bridge/Doctrine/Form/DoctrineOrmExtension.php +++ b/src/Symfony/Bridge/Doctrine/Form/DoctrineOrmExtension.php @@ -12,6 +12,7 @@ namespace Symfony\Bridge\Doctrine\Form; use Doctrine\Common\Persistence\ManagerRegistry; +use Symfony\Bridge\Doctrine\Form\Type\EntityType; use Symfony\Component\Form\AbstractExtension; use Symfony\Component\PropertyAccess\PropertyAccess; @@ -27,7 +28,7 @@ class DoctrineOrmExtension extends AbstractExtension protected function loadTypes() { return array( - new Type\EntityType($this->registry, PropertyAccess::createPropertyAccessor()), + new EntityType($this->registry, PropertyAccess::createPropertyAccessor()), ); } diff --git a/src/Symfony/Bridge/Doctrine/Form/EventListener/MergeDoctrineCollectionListener.php b/src/Symfony/Bridge/Doctrine/Form/EventListener/MergeDoctrineCollectionListener.php index b928bccfc7..4edf1043c5 100644 --- a/src/Symfony/Bridge/Doctrine/Form/EventListener/MergeDoctrineCollectionListener.php +++ b/src/Symfony/Bridge/Doctrine/Form/EventListener/MergeDoctrineCollectionListener.php @@ -23,7 +23,7 @@ use Symfony\Component\EventDispatcher\EventSubscriberInterface; * * @author Bernhard Schussek * - * @see Doctrine\Common\Collections\Collection + * @see Collection */ class MergeDoctrineCollectionListener implements EventSubscriberInterface { diff --git a/src/Symfony/Bridge/Doctrine/Security/RememberMe/DoctrineTokenProvider.php b/src/Symfony/Bridge/Doctrine/Security/RememberMe/DoctrineTokenProvider.php index 40112462c6..feb170cb72 100644 --- a/src/Symfony/Bridge/Doctrine/Security/RememberMe/DoctrineTokenProvider.php +++ b/src/Symfony/Bridge/Doctrine/Security/RememberMe/DoctrineTokenProvider.php @@ -41,14 +41,14 @@ class DoctrineTokenProvider implements TokenProviderInterface * Doctrine DBAL database connection * F.ex. service id: doctrine.dbal.default_connection. * - * @var \Doctrine\DBAL\Connection + * @var Connection */ private $conn; /** * new DoctrineTokenProvider for the RemembeMe authentication service. * - * @param \Doctrine\DBAL\Connection $conn + * @param Connection $conn */ public function __construct(Connection $conn) { @@ -65,14 +65,10 @@ class DoctrineTokenProvider implements TokenProviderInterface $paramValues = array('series' => $series); $paramTypes = array('series' => \PDO::PARAM_STR); $stmt = $this->conn->executeQuery($sql, $paramValues, $paramTypes); - $row = $stmt->fetch(\PDO::FETCH_ASSOC); + $row = $stmt->fetch(\PDO::FETCH_ASSOC); + if ($row) { - return new PersistentToken($row['class'], - $row['username'], - $series, - $row['value'], - new \DateTime($row['lastUsed']) - ); + return new PersistentToken($row['class'], $row['username'], $series, $row['value'], new \DateTime($row['lastUsed'])); } throw new TokenNotFoundException('No token found.'); diff --git a/src/Symfony/Bridge/Doctrine/Validator/Constraints/UniqueEntityValidator.php b/src/Symfony/Bridge/Doctrine/Validator/Constraints/UniqueEntityValidator.php index da66a4b9f6..e4bbcaff9b 100644 --- a/src/Symfony/Bridge/Doctrine/Validator/Constraints/UniqueEntityValidator.php +++ b/src/Symfony/Bridge/Doctrine/Validator/Constraints/UniqueEntityValidator.php @@ -29,9 +29,6 @@ class UniqueEntityValidator extends ConstraintValidator */ private $registry; - /** - * @param ManagerRegistry $registry - */ public function __construct(ManagerRegistry $registry) { $this->registry = $registry; diff --git a/src/Symfony/Bridge/Monolog/Logger.php b/src/Symfony/Bridge/Monolog/Logger.php index b675069ef7..cf8b537bdf 100644 --- a/src/Symfony/Bridge/Monolog/Logger.php +++ b/src/Symfony/Bridge/Monolog/Logger.php @@ -55,7 +55,7 @@ class Logger extends BaseLogger implements LoggerInterface, DebugLoggerInterface } /** - * @see Symfony\Component\HttpKernel\Log\DebugLoggerInterface + * {@inheritdoc} */ public function getLogs() { @@ -67,7 +67,7 @@ class Logger extends BaseLogger implements LoggerInterface, DebugLoggerInterface } /** - * @see Symfony\Component\HttpKernel\Log\DebugLoggerInterface + * {@inheritdoc} */ public function countErrors() { diff --git a/src/Symfony/Bridge/Propel1/Form/ChoiceList/ModelChoiceList.php b/src/Symfony/Bridge/Propel1/Form/ChoiceList/ModelChoiceList.php index a11deed45b..04d4f80ad2 100644 --- a/src/Symfony/Bridge/Propel1/Form/ChoiceList/ModelChoiceList.php +++ b/src/Symfony/Bridge/Propel1/Form/ChoiceList/ModelChoiceList.php @@ -11,11 +11,11 @@ namespace Symfony\Bridge\Propel1\Form\ChoiceList; -use ModelCriteria; -use BaseObject; -use Persistent; +use Symfony\Bridge\Propel1\Form\Type\ModelType; use Symfony\Component\Form\Exception\StringCastException; use Symfony\Component\Form\Extension\Core\ChoiceList\ObjectChoiceList; +use Symfony\Component\Form\Extension\Core\DataTransformer\ChoiceToValueTransformer; +use Symfony\Component\Form\Extension\Core\DataTransformer\ChoicesToValuesTransformer; use Symfony\Component\OptionsResolver\Exception\InvalidOptionsException; use Symfony\Component\OptionsResolver\Exception\MissingOptionsException; use Symfony\Component\PropertyAccess\PropertyAccessorInterface; @@ -40,14 +40,14 @@ class ModelChoiceList extends ObjectChoiceList /** * The query to retrieve the choices of this list. * - * @var ModelCriteria + * @var \ModelCriteria */ protected $query; /** * The query to retrieve the preferred choices for this list. * - * @var ModelCriteria + * @var \ModelCriteria */ protected $preferredQuery; @@ -68,16 +68,16 @@ class ModelChoiceList extends ObjectChoiceList /** * Constructor. * - * @see \Symfony\Bridge\Propel1\Form\Type\ModelType How to use the preferred choices. + * @see ModelType How to use the preferred choices. * * @param string $class The FQCN of the model class to be loaded. * @param string $labelPath A property path pointing to the property used for the choice labels. * @param array $choices An optional array to use, rather than fetching the models. - * @param ModelCriteria $queryObject The query to use retrieving model data from database. + * @param \ModelCriteria $queryObject The query to use retrieving model data from database. * @param string $groupPath A property path pointing to the property used to group the choices. - * @param array|ModelCriteria $preferred The preferred items of this choice. + * @param array|\ModelCriteria $preferred The preferred items of this choice. * Either an array if $choices is given, - * or a ModelCriteria to be merged with the $queryObject. + * or a \ModelCriteria to be merged with the $queryObject. * @param PropertyAccessorInterface $propertyAccessor The reflection graph for reading property paths. * * @throws MissingOptionsException when no model class is given @@ -101,7 +101,7 @@ class ModelChoiceList extends ObjectChoiceList $this->identifier = $this->query->getTableMap()->getPrimaryKeys(); $this->loaded = is_array($choices) || $choices instanceof \Traversable; - if ($preferred instanceof ModelCriteria) { + if ($preferred instanceof \ModelCriteria) { $this->preferredQuery = $preferred->mergeWith($this->query); } @@ -184,8 +184,8 @@ class ModelChoiceList extends ObjectChoiceList * * The choice option "expanded" is set to false. * * The current request is the submission of the selected value. * - * @see \Symfony\Component\Form\Extension\Core\DataTransformer\ChoicesToValuesTransformer::reverseTransform - * @see \Symfony\Component\Form\Extension\Core\DataTransformer\ChoiceToValueTransformer::reverseTransform + * @see ChoicesToValuesTransformer::reverseTransform() + * @see ChoiceToValueTransformer::reverseTransform() */ if (!$this->loaded) { if (1 === count($this->identifier)) { @@ -239,8 +239,8 @@ class ModelChoiceList extends ObjectChoiceList * It correlates with the performance optimization in {@link ModelChoiceList::getChoicesForValues()} * as it won't load the actual entries from the database. * - * @see \Symfony\Component\Form\Extension\Core\DataTransformer\ChoicesToValuesTransformer::transform - * @see \Symfony\Component\Form\Extension\Core\DataTransformer\ChoiceToValueTransformer::transform + * @see ChoicesToValuesTransformer::transform() + * @see ChoiceToValueTransformer::transform() */ if (1 === count($this->identifier)) { $values = array(); @@ -404,7 +404,7 @@ class ModelChoiceList extends ObjectChoiceList $models = (array) $this->query->find(); $preferred = array(); - if ($this->preferredQuery instanceof ModelCriteria) { + if ($this->preferredQuery instanceof \ModelCriteria) { $preferred = (array) $this->preferredQuery->find(); } @@ -435,12 +435,12 @@ class ModelChoiceList extends ObjectChoiceList return array(); } - if ($model instanceof Persistent) { + if ($model instanceof \Persistent) { return array($model->getPrimaryKey()); } - // readonly="true" models do not implement Persistent. - if ($model instanceof BaseObject && method_exists($model, 'getPrimaryKey')) { + // readonly="true" models do not implement \Persistent. + if ($model instanceof \BaseObject && method_exists($model, 'getPrimaryKey')) { return array($model->getPrimaryKey()); } diff --git a/src/Symfony/Bridge/ProxyManager/LazyProxy/Instantiator/RuntimeInstantiator.php b/src/Symfony/Bridge/ProxyManager/LazyProxy/Instantiator/RuntimeInstantiator.php index 6c5043f2c5..0101026794 100644 --- a/src/Symfony/Bridge/ProxyManager/LazyProxy/Instantiator/RuntimeInstantiator.php +++ b/src/Symfony/Bridge/ProxyManager/LazyProxy/Instantiator/RuntimeInstantiator.php @@ -27,17 +27,13 @@ use Symfony\Component\DependencyInjection\LazyProxy\Instantiator\InstantiatorInt class RuntimeInstantiator implements InstantiatorInterface { /** - * @var \ProxyManager\Factory\LazyLoadingValueHolderFactory + * @var LazyLoadingValueHolderFactory */ private $factory; - /** - * Constructor. - */ public function __construct() { $config = new Configuration(); - $config->setGeneratorStrategy(new EvaluatingGeneratorStrategy()); $this->factory = new LazyLoadingValueHolderFactory($config); diff --git a/src/Symfony/Bridge/ProxyManager/LazyProxy/PhpDumper/ProxyDumper.php b/src/Symfony/Bridge/ProxyManager/LazyProxy/PhpDumper/ProxyDumper.php index bcc6a4ca48..2865879ec1 100644 --- a/src/Symfony/Bridge/ProxyManager/LazyProxy/PhpDumper/ProxyDumper.php +++ b/src/Symfony/Bridge/ProxyManager/LazyProxy/PhpDumper/ProxyDumper.php @@ -27,12 +27,12 @@ use Symfony\Component\DependencyInjection\LazyProxy\PhpDumper\DumperInterface; class ProxyDumper implements DumperInterface { /** - * @var \ProxyManager\ProxyGenerator\LazyLoadingValueHolderGenerator + * @var LazyLoadingValueHolderGenerator */ private $proxyGenerator; /** - * @var \ProxyManager\GeneratorStrategy\BaseGeneratorStrategy + * @var BaseGeneratorStrategy */ private $classGenerator; diff --git a/src/Symfony/Bridge/Twig/Extension/HttpKernelExtension.php b/src/Symfony/Bridge/Twig/Extension/HttpKernelExtension.php index 2510f24920..4d9919d16c 100644 --- a/src/Symfony/Bridge/Twig/Extension/HttpKernelExtension.php +++ b/src/Symfony/Bridge/Twig/Extension/HttpKernelExtension.php @@ -50,7 +50,7 @@ class HttpKernelExtension extends \Twig_Extension * * @return string The fragment content * - * @see Symfony\Component\HttpKernel\Fragment\FragmentHandler::render() + * @see FragmentHandler::render() */ public function renderFragment($uri, $options = array()) { @@ -69,7 +69,7 @@ class HttpKernelExtension extends \Twig_Extension * * @return string The fragment content * - * @see Symfony\Component\HttpKernel\Fragment\FragmentHandler::render() + * @see FragmentHandler::render() */ public function renderFragmentStrategy($strategy, $uri, $options = array()) { diff --git a/src/Symfony/Bundle/FrameworkBundle/CacheWarmer/TemplateFinder.php b/src/Symfony/Bundle/FrameworkBundle/CacheWarmer/TemplateFinder.php index 7c441a8748..07f81f5878 100644 --- a/src/Symfony/Bundle/FrameworkBundle/CacheWarmer/TemplateFinder.php +++ b/src/Symfony/Bundle/FrameworkBundle/CacheWarmer/TemplateFinder.php @@ -55,7 +55,7 @@ class TemplateFinder implements TemplateFinderInterface $templates = array(); - foreach ($this->kernel->getBundles() as $name => $bundle) { + foreach ($this->kernel->getBundles() as $bundle) { $templates = array_merge($templates, $this->findTemplatesInBundle($bundle)); } diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/RouterMatchCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/RouterMatchCommand.php index 7d1f16696a..a54f18294f 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/RouterMatchCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/RouterMatchCommand.php @@ -72,7 +72,7 @@ EOF $traces = $matcher->getTraces($input->getArgument('path_info')); $matches = false; - foreach ($traces as $i => $trace) { + foreach ($traces as $trace) { if (TraceableUrlMatcher::ROUTE_ALMOST_MATCHES == $trace['level']) { $output->writeln(sprintf('Route "%s" almost matches but %s', $trace['name'], lcfirst($trace['log']))); } elseif (TraceableUrlMatcher::ROUTE_MATCHES == $trace['level']) { diff --git a/src/Symfony/Bundle/FrameworkBundle/Controller/Controller.php b/src/Symfony/Bundle/FrameworkBundle/Controller/Controller.php index 58569d0983..8dc35f2962 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Controller/Controller.php +++ b/src/Symfony/Bundle/FrameworkBundle/Controller/Controller.php @@ -22,6 +22,7 @@ use Symfony\Component\Form\FormTypeInterface; use Symfony\Component\Form\Form; use Symfony\Component\Form\FormBuilder; use Symfony\Component\Routing\Generator\UrlGeneratorInterface; +use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; use Doctrine\Bundle\DoctrineBundle\Registry; /** @@ -209,7 +210,7 @@ class Controller extends ContainerAware * * @throws \LogicException If SecurityBundle is not available * - * @see Symfony\Component\Security\Core\Authentication\Token\TokenInterface::getUser() + * @see TokenInterface::getUser() */ public function getUser() { diff --git a/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/ActionsHelper.php b/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/ActionsHelper.php index 253d348547..d4a855d53b 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/ActionsHelper.php +++ b/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/ActionsHelper.php @@ -42,7 +42,7 @@ class ActionsHelper extends Helper * * @return string The fragment content * - * @see Symfony\Component\HttpKernel\Fragment\FragmentHandler::render() + * @see FragmentHandler::render() */ public function render($uri, array $options = array()) { diff --git a/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/RequestHelper.php b/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/RequestHelper.php index c098be8cf6..9f001f7f3f 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/RequestHelper.php +++ b/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/RequestHelper.php @@ -41,7 +41,7 @@ class RequestHelper extends Helper * * @return mixed * - * @see Symfony\Component\HttpFoundation\Request::get() + * @see Request::get() */ public function getParameter($key, $default = null) { diff --git a/src/Symfony/Bundle/SecurityBundle/Command/InitAclCommand.php b/src/Symfony/Bundle/SecurityBundle/Command/InitAclCommand.php index a976c585ee..74889454b2 100644 --- a/src/Symfony/Bundle/SecurityBundle/Command/InitAclCommand.php +++ b/src/Symfony/Bundle/SecurityBundle/Command/InitAclCommand.php @@ -59,7 +59,7 @@ EOF try { $schema->addToSchema($connection->getSchemaManager()->createSchema()); } catch (SchemaException $e) { - $output->writeln("Aborting: ".$e->getMessage()); + $output->writeln('Aborting: '.$e->getMessage()); return 1; } diff --git a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/MainConfiguration.php b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/MainConfiguration.php index 55d607d1e7..79afd37527 100644 --- a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/MainConfiguration.php +++ b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/MainConfiguration.php @@ -49,7 +49,7 @@ class MainConfiguration implements ConfigurationInterface /** * Generates the configuration tree builder. * - * @return \Symfony\Component\Config\Definition\Builder\TreeBuilder The tree builder + * @return TreeBuilder The tree builder */ public function getConfigTreeBuilder() { diff --git a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/SecurityExtension.php b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/SecurityExtension.php index d6e0bad243..00f251765a 100644 --- a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/SecurityExtension.php +++ b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/SecurityExtension.php @@ -490,7 +490,7 @@ class SecurityExtension extends Extension } // Parses a tag and returns the id for the related user provider service - private function createUserDaoProvider($name, $provider, ContainerBuilder $container, $master = true) + private function createUserDaoProvider($name, $provider, ContainerBuilder $container) { $name = $this->getUserProviderId(strtolower($name)); diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/CsrfFormLoginBundle/Form/UserLoginFormType.php b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/CsrfFormLoginBundle/Form/UserLoginFormType.php index 21389efd07..11753cb126 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/CsrfFormLoginBundle/Form/UserLoginFormType.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/CsrfFormLoginBundle/Form/UserLoginFormType.php @@ -40,7 +40,7 @@ class UserLoginFormType extends AbstractType } /** - * @see Symfony\Component\Form\AbstractType::buildForm() + * {@inheritdoc} */ public function buildForm(FormBuilderInterface $builder, array $options) { @@ -75,7 +75,7 @@ class UserLoginFormType extends AbstractType } /** - * @see Symfony\Component\Form\AbstractType::setDefaultOptions() + * {@inheritdoc} */ public function setDefaultOptions(OptionsResolverInterface $resolver) { @@ -89,7 +89,7 @@ class UserLoginFormType extends AbstractType } /** - * @see Symfony\Component\Form\FormTypeInterface::getName() + * {@inheritdoc} */ public function getName() { diff --git a/src/Symfony/Bundle/SecurityBundle/Twig/Extension/LogoutUrlExtension.php b/src/Symfony/Bundle/SecurityBundle/Twig/Extension/LogoutUrlExtension.php index 7fc00bc46a..8d28b3f246 100644 --- a/src/Symfony/Bundle/SecurityBundle/Twig/Extension/LogoutUrlExtension.php +++ b/src/Symfony/Bundle/SecurityBundle/Twig/Extension/LogoutUrlExtension.php @@ -22,18 +22,13 @@ class LogoutUrlExtension extends \Twig_Extension { private $helper; - /** - * Constructor. - * - * @param LogoutUrlHelper $helper - */ public function __construct(LogoutUrlHelper $helper) { $this->helper = $helper; } /** - * @see Twig_Extension::getFunctions() + * {@inheritdoc} */ public function getFunctions() { @@ -44,7 +39,7 @@ class LogoutUrlExtension extends \Twig_Extension } /** - * Generate the relative logout URL for the firewall. + * Generates the relative logout URL for the firewall. * * @param string $key The firewall key * @@ -56,7 +51,7 @@ class LogoutUrlExtension extends \Twig_Extension } /** - * Generate the absolute logout URL for the firewall. + * Generates the absolute logout URL for the firewall. * * @param string $key The firewall key * @@ -68,7 +63,7 @@ class LogoutUrlExtension extends \Twig_Extension } /** - * @see Twig_ExtensionInterface::getName() + * {@inheritdoc} */ public function getName() { diff --git a/src/Symfony/Bundle/TwigBundle/Command/LintCommand.php b/src/Symfony/Bundle/TwigBundle/Command/LintCommand.php index aa01ce6e7b..f18ce09d60 100644 --- a/src/Symfony/Bundle/TwigBundle/Command/LintCommand.php +++ b/src/Symfony/Bundle/TwigBundle/Command/LintCommand.php @@ -77,7 +77,6 @@ EOF throw new \RuntimeException(sprintf('File or directory "%s" is not readable', $filename)); } - $files = array(); if (is_file($filename)) { $files = array($filename); } elseif (is_dir($filename)) { diff --git a/src/Symfony/Bundle/TwigBundle/DependencyInjection/Configuration.php b/src/Symfony/Bundle/TwigBundle/DependencyInjection/Configuration.php index 5e85512e9d..a20ca8c1a8 100644 --- a/src/Symfony/Bundle/TwigBundle/DependencyInjection/Configuration.php +++ b/src/Symfony/Bundle/TwigBundle/DependencyInjection/Configuration.php @@ -25,7 +25,7 @@ class Configuration implements ConfigurationInterface /** * Generates the configuration tree builder. * - * @return \Symfony\Component\Config\Definition\Builder\TreeBuilder The tree builder + * @return TreeBuilder The tree builder */ public function getConfigTreeBuilder() { diff --git a/src/Symfony/Bundle/TwigBundle/Extension/ActionsExtension.php b/src/Symfony/Bundle/TwigBundle/Extension/ActionsExtension.php index be96d69c04..3b08bd6859 100644 --- a/src/Symfony/Bundle/TwigBundle/Extension/ActionsExtension.php +++ b/src/Symfony/Bundle/TwigBundle/Extension/ActionsExtension.php @@ -12,6 +12,7 @@ namespace Symfony\Bundle\TwigBundle\Extension; use Symfony\Bundle\TwigBundle\TokenParser\RenderTokenParser; +use Symfony\Bundle\FrameworkBundle\Templating\Helper\ActionsHelper; use Symfony\Component\DependencyInjection\ContainerInterface; /** @@ -41,7 +42,7 @@ class ActionsExtension extends \Twig_Extension * @param string $uri A URI * @param array $options An array of options * - * @see Symfony\Bundle\FrameworkBundle\Controller\ControllerResolver::render() + * @see ActionsHelper::render() */ public function renderUri($uri, array $options = array()) { @@ -51,7 +52,7 @@ class ActionsExtension extends \Twig_Extension /** * Returns the token parser instance to add to the existing list. * - * @return array An array of Twig_TokenParser instances + * @return array An array of \Twig_TokenParser instances */ public function getTokenParsers() { diff --git a/src/Symfony/Bundle/WebProfilerBundle/Controller/RouterController.php b/src/Symfony/Bundle/WebProfilerBundle/Controller/RouterController.php index d171a8885f..f4a84bf568 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Controller/RouterController.php +++ b/src/Symfony/Bundle/WebProfilerBundle/Controller/RouterController.php @@ -36,11 +36,7 @@ class RouterController $this->profiler = $profiler; $this->twig = $twig; $this->matcher = $matcher; - $this->routes = $routes; - - if (null === $this->routes && $this->matcher instanceof RouterInterface) { - $this->routes = $matcher->getRouteCollection(); - } + $this->routes = (null === $routes && $matcher instanceof RouterInterface) ? $matcher->getRouteCollection() : $routes; } /** diff --git a/src/Symfony/Bundle/WebProfilerBundle/DependencyInjection/Configuration.php b/src/Symfony/Bundle/WebProfilerBundle/DependencyInjection/Configuration.php index 79ad59f870..4f84378f8d 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/DependencyInjection/Configuration.php +++ b/src/Symfony/Bundle/WebProfilerBundle/DependencyInjection/Configuration.php @@ -27,7 +27,7 @@ class Configuration implements ConfigurationInterface /** * Generates the configuration tree builder. * - * @return \Symfony\Component\Config\Definition\Builder\TreeBuilder The tree builder + * @return TreeBuilder The tree builder */ public function getConfigTreeBuilder() { diff --git a/src/Symfony/Bundle/WebProfilerBundle/DependencyInjection/WebProfilerExtension.php b/src/Symfony/Bundle/WebProfilerBundle/DependencyInjection/WebProfilerExtension.php index e4b4cb72a0..e5e84ae4f7 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/DependencyInjection/WebProfilerExtension.php +++ b/src/Symfony/Bundle/WebProfilerBundle/DependencyInjection/WebProfilerExtension.php @@ -25,7 +25,7 @@ use Symfony\Bundle\WebProfilerBundle\EventListener\WebDebugToolbarListener; * + * /> * * @author Fabien Potencier */ diff --git a/src/Symfony/Component/BrowserKit/Client.php b/src/Symfony/Component/BrowserKit/Client.php index b3f90a094d..7f640a7919 100644 --- a/src/Symfony/Component/BrowserKit/Client.php +++ b/src/Symfony/Component/BrowserKit/Client.php @@ -205,7 +205,7 @@ abstract class Client * * @return object|null A response instance * - * @see doRequest + * @see doRequest() * * @api */ @@ -234,7 +234,7 @@ abstract class Client * * @return object|null A Request instance * - * @see doRequest + * @see doRequest() * * @api */ diff --git a/src/Symfony/Component/Console/Command/Command.php b/src/Symfony/Component/Console/Command/Command.php index 771e45cee4..47e8432890 100644 --- a/src/Symfony/Component/Console/Command/Command.php +++ b/src/Symfony/Component/Console/Command/Command.php @@ -165,7 +165,7 @@ class Command * * @throws \LogicException When this abstract method is not implemented * - * @see setCode() + * @see setCode() */ protected function execute(InputInterface $input, OutputInterface $output) { diff --git a/src/Symfony/Component/Console/Input/ArgvInput.php b/src/Symfony/Component/Console/Input/ArgvInput.php index 1aa6a1f171..7234f75608 100644 --- a/src/Symfony/Component/Console/Input/ArgvInput.php +++ b/src/Symfony/Component/Console/Input/ArgvInput.php @@ -33,8 +33,8 @@ namespace Symfony\Component\Console\Input; * * @author Fabien Potencier * - * @see http://www.gnu.org/software/libc/manual/html_node/Argument-Syntax.html - * @see http://www.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap12.html#tag_12_02 + * @see http://www.gnu.org/software/libc/manual/html_node/Argument-Syntax.html + * @see http://www.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap12.html#tag_12_02 * * @api */ diff --git a/src/Symfony/Component/Debug/ExceptionHandler.php b/src/Symfony/Component/Debug/ExceptionHandler.php index d957241fdb..9ab418c945 100644 --- a/src/Symfony/Component/Debug/ExceptionHandler.php +++ b/src/Symfony/Component/Debug/ExceptionHandler.php @@ -61,8 +61,8 @@ class ExceptionHandler * * @param \Exception $exception An \Exception instance * - * @see sendPhpResponse - * @see createResponse + * @see sendPhpResponse() + * @see createResponse() */ public function handle(\Exception $exception) { diff --git a/src/Symfony/Component/EventDispatcher/ContainerAwareEventDispatcher.php b/src/Symfony/Component/EventDispatcher/ContainerAwareEventDispatcher.php index bf8fcd87e8..897fafd4f1 100644 --- a/src/Symfony/Component/EventDispatcher/ContainerAwareEventDispatcher.php +++ b/src/Symfony/Component/EventDispatcher/ContainerAwareEventDispatcher.php @@ -103,7 +103,7 @@ class ContainerAwareEventDispatcher extends EventDispatcher } /** - * @see EventDispatcherInterface::hasListeners + * @see EventDispatcherInterface::hasListeners() */ public function hasListeners($eventName = null) { @@ -119,7 +119,7 @@ class ContainerAwareEventDispatcher extends EventDispatcher } /** - * @see EventDispatcherInterface::getListeners + * @see EventDispatcherInterface::getListeners() */ public function getListeners($eventName = null) { diff --git a/src/Symfony/Component/EventDispatcher/Event.php b/src/Symfony/Component/EventDispatcher/Event.php index 53a6ad33c5..ea89f56bcd 100644 --- a/src/Symfony/Component/EventDispatcher/Event.php +++ b/src/Symfony/Component/EventDispatcher/Event.php @@ -47,7 +47,7 @@ class Event /** * Returns whether further event listeners should be triggered. * - * @see Event::stopPropagation + * @see Event::stopPropagation() * * @return bool Whether propagation was already stopped for this event. * diff --git a/src/Symfony/Component/EventDispatcher/EventDispatcher.php b/src/Symfony/Component/EventDispatcher/EventDispatcher.php index 3700125f38..12c75fcafd 100644 --- a/src/Symfony/Component/EventDispatcher/EventDispatcher.php +++ b/src/Symfony/Component/EventDispatcher/EventDispatcher.php @@ -33,7 +33,7 @@ class EventDispatcher implements EventDispatcherInterface private $sorted = array(); /** - * @see EventDispatcherInterface::dispatch + * @see EventDispatcherInterface::dispatch() * * @api */ @@ -56,7 +56,7 @@ class EventDispatcher implements EventDispatcherInterface } /** - * @see EventDispatcherInterface::getListeners + * @see EventDispatcherInterface::getListeners() */ public function getListeners($eventName = null) { @@ -78,7 +78,7 @@ class EventDispatcher implements EventDispatcherInterface } /** - * @see EventDispatcherInterface::hasListeners + * @see EventDispatcherInterface::hasListeners() */ public function hasListeners($eventName = null) { @@ -86,7 +86,7 @@ class EventDispatcher implements EventDispatcherInterface } /** - * @see EventDispatcherInterface::addListener + * @see EventDispatcherInterface::addListener() * * @api */ @@ -97,7 +97,7 @@ class EventDispatcher implements EventDispatcherInterface } /** - * @see EventDispatcherInterface::removeListener + * @see EventDispatcherInterface::removeListener() */ public function removeListener($eventName, $listener) { @@ -113,7 +113,7 @@ class EventDispatcher implements EventDispatcherInterface } /** - * @see EventDispatcherInterface::addSubscriber + * @see EventDispatcherInterface::addSubscriber() * * @api */ @@ -133,7 +133,7 @@ class EventDispatcher implements EventDispatcherInterface } /** - * @see EventDispatcherInterface::removeSubscriber + * @see EventDispatcherInterface::removeSubscriber() */ public function removeSubscriber(EventSubscriberInterface $subscriber) { diff --git a/src/Symfony/Component/Finder/Adapter/AbstractAdapter.php b/src/Symfony/Component/Finder/Adapter/AbstractAdapter.php index c534a6015c..4ddd913174 100644 --- a/src/Symfony/Component/Finder/Adapter/AbstractAdapter.php +++ b/src/Symfony/Component/Finder/Adapter/AbstractAdapter.php @@ -228,7 +228,7 @@ abstract class AbstractAdapter implements AdapterInterface * isSupported in the adapters as the generic implementation provides a cache * layer. * - * @see isSupported + * @see isSupported() * * @return bool Whether the adapter is supported */ diff --git a/src/Symfony/Component/Finder/Comparator/NumberComparator.php b/src/Symfony/Component/Finder/Comparator/NumberComparator.php index 65326e7883..c8587dc5ba 100644 --- a/src/Symfony/Component/Finder/Comparator/NumberComparator.php +++ b/src/Symfony/Component/Finder/Comparator/NumberComparator.php @@ -30,7 +30,7 @@ namespace Symfony\Component\Finder\Comparator; * @copyright 2004-2005 Fabien Potencier * @copyright 2002 Richard Clamp * - * @see http://physics.nist.gov/cuu/Units/binary.html + * @see http://physics.nist.gov/cuu/Units/binary.html */ class NumberComparator extends Comparator { diff --git a/src/Symfony/Component/Finder/Finder.php b/src/Symfony/Component/Finder/Finder.php index 8aed2bcd02..0eeda75911 100644 --- a/src/Symfony/Component/Finder/Finder.php +++ b/src/Symfony/Component/Finder/Finder.php @@ -15,7 +15,17 @@ use Symfony\Component\Finder\Adapter\AdapterInterface; use Symfony\Component\Finder\Adapter\GnuFindAdapter; use Symfony\Component\Finder\Adapter\BsdFindAdapter; use Symfony\Component\Finder\Adapter\PhpAdapter; +use Symfony\Component\Finder\Comparator\DateComparator; +use Symfony\Component\Finder\Comparator\NumberComparator; use Symfony\Component\Finder\Exception\ExceptionInterface; +use Symfony\Component\Finder\Iterator\CustomFilterIterator; +use Symfony\Component\Finder\Iterator\DateRangeFilterIterator; +use Symfony\Component\Finder\Iterator\DepthRangeFilterIterator; +use Symfony\Component\Finder\Iterator\ExcludeDirectoryFilterIterator; +use Symfony\Component\Finder\Iterator\FilecontentFilterIterator; +use Symfony\Component\Finder\Iterator\FilenameFilterIterator; +use Symfony\Component\Finder\Iterator\SizeRangeFilterIterator; +use Symfony\Component\Finder\Iterator\SortableIterator; /** * Finder allows to build rules to find files and directories. @@ -202,8 +212,8 @@ class Finder implements \IteratorAggregate, \Countable * * @return Finder The current Finder instance * - * @see Symfony\Component\Finder\Iterator\DepthRangeFilterIterator - * @see Symfony\Component\Finder\Comparator\NumberComparator + * @see DepthRangeFilterIterator + * @see NumberComparator * * @api */ @@ -229,8 +239,8 @@ class Finder implements \IteratorAggregate, \Countable * @return Finder The current Finder instance * * @see strtotime - * @see Symfony\Component\Finder\Iterator\DateRangeFilterIterator - * @see Symfony\Component\Finder\Comparator\DateComparator + * @see DateRangeFilterIterator + * @see DateComparator * * @api */ @@ -254,7 +264,7 @@ class Finder implements \IteratorAggregate, \Countable * * @return Finder The current Finder instance * - * @see Symfony\Component\Finder\Iterator\FilenameFilterIterator + * @see FilenameFilterIterator * * @api */ @@ -272,7 +282,7 @@ class Finder implements \IteratorAggregate, \Countable * * @return Finder The current Finder instance * - * @see Symfony\Component\Finder\Iterator\FilenameFilterIterator + * @see FilenameFilterIterator * * @api */ @@ -295,7 +305,7 @@ class Finder implements \IteratorAggregate, \Countable * * @return Finder The current Finder instance * - * @see Symfony\Component\Finder\Iterator\FilecontentFilterIterator + * @see FilecontentFilterIterator */ public function contains($pattern) { @@ -316,7 +326,7 @@ class Finder implements \IteratorAggregate, \Countable * * @return Finder The current Finder instance * - * @see Symfony\Component\Finder\Iterator\FilecontentFilterIterator + * @see FilecontentFilterIterator */ public function notContains($pattern) { @@ -339,7 +349,7 @@ class Finder implements \IteratorAggregate, \Countable * * @return Finder The current Finder instance * - * @see Symfony\Component\Finder\Iterator\FilenameFilterIterator + * @see FilenameFilterIterator */ public function path($pattern) { @@ -362,7 +372,7 @@ class Finder implements \IteratorAggregate, \Countable * * @return Finder The current Finder instance * - * @see Symfony\Component\Finder\Iterator\FilenameFilterIterator + * @see FilenameFilterIterator */ public function notPath($pattern) { @@ -382,8 +392,8 @@ class Finder implements \IteratorAggregate, \Countable * * @return Finder The current Finder instance * - * @see Symfony\Component\Finder\Iterator\SizeRangeFilterIterator - * @see Symfony\Component\Finder\Comparator\NumberComparator + * @see SizeRangeFilterIterator + * @see NumberComparator * * @api */ @@ -401,7 +411,7 @@ class Finder implements \IteratorAggregate, \Countable * * @return Finder The current Finder instance * - * @see Symfony\Component\Finder\Iterator\ExcludeDirectoryFilterIterator + * @see ExcludeDirectoryFilterIterator * * @api */ @@ -419,7 +429,7 @@ class Finder implements \IteratorAggregate, \Countable * * @return Finder The current Finder instance * - * @see Symfony\Component\Finder\Iterator\ExcludeDirectoryFilterIterator + * @see ExcludeDirectoryFilterIterator * * @api */ @@ -441,7 +451,7 @@ class Finder implements \IteratorAggregate, \Countable * * @return Finder The current Finder instance * - * @see Symfony\Component\Finder\Iterator\ExcludeDirectoryFilterIterator + * @see ExcludeDirectoryFilterIterator * * @api */ @@ -459,7 +469,7 @@ class Finder implements \IteratorAggregate, \Countable /** * Adds VCS patterns. * - * @see ignoreVCS + * @see ignoreVCS() * * @param string|string[] $pattern VCS patterns to ignore */ @@ -483,7 +493,7 @@ class Finder implements \IteratorAggregate, \Countable * * @return Finder The current Finder instance * - * @see Symfony\Component\Finder\Iterator\SortableIterator + * @see SortableIterator * * @api */ @@ -501,7 +511,7 @@ class Finder implements \IteratorAggregate, \Countable * * @return Finder The current Finder instance * - * @see Symfony\Component\Finder\Iterator\SortableIterator + * @see SortableIterator * * @api */ @@ -519,7 +529,7 @@ class Finder implements \IteratorAggregate, \Countable * * @return Finder The current Finder instance * - * @see Symfony\Component\Finder\Iterator\SortableIterator + * @see SortableIterator * * @api */ @@ -539,7 +549,7 @@ class Finder implements \IteratorAggregate, \Countable * * @return Finder The current Finder instance * - * @see Symfony\Component\Finder\Iterator\SortableIterator + * @see SortableIterator * * @api */ @@ -561,7 +571,7 @@ class Finder implements \IteratorAggregate, \Countable * * @return Finder The current Finder instance * - * @see Symfony\Component\Finder\Iterator\SortableIterator + * @see SortableIterator * * @api */ @@ -581,7 +591,7 @@ class Finder implements \IteratorAggregate, \Countable * * @return Finder The current Finder instance * - * @see Symfony\Component\Finder\Iterator\SortableIterator + * @see SortableIterator * * @api */ @@ -602,7 +612,7 @@ class Finder implements \IteratorAggregate, \Countable * * @return Finder The current Finder instance * - * @see Symfony\Component\Finder\Iterator\CustomFilterIterator + * @see CustomFilterIterator * * @api */ diff --git a/src/Symfony/Component/Form/Extension/Core/ChoiceList/ChoiceList.php b/src/Symfony/Component/Form/Extension/Core/ChoiceList/ChoiceList.php index 358cc4cd17..d9d00ef7d1 100644 --- a/src/Symfony/Component/Form/Extension/Core/ChoiceList/ChoiceList.php +++ b/src/Symfony/Component/Form/Extension/Core/ChoiceList/ChoiceList.php @@ -501,7 +501,7 @@ class ChoiceList implements ChoiceListInterface * * @return array The fixed choices. * - * @see fixChoice + * @see fixChoice() */ protected function fixChoices(array $choices) { diff --git a/src/Symfony/Component/Form/Extension/Core/ChoiceList/ChoiceListInterface.php b/src/Symfony/Component/Form/Extension/Core/ChoiceList/ChoiceListInterface.php index c74a666228..d205b92d4d 100644 --- a/src/Symfony/Component/Form/Extension/Core/ChoiceList/ChoiceListInterface.php +++ b/src/Symfony/Component/Form/Extension/Core/ChoiceList/ChoiceListInterface.php @@ -88,7 +88,7 @@ interface ChoiceListInterface * choice indices as keys on the lowest levels and the choice * group names in the keys of the higher levels * - * @see getPreferredValues + * @see getPreferredValues() */ public function getRemainingViews(); diff --git a/src/Symfony/Component/Form/Tests/FormBuilderTest.php b/src/Symfony/Component/Form/Tests/FormBuilderTest.php index 71cd70cfbb..c49d393b44 100644 --- a/src/Symfony/Component/Form/Tests/FormBuilderTest.php +++ b/src/Symfony/Component/Form/Tests/FormBuilderTest.php @@ -16,9 +16,7 @@ use Symfony\Component\Form\FormBuilder; class FormBuilderTest extends \PHPUnit_Framework_TestCase { private $dispatcher; - private $factory; - private $builder; protected function setUp() @@ -43,7 +41,7 @@ class FormBuilderTest extends \PHPUnit_Framework_TestCase * Changing the name is not allowed, otherwise the name and property path * are not synchronized anymore. * - * @see FormType::buildForm + * @see FormType::buildForm() */ public function testNoSetName() { diff --git a/src/Symfony/Component/HttpFoundation/File/UploadedFile.php b/src/Symfony/Component/HttpFoundation/File/UploadedFile.php index 6693742e27..98b1176063 100644 --- a/src/Symfony/Component/HttpFoundation/File/UploadedFile.php +++ b/src/Symfony/Component/HttpFoundation/File/UploadedFile.php @@ -139,7 +139,7 @@ class UploadedFile extends File * * @return string|null The mime type * - * @see getMimeType + * @see getMimeType() * * @api */ diff --git a/src/Symfony/Component/HttpFoundation/Request.php b/src/Symfony/Component/HttpFoundation/Request.php index 5756c49cbe..4544c090e5 100644 --- a/src/Symfony/Component/HttpFoundation/Request.php +++ b/src/Symfony/Component/HttpFoundation/Request.php @@ -1223,7 +1223,7 @@ class Request * * @api * - * @see getRealMethod + * @see getRealMethod() */ public function getMethod() { @@ -1247,7 +1247,7 @@ class Request * * @return string The request method * - * @see getMethod + * @see getMethod() */ public function getRealMethod() { diff --git a/src/Symfony/Component/HttpKernel/Client.php b/src/Symfony/Component/HttpKernel/Client.php index d1a29ef8d0..ca3f45b6bf 100644 --- a/src/Symfony/Component/HttpKernel/Client.php +++ b/src/Symfony/Component/HttpKernel/Client.php @@ -162,7 +162,7 @@ EOF; * If the size of a file is greater than the allowed size (from php.ini) then * an invalid UploadedFile is returned with an error set to UPLOAD_ERR_INI_SIZE. * - * @see Symfony\Component\HttpFoundation\File\UploadedFile + * @see UploadedFile * * @param array $files An array of files * diff --git a/src/Symfony/Component/HttpKernel/Controller/ControllerReference.php b/src/Symfony/Component/HttpKernel/Controller/ControllerReference.php index 22d6cd320d..3d1592e83a 100644 --- a/src/Symfony/Component/HttpKernel/Controller/ControllerReference.php +++ b/src/Symfony/Component/HttpKernel/Controller/ControllerReference.php @@ -11,6 +11,8 @@ namespace Symfony\Component\HttpKernel\Controller; +use Symfony\Component\HttpKernel\Fragment\FragmentRendererInterface; + /** * Acts as a marker and a data holder for a Controller. * @@ -20,8 +22,7 @@ namespace Symfony\Component\HttpKernel\Controller; * * @author Fabien Potencier * - * @see Symfony\Component\HttpKernel\FragmentRenderer - * @see Symfony\Component\HttpKernel\Fragment\FragmentRendererInterface + * @see FragmentRendererInterface */ class ControllerReference { diff --git a/src/Symfony/Component/HttpKernel/Fragment/EsiFragmentRenderer.php b/src/Symfony/Component/HttpKernel/Fragment/EsiFragmentRenderer.php index 8ff0e6ad44..43f6520f5a 100644 --- a/src/Symfony/Component/HttpKernel/Fragment/EsiFragmentRenderer.php +++ b/src/Symfony/Component/HttpKernel/Fragment/EsiFragmentRenderer.php @@ -56,7 +56,7 @@ class EsiFragmentRenderer extends RoutableFragmentRenderer * * alt: an alternative URI to render in case of an error * * comment: a comment to add when returning an esi:include tag * - * @see Symfony\Component\HttpKernel\HttpCache\ESI + * @see Esi */ public function render($uri, Request $request, array $options = array()) { diff --git a/src/Symfony/Component/HttpKernel/Fragment/FragmentRendererInterface.php b/src/Symfony/Component/HttpKernel/Fragment/FragmentRendererInterface.php index ae172df80d..b177c3ac12 100644 --- a/src/Symfony/Component/HttpKernel/Fragment/FragmentRendererInterface.php +++ b/src/Symfony/Component/HttpKernel/Fragment/FragmentRendererInterface.php @@ -19,8 +19,6 @@ use Symfony\Component\HttpFoundation\Response; * Interface implemented by all rendering strategies. * * @author Fabien Potencier - * - * @see Symfony\Component\HttpKernel\FragmentRenderer */ interface FragmentRendererInterface { diff --git a/src/Symfony/Component/HttpKernel/Tests/Fixtures/ExtensionPresentBundle/Command/BarCommand.php b/src/Symfony/Component/HttpKernel/Tests/Fixtures/ExtensionPresentBundle/Command/BarCommand.php index 0eb420f789..f3fd14b55d 100644 --- a/src/Symfony/Component/HttpKernel/Tests/Fixtures/ExtensionPresentBundle/Command/BarCommand.php +++ b/src/Symfony/Component/HttpKernel/Tests/Fixtures/ExtensionPresentBundle/Command/BarCommand.php @@ -3,11 +3,12 @@ namespace Symfony\Component\HttpKernel\Tests\Fixtures\ExtensionPresentBundle\Command; use Symfony\Component\Console\Command\Command; +use Symfony\Component\HttpKernel\Bundle; /** * This command has a required parameter on the constructor and will be ignored by the default Bundle implementation. * - * @see Symfony\Component\HttpKernel\Bundle\Bundle::registerCommands + * @see Bundle::registerCommands() */ class BarCommand extends Command { diff --git a/src/Symfony/Component/Intl/NumberFormatter/NumberFormatter.php b/src/Symfony/Component/Intl/NumberFormatter/NumberFormatter.php index 56a92a1cb8..b35b943dd4 100644 --- a/src/Symfony/Component/Intl/NumberFormatter/NumberFormatter.php +++ b/src/Symfony/Component/Intl/NumberFormatter/NumberFormatter.php @@ -510,7 +510,7 @@ class NumberFormatter * * @return bool|string The parsed value of false on error * - * @see http://www.php.net/manual/en/numberformatter.parse.php + * @see http://www.php.net/manual/en/numberformatter.parse.php */ public function parse($value, $type = self::TYPE_DOUBLE, &$position = 0) { diff --git a/src/Symfony/Component/Intl/Resources/stubs/Collator.php b/src/Symfony/Component/Intl/Resources/stubs/Collator.php index 3886f5cbd6..2e73e5aace 100644 --- a/src/Symfony/Component/Intl/Resources/stubs/Collator.php +++ b/src/Symfony/Component/Intl/Resources/stubs/Collator.php @@ -9,13 +9,16 @@ * file that was distributed with this source code. */ +use Symfony\Component\Intl\Collator\Collator as IntlCollator; +use Symfony\Component\Intl\Collator\StubCollator; + /** * Stub implementation for the Collator class of the intl extension. * * @author Bernhard Schussek * - * @see \Symfony\Component\Intl\Collator\StubCollator + * @see StubCollator */ -class Collator extends \Symfony\Component\Intl\Collator\Collator +class Collator extends IntlCollator { } diff --git a/src/Symfony/Component/Intl/Resources/stubs/IntlDateFormatter.php b/src/Symfony/Component/Intl/Resources/stubs/IntlDateFormatter.php index 38bb50e14f..e5209b62cc 100644 --- a/src/Symfony/Component/Intl/Resources/stubs/IntlDateFormatter.php +++ b/src/Symfony/Component/Intl/Resources/stubs/IntlDateFormatter.php @@ -9,13 +9,15 @@ * file that was distributed with this source code. */ +use Symfony\Component\Intl\DateFormatter\IntlDateFormatter as BaseIntlDateFormatter; + /** * Stub implementation for the IntlDateFormatter class of the intl extension. * * @author Bernhard Schussek * - * @see \Symfony\Component\Intl\DateFormatter\IntlDateFormatter + * @see BaseIntlDateFormatter */ -class IntlDateFormatter extends \Symfony\Component\Intl\DateFormatter\IntlDateFormatter +class IntlDateFormatter extends BaseIntlDateFormatter { } diff --git a/src/Symfony/Component/Intl/Resources/stubs/Locale.php b/src/Symfony/Component/Intl/Resources/stubs/Locale.php index 704c8e3be1..8a3b89bc3e 100644 --- a/src/Symfony/Component/Intl/Resources/stubs/Locale.php +++ b/src/Symfony/Component/Intl/Resources/stubs/Locale.php @@ -9,13 +9,15 @@ * file that was distributed with this source code. */ +use Symfony\Component\Intl\Locale\Locale as IntlLocale; + /** * Stub implementation for the Locale class of the intl extension. * * @author Bernhard Schussek * - * @see \Symfony\Component\Intl\Locale\Locale + * @see IntlLocale */ -class Locale extends \Symfony\Component\Intl\Locale\Locale +class Locale extends IntlLocale { } diff --git a/src/Symfony/Component/Intl/Resources/stubs/NumberFormatter.php b/src/Symfony/Component/Intl/Resources/stubs/NumberFormatter.php index 0ab6562958..c8e689b3ab 100644 --- a/src/Symfony/Component/Intl/Resources/stubs/NumberFormatter.php +++ b/src/Symfony/Component/Intl/Resources/stubs/NumberFormatter.php @@ -9,13 +9,15 @@ * file that was distributed with this source code. */ +use Symfony\Component\Intl\NumberFormatter\NumberFormatter as IntlNumberFormatter; + /** * Stub implementation for the NumberFormatter class of the intl extension. * * @author Bernhard Schussek * - * @see \Symfony\Component\Intl\NumberFormatter\NumberFormatter + * @see IntlNumberFormatter */ -class NumberFormatter extends \Symfony\Component\Intl\NumberFormatter\NumberFormatter +class NumberFormatter extends IntlNumberFormatter { } diff --git a/src/Symfony/Component/Intl/Resources/stubs/functions.php b/src/Symfony/Component/Intl/Resources/stubs/functions.php index 0cf404b846..704f0f0c72 100644 --- a/src/Symfony/Component/Intl/Resources/stubs/functions.php +++ b/src/Symfony/Component/Intl/Resources/stubs/functions.php @@ -22,7 +22,7 @@ if (!function_exists('intl_is_failure')) { * * @return bool Whether the error code indicates an error. * - * @see \Symfony\Component\Intl\Globals\StubIntlGlobals::isFailure + * @see IntlGlobals::isFailure() */ function intl_is_failure($errorCode) { @@ -38,7 +38,7 @@ if (!function_exists('intl_is_failure')) { * @return bool The error code of the last intl function call or * IntlGlobals::U_ZERO_ERROR if no error occurred. * - * @see \Symfony\Component\Intl\Globals\StubIntlGlobals::getErrorCode + * @see IntlGlobals::getErrorCode() */ function intl_get_error_code() { @@ -54,7 +54,7 @@ if (!function_exists('intl_is_failure')) { * @return bool The error message of the last intl function call or * "U_ZERO_ERROR" if no error occurred. * - * @see \Symfony\Component\Intl\Globals\StubIntlGlobals::getErrorMessage + * @see IntlGlobals::getErrorMessage() */ function intl_get_error_message() { @@ -69,7 +69,7 @@ if (!function_exists('intl_is_failure')) { * * @return string The name of the error code constant. * - * @see \Symfony\Component\Intl\Globals\StubIntlGlobals::getErrorName + * @see IntlGlobals::getErrorName() */ function intl_error_name($errorCode) { diff --git a/src/Symfony/Component/Security/Core/Util/ClassUtils.php b/src/Symfony/Component/Security/Core/Util/ClassUtils.php index 0585204622..6107c40fa6 100644 --- a/src/Symfony/Component/Security/Core/Util/ClassUtils.php +++ b/src/Symfony/Component/Security/Core/Util/ClassUtils.php @@ -11,11 +11,13 @@ namespace Symfony\Component\Security\Core\Util; +use Doctrine\Common\Util\ClassUtils as DoctrineClassUtils; + /** * Class related functionality for objects that * might or might not be proxy objects at the moment. * - * @see Doctrine\Common\Util\ClassUtils + * @see DoctrineClassUtils * * @author Benjamin Eberlei * @author Johannes Schmitt diff --git a/src/Symfony/Component/Stopwatch/Stopwatch.php b/src/Symfony/Component/Stopwatch/Stopwatch.php index b1935a38e7..31f5a3096a 100644 --- a/src/Symfony/Component/Stopwatch/Stopwatch.php +++ b/src/Symfony/Component/Stopwatch/Stopwatch.php @@ -58,7 +58,7 @@ class Stopwatch * * The id parameter is used to retrieve the events from this section. * - * @see getSectionEvents + * @see getSectionEvents() * * @param string $id The identifier of the section * diff --git a/src/Symfony/Component/Validator/ConstraintViolationInterface.php b/src/Symfony/Component/Validator/ConstraintViolationInterface.php index 01bec9d013..232fb5513f 100644 --- a/src/Symfony/Component/Validator/ConstraintViolationInterface.php +++ b/src/Symfony/Component/Validator/ConstraintViolationInterface.php @@ -65,7 +65,7 @@ interface ConstraintViolationInterface * @return array A possibly empty list of parameters indexed by the names * that appear in the message template. * - * @see getMessageTemplate + * @see getMessageTemplate() * * @api */ diff --git a/src/Symfony/Component/Validator/GlobalExecutionContextInterface.php b/src/Symfony/Component/Validator/GlobalExecutionContextInterface.php index aff44b3507..199d36c61b 100644 --- a/src/Symfony/Component/Validator/GlobalExecutionContextInterface.php +++ b/src/Symfony/Component/Validator/GlobalExecutionContextInterface.php @@ -41,7 +41,7 @@ interface GlobalExecutionContextInterface * * @return mixed The root value. * - * @see ExecutionContextInterface::getRoot + * @see ExecutionContextInterface::getRoot() */ public function getRoot(); diff --git a/src/Symfony/Component/Validator/Mapping/Loader/FilesLoader.php b/src/Symfony/Component/Validator/Mapping/Loader/FilesLoader.php index a20c797a0a..a631093296 100644 --- a/src/Symfony/Component/Validator/Mapping/Loader/FilesLoader.php +++ b/src/Symfony/Component/Validator/Mapping/Loader/FilesLoader.php @@ -18,8 +18,8 @@ namespace Symfony\Component\Validator\Mapping\Loader; * * @author Bulat Shakirzyanov * - * @see Symfony\Component\Validator\Mapping\Loader\YamlFileLoader - * @see Symfony\Component\Validator\Mapping\Loader\XmlFileLoader + * @see YamlFileLoader + * @see XmlFileLoader */ abstract class FilesLoader extends LoaderChain { diff --git a/src/Symfony/Component/Validator/Mapping/Loader/XmlFilesLoader.php b/src/Symfony/Component/Validator/Mapping/Loader/XmlFilesLoader.php index bba6dd9e06..3b7043feaf 100644 --- a/src/Symfony/Component/Validator/Mapping/Loader/XmlFilesLoader.php +++ b/src/Symfony/Component/Validator/Mapping/Loader/XmlFilesLoader.php @@ -16,7 +16,7 @@ namespace Symfony\Component\Validator\Mapping\Loader; * * @author Bulat Shakirzyanov * - * @see Symfony\Component\Validator\Mapping\Loader\FilesLoader + * @see FilesLoader */ class XmlFilesLoader extends FilesLoader { diff --git a/src/Symfony/Component/Validator/Mapping/Loader/YamlFilesLoader.php b/src/Symfony/Component/Validator/Mapping/Loader/YamlFilesLoader.php index 8ca5ed4eb0..e01def2f67 100644 --- a/src/Symfony/Component/Validator/Mapping/Loader/YamlFilesLoader.php +++ b/src/Symfony/Component/Validator/Mapping/Loader/YamlFilesLoader.php @@ -16,7 +16,7 @@ namespace Symfony\Component\Validator\Mapping\Loader; * * @author Bulat Shakirzyanov * - * @see Symfony\Component\Validator\Mapping\Loader\FilesLoader + * @see FilesLoader */ class YamlFilesLoader extends FilesLoader { From 5a14941a6f65ade10baf040e4b8414354ba8b348 Mon Sep 17 00:00:00 2001 From: Mikael Pajunen Date: Thu, 1 Jan 2015 15:52:57 +0200 Subject: [PATCH 15/17] [Process] Removed unused variable assignment --- src/Symfony/Component/Process/Tests/ExecutableFinderTest.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/Symfony/Component/Process/Tests/ExecutableFinderTest.php b/src/Symfony/Component/Process/Tests/ExecutableFinderTest.php index 9af8082adf..c26520b670 100644 --- a/src/Symfony/Component/Process/Tests/ExecutableFinderTest.php +++ b/src/Symfony/Component/Process/Tests/ExecutableFinderTest.php @@ -120,8 +120,6 @@ class ExecutableFinderTest extends \PHPUnit_Framework_TestCase $this->markTestSkipped('Requires the PHP_BINARY constant'); } - $execPath = __DIR__.'/SignalListener.php'; - $this->setPath(''); ini_set('open_basedir', PHP_BINARY.PATH_SEPARATOR.'/'); From 99ff8a6de4a0c7bec0cd62cd87ba52b5287bd958 Mon Sep 17 00:00:00 2001 From: Mikael Pajunen Date: Thu, 1 Jan 2015 16:36:27 +0200 Subject: [PATCH 16/17] [Process] Added a test skip check for Windows The test FindProcessInOpenBasedir fails similarly to FindWithOpenBaseDir on Windows. --- src/Symfony/Component/Process/Tests/ExecutableFinderTest.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Symfony/Component/Process/Tests/ExecutableFinderTest.php b/src/Symfony/Component/Process/Tests/ExecutableFinderTest.php index c26520b670..9d0a0d141f 100644 --- a/src/Symfony/Component/Process/Tests/ExecutableFinderTest.php +++ b/src/Symfony/Component/Process/Tests/ExecutableFinderTest.php @@ -120,6 +120,10 @@ class ExecutableFinderTest extends \PHPUnit_Framework_TestCase $this->markTestSkipped('Requires the PHP_BINARY constant'); } + if ('\\' === DIRECTORY_SEPARATOR) { + $this->markTestSkipped('Cannot run test on windows'); + } + $this->setPath(''); ini_set('open_basedir', PHP_BINARY.PATH_SEPARATOR.'/'); From 75d0d593e3290acc68e0a6c8402b842f7144c0f1 Mon Sep 17 00:00:00 2001 From: Mikael Pajunen Date: Fri, 2 Jan 2015 18:12:15 +0200 Subject: [PATCH 17/17] Use PHPUnit ini_set wrapper in tests PHPUnit ini_set wrapper is now used in tests to automatically reset ini settings after the test is run. This avoids possible side effects and test skipping. Native ini_set is still used in DefaultCsrfProviderTest, but its tests are run in isolation. --- .../Component/Debug/Tests/ErrorHandlerTest.php | 9 +-------- .../Session/Storage/NativeSessionStorageTest.php | 12 ++++++------ .../Session/Storage/PhpBridgeSessionStorageTest.php | 4 ++-- .../Tests/EventListener/ExceptionListenerTest.php | 6 +----- .../Component/Process/Tests/ExecutableFinderTest.php | 4 ++-- 5 files changed, 12 insertions(+), 23 deletions(-) diff --git a/src/Symfony/Component/Debug/Tests/ErrorHandlerTest.php b/src/Symfony/Component/Debug/Tests/ErrorHandlerTest.php index 3ba7ad21f8..409780cffc 100644 --- a/src/Symfony/Component/Debug/Tests/ErrorHandlerTest.php +++ b/src/Symfony/Component/Debug/Tests/ErrorHandlerTest.php @@ -26,21 +26,14 @@ class ErrorHandlerTest extends \PHPUnit_Framework_TestCase */ protected $errorReporting; - /** - * @var string Display errors setting before running tests. - */ - protected $displayErrors; - public function setUp() { $this->errorReporting = error_reporting(E_ALL | E_STRICT); - $this->displayErrors = ini_get('display_errors'); - ini_set('display_errors', '1'); + $this->iniSet('display_errors', '1'); } public function tearDown() { - ini_set('display_errors', $this->displayErrors); error_reporting($this->errorReporting); } diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/NativeSessionStorageTest.php b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/NativeSessionStorageTest.php index 41329e7248..e2146d8434 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/NativeSessionStorageTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/NativeSessionStorageTest.php @@ -35,8 +35,8 @@ class NativeSessionStorageTest extends \PHPUnit_Framework_TestCase protected function setUp() { - ini_set('session.save_handler', 'files'); - ini_set('session.save_path', $this->savePath = sys_get_temp_dir().'/sf2test'); + $this->iniSet('session.save_handler', 'files'); + $this->iniSet('session.save_path', $this->savePath = sys_get_temp_dir().'/sf2test'); if (!is_dir($this->savePath)) { mkdir($this->savePath); } @@ -121,7 +121,7 @@ class NativeSessionStorageTest extends \PHPUnit_Framework_TestCase public function testDefaultSessionCacheLimiter() { - ini_set('session.cache_limiter', 'nocache'); + $this->iniSet('session.cache_limiter', 'nocache'); $storage = new NativeSessionStorage(); $this->assertEquals('', ini_get('session.cache_limiter')); @@ -129,7 +129,7 @@ class NativeSessionStorageTest extends \PHPUnit_Framework_TestCase public function testExplicitSessionCacheLimiter() { - ini_set('session.cache_limiter', 'nocache'); + $this->iniSet('session.cache_limiter', 'nocache'); $storage = new NativeSessionStorage(array('cache_limiter' => 'public')); $this->assertEquals('public', ini_get('session.cache_limiter')); @@ -171,7 +171,7 @@ class NativeSessionStorageTest extends \PHPUnit_Framework_TestCase $this->markTestSkipped('Test skipped, for PHP 5.3 only.'); } - ini_set('session.save_handler', 'files'); + $this->iniSet('session.save_handler', 'files'); $storage = $this->getStorage(); $storage->setSaveHandler(); $this->assertInstanceOf('Symfony\Component\HttpFoundation\Session\Storage\Proxy\NativeProxy', $storage->getSaveHandler()); @@ -193,7 +193,7 @@ class NativeSessionStorageTest extends \PHPUnit_Framework_TestCase $this->markTestSkipped('Test skipped, for PHP 5.4 only.'); } - ini_set('session.save_handler', 'files'); + $this->iniSet('session.save_handler', 'files'); $storage = $this->getStorage(); $storage->setSaveHandler(); $this->assertInstanceOf('Symfony\Component\HttpFoundation\Session\Storage\Proxy\SessionHandlerProxy', $storage->getSaveHandler()); diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/PhpBridgeSessionStorageTest.php b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/PhpBridgeSessionStorageTest.php index d9f4a30a89..0acc4458cc 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/PhpBridgeSessionStorageTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/PhpBridgeSessionStorageTest.php @@ -30,8 +30,8 @@ class PhpBridgeSessionStorageTest extends \PHPUnit_Framework_TestCase protected function setUp() { - ini_set('session.save_handler', 'files'); - ini_set('session.save_path', $this->savePath = sys_get_temp_dir().'/sf2test'); + $this->iniSet('session.save_handler', 'files'); + $this->iniSet('session.save_path', $this->savePath = sys_get_temp_dir().'/sf2test'); if (!is_dir($this->savePath)) { mkdir($this->savePath); } diff --git a/src/Symfony/Component/HttpKernel/Tests/EventListener/ExceptionListenerTest.php b/src/Symfony/Component/HttpKernel/Tests/EventListener/ExceptionListenerTest.php index d691e0aaaf..02664b7eed 100644 --- a/src/Symfony/Component/HttpKernel/Tests/EventListener/ExceptionListenerTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/EventListener/ExceptionListenerTest.php @@ -56,8 +56,7 @@ class ExceptionListenerTest extends \PHPUnit_Framework_TestCase */ public function testHandleWithoutLogger($event, $event2) { - // store the current error_log, and disable it temporarily - $errorLog = ini_set('error_log', file_exists('/dev/null') ? '/dev/null' : 'nul'); + $this->iniSet('error_log', file_exists('/dev/null') ? '/dev/null' : 'nul'); $l = new ExceptionListener('foo'); $l->onKernelException($event); @@ -69,9 +68,6 @@ class ExceptionListenerTest extends \PHPUnit_Framework_TestCase } catch (\Exception $e) { $this->assertSame('foo', $e->getMessage()); } - - // restore the old error_log - ini_set('error_log', $errorLog); } /** diff --git a/src/Symfony/Component/Process/Tests/ExecutableFinderTest.php b/src/Symfony/Component/Process/Tests/ExecutableFinderTest.php index 9d0a0d141f..5033cdab02 100644 --- a/src/Symfony/Component/Process/Tests/ExecutableFinderTest.php +++ b/src/Symfony/Component/Process/Tests/ExecutableFinderTest.php @@ -102,7 +102,7 @@ class ExecutableFinderTest extends \PHPUnit_Framework_TestCase $this->markTestSkipped('Cannot test when open_basedir is set'); } - ini_set('open_basedir', dirname(PHP_BINARY).PATH_SEPARATOR.'/'); + $this->iniSet('open_basedir', dirname(PHP_BINARY).PATH_SEPARATOR.'/'); $finder = new ExecutableFinder(); $result = $finder->find($this->getPhpBinaryName()); @@ -125,7 +125,7 @@ class ExecutableFinderTest extends \PHPUnit_Framework_TestCase } $this->setPath(''); - ini_set('open_basedir', PHP_BINARY.PATH_SEPARATOR.'/'); + $this->iniSet('open_basedir', PHP_BINARY.PATH_SEPARATOR.'/'); $finder = new ExecutableFinder(); $result = $finder->find($this->getPhpBinaryName(), false);