Skip to content

Commit 2f3692a

Browse files
Merge branch '2.3' into 2.6
* 2.3: Minor hot fix [PROCESS] make sure /dev/tty is readable [2.3] require-dev PHPUnit bridge [FrameworkBundle] Fixed Shell logo [2.3] Update CONTRIBUTING.md [2.3][Process] Fixed PhpProcess::getCommandLine() result [Console] explicit assertion for ArgvInput::getFirstArgument() with no arguments Enforce UTF-8 charset for core controllers Conflicts: CONTRIBUTING.md src/Symfony/Bridge/Monolog/composer.json src/Symfony/Bundle/FrameworkBundle/composer.json src/Symfony/Bundle/SecurityBundle/composer.json src/Symfony/Bundle/TwigBundle/Controller/ExceptionController.php src/Symfony/Bundle/WebProfilerBundle/Controller/ProfilerController.php src/Symfony/Component/Console/composer.json src/Symfony/Component/Debug/composer.json src/Symfony/Component/DomCrawler/composer.json src/Symfony/Component/EventDispatcher/composer.json src/Symfony/Component/HttpFoundation/composer.json src/Symfony/Component/Security/composer.json src/Symfony/Component/Templating/composer.json
2 parents ed8f5c8 + 4a63bde commit 2f3692a

File tree

106 files changed

+275
-218
lines changed

Some content is hidden

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

106 files changed

+275
-218
lines changed

.travis.yml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ matrix:
88
- php: 5.5
99
- php: 5.6
1010
- php: 5.3
11-
env: components=low
11+
env: deps=low
1212
- php: 5.6
13-
env: components=high
13+
env: deps=high
1414
- php: hhvm-nightly
1515
allow_failures:
1616
- php: hhvm-nightly
@@ -20,7 +20,8 @@ services: mongodb
2020

2121
env:
2222
global:
23-
- components=no
23+
- deps=no
24+
- SYMFONY_DEPRECATIONS_HELPER=weak
2425

2526
before_install:
2627
- travis_retry sudo apt-get install parallel
@@ -36,10 +37,10 @@ before_install:
3637
- if [ "$TRAVIS_BRANCH" = "master" ]; then export COMPOSER_ROOT_VERSION=dev-master; else export COMPOSER_ROOT_VERSION="$TRAVIS_BRANCH".x-dev; fi;
3738

3839
install:
39-
- if [ "$components" = "no" ]; then composer --prefer-source install; fi;
40+
- if [ "$deps" = "no" ]; then composer --prefer-source install; fi;
4041

