Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 18c4ac1

Browse files
committed
Merge branch '2.5' into 2.6
* 2.5: [Debug] fix error message on double exception Fix initialized() with aliased services Rename Symfony2 to Symfony compare version using PHP_VERSION_ID backport symfony#12489 remove an unneeded check
2 parents c4902d8 + 402e183 commit 18c4ac1

File tree

42 files changed

+86
-84
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+86
-84
lines changed

CONTRIBUTORS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
CONTRIBUTORS
22
============
33

4-
Symfony2 is the result of the work of many people who made the code better
4+
Symfony is the result of the work of many people who made the code better
55
(see http://symfony.com/contributors for more information):
66

77
- Fabien Potencier (fabpot)

README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
README
22
======
33

4-
What is Symfony2?
4+
What is Symfony?
55
-----------------
66

7-
Symfony2 is a PHP 5.3 full-stack web framework. It is written with speed and
7+
Symfony is a PHP 5.3 full-stack web framework. It is written with speed and
88
flexibility in mind. It allows developers to build better and easy to maintain
99
websites with PHP.
1010

@@ -14,7 +14,7 @@ to high traffic ones like Dailymotion or Yahoo! Answers.
1414
Requirements
1515
------------
1616

17-
Symfony2 is only supported on PHP 5.3.3 and up.
17+
Symfony is only supported on PHP 5.3.3 and up.
1818

1919
Be warned that PHP versions before 5.3.8 are known to be buggy and might not
2020
work for you:
@@ -28,35 +28,35 @@ work for you:
2828
known PHP bug (see https://bugs.php.net/bug.php?id=55156).
2929

3030
* PHP 5.3.16 has a major bug in the Reflection subsystem and is not suitable to
31-
run Symfony2 (https://bugs.php.net/bug.php?id=62715)
31+
run Symfony (https://bugs.php.net/bug.php?id=62715)
3232

3333
Installation
3434
------------
3535

36-
The best way to install Symfony2 is to download the Symfony Standard Edition
36+
The best way to install Symfony is to download the Symfony Standard Edition
3737
available at [http://symfony.com/download][1].
3838

3939
Documentation
4040
-------------
4141

4242
The "[Quick Tour][2]" tutorial gives you a first feeling of the framework. If,
43-
like us, you think that Symfony2 can help speed up your development and take
43+
like us, you think that Symfony can help speed up your development and take
4444
the quality of your work to the next level, read the official
45-
[Symfony2 documentation][3].
45+
[Symfony documentation][3].
4646

4747
Contributing
4848
------------
4949

50-
Symfony2 is an open source, community-driven project. If you'd like to contribute,
50+
Symfony is an open source, community-driven project. If you'd like to contribute,
5151
please read the [Contributing Code][4] part of the documentation. If you're submitting
5252
a pull request, please follow the guidelines in the [Submitting a Patch][5] section
5353
and use [Pull Request Template][6].
5454

55-
Running Symfony2 Tests
55+
Running Symfony Tests
5656
----------------------
5757

58-
Information on how to run the Symfony2 test suite can be found in the
59-
[Running Symfony2 Tests][7] section.
58+
Information on how to run the Symfony test suite can be found in the
59+
[Running Symfony Tests][7] section.
6060

6161
[1]: http://symfony.com/download
6262
[2]: http://symfony.com/get_started

src/Symfony/Bridge/Doctrine/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Doctrine Bridge
22
===============
33

44
Provides integration for [Doctrine](http://www.doctrine-project.org/) with
5-
various Symfony2 components.
5+
various Symfony components.
66

77
Resources
88
---------

src/Symfony/Bridge/Monolog/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Monolog Bridge
22
==============
33

4-
Provides integration for Monolog with various Symfony2 components.
4+
Provides integration for Monolog with various Symfony components.
55

66
Resources
77
---------

src/Symfony/Bridge/Propel1/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Propel Bridge
22
=============
33

4-
Provides integration for Propel with various Symfony2 components.
4+
Provides integration for Propel with various Symfony components.
55

66
Resources
77
---------

src/Symfony/Bridge/ProxyManager/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
ProxyManager Bridge
22
===================
33

4-
Provides integration for [ProxyManager][1] with various Symfony2 components.
4+
Provides integration for [ProxyManager][1] with various Symfony components.
55

66
Resources
77
---------

src/Symfony/Bridge/Twig/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Twig Bridge
22
===========
33

44
Provides integration for [Twig](http://twig.sensiolabs.org/) with various
5-
Symfony2 components.
5+
Symfony components.
66

77
Resources
88
---------

src/Symfony/Bridge/Twig/Tests/Extension/TranslationExtensionTest.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -75,13 +75,13 @@ public function getTransTests()
7575
return array(
7676
// trans tag
7777
array('{% trans %}Hello{% endtrans %}', 'Hello'),
78-
array('{% trans %}%name%{% endtrans %}', 'Symfony2', array('name' => 'Symfony2')),
78+
array('{% trans %}%name%{% endtrans %}', 'Symfony', array('name' => 'Symfony')),
7979

8080
array('{% trans from elsewhere %}Hello{% endtrans %}', 'Hello'),
8181

82-
array('{% trans %}Hello %name%{% endtrans %}', 'Hello Symfony2', array('name' => 'Symfony2')),
83-
array('{% trans with { \'%name%\': \'Symfony2\' } %}Hello %name%{% endtrans %}', 'Hello Symfony2'),
84-
array('{% set vars = { \'%name%\': \'Symfony2\' } %}{% trans with vars %}Hello %name%{% endtrans %}', 'Hello Symfony2'),
82+
array('{% trans %}Hello %name%{% endtrans %}', 'Hello Symfony', array('name' => 'Symfony')),
83+
array('{% trans with { \'%name%\': \'Symfony\' } %}Hello %name%{% endtrans %}', 'Hello Symfony'),
84+
array('{% set vars = { \'%name%\': \'Symfony\' } %}{% trans with vars %}Hello %name%{% endtrans %}', 'Hello Symfony'),
8585

8686
array('{% trans into "fr"%}Hello{% endtrans %}', 'Hello'),
8787

@@ -91,24 +91,24 @@ public function getTransTests()
9191
array('{% transchoice count %}{0} There is no apples|{1} There is one apple|]1,Inf] There is %count% apples{% endtranschoice %}',
9292
'There is 5 apples', array('count' => 5),),
9393
array('{% transchoice count %}{0} There is no apples|{1} There is one apple|]1,Inf] There is %count% apples (%name%){% endtranschoice %}',
94-
'There is 5 apples (Symfony2)', array('count' => 5, 'name' => 'Symfony2'),),
95-
array('{% transchoice count with { \'%name%\': \'Symfony2\' } %}{0} There is no apples|{1} There is one apple|]1,Inf] There is %count% apples (%name%){% endtranschoice %}',
96-
'There is 5 apples (Symfony2)', array('count' => 5),),
94+
'There is 5 apples (Symfony)', array('count' => 5, 'name' => 'Symfony'),),
95+
array('{% transchoice count with { \'%name%\': \'Symfony\' } %}{0} There is no apples|{1} There is one apple|]1,Inf] There is %count% apples (%name%){% endtranschoice %}',
96+
'There is 5 apples (Symfony)', array('count' => 5),),
9797
array('{% transchoice count into "fr"%}{0} There is no apples|{1} There is one apple|]1,Inf] There is %count% apples{% endtranschoice %}',
9898
'There is no apples', array('count' => 0),),
9999
array('{% transchoice 5 into "fr"%}{0} There is no apples|{1} There is one apple|]1,Inf] There is %count% apples{% endtranschoice %}',
100100
'There is 5 apples',),
101101

102102
// trans filter
103103
array('{{ "Hello"|trans }}', 'Hello'),
104-
array('{{ name|trans }}', 'Symfony2', array('name' => 'Symfony2')),
105-
array('{{ hello|trans({ \'%name%\': \'Symfony2\' }) }}', 'Hello Symfony2', array('hello' => 'Hello %name%')),
106-
array('{% set vars = { \'%name%\': \'Symfony2\' } %}{{ hello|trans(vars) }}', 'Hello Symfony2', array('hello' => 'Hello %name%')),
104+
array('{{ name|trans }}', 'Symfony', array('name' => 'Symfony')),
105+
array('{{ hello|trans({ \'%name%\': \'Symfony\' }) }}', 'Hello Symfony', array('hello' => 'Hello %name%')),
106+
array('{% set vars = { \'%name%\': \'Symfony\' } %}{{ hello|trans(vars) }}', 'Hello Symfony', array('hello' => 'Hello %name%')),
107107
array('{{ "Hello"|trans({}, "messages", "fr") }}', 'Hello'),
108108

109109
// transchoice filter
110110
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)),
111-
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%)')),
111+
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%)')),
112112
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)),
113113
);
114114
}

