diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index cde155aa47..d85827540b 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -1,7 +1,7 @@ CONTRIBUTORS ============ -Symfony2 is the result of the work of many people who made the code better +Symfony is the result of the work of many people who made the code better (see http://symfony.com/contributors for more information): - Fabien Potencier (fabpot) diff --git a/README.md b/README.md index 8f04cd8650..42607fbbfa 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ README ====== -What is Symfony2? +What is Symfony? ----------------- -Symfony2 is a PHP 5.3 full-stack web framework. It is written with speed and +Symfony is a PHP 5.3 full-stack web framework. It is written with speed and flexibility in mind. It allows developers to build better and easy to maintain websites with PHP. @@ -14,7 +14,7 @@ to high traffic ones like Dailymotion or Yahoo! Answers. Requirements ------------ -Symfony2 is only supported on PHP 5.3.3 and up. +Symfony is only supported on PHP 5.3.3 and up. Be warned that PHP versions before 5.3.8 are known to be buggy and might not work for you: @@ -28,35 +28,35 @@ work for you: known PHP bug (see https://bugs.php.net/bug.php?id=55156). * PHP 5.3.16 has a major bug in the Reflection subsystem and is not suitable to - run Symfony2 (https://bugs.php.net/bug.php?id=62715) + run Symfony (https://bugs.php.net/bug.php?id=62715) Installation ------------ -The best way to install Symfony2 is to download the Symfony Standard Edition +The best way to install Symfony is to download the Symfony Standard Edition available at [http://symfony.com/download][1]. Documentation ------------- The "[Quick Tour][2]" tutorial gives you a first feeling of the framework. If, -like us, you think that Symfony2 can help speed up your development and take +like us, you think that Symfony can help speed up your development and take the quality of your work to the next level, read the official -[Symfony2 documentation][3]. +[Symfony documentation][3]. Contributing ------------ -Symfony2 is an open source, community-driven project. If you'd like to contribute, +Symfony is an open source, community-driven project. If you'd like to contribute, please read the [Contributing Code][4] part of the documentation. If you're submitting a pull request, please follow the guidelines in the [Submitting a Patch][5] section and use [Pull Request Template][6]. -Running Symfony2 Tests +Running Symfony Tests ---------------------- -Information on how to run the Symfony2 test suite can be found in the -[Running Symfony2 Tests][7] section. +Information on how to run the Symfony test suite can be found in the +[Running Symfony Tests][7] section. [1]: http://symfony.com/download [2]: http://symfony.com/get_started diff --git a/src/Symfony/Bridge/Doctrine/README.md b/src/Symfony/Bridge/Doctrine/README.md index 2a97041a05..972ccbfc96 100644 --- a/src/Symfony/Bridge/Doctrine/README.md +++ b/src/Symfony/Bridge/Doctrine/README.md @@ -2,7 +2,7 @@ Doctrine Bridge =============== Provides integration for [Doctrine](http://www.doctrine-project.org/) with -various Symfony2 components. +various Symfony components. Resources --------- diff --git a/src/Symfony/Bridge/Monolog/README.md b/src/Symfony/Bridge/Monolog/README.md index f28c85b009..c666f1d150 100644 --- a/src/Symfony/Bridge/Monolog/README.md +++ b/src/Symfony/Bridge/Monolog/README.md @@ -1,7 +1,7 @@ Monolog Bridge ============== -Provides integration for Monolog with various Symfony2 components. +Provides integration for Monolog with various Symfony components. Resources --------- diff --git a/src/Symfony/Bridge/Propel1/README.md b/src/Symfony/Bridge/Propel1/README.md index 81a3388edf..22d0aa2a7a 100644 --- a/src/Symfony/Bridge/Propel1/README.md +++ b/src/Symfony/Bridge/Propel1/README.md @@ -1,7 +1,7 @@ Propel Bridge ============= -Provides integration for Propel with various Symfony2 components. +Provides integration for Propel with various Symfony components. Resources --------- diff --git a/src/Symfony/Bridge/ProxyManager/README.md b/src/Symfony/Bridge/ProxyManager/README.md index a266a26001..f2ce134241 100644 --- a/src/Symfony/Bridge/ProxyManager/README.md +++ b/src/Symfony/Bridge/ProxyManager/README.md @@ -1,7 +1,7 @@ ProxyManager Bridge =================== -Provides integration for [ProxyManager][1] with various Symfony2 components. +Provides integration for [ProxyManager][1] with various Symfony components. Resources --------- diff --git a/src/Symfony/Bridge/Twig/README.md b/src/Symfony/Bridge/Twig/README.md index 0e7c9608e4..c5053c860b 100644 --- a/src/Symfony/Bridge/Twig/README.md +++ b/src/Symfony/Bridge/Twig/README.md @@ -2,7 +2,7 @@ Twig Bridge =========== Provides integration for [Twig](http://twig.sensiolabs.org/) with various -Symfony2 components. +Symfony components. Resources --------- diff --git a/src/Symfony/Bridge/Twig/Tests/Extension/TranslationExtensionTest.php b/src/Symfony/Bridge/Twig/Tests/Extension/TranslationExtensionTest.php index cecedc37dc..777000efd1 100644 --- a/src/Symfony/Bridge/Twig/Tests/Extension/TranslationExtensionTest.php +++ b/src/Symfony/Bridge/Twig/Tests/Extension/TranslationExtensionTest.php @@ -75,13 +75,13 @@ class TranslationExtensionTest extends \PHPUnit_Framework_TestCase return array( // trans tag array('{% trans %}Hello{% endtrans %}', 'Hello'), - array('{% trans %}%name%{% endtrans %}', 'Symfony2', array('name' => 'Symfony2')), + array('{% trans %}%name%{% endtrans %}', 'Symfony', array('name' => 'Symfony')), array('{% trans from elsewhere %}Hello{% endtrans %}', 'Hello'), - array('{% trans %}Hello %name%{% endtrans %}', 'Hello Symfony2', array('name' => 'Symfony2')), - array('{% trans with { \'%name%\': \'Symfony2\' } %}Hello %name%{% endtrans %}', 'Hello Symfony2'), - array('{% set vars = { \'%name%\': \'Symfony2\' } %}{% trans with vars %}Hello %name%{% endtrans %}', 'Hello Symfony2'), + array('{% trans %}Hello %name%{% endtrans %}', 'Hello Symfony', array('name' => 'Symfony')), + array('{% trans with { \'%name%\': \'Symfony\' } %}Hello %name%{% endtrans %}', 'Hello Symfony'), + array('{% set vars = { \'%name%\': \'Symfony\' } %}{% trans with vars %}Hello %name%{% endtrans %}', 'Hello Symfony'), array('{% trans into "fr"%}Hello{% endtrans %}', 'Hello'), @@ -91,9 +91,9 @@ class TranslationExtensionTest extends \PHPUnit_Framework_TestCase array('{% transchoice count %}{0} There is no apples|{1} There is one apple|]1,Inf] There is %count% apples{% endtranschoice %}', 'There is 5 apples', array('count' => 5),), array('{% transchoice count %}{0} There is no apples|{1} There is one apple|]1,Inf] There is %count% apples (%name%){% endtranschoice %}', - 'There is 5 apples (Symfony2)', array('count' => 5, 'name' => 'Symfony2'),), - array('{% transchoice count with { \'%name%\': \'Symfony2\' } %}{0} There is no apples|{1} There is one apple|]1,Inf] There is %count% apples (%name%){% endtranschoice %}', - 'There is 5 apples (Symfony2)', array('count' => 5),), + 'There is 5 apples (Symfony)', array('count' => 5, 'name' => 'Symfony'),), + array('{% transchoice count with { \'%name%\': \'Symfony\' } %}{0} There is no apples|{1} There is one apple|]1,Inf] There is %count% apples (%name%){% endtranschoice %}', + 'There is 5 apples (Symfony)', array('count' => 5),), array('{% transchoice count into "fr"%}{0} There is no apples|{1} There is one apple|]1,Inf] There is %count% apples{% endtranschoice %}', 'There is no apples', array('count' => 0),), array('{% transchoice 5 into "fr"%}{0} There is no apples|{1} There is one apple|]1,Inf] There is %count% apples{% endtranschoice %}', @@ -101,14 +101,14 @@ class TranslationExtensionTest extends \PHPUnit_Framework_TestCase // trans filter array('{{ "Hello"|trans }}', 'Hello'), - array('{{ name|trans }}', 'Symfony2', array('name' => 'Symfony2')), - array('{{ hello|trans({ \'%name%\': \'Symfony2\' }) }}', 'Hello Symfony2', array('hello' => 'Hello %name%')), - array('{% set vars = { \'%name%\': \'Symfony2\' } %}{{ hello|trans(vars) }}', 'Hello Symfony2', array('hello' => 'Hello %name%')), + array('{{ name|trans }}', 'Symfony', array('name' => 'Symfony')), + array('{{ hello|trans({ \'%name%\': \'Symfony\' }) }}', 'Hello Symfony', array('hello' => 'Hello %name%')), + array('{% set vars = { \'%name%\': \'Symfony\' } %}{{ hello|trans(vars) }}', 'Hello Symfony', array('hello' => 'Hello %name%')), array('{{ "Hello"|trans({}, "messages", "fr") }}', 'Hello'), // transchoice filter array('{{ "{0} There is no apples|{1} There is one apple|]1,Inf] There is %count% apples"|transchoice(count) }}', 'There is 5 apples', array('count' => 5)), - array('{{ text|transchoice(5, {\'%name%\': \'Symfony2\'}) }}', 'There is 5 apples (Symfony2)', array('text' => '{0} There is no apples|{1} There is one apple|]1,Inf] There is %count% apples (%name%)')), + array('{{ text|transchoice(5, {\'%name%\': \'Symfony\'}) }}', 'There is 5 apples (Symfony)', array('text' => '{0} There is no apples|{1} There is one apple|]1,Inf] There is %count% apples (%name%)')), array('{{ "{0} There is no apples|{1} There is one apple|]1,Inf] There is %count% apples"|transchoice(count, {}, "messages", "fr") }}', 'There is 5 apples', array('count' => 5)), ); } diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/ServerRunCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/ServerRunCommand.php index 8477720efc..3b2efc139a 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/ServerRunCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/ServerRunCommand.php @@ -19,7 +19,7 @@ use Symfony\Component\Process\PhpExecutableFinder; use Symfony\Component\Process\ProcessBuilder; /** - * Runs Symfony2 application using PHP built-in web server. + * Runs Symfony application using PHP built-in web server. * * @author Michał Pipa */ @@ -83,12 +83,6 @@ EOF */ protected function execute(InputInterface $input, OutputInterface $output) { - if (defined('HHVM_VERSION')) { - $output->writeln('This command is not supported on HHVM.'); - - return 1; - } - $documentRoot = $input->getOption('docroot'); if (null === $documentRoot) { diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php index adef4ade68..ab9a3312c8 100644 --- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php +++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php @@ -498,7 +498,7 @@ class Configuration implements ConfigurationInterface // API version already during container configuration // (to adjust service classes etc.) // See https://github.com/symfony/symfony/issues/11580 - $v['validation']['api'] = version_compare(PHP_VERSION, '5.3.9', '<') + $v['validation']['api'] = PHP_VERSION_ID < 50309 ? '2.4' : '2.5-bc'; diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Console/Descriptor/JsonDescriptorTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Console/Descriptor/JsonDescriptorTest.php index 5d6dafe46b..7f7a0ae15c 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Console/Descriptor/JsonDescriptorTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Console/Descriptor/JsonDescriptorTest.php @@ -17,7 +17,7 @@ class JsonDescriptorTest extends AbstractDescriptorTest { protected function setUp() { - if (version_compare(phpversion(), '5.4.0', '<')) { + if (PHP_VERSION_ID < 50400) { $this->markTestSkipped('Test skipped on PHP 5.3 as JSON_PRETTY_PRINT does not exist.'); } } diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/ConfigurationTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/ConfigurationTest.php index 2231a5f255..9a4ad2770a 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/ConfigurationTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/ConfigurationTest.php @@ -131,7 +131,7 @@ class ConfigurationTest extends \PHPUnit_Framework_TestCase 'static_method' => array('loadValidatorMetadata'), 'translation_domain' => 'validators', 'strict_email' => false, - 'api' => version_compare(PHP_VERSION, '5.3.9', '<') ? '2.4' : '2.5-bc', + 'api' => PHP_VERSION_ID < 50309 ? '2.4' : '2.5-bc', ), 'annotations' => array( 'cache' => 'file', diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php index b87807b323..acc3cff6ba 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php @@ -295,7 +295,7 @@ abstract class FrameworkExtensionTest extends TestCase $this->assertEquals(array(new Reference('validator.mapping.cache.apc')), $calls[5][1]); $this->assertSame('setApiVersion', $calls[6][0]); - if (version_compare(PHP_VERSION, '5.3.9', '<')) { + if (PHP_VERSION_ID < 50309) { $this->assertEquals(array(Validation::API_VERSION_2_4), $calls[6][1]); } else { $this->assertEquals(array(Validation::API_VERSION_2_5_BC), $calls[6][1]); @@ -448,7 +448,7 @@ abstract class FrameworkExtensionTest extends TestCase $this->assertSame('setApiVersion', $calls[5][0]); // no cache, no annotations - if (version_compare(PHP_VERSION, '5.3.9', '<')) { + if (PHP_VERSION_ID < 50309) { $this->assertSame(array(Validation::API_VERSION_2_4), $calls[5][1]); } else { $this->assertSame(array(Validation::API_VERSION_2_5_BC), $calls[5][1]); @@ -472,7 +472,7 @@ abstract class FrameworkExtensionTest extends TestCase $this->assertSame('setApiVersion', $calls[5][0]); // no cache, no annotations - if (version_compare(PHP_VERSION, '5.3.9', '<')) { + if (PHP_VERSION_ID < 50309) { $this->assertSame(array(Validation::API_VERSION_2_4), $calls[5][1]); } else { $this->assertSame(array(Validation::API_VERSION_2_5_BC), $calls[5][1]); diff --git a/src/Symfony/Bundle/TwigBundle/Loader/FilesystemLoader.php b/src/Symfony/Bundle/TwigBundle/Loader/FilesystemLoader.php index 816874315a..3c7f925d03 100644 --- a/src/Symfony/Bundle/TwigBundle/Loader/FilesystemLoader.php +++ b/src/Symfony/Bundle/TwigBundle/Loader/FilesystemLoader.php @@ -17,7 +17,7 @@ use Symfony\Component\Templating\TemplateReferenceInterface; /** * FilesystemLoader extends the default Twig filesystem loader - * to work with the Symfony2 paths and template references. + * to work with the Symfony paths and template references. * * @author Fabien Potencier */ diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.html.twig index 1170b9c4b5..9e96dc6d1a 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.html.twig @@ -1,4 +1,4 @@ - + {% if 'normal' != position %}
{% endif %}
- + diff --git a/src/Symfony/Component/Debug/ExceptionHandler.php b/src/Symfony/Component/Debug/ExceptionHandler.php index 74346a5d00..9812729071 100644 --- a/src/Symfony/Component/Debug/ExceptionHandler.php +++ b/src/Symfony/Component/Debug/ExceptionHandler.php @@ -249,7 +249,7 @@ EOF } catch (\Exception $e) { // something nasty happened and we cannot throw an exception anymore if ($this->debug) { - $title = sprintf('Exception thrown when handling an exception (%s: %s)', get_class($exception), $exception->getMessage()); + $title = sprintf('Exception thrown when handling an exception (%s: %s)', get_class($e), $e->getMessage()); } else { $title = 'Whoops, looks like something went wrong.'; } diff --git a/src/Symfony/Component/DependencyInjection/Container.php b/src/Symfony/Component/DependencyInjection/Container.php index 9b3af2464e..17117ffbc7 100644 --- a/src/Symfony/Component/DependencyInjection/Container.php +++ b/src/Symfony/Component/DependencyInjection/Container.php @@ -360,6 +360,10 @@ class Container implements IntrospectableContainerInterface return true; } + if (isset($this->aliases[$id])) { + $id = $this->aliases[$id]; + } + return isset($this->services[$id]) || array_key_exists($id, $this->services); } diff --git a/src/Symfony/Component/DependencyInjection/Tests/ContainerTest.php b/src/Symfony/Component/DependencyInjection/Tests/ContainerTest.php index 508033f98a..2ce50ee5f9 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/ContainerTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/ContainerTest.php @@ -305,6 +305,10 @@ class ContainerTest extends \PHPUnit_Framework_TestCase $this->assertTrue($sc->initialized('foo'), '->initialized() returns true if service is loaded'); $this->assertFalse($sc->initialized('foo1'), '->initialized() returns false if service is not loaded'); $this->assertFalse($sc->initialized('bar'), '->initialized() returns false if a service is defined, but not currently loaded'); + $this->assertFalse($sc->initialized('alias'), '->initialized() returns false if an aliased service is not initialized'); + + $sc->set('bar', new \stdClass()); + $this->assertTrue($sc->initialized('alias'), '->initialized() returns true for alias if aliased service is initialized'); } public function testEnterLeaveCurrentScope() diff --git a/src/Symfony/Component/EventDispatcher/README.md b/src/Symfony/Component/EventDispatcher/README.md index c928f13669..0fbc35e2a4 100644 --- a/src/Symfony/Component/EventDispatcher/README.md +++ b/src/Symfony/Component/EventDispatcher/README.md @@ -1,7 +1,7 @@ EventDispatcher Component ========================= -The Symfony2 EventDispatcher component implements the Mediator pattern in a +The Symfony EventDispatcher component implements the Mediator pattern in a simple and effective way to make your projects truly extensible. ```php diff --git a/src/Symfony/Component/ExpressionLanguage/Parser.php b/src/Symfony/Component/ExpressionLanguage/Parser.php index e08568ceef..3e769c6d4f 100644 --- a/src/Symfony/Component/ExpressionLanguage/Parser.php +++ b/src/Symfony/Component/ExpressionLanguage/Parser.php @@ -336,7 +336,7 @@ class Parser $node = new Node\GetAttrNode($node, $arg, $arguments, $type); } elseif ('[' === $token->value) { - if ($node instanceof Node\GetAttrNode && Node\GetAttrNode::METHOD_CALL === $node->attributes['type'] && version_compare(PHP_VERSION, '5.4.0', '<')) { + if ($node instanceof Node\GetAttrNode && Node\GetAttrNode::METHOD_CALL === $node->attributes['type'] && PHP_VERSION_ID < 50400) { throw new SyntaxError('Array calls on a method call is only supported on PHP 5.4+', $token->cursor); } diff --git a/src/Symfony/Component/Finder/Tests/Iterator/FilePathsIteratorTest.php b/src/Symfony/Component/Finder/Tests/Iterator/FilePathsIteratorTest.php index d2f0e245f6..89853a85cb 100644 --- a/src/Symfony/Component/Finder/Tests/Iterator/FilePathsIteratorTest.php +++ b/src/Symfony/Component/Finder/Tests/Iterator/FilePathsIteratorTest.php @@ -31,7 +31,7 @@ class FilePathsIteratorTest extends RealIteratorTestCase public function getSubPathData() { - $tmpDir = sys_get_temp_dir().'/symfony2_finder'; + $tmpDir = sys_get_temp_dir().'/symfony_finder'; return array( array( diff --git a/src/Symfony/Component/Finder/Tests/Iterator/RealIteratorTestCase.php b/src/Symfony/Component/Finder/Tests/Iterator/RealIteratorTestCase.php index 2a7383dc0a..e22476dad2 100644 --- a/src/Symfony/Component/Finder/Tests/Iterator/RealIteratorTestCase.php +++ b/src/Symfony/Component/Finder/Tests/Iterator/RealIteratorTestCase.php @@ -18,7 +18,7 @@ abstract class RealIteratorTestCase extends IteratorTestCase public static function setUpBeforeClass() { - self::$tmpDir = realpath(sys_get_temp_dir()).DIRECTORY_SEPARATOR.'symfony2_finder'; + self::$tmpDir = realpath(sys_get_temp_dir()).DIRECTORY_SEPARATOR.'symfony_finder'; self::$files = array( '.git/', @@ -74,7 +74,7 @@ abstract class RealIteratorTestCase extends IteratorTestCase * Without the call to setUpBeforeClass() property can be null. */ if (!self::$tmpDir) { - self::$tmpDir = realpath(sys_get_temp_dir()).DIRECTORY_SEPARATOR.'symfony2_finder'; + self::$tmpDir = realpath(sys_get_temp_dir()).DIRECTORY_SEPARATOR.'symfony_finder'; } if (is_array($files)) { diff --git a/src/Symfony/Component/Form/Extension/Csrf/CsrfProvider/SessionCsrfProvider.php b/src/Symfony/Component/Form/Extension/Csrf/CsrfProvider/SessionCsrfProvider.php index 741db1ec23..6965f0a2ba 100644 --- a/src/Symfony/Component/Form/Extension/Csrf/CsrfProvider/SessionCsrfProvider.php +++ b/src/Symfony/Component/Form/Extension/Csrf/CsrfProvider/SessionCsrfProvider.php @@ -14,7 +14,7 @@ namespace Symfony\Component\Form\Extension\Csrf\CsrfProvider; use Symfony\Component\HttpFoundation\Session\Session; /** - * This provider uses a Symfony2 Session object to retrieve the user's + * This provider uses a Symfony Session object to retrieve the user's * session ID. * * @see DefaultCsrfProvider diff --git a/src/Symfony/Component/Form/Extension/Validator/ValidatorExtension.php b/src/Symfony/Component/Form/Extension/Validator/ValidatorExtension.php index 5717ffb154..f6ef3070ca 100644 --- a/src/Symfony/Component/Form/Extension/Validator/ValidatorExtension.php +++ b/src/Symfony/Component/Form/Extension/Validator/ValidatorExtension.php @@ -20,7 +20,7 @@ use Symfony\Component\Validator\Validator\ValidatorInterface; use Symfony\Component\Validator\ValidatorInterface as LegacyValidatorInterface; /** - * Extension supporting the Symfony2 Validator component in forms. + * Extension supporting the Symfony Validator component in forms. * * @author Bernhard Schussek */ diff --git a/src/Symfony/Component/Form/Tests/FormConfigTest.php b/src/Symfony/Component/Form/Tests/FormConfigTest.php index 961dfd3367..b77632c505 100644 --- a/src/Symfony/Component/Form/Tests/FormConfigTest.php +++ b/src/Symfony/Component/Form/Tests/FormConfigTest.php @@ -49,7 +49,7 @@ class FormConfigTest extends \PHPUnit_Framework_TestCase array('9', true), // Contrary to the HTML4 spec, we allow names starting with an // underscore, since this is already a widely used practice in - // Symfony2. + // Symfony. // For root forms, leading underscores will be stripped from the // "id" attribute to produce valid HTML4. array('_', true), diff --git a/src/Symfony/Component/HttpFoundation/Session/Storage/PhpBridgeSessionStorage.php b/src/Symfony/Component/HttpFoundation/Session/Storage/PhpBridgeSessionStorage.php index f70b5e6227..6b5ad65056 100644 --- a/src/Symfony/Component/HttpFoundation/Session/Storage/PhpBridgeSessionStorage.php +++ b/src/Symfony/Component/HttpFoundation/Session/Storage/PhpBridgeSessionStorage.php @@ -15,7 +15,7 @@ use Symfony\Component\HttpFoundation\Session\Storage\Proxy\AbstractProxy; use Symfony\Component\HttpFoundation\Session\Storage\Handler\NativeSessionHandler; /** - * Allows session to be started by PHP and managed by Symfony2 + * Allows session to be started by PHP and managed by Symfony * * @author Drak */ diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/SessionTest.php b/src/Symfony/Component/HttpFoundation/Tests/Session/SessionTest.php index 56015fdf5a..c8a0183513 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/Session/SessionTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/Session/SessionTest.php @@ -136,7 +136,7 @@ class SessionTest extends \PHPUnit_Framework_TestCase return array( array('foo', 'bar', array('foo' => 'bar')), array('foo.bar', 'too much beer', array('foo.bar' => 'too much beer')), - array('great', 'symfony2 is great', array('great' => 'symfony2 is great')), + array('great', 'symfony is great', array('great' => 'symfony is great')), ); } @@ -195,7 +195,7 @@ class SessionTest extends \PHPUnit_Framework_TestCase */ public function testGetIterator() { - $attributes = array('hello' => 'world', 'symfony2' => 'rocks'); + $attributes = array('hello' => 'world', 'symfony' => 'rocks'); foreach ($attributes as $key => $val) { $this->session->set($key, $val); } @@ -215,7 +215,7 @@ class SessionTest extends \PHPUnit_Framework_TestCase public function testGetCount() { $this->session->set('hello', 'world'); - $this->session->set('symfony2', 'rocks'); + $this->session->set('symfony', 'rocks'); $this->assertCount(2, $this->session); } diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/NativeSessionStorageTest.php b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/NativeSessionStorageTest.php index ca8d28e337..1e79812118 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/NativeSessionStorageTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/NativeSessionStorageTest.php @@ -137,7 +137,7 @@ class NativeSessionStorageTest extends \PHPUnit_Framework_TestCase $options = array( 'cookie_lifetime' => 123456, 'cookie_path' => '/my/cookie/path', - 'cookie_domain' => 'symfony2.example.com', + 'cookie_domain' => 'symfony.example.com', 'cookie_secure' => true, 'cookie_httponly' => false, ); diff --git a/src/Symfony/Component/HttpKernel/README.md b/src/Symfony/Component/HttpKernel/README.md index 8c3c32c244..0830eb0bb5 100644 --- a/src/Symfony/Component/HttpKernel/README.md +++ b/src/Symfony/Component/HttpKernel/README.md @@ -4,7 +4,7 @@ HttpKernel Component HttpKernel provides the building blocks to create flexible and fast HTTP-based frameworks. -``HttpKernelInterface`` is the core interface of the Symfony2 full-stack +``HttpKernelInterface`` is the core interface of the Symfony full-stack framework: ```php @@ -23,11 +23,11 @@ interface HttpKernelInterface It takes a ``Request`` as an input and should return a ``Response`` as an output. Using this interface makes your code compatible with all frameworks -using the Symfony2 components. And this will give you many cool features for +using the Symfony components. And this will give you many cool features for free. -Creating a framework based on the Symfony2 components is really easy. Here is -a very simple, but fully-featured framework based on the Symfony2 components: +Creating a framework based on the Symfony components is really easy. Here is +a very simple, but fully-featured framework based on the Symfony components: ```php $routes = new RouteCollection(); @@ -54,7 +54,7 @@ $kernel = new HttpKernel($dispatcher, $resolver); $kernel->handle($request)->send(); ``` -This is all you need to create a flexible framework with the Symfony2 +This is all you need to create a flexible framework with the Symfony components. Want to add an HTTP reverse proxy and benefit from HTTP caching and Edge Side diff --git a/src/Symfony/Component/Intl/CONTRIBUTING.md b/src/Symfony/Component/Intl/CONTRIBUTING.md index 315c28ab6e..0657e12019 100644 --- a/src/Symfony/Component/Intl/CONTRIBUTING.md +++ b/src/Symfony/Component/Intl/CONTRIBUTING.md @@ -88,4 +88,4 @@ Once it is, the following steps have to be followed to build the .dat-file: $ rm -rf build packagelist.txt -3. You can now move region.dat to replace the version bundled with Symfony2. +3. You can now move region.dat to replace the version bundled with Symfony. diff --git a/src/Symfony/Component/Intl/Resources/bin/update-data.php b/src/Symfony/Component/Intl/Resources/bin/update-data.php index 74e3ee3b79..5fa5b6a622 100644 --- a/src/Symfony/Component/Intl/Resources/bin/update-data.php +++ b/src/Symfony/Component/Intl/Resources/bin/update-data.php @@ -38,7 +38,7 @@ if ($argc > 3 || 2 === $argc && '-h' === $argv[1]) { bailout(<< -Updates the ICU data for Symfony2 to the latest version of ICU. +Updates the ICU data for Symfony to the latest version of ICU. If you downloaded the SVN repository before, you can pass the path to the repository source in the first optional argument. diff --git a/src/Symfony/Component/Security/Csrf/Tests/TokenStorage/NativeSessionTokenStorageTest.php b/src/Symfony/Component/Security/Csrf/Tests/TokenStorage/NativeSessionTokenStorageTest.php index 724806c881..7ae27790e5 100644 --- a/src/Symfony/Component/Security/Csrf/Tests/TokenStorage/NativeSessionTokenStorageTest.php +++ b/src/Symfony/Component/Security/Csrf/Tests/TokenStorage/NativeSessionTokenStorageTest.php @@ -51,7 +51,7 @@ class NativeSessionTokenStorageTest extends \PHPUnit_Framework_TestCase public function testStoreTokenInClosedSessionWithExistingSessionId() { - if (version_compare(PHP_VERSION, '5.4', '<')) { + if (PHP_VERSION_ID < 50400) { $this->markTestSkipped('This test requires PHP 5.4 or later.'); } diff --git a/src/Symfony/Component/Security/Csrf/TokenStorage/NativeSessionTokenStorage.php b/src/Symfony/Component/Security/Csrf/TokenStorage/NativeSessionTokenStorage.php index af5931b40b..bb1a417ad5 100644 --- a/src/Symfony/Component/Security/Csrf/TokenStorage/NativeSessionTokenStorage.php +++ b/src/Symfony/Component/Security/Csrf/TokenStorage/NativeSessionTokenStorage.php @@ -108,7 +108,7 @@ class NativeSessionTokenStorage implements TokenStorageInterface private function startSession() { - if (version_compare(PHP_VERSION, '5.4', '>=')) { + if (PHP_VERSION_ID >= 50400) { if (PHP_SESSION_NONE === session_status()) { session_start(); } diff --git a/src/Symfony/Component/Translation/Tests/Dumper/JsonFileDumperTest.php b/src/Symfony/Component/Translation/Tests/Dumper/JsonFileDumperTest.php index acd2087fdb..697cd939f6 100644 --- a/src/Symfony/Component/Translation/Tests/Dumper/JsonFileDumperTest.php +++ b/src/Symfony/Component/Translation/Tests/Dumper/JsonFileDumperTest.php @@ -18,7 +18,7 @@ class JsonFileDumperTest extends \PHPUnit_Framework_TestCase { public function testDump() { - if (version_compare(PHP_VERSION, '5.4.0', '<')) { + if (PHP_VERSION_ID < 50400) { $this->markTestIncomplete('PHP below 5.4 doesn\'t support JSON pretty printing'); } diff --git a/src/Symfony/Component/Translation/Tests/IdentityTranslatorTest.php b/src/Symfony/Component/Translation/Tests/IdentityTranslatorTest.php index 8d0d280b3b..352dd318dc 100644 --- a/src/Symfony/Component/Translation/Tests/IdentityTranslatorTest.php +++ b/src/Symfony/Component/Translation/Tests/IdentityTranslatorTest.php @@ -74,8 +74,8 @@ class IdentityTranslatorTest extends \PHPUnit_Framework_TestCase public function getTransTests() { return array( - array('Symfony2 is great!', 'Symfony2 is great!', array()), - array('Symfony2 is awesome!', 'Symfony2 is %what%!', array('%what%' => 'awesome')), + array('Symfony is great!', 'Symfony is great!', array()), + array('Symfony is awesome!', 'Symfony is %what%!', array('%what%' => 'awesome')), ); } diff --git a/src/Symfony/Component/Translation/Tests/TranslatorTest.php b/src/Symfony/Component/Translation/Tests/TranslatorTest.php index 305a25d42d..2cb5f38ad5 100644 --- a/src/Symfony/Component/Translation/Tests/TranslatorTest.php +++ b/src/Symfony/Component/Translation/Tests/TranslatorTest.php @@ -356,18 +356,18 @@ class TranslatorTest extends \PHPUnit_Framework_TestCase public function getTransTests() { return array( - array('Symfony2 est super !', 'Symfony2 is great!', 'Symfony2 est super !', array(), 'fr', ''), - array('Symfony2 est awesome !', 'Symfony2 is %what%!', 'Symfony2 est %what% !', array('%what%' => 'awesome'), 'fr', ''), - array('Symfony2 est super !', new String('Symfony2 is great!'), 'Symfony2 est super !', array(), 'fr', ''), + array('Symfony est super !', 'Symfony is great!', 'Symfony est super !', array(), 'fr', ''), + array('Symfony est awesome !', 'Symfony is %what%!', 'Symfony est %what% !', array('%what%' => 'awesome'), 'fr', ''), + array('Symfony est super !', new String('Symfony is great!'), 'Symfony est super !', array(), 'fr', ''), ); } public function getFlattenedTransTests() { $messages = array( - 'symfony2' => array( + 'symfony' => array( 'is' => array( - 'great' => 'Symfony2 est super!', + 'great' => 'Symfony est super!', ), ), 'foo' => array( @@ -379,7 +379,7 @@ class TranslatorTest extends \PHPUnit_Framework_TestCase ); return array( - array('Symfony2 est super!', $messages, 'symfony2.is.great'), + array('Symfony est super!', $messages, 'symfony.is.great'), array('Foo Bar Baz', $messages, 'foo.bar.baz'), array('Foo Baz', $messages, 'foo.baz'), ); diff --git a/src/Symfony/Component/Translation/Tests/fixtures/resourcebundle/dat/en.txt b/src/Symfony/Component/Translation/Tests/fixtures/resourcebundle/dat/en.txt index c04a4e8522..3d9e9eae1c 100644 --- a/src/Symfony/Component/Translation/Tests/fixtures/resourcebundle/dat/en.txt +++ b/src/Symfony/Component/Translation/Tests/fixtures/resourcebundle/dat/en.txt @@ -1,3 +1,3 @@ en{ - symfony{"Symfony 2 is great"} + symfony{"Symfony is great"} } \ No newline at end of file diff --git a/src/Symfony/Component/Translation/Tests/fixtures/resourcebundle/dat/fr.txt b/src/Symfony/Component/Translation/Tests/fixtures/resourcebundle/dat/fr.txt index 7e84f67ae0..182d0a0de3 100644 --- a/src/Symfony/Component/Translation/Tests/fixtures/resourcebundle/dat/fr.txt +++ b/src/Symfony/Component/Translation/Tests/fixtures/resourcebundle/dat/fr.txt @@ -1,3 +1,3 @@ fr{ - symfony{"Symfony 2 est génial"} + symfony{"Symfony est génial"} } \ No newline at end of file diff --git a/src/Symfony/Component/Validator/Tests/Validator/LegacyValidator2Dot5ApiTest.php b/src/Symfony/Component/Validator/Tests/Validator/LegacyValidator2Dot5ApiTest.php index 7a00da6419..3e1e442f75 100644 --- a/src/Symfony/Component/Validator/Tests/Validator/LegacyValidator2Dot5ApiTest.php +++ b/src/Symfony/Component/Validator/Tests/Validator/LegacyValidator2Dot5ApiTest.php @@ -21,7 +21,7 @@ class LegacyValidator2Dot5ApiTest extends Abstract2Dot5ApiTest { protected function setUp() { - if (version_compare(PHP_VERSION, '5.3.9', '<')) { + if (PHP_VERSION_ID < 50309) { $this->markTestSkipped('Not supported prior to PHP 5.3.9'); } diff --git a/src/Symfony/Component/Validator/Tests/Validator/LegacyValidatorLegacyApiTest.php b/src/Symfony/Component/Validator/Tests/Validator/LegacyValidatorLegacyApiTest.php index f803c636b9..3f02a5af71 100644 --- a/src/Symfony/Component/Validator/Tests/Validator/LegacyValidatorLegacyApiTest.php +++ b/src/Symfony/Component/Validator/Tests/Validator/LegacyValidatorLegacyApiTest.php @@ -21,7 +21,7 @@ class LegacyValidatorLegacyApiTest extends AbstractLegacyApiTest { protected function setUp() { - if (version_compare(PHP_VERSION, '5.3.9', '<')) { + if (PHP_VERSION_ID < 50309) { $this->markTestSkipped('Not supported prior to PHP 5.3.9'); } diff --git a/src/Symfony/Component/Validator/Tests/ValidatorBuilderTest.php b/src/Symfony/Component/Validator/Tests/ValidatorBuilderTest.php index ed914d1394..ba184f7c78 100644 --- a/src/Symfony/Component/Validator/Tests/ValidatorBuilderTest.php +++ b/src/Symfony/Component/Validator/Tests/ValidatorBuilderTest.php @@ -112,7 +112,7 @@ class ValidatorBuilderTest extends \PHPUnit_Framework_TestCase public function testDefaultApiVersion() { - if (version_compare(PHP_VERSION, '5.3.9', '<')) { + if (PHP_VERSION_ID < 50309) { // Old implementation on PHP < 5.3.9 $this->assertInstanceOf('Symfony\Component\Validator\Validator', $this->builder->getValidator()); } else { @@ -135,7 +135,7 @@ class ValidatorBuilderTest extends \PHPUnit_Framework_TestCase public function testSetApiVersion24And25() { - if (version_compare(PHP_VERSION, '5.3.9', '<')) { + if (PHP_VERSION_ID < 50309) { $this->markTestSkipped('Not supported prior to PHP 5.3.9'); } diff --git a/src/Symfony/Component/Validator/ValidatorBuilder.php b/src/Symfony/Component/Validator/ValidatorBuilder.php index 103fb5a9d3..07a206b67c 100644 --- a/src/Symfony/Component/Validator/ValidatorBuilder.php +++ b/src/Symfony/Component/Validator/ValidatorBuilder.php @@ -325,7 +325,7 @@ class ValidatorBuilder implements ValidatorBuilderInterface )); } - if (version_compare(PHP_VERSION, '5.3.9', '<') && $apiVersion === Validation::API_VERSION_2_5_BC) { + if (PHP_VERSION_ID < 50309 && $apiVersion === Validation::API_VERSION_2_5_BC) { throw new InvalidArgumentException(sprintf( 'The Validator API that is compatible with both Symfony 2.4 '. 'and Symfony 2.5 can only be used on PHP 5.3.9 and higher. '. @@ -385,7 +385,7 @@ class ValidatorBuilder implements ValidatorBuilderInterface $apiVersion = $this->apiVersion; if (null === $apiVersion) { - $apiVersion = version_compare(PHP_VERSION, '5.3.9', '<') + $apiVersion = PHP_VERSION_ID < 50309 ? Validation::API_VERSION_2_4 : Validation::API_VERSION_2_5_BC; }