4142
script:
42-
- if [ "$components" = "no" ]; then ls -d src/Symfony/*/* | parallel --gnu --keep-order 'echo -e "\\nRunning {} tests"; phpunit --exclude-group tty,benchmark,intl-data {} || (echo -e "\\e[41mKO\\e[0m {}" && $(exit 1));'; fi;
43-
- if [ "$components" = "no" ]; then echo -e "\\nRunning tests requiring tty"; phpunit --group tty || (echo -e "\\e[41mKO\\e[0m tty group" && $(exit 1)); fi;
44-
- if [ "$components" = "high" ]; then find src/Symfony -mindepth 3 -type f -name phpunit.xml.dist | sed 's#\(.*\)/.*#\1#' | parallel --gnu --keep-order -j25% 'echo -e "\\nRunning {} tests"; cd {}; composer --prefer-source update; phpunit --exclude-group tty,benchmark,intl-data || (echo -e "\\e[41mKO\\e[0m {}" && $(exit 1));'; fi;
45-
- if [ "$components" = "low" ]; then find src/Symfony -mindepth 3 -type f -name phpunit.xml.dist | sed 's#\(.*\)/.*#\1#' | parallel --gnu --keep-order -j25% 'echo -e "\\nRunning {} tests"; cd {}; composer --prefer-source --prefer-lowest --prefer-stable update; phpunit --exclude-group tty,benchmark,intl-data || (echo -e "\\e[41mKO\\e[0m {}" && $(exit 1));'; fi;
43+
- if [ "$deps" = "no" ]; then ls -d src/Symfony/*/* | parallel --gnu --keep-order 'echo -e "\\nRunning {} tests"; phpunit --exclude-group tty,benchmark,intl-data {} || (echo -e "\\e[41mKO\\e[0m {}" && $(exit 1));'; fi;
44+
- if [ "$deps" = "no" ]; then echo -e "\\nRunning tests requiring tty"; phpunit --group tty || (echo -e "\\e[41mKO\\e[0m tty group" && $(exit 1)); fi;
45+
- if [ "$deps" = "high" ]; then find src/Symfony -mindepth 3 -type f -name phpunit.xml.dist | sed 's#\(.*\)/.*#\1#' | parallel --gnu --keep-order -j25% 'echo -e "\\nRunning {} tests"; cd {}; composer --prefer-source update; phpunit --exclude-group tty,benchmark,intl-data,legacy || (echo -e "\\e[41mKO\\e[0m {}" && $(exit 1));'; fi;
46+
- if [ "$deps" = "low" ]; then find src/Symfony -mindepth 3 -type f -name phpunit.xml.dist | sed 's#\(.*\)/.*#\1#' | parallel --gnu --keep-order -j25% 'echo -e "\\nRunning {} tests"; cd {}; composer --prefer-source --prefer-lowest --prefer-stable update; phpunit --exclude-group tty,benchmark,intl-data || (echo -e "\\e[41mKO\\e[0m {}" && $(exit 1));'; fi;

CONTRIBUTING.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Contributing
22
------------
33

4-
Symfony2 is an open source, community-driven project.
4+
Symfony is an open source, community-driven project.
55

66
If you'd like to contribute, please read the following documents:
77

@@ -12,6 +12,19 @@ If you'd like to contribute, please read the following documents:
1212
* [Pull Request Template][3]: Template header to use in your pull request
1313
description;
1414

15+
```markdown
16+
| Q | A
17+
| ------------- | ---
18+
| Bug fix? | yes/no
19+
| New feature? | yes/no
20+
| BC breaks? | no
21+
| Deprecations? | no
22+
| Tests pass? | yes
23+
| Fixed tickets | #1234
24+
| License | MIT
25+
| Doc PR | symfony/symfony-docs#1234
26+
```
27+
1528
* [Backwards Compatibility][4]: Backward compatibility rules.
1629

1730
[1]: http://symfony.com/doc/current/contributing/code/index.html

autoload.php.dist