src/Symfony/Bundle/FrameworkBundle/Command/ServerRunCommand.php

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
use Symfony\Component\Process\ProcessBuilder;
2020

2121
/**
22-
* Runs Symfony2 application using PHP built-in web server.
22+
* Runs Symfony application using PHP built-in web server.
2323
*
2424
* @author Michał Pipa <[email protected]>
2525
*/
@@ -83,12 +83,6 @@ protected function configure()
8383
*/
8484
protected function execute(InputInterface $input, OutputInterface $output)
8585
{
86-
if (defined('HHVM_VERSION')) {
87-
$output->writeln('<error>This command is not supported on HHVM.</error>');
88-
89-
return 1;
90-
}
91-
9286
$documentRoot = $input->getOption('docroot');
9387

9488
if (null === $documentRoot) {

src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,7 @@ private function addValidationSection(ArrayNodeDefinition $rootNode)
498498
// API version already during container configuration
499499
// (to adjust service classes etc.)
500500
// See https://github.com/symfony/symfony/issues/11580
501-
$v['validation']['api'] = version_compare(PHP_VERSION, '5.3.9', '<')
501+
$v['validation']['api'] = PHP_VERSION_ID < 50309
502502
? '2.4'
503503
: '2.5-bc';
504504

src/Symfony/Bundle/FrameworkBundle/Tests/Console/Descriptor/JsonDescriptorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class JsonDescriptorTest extends AbstractDescriptorTest
1717
{
1818
protected function setUp()
1919
{
20-
if (version_compare(phpversion(), '5.4.0', '<')) {
20+
if (PHP_VERSION_ID < 50400) {
2121
$this->markTestSkipped('Test skipped on PHP 5.3 as JSON_PRETTY_PRINT does not exist.');
2222
}
2323
}

src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/ConfigurationTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ protected static function getBundleDefaultConfig()
131131
'static_method' => array('loadValidatorMetadata'),
132132
'translation_domain' => 'validators',
133133
'strict_email' => false,
134-
'api' => version_compare(PHP_VERSION, '5.3.9', '<') ? '2.4' : '2.5-bc',
134+
'api' => PHP_VERSION_ID < 50309 ? '2.4' : '2.5-bc',
135135
),
136136
'annotations' => array(
137137
'cache' => 'file',

src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ public function testValidation()
295295
$this->assertEquals(array(new Reference('validator.mapping.cache.apc')), $calls[5][1]);
296296
$this->assertSame('setApiVersion', $calls[6][0]);
297297

298-
if (version_compare(PHP_VERSION, '5.3.9', '<')) {
298+
if (PHP_VERSION_ID < 50309) {
299299
$this->assertEquals(array(Validation::API_VERSION_2_4), $calls[6][1]);
300300
} else {
301301
$this->assertEquals(array(Validation::API_VERSION_2_5_BC), $calls[6][1]);
@@ -448,7 +448,7 @@ public function testValidationImplicitApi()
448448
$this->assertSame('setApiVersion', $calls[5][0]);
449449
// no cache, no annotations
450450

451-
if (version_compare(PHP_VERSION, '5.3.9', '<')) {
451+
if (PHP_VERSION_ID < 50309) {
452452
$this->assertSame(array(Validation::API_VERSION_2_4), $calls[5][1]);
453453
} else {
454454
$this->assertSame(array(Validation::API_VERSION_2_5_BC), $calls[5][1]);
@@ -472,7 +472,7 @@ public function testValidationAutoApi()
472472
$this->assertSame('setApiVersion', $calls[5][0]);
473473
// no cache, no annotations
474474

475-
if (version_compare(PHP_VERSION, '5.3.9', '<')) {
475+
if (PHP_VERSION_ID < 50309) {
476476
$this->assertSame(array(Validation::API_VERSION_2_4), $calls[5][1]);
477477
} else {
478478
$this->assertSame(array(Validation::API_VERSION_2_5_BC), $calls[5][1]);

src/Symfony/Bundle/TwigBundle/Loader/FilesystemLoader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
/**
1919
* FilesystemLoader extends the default Twig filesystem loader
20-
* to work with the Symfony2 paths and template references.
20+
* to work with the Symfony paths and template references.
2121
*
2222
* @author Fabien Potencier <[email protected]>
2323
*/

src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.html.twig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- START of Symfony2 Web Debug Toolbar -->
1+
<!-- START of Symfony Web Debug Toolbar -->
22
{% if 'normal' != position %}
33
<div id="sfMiniToolbar-{{ token }}" class="sf-minitoolbar" data-no-turbolink>
44
<a href="javascript:void(0);" title="Show Symfony toolbar" onclick="
@@ -45,4 +45,4 @@
4545
"></a>
4646
{% endif %}
4747
</div>
48-
<!-- END of Symfony2 Web Debug Toolbar -->
48+
<!-- END of Symfony Web Debug Toolbar -->

src/Symfony/Component/Debug/ExceptionHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ public function getContent(FlattenException $exception)
249249
} catch (\Exception $e) {
250250
// something nasty happened and we cannot throw an exception anymore
251251
if ($this->debug) {
252-
$title = sprintf('Exception thrown when handling an exception (%s: %s)', get_class($exception), $exception->getMessage());
252+
$title = sprintf('Exception thrown when handling an exception (%s: %s)', get_class($e), $e->getMessage());
253253
} else {
254254
$title = 'Whoops, looks like something went wrong.';
255255
}

src/Symfony/Component/DependencyInjection/Container.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,10 @@ public function initialized($id)
360360
return true;
361361
}
362362

363+
if (isset($this->aliases[$id])) {
364+
$id = $this->aliases[$id];
365+
}
366+
363367
return isset($this->services[$id]) || array_key_exists($id, $this->services);
364368
}
365369

src/Symfony/Component/DependencyInjection/Tests/ContainerTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,10 @@ public function testInitialized()
305305
$this->assertTrue($sc->initialized('foo'), '->initialized() returns true if service is loaded');
306306
$this->assertFalse($sc->initialized('foo1'), '->initialized() returns false if service is not loaded');
307307
$this->assertFalse($sc->initialized('bar'), '->initialized() returns false if a service is defined, but not currently loaded');
308+
$this->assertFalse($sc->initialized('alias'), '->initialized() returns false if an aliased service is not initialized');
309+
310+
$sc->set('bar', new \stdClass());
311+
$this->assertTrue($sc->initialized('alias'), '->initialized() returns true for alias if aliased service is initialized');
308312
}
309313

310314
public function testEnterLeaveCurrentScope()

src/Symfony/Component/EventDispatcher/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
EventDispatcher Component
22
=========================
33

4-
The Symfony2 EventDispatcher component implements the Mediator pattern in a
4+
The Symfony EventDispatcher component implements the Mediator pattern in a
55
simple and effective way to make your projects truly extensible.
66

77
```php

src/Symfony/Component/ExpressionLanguage/Parser.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ public function parsePostfixExpression($node)
336336

337337
$node = new Node\GetAttrNode($node, $arg, $arguments, $type);
338338
} elseif ('[' === $token->value) {
339-
if ($node instanceof Node\GetAttrNode && Node\GetAttrNode::METHOD_CALL === $node->attributes['type'] && version_compare(PHP_VERSION, '5.4.0', '<')) {
339+
if ($node instanceof Node\GetAttrNode && Node\GetAttrNode::METHOD_CALL === $node->attributes['type'] && PHP_VERSION_ID < 50400) {
340340
throw new SyntaxError('Array calls on a method call is only supported on PHP 5.4+', $token->cursor);
341341
}
342342

src/Symfony/Component/Finder/Tests/Iterator/FilePathsIteratorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public function testSubPath($baseDir, array $paths, array $subPaths, array $subP
3131

3232
public function getSubPathData()
3333
{
34-
$tmpDir = sys_get_temp_dir().'/symfony2_finder';
34+
$tmpDir = sys_get_temp_dir().'/symfony_finder';
3535

3636
return array(
3737
array(

src/Symfony/Component/Finder/Tests/Iterator/RealIteratorTestCase.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ abstract class RealIteratorTestCase extends IteratorTestCase
1818

1919
public static function setUpBeforeClass()
2020
{
21-
self::$tmpDir = realpath(sys_get_temp_dir()).DIRECTORY_SEPARATOR.'symfony2_finder';
21+
self::$tmpDir = realpath(sys_get_temp_dir()).DIRECTORY_SEPARATOR.'symfony_finder';
2222

2323
self::$files = array(
2424
'.git/',
@@ -74,7 +74,7 @@ protected static function toAbsolute($files = null)
7474
* Without the call to setUpBeforeClass() property can be null.
7575
*/
7676
if (!self::$tmpDir) {
77-
self::$tmpDir = realpath(sys_get_temp_dir()).DIRECTORY_SEPARATOR.'symfony2_finder';
77+
self::$tmpDir = realpath(sys_get_temp_dir()).DIRECTORY_SEPARATOR.'symfony_finder';
7878
}
7979

8080
if (is_array($files)) {

src/Symfony/Component/Form/Extension/Csrf/CsrfProvider/SessionCsrfProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
use Symfony\Component\HttpFoundation\Session\Session;
1515

1616
/**
17-
* This provider uses a Symfony2 Session object to retrieve the user's
17+
* This provider uses a Symfony Session object to retrieve the user's
1818
* session ID.
1919
*
2020
* @see DefaultCsrfProvider

src/Symfony/Component/Form/Extension/Validator/ValidatorExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
use Symfony\Component\Validator\ValidatorInterface as LegacyValidatorInterface;
2121

2222
/**
23-
* Extension supporting the Symfony2 Validator component in forms.
23+
* Extension supporting the Symfony Validator component in forms.
2424
*
2525
* @author Bernhard Schussek <[email protected]>
2626
*/

src/Symfony/Component/Form/Tests/FormConfigTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public function getHtml4Ids()
4949
array('9', true),
5050
// Contrary to the HTML4 spec, we allow names starting with an
5151
// underscore, since this is already a widely used practice in
52-
// Symfony2.
52+
// Symfony.
5353
// For root forms, leading underscores will be stripped from the
5454
// "id" attribute to produce valid HTML4.
5555
array('_', true),

src/Symfony/Component/HttpFoundation/Session/Storage/PhpBridgeSessionStorage.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
use Symfony\Component\HttpFoundation\Session\Storage\Handler\NativeSessionHandler;
1616

1717
/**
18-
* Allows session to be started by PHP and managed by Symfony2
18+
* Allows session to be started by PHP and managed by Symfony
1919
*
2020
* @author Drak <[email protected]>
2121
*/

0 commit comments

Comments
 (0)