From 556eff1b54d5daf5ca9e1e23d78faa8663c1d280 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Sun, 23 Nov 2014 19:59:34 +0100 Subject: [PATCH 1/4] backport #12489 --- .../Command/ServerRunCommand.php | 42 +++++++++++++------ 1 file changed, 29 insertions(+), 13 deletions(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/ServerRunCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/ServerRunCommand.php index 5f3ea5dffb..fb8b285fc6 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/ServerRunCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/ServerRunCommand.php @@ -15,6 +15,7 @@ use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; +use Symfony\Component\Process\PhpExecutableFinder; use Symfony\Component\Process\ProcessBuilder; /** @@ -29,7 +30,7 @@ class ServerRunCommand extends ContainerAwareCommand */ public function isEnabled() { - if (PHP_VERSION_ID < 50400) { + if (PHP_VERSION_ID < 50400 || defined('HHVM_VERSION')) { return false; } @@ -99,24 +100,13 @@ EOF $output->writeln('Running PHP built-in server in production environment is NOT recommended!'); } - $router = $input->getOption('router') ?: $this - ->getContainer() - ->get('kernel') - ->locateResource(sprintf('@FrameworkBundle/Resources/config/router_%s.php', $env)) - ; - - if (!file_exists($router)) { - $output->writeln(sprintf('The given router script "%s" does not exist', $router)); - + if (null === $builder = $this->createPhpProcessBuilder($input, $output, $env)) { return 1; } - $router = realpath($router); - $output->writeln(sprintf("Server running on http://%s\n", $input->getArgument('address'))); $output->writeln('Quit the server with CONTROL-C.'); - $builder = new ProcessBuilder(array(PHP_BINARY, '-S', $input->getArgument('address'), $router)); $builder->setWorkingDirectory($documentRoot); $builder->setTimeout(null); $process = $builder->getProcess(); @@ -136,4 +126,30 @@ EOF return $process->getExitCode(); } + + private function createPhpProcessBuilder(InputInterface $input, OutputInterface $output, $env) + { + $router = $input->getOption('router') ?: $this + ->getContainer() + ->get('kernel') + ->locateResource(sprintf('@FrameworkBundle/Resources/config/router_%s.php', $env)) + ; + + if (!file_exists($router)) { + $output->writeln(sprintf('The given router script "%s" does not exist', $router)); + + return; + } + + $router = realpath($router); + $finder = new PhpExecutableFinder(); + + if (false === $binary = $finder->find()) { + $output->writeln('Unable to find PHP binary to run server'); + + return; + } + + return new ProcessBuilder(array($binary, '-S', $input->getArgument('address'), $router)); + } } From 0a76b7e9fc2fcc0495312047f83843e041e28cfc Mon Sep 17 00:00:00 2001 From: Romain Neutron Date: Mon, 24 Nov 2014 13:25:40 +0100 Subject: [PATCH 2/4] Rename Symfony2 to Symfony --- CONTRIBUTING.md | 2 +- CONTRIBUTORS.md | 2 +- README.md | 22 +++++++++---------- src/Symfony/Bridge/Doctrine/README.md | 2 +- src/Symfony/Bridge/Monolog/README.md | 2 +- src/Symfony/Bridge/Propel1/README.md | 2 +- src/Symfony/Bridge/ProxyManager/README.md | 2 +- src/Symfony/Bridge/Twig/README.md | 2 +- .../Extension/TranslationExtensionTest.php | 22 +++++++++---------- .../Command/ServerRunCommand.php | 2 +- .../TwigBundle/Loader/FilesystemLoader.php | 2 +- .../views/Profiler/toolbar.html.twig | 4 ++-- .../Component/EventDispatcher/README.md | 2 +- .../Tests/Iterator/FilePathsIteratorTest.php | 2 +- .../Tests/Iterator/RealIteratorTestCase.php | 4 ++-- .../Csrf/CsrfProvider/SessionCsrfProvider.php | 2 +- .../Validator/ValidatorExtension.php | 2 +- .../Component/Form/Tests/FormConfigTest.php | 2 +- .../Storage/PhpBridgeSessionStorage.php | 2 +- .../Tests/Session/SessionTest.php | 6 ++--- .../Storage/NativeSessionStorageTest.php | 2 +- src/Symfony/Component/HttpKernel/README.md | 10 ++++----- src/Symfony/Component/Intl/CONTRIBUTING.md | 2 +- .../Intl/Resources/bin/update-data.php | 2 +- .../Tests/IdentityTranslatorTest.php | 4 ++-- .../Translation/Tests/TranslatorTest.php | 12 +++++----- .../Tests/fixtures/resourcebundle/dat/en.txt | 2 +- .../Tests/fixtures/resourcebundle/dat/fr.txt | 2 +- 28 files changed, 62 insertions(+), 62 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 383bec81f6..79cc6756b9 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,7 +1,7 @@ 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][1] part of the documentation. If you're submitting a pull request, please follow the guidelines in the [Submitting a Patch][2] section and use the [Pull Request Template][3]. 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 a75f228860..4e03e8a004 100644 --- a/src/Symfony/Bridge/Twig/Tests/Extension/TranslationExtensionTest.php +++ b/src/Symfony/Bridge/Twig/Tests/Extension/TranslationExtensionTest.php @@ -89,13 +89,13 @@ class TranslationExtensionTest extends 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'), @@ -105,9 +105,9 @@ class TranslationExtensionTest extends 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 %}', @@ -115,14 +115,14 @@ class TranslationExtensionTest extends 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 5f3ea5dffb..f07e4d540c 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/ServerRunCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/ServerRunCommand.php @@ -18,7 +18,7 @@ use Symfony\Component\Console\Output\OutputInterface; 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 */ diff --git a/src/Symfony/Bundle/TwigBundle/Loader/FilesystemLoader.php b/src/Symfony/Bundle/TwigBundle/Loader/FilesystemLoader.php index 3793e66df4..fe0fbe15f3 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. + * 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/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/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 ea1fa58547..52c9685ee1 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 572a4ac938..9affa1a4d7 100644 --- a/src/Symfony/Component/Form/Extension/Validator/ValidatorExtension.php +++ b/src/Symfony/Component/Form/Extension/Validator/ValidatorExtension.php @@ -17,7 +17,7 @@ use Symfony\Component\Validator\ValidatorInterface; use Symfony\Component\Validator\Constraints\Valid; /** - * 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/Translation/Tests/IdentityTranslatorTest.php b/src/Symfony/Component/Translation/Tests/IdentityTranslatorTest.php index cfd282a294..76db452abc 100644 --- a/src/Symfony/Component/Translation/Tests/IdentityTranslatorTest.php +++ b/src/Symfony/Component/Translation/Tests/IdentityTranslatorTest.php @@ -75,8 +75,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 3fa87161d0..5538f4e81e 100644 --- a/src/Symfony/Component/Translation/Tests/TranslatorTest.php +++ b/src/Symfony/Component/Translation/Tests/TranslatorTest.php @@ -344,18 +344,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( @@ -367,7 +367,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 From a18b6d17e32a025f67287122d084bb19a4b198e8 Mon Sep 17 00:00:00 2001 From: Daniel Wehner Date: Tue, 25 Nov 2014 10:00:53 +0100 Subject: [PATCH 3/4] Fix initialized() with aliased services --- src/Symfony/Component/DependencyInjection/Container.php | 4 ++++ .../Component/DependencyInjection/Tests/ContainerTest.php | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/src/Symfony/Component/DependencyInjection/Container.php b/src/Symfony/Component/DependencyInjection/Container.php index 0d1be8f051..f5f61e5a82 100644 --- a/src/Symfony/Component/DependencyInjection/Container.php +++ b/src/Symfony/Component/DependencyInjection/Container.php @@ -365,6 +365,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 314f3e61f1..8bc530c005 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/ContainerTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/ContainerTest.php @@ -272,6 +272,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() From 1ed7606c3247ad73c1a8dd4a4d2bdfa9158c391f Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Sun, 23 Nov 2014 21:05:05 +0100 Subject: [PATCH 4/4] [Debug] fix error message on double exception --- src/Symfony/Component/Debug/ExceptionHandler.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/Debug/ExceptionHandler.php b/src/Symfony/Component/Debug/ExceptionHandler.php index c7864dc961..cd7c51bdad 100644 --- a/src/Symfony/Component/Debug/ExceptionHandler.php +++ b/src/Symfony/Component/Debug/ExceptionHandler.php @@ -169,7 +169,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.'; }