Lines changed: 0 additions & 15 deletions
This file was deleted.

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@
6868
"symfony/yaml": "self.version"
6969
},
7070
"require-dev": {
71+
"symfony/phpunit-bridge": "~2.7",
7172
"doctrine/data-fixtures": "1.0.*",
7273
"doctrine/dbal": "~2.2",
7374
"doctrine/orm": "~2.2,>=2.2.3",

phpunit.xml.dist

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,13 @@
44
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/4.1/phpunit.xsd"
55
backupGlobals="false"
66
colors="true"
7-
bootstrap="autoload.php.dist"
7+
bootstrap="vendor/autoload.php"
88
>
99
<php>
10-
<ini name="intl.default_locale" value="en"/>
11-
<ini name="intl.error_level" value="0"/>
12-
<ini name="memory_limit" value="-1"/>
10+
<ini name="error_reporting" value="-1" />
11+
<ini name="intl.default_locale" value="en" />
12+
<ini name="intl.error_level" value="0" />
13+
<ini name="memory_limit" value="-1" />
1314
</php>
1415

1516
<testsuites>

src/Symfony/Bridge/Doctrine/Tests/bootstrap.php

Lines changed: 0 additions & 14 deletions
This file was deleted.

src/Symfony/Bridge/Doctrine/composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
"doctrine/common": "~2.3"
2121
},
2222
"require-dev": {
23+
"symfony/phpunit-bridge": "~2.7",
2324
"symfony/stopwatch": "~2.2",
2425
"symfony/dependency-injection": "~2.2",
2526
"symfony/form": "~2.3,>=2.3.8",

src/Symfony/Bridge/Doctrine/phpunit.xml.dist

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,10 @@
44
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/4.1/phpunit.xsd"
55
backupGlobals="false"
66
colors="true"
7-
bootstrap="Tests/bootstrap.php"
7+
bootstrap="vendor/autoload.php"
88
>
99
<php>
10-
<!-- Silence E_USER_DEPRECATED (-16385 == -1 & ~E_USER_DEPRECATED) -->
11-
<ini name="error_reporting" value="-16385"/>
10+
<ini name="error_reporting" value="-1" />
1211
</php>
1312
<testsuites>
1413
<testsuite name="Symfony Doctrine Bridge Test Suite">

src/Symfony/Bridge/Monolog/composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
"monolog/monolog": "~1.11"
2121
},
2222
"require-dev": {
23+
"symfony/phpunit-bridge": "~2.7",
2324
"symfony/http-kernel": "~2.4",
2425
"symfony/console": "~2.4",
2526
"symfony/event-dispatcher": "~2.2"

src/Symfony/Bridge/Monolog/phpunit.xml.dist

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77
bootstrap="vendor/autoload.php"
88
>
99
<php>
10-
<!-- Silence E_USER_DEPRECATED (-16385 == -1 & ~E_USER_DEPRECATED) -->
11-
<ini name="error_reporting" value="-16385"/>
10+
<ini name="error_reporting" value="-1" />
1211
</php>
1312
<testsuites>
1413
<testsuite name="Symfony Monolog Bridge Test Suite">

src/Symfony/Bridge/Propel1/composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
"propel/propel1": "~1.6,>=1.6.5"
2525
},
2626
"require-dev": {
27+
"symfony/phpunit-bridge": "~2.7",
2728
"symfony/stopwatch": "~2.2"
2829
},
2930
"autoload": {

src/Symfony/Bridge/Propel1/phpunit.xml.dist

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77
bootstrap="vendor/autoload.php"
88
>
99
<php>
10-
<!-- Silence E_USER_DEPRECATED (-16385 == -1 & ~E_USER_DEPRECATED) -->
11-
<ini name="error_reporting" value="-16385"/>
10+
<ini name="error_reporting" value="-1" />
1211
</php>
1312
<testsuites>
1413
<testsuite name="Symfony Propel1 Bridge Test Suite">

src/Symfony/Bridge/ProxyManager/composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
"ocramius/proxy-manager": "~0.4|~1.0"
2222
},
2323
"require-dev": {
24+
"symfony/phpunit-bridge": "~2.7",
2425
"symfony/config": "~2.3"
2526
},
2627
"autoload": {

src/Symfony/Bridge/ProxyManager/phpunit.xml.dist

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77
bootstrap="vendor/autoload.php"
88
>
99
<php>
10-
<!-- Silence E_USER_DEPRECATED (-16385 == -1 & ~E_USER_DEPRECATED) -->
11-
<ini name="error_reporting" value="-16385"/>
10+
<ini name="error_reporting" value="-1" />
1211
</php>
1312
<testsuites>
1413
<testsuite name="Symfony ProxyManager Bridge Test Suite">

src/Symfony/Bridge/Swiftmailer/composer.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@
1919
"php": ">=5.3.3",
2020
"swiftmailer/swiftmailer": ">=4.2.0,<6.0-dev"
2121
},
22+
"require-dev": {
23+
"symfony/phpunit-bridge": "~2.7"
24+
},
2225
"suggest": {
2326
"symfony/http-kernel": ""
2427
},

src/Symfony/Bridge/Twig/composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
"twig/twig": "~1.13,>=1.13.1"
2121
},
2222
"require-dev": {
23+
"symfony/phpunit-bridge": "~2.7",
2324
"symfony/finder": "~2.3",
2425
"symfony/form": "~2.6",
2526
"symfony/http-kernel": "~2.3",

src/Symfony/Bridge/Twig/phpunit.xml.dist

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77
bootstrap="vendor/autoload.php"
88
>
99
<php>
10-
<!-- Silence E_USER_DEPRECATED (-16385 == -1 & ~E_USER_DEPRECATED) -->
11-
<ini name="error_reporting" value="-16385"/>
10+
<ini name="error_reporting" value="-1" />
1211
</php>
1312
<testsuites>
1413
<testsuite name="Symfony Twig Bridge Test Suite">

src/Symfony/Bundle/DebugBundle/composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
"symfony/var-dumper": "~2.6"
2323
},
2424
"require-dev": {
25+
"symfony/phpunit-bridge": "~2.7",
2526
"symfony/config": "~2.3",
2627
"symfony/dependency-injection": "~2.3"
2728
},

src/Symfony/Bundle/DebugBundle/phpunit.xml.dist

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77
bootstrap="vendor/autoload.php"
88
>
99
<php>
10-
<!-- Silence E_USER_DEPRECATED (-16385 == -1 & ~E_USER_DEPRECATED) -->
11-
<ini name="error_reporting" value="-16385"/>
10+
<ini name="error_reporting" value="-1" />
1211
</php>
1312
<testsuites>
1413
<testsuite name="Symfony DebugBundle Test Suite">

src/Symfony/Bundle/FrameworkBundle/Console/Shell.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@ protected function getHeader()
2929
{
3030
return <<<EOF
3131
<info>
32-
_____ __ ___
33-
/ ____| / _| |__ \
34-
| (___ _ _ _ __ ___ | |_ ___ _ __ _ _ ) |
35-
\___ \| | | | '_ ` _ \| _/ _ \| '_ \| | | | / /
36-
____) | |_| | | | | | | || (_) | | | | |_| |/ /_
37-
|_____/ \__, |_| |_| |_|_| \___/|_| |_|\__, |____|
32+
_____ __
33+
/ ____| / _|
34+
| (___ _ _ _ __ ___ | |_ ___ _ __ _ _
35+
\___ \| | | | '_ ` _ \| _/ _ \| '_ \| | | |
36+
____) | |_| | | | | | | || (_) | | | | |_| |
37+
|_____/ \__, |_| |_| |_|_| \___/|_| |_|\__, |
3838
__/ | __/ |
3939
|___/ |___/
4040

src/Symfony/Bundle/FrameworkBundle/composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
"doctrine/annotations": "~1.0"
3333
},
3434
"require-dev": {
35+
"symfony/phpunit-bridge": "~2.7",
3536
"symfony/browser-kit": "~2.4",
3637
"symfony/console": "~2.5,>=2.5.2",
3738
"symfony/css-selector": "~2.0,>=2.0.5",

src/Symfony/Bundle/FrameworkBundle/phpunit.xml.dist

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77
bootstrap="vendor/autoload.php"
88
>
99
<php>
10-
<!-- Silence E_USER_DEPRECATED (-16385 == -1 & ~E_USER_DEPRECATED) -->
11-
<ini name="error_reporting" value="-16385"/>
10+
<ini name="error_reporting" value="-1" />
1211
</php>
1312
<testsuites>
1413
<testsuite name="Symfony FrameworkBundle Test Suite">

src/Symfony/Bundle/SecurityBundle/composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
"symfony/http-kernel": "~2.2"
2222
},
2323
"require-dev": {
24+
"symfony/phpunit-bridge": "~2.7",
2425
"symfony/browser-kit": "~2.4",
2526
"symfony/console": "~2.3",
2627
"symfony/css-selector": "~2.0,>=2.0.5",

src/Symfony/Bundle/SecurityBundle/phpunit.xml.dist

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77
bootstrap="vendor/autoload.php"
88
>
99
<php>
10-
<!-- Silence E_USER_DEPRECATED (-16385 == -1 & ~E_USER_DEPRECATED) -->
11-
<ini name="error_reporting" value="-16385"/>
10+
<ini name="error_reporting" value="-1" />
1211
</php>
1312
<testsuites>
1413
<testsuite name="Symfony SecurityBundle Test Suite">

src/Symfony/Bundle/TwigBundle/Controller/ExceptionController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public function showAction(Request $request, FlattenException $exception, DebugL
6262

6363
$code = $exception->getStatusCode();
6464

65-
return new Response($this->twig->render(
65+
return Response::create($this->twig->render(
6666
$this->findTemplate($request, $request->getRequestFormat(), $code, $showException),
6767
array(
6868
'status_code' => $code,
@@ -71,7 +71,7 @@ public function showAction(Request $request, FlattenException $exception, DebugL
7171
'logger' => $logger,
7272
'currentContent' => $currentContent,
7373
)
74-
));
74+
))->setCharset('UTF-8');
7575
}
7676

7777
/**

src/Symfony/Bundle/TwigBundle/Tests/Controller/ExceptionControllerTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ public function testOnlyClearOwnOutputBuffers()
4040
$request->headers->set('X-Php-Ob-Level', 1);
4141

4242
$controller = new ExceptionController($twig, false);
43-
$controller->showAction($request, $flatten);
43+
$response = $controller->showAction($request, $flatten);
44+
$this->assertEquals('UTF-8', $response->getCharset(), 'Request charset is explicitly set to UTF-8');
4445
}
4546

4647
public function testShowActionCanBeForcedToShowErrorPage()

src/Symfony/Bundle/TwigBundle/composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
"symfony/http-kernel": "~2.3.24|~2.5.9|~2.6,>=2.6.2"
2323
},
2424
"require-dev": {
25+
"symfony/phpunit-bridge": "~2.7",
2526
"symfony/stopwatch": "~2.2",
2627
"symfony/dependency-injection": "~2.2",
2728
"symfony/expression-language": "~2.4",

src/Symfony/Bundle/TwigBundle/phpunit.xml.dist

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77
bootstrap="vendor/autoload.php"
88
>
99
<php>
10-
<!-- Silence E_USER_DEPRECATED (-16385 == -1 & ~E_USER_DEPRECATED) -->
11-
<ini name="error_reporting" value="-16385"/>
10+
<ini name="error_reporting" value="-1" />
1211
</php>
1312
<testsuites>
1413
<testsuite name="Symfony TwigBundle Test Suite">

src/Symfony/Bundle/WebProfilerBundle/Controller/ExceptionController.php

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -62,16 +62,17 @@ public function showAction($token)
6262

6363
$code = $exception->getStatusCode();
6464

65-
return new Response($this->twig->render(
66-
$template,
67-
array(
65+
return Response::create(
66+
$this->twig->render($template, array(
6867
'status_code' => $code,
6968
'status_text' => Response::$statusTexts[$code],
7069
'exception' => $exception,
7170
'logger' => null,
7271
'currentContent' => '',
73-
)
74-
), 200, array('Content-Type' => 'text/html'));
72+
)),
73+
200,
74+
array('Content-Type' => 'text/html')
75+
)->setCharset('UTF-8');
7576
}
7677

7778
/**
@@ -97,10 +98,14 @@ public function cssAction($token)
9798
if (!$this->templateExists($template)) {
9899
$handler = new ExceptionHandler();
99100

100-
return new Response($handler->getStylesheet($exception), 200, array('Content-Type' => 'text/css'));
101+
$response = new Response($handler->getStylesheet($exception), 200, array('Content-Type' => 'text/css'));
102+
} else {
103+
$response = new Response($this->twig->render('@WebProfiler/Collector/exception.css.twig'), 200, array('Content-Type' => 'text/css'));
101104
}
102105

103-
return new Response($this->twig->render('@WebProfiler/Collector/exception.css.twig'), 200, array('Content-Type' => 'text/css'));
106+
$response->setCharset('UTF-8');
107+
108+
return $response;
104109
}
105110

106111
protected function getTemplate()

0 commit comments

Comments
 (0)