8000 Merge branch '2.5' into 2.6 · symfony/symfony@a7fd55a · GitHub
[go: up one dir, main page]

Skip to content

Commit a7fd55a

Browse files
committed
Merge branch '2.5' into 2.6
* 2.5: [2.3] fix failing test fixed typo Escape annotations in comments, refs #13089. [2.3] missing cleanup for legacy test add missing param names to @param annotation Improve the composer root version setting on Travis use Table instead of the deprecated TableHelper Conflicts: src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php
2 parents f77bfaa + e3ca516 commit a7fd55a

File tree

9 files changed

+51
-56
lines changed

9 files changed

+51
-56
lines changed

.travis.yml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@ language: php
22

33
matrix:
44
include:
5-
- php: 5.3.3
6-
env: components=low
7-
- php: 5.6
8-
env: components=high
95
- php: 5.3.3
106
- php: 5.3
117
- php: 5.4
128
- php: 5.5
139
- php: 5.6
10+
- php: 5.3.3
11+
env: components=low
12+
- php: 5.6
13+
env: components=high
1414
- php: hhvm-nightly
1515
allow_failures:
1616
- php: hhvm-nightly
@@ -32,13 +32,14 @@ before_install:
3232
- if [ "$TRAVIS_PHP_VERSION" != "hhvm-nightly" ]; then echo "extension = memcache.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; fi;
3333
- if [ "$TRAVIS_PHP_VERSION" != "hhvm-nightly" ]; then php -i; fi;
3434
- sudo locale-gen fr_FR.UTF-8 && sudo update-locale
35-
# - if [ "$TRAVIS_PHP_VERSION" != "5.3.3" ]; then phpunit --self-update; fi;
35+
# Set the COMPOSER_ROOT_VERSION to the right version according to the branch being built
36+
- if [ "$TRAVIS_BRANCH" = "master" ]; then export COMPOSER_ROOT_VERSION=dev-master; else export COMPOSER_ROOT_VERSION="$TRAVIS_BRANCH".x-dev; fi;
3637

3738
install:
38-
- if [ "$components" = "no" ]; then COMPOSER_ROOT_VERSION=dev-master composer --prefer-source --dev install; fi;
39+
- if [ "$components" = "no" ]; then composer --prefer-source --dev install; fi;
3940

4041
script:
4142
- 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;
4243
- if [ "$components" = "no" ]; then echo -e "\\nRunning tests requiring tty"; phpunit --group tty || (echo -e "\\e[41mKO\\e[0m tty group" && $(exit 1)); fi;
43-
- 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_ROOT_VERSION=dev-master composer --prefer-source --dev update; phpunit --exclude-group tty,benchmark,intl-data || (echo -e "\\e[41mKO\\e[0m {}" && $(exit 1));'; fi;
44-
- 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_ROOT_VERSION=dev-master composer --prefer-source --dev --prefer-lowest --prefer-stable update; phpunit --exclude-group tty,benchmark,intl-data || (echo -e "\\e[41mKO\\e[0m {}" && $(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 --dev 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 --dev --prefer-lowest --prefer-stable update; phpunit --exclude-group tty,benchmark,intl-data || (echo -e "\\e[41mKO\\e[0m {}" && $(exit 1));'; fi;

UPGRADE-2.5.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
UPGRADE FROM 2.4 to 2.5
22
=======================
33

4+
FrameworkBundle
5+
---------------
6+
7+
* The `Symfony\Bundle\FrameworkBundle\Console\Descriptor\Descriptor::renderTable()`
8+
method expects the table to be an instance of `Symfony\Component\Console\Helper\Table`
9+
instead of `Symfony\Component\Console\Helper\TableHelper`.
10+
411
Routing
512
-------
613

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

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
namespace Symfony\Bundle\FrameworkBundle\Console\Descriptor;
1313

1414
use Symfony\Component\Console\Descriptor\DescriptorInterface;
15-
use Symfony\Component\Console\Helper\TableHelper;
15+
use Symfony\Component\Console\Helper\Table;
1616
use Symfony\Component\Console\Output\OutputInterface;
1717
use Symfony\Component\DependencyInjection\Alias;
1818
use Symfony\Component\DependencyInjection\ContainerBuilder;
@@ -78,6 +78,16 @@ public function describe(OutputInterface $output, $object, array $options = arra
7878
}
7979
}
8080

81+
/**
82+
* Returns the output.
83+
*
84+
* @return OutputInterface The output
85+
*/
86+
protected function getOutput()
87+
{
88+
return $this->output;
89+
}
90+
8191
/**
8292
* Writes content to output.
8393
*
@@ -92,17 +102,18 @@ protected function write($content, $decorated = false)
92102
/**
93103
* Writes content to output.
94104
*
95-
* @param TableHelper $table
96-
* @param bool $decorated
105+
* @param Table $table
106+
* @param bool $decorated
97107
*/
98-
protected function renderTable(TableHelper $table, $decorated = false)
108+
protected function renderTable(Table $table, $decorated = false)
99109
{
100110
if (!$decorated) {
101-
$table->setCellRowFormat('%s');
102-
$table->setCellHeaderFormat('%s');
111+
$table->getStyle()->setCellRowFormat('%s');
112+
$table->getStyle()->setCellRowContentFormat('%s');
113+
$table->getStyle()->setCellHeaderFormat('%s');
103114
}
104115

105-
$table->render($this->output);
116+
$table->render();
106117
}
107118

108119
/**

src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
namespace Symfony\Bundle\FrameworkBundle\Console\Descriptor;
1313

14-
use Symfony\Component\Console\Helper\TableHelper;
14+
use Symfony\Component\Console\Helper\Table;
1515
use Symfony\Component\DependencyInjection\Alias;
1616
use Symfony\Component\DependencyInjection\ContainerBuilder;
1717
use Symfony\Component\DependencyInjection\Definition;
@@ -32,8 +32,8 @@ protected function describeRouteCollection(RouteCollection $routes, array $optio
3232
{
3333
$showControllers = isset($options['show_controllers']) && $options['show_controllers'];
3434
$headers = array('Name', 'Method', 'Scheme', 'Host', 'Path');
35-
$table = new TableHelper();
36-
$table->setLayout(TableHelper::LAYOUT_COMPACT);
35+
$table = new Table($this->getOutput());
36+
$table->setStyle('compact');
3737
$table->setHeaders($showControllers ? array_merge($headers, array('Controller')) : $headers);
3838

3939
foreach ($routes->all() as $name => $route) {
@@ -100,8 +100,8 @@ protected function describeRoute(Route $route, array $options = array())
100100
*/
101101
protected function describeContainerParameters(ParameterBag $parameters, array $options = array())
102102
{
103-
$table = new TableHelper();
104-
$table->setLayout(TableHelper::LAYOUT_COMPACT);
103+
$table = new Table($this->getOutput());
104+
$table->setStyle('compact');
105105
$table->setHeaders(array('Parameter', 'Value'));
106106

107107
foreach ($this->sortParameters($parameters) as $parameter => $value) {
@@ -201,8 +201,8 @@ protected function describeContainerServices(ContainerBuilder $builder, array $o
201201
$tagsCount = count($maxTags);
202202
$tagsNames = array_keys($maxTags);
203203

204-
$table = new TableHelper();
205-
$table->setLayout(TableHelper::LAYOUT_COMPACT);
204+
$table = new Table($this->getOutput());
205+
$table->setStyle('compact');
206206
$table->setHeaders(array_merge(array('Service ID'), $tagsNames, array('Class name')));
207207

208208
foreach ($this->sortServiceIds($serviceIds) as $serviceId) {

src/Symfony/Bundle/FrameworkBundle/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
},
3434
"require-dev": {
3535
"symfony/browser-kit": "~2.4",
36-
"symfony/console": "~2.4,>=2.4.8",
36+
"symfony/console": "~2.5,>=2.5.2",
3737
"symfony/css-selector": "~2.0,>=2.0.5",
3838
"symfony/dom-crawler": "~2.0,>=2.0.5",
3939
"symfony/finder": "~2.0,>=2.0.5",

src/Symfony/Component/HttpKernel/Kernel.php

Lines changed: 2 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -242,35 +242,9 @@ public function getBundle($name, $first = true)
242242
}
243243

244244
/**
245-
* Returns the file path for a given resource.
245+
* {@inheritDoc}
246246
*
247-
* A Resource can be a file or a directory.< 10BC0 /div>
248-
*
249-
* The resource name must follow the following pattern:
250-
*
251-
* @<BundleName>/path/to/a/file.something
252-
*
253-
* where BundleName is the name of the bundle
254-
* and the remaining part is the relative path in the bundle.
255-
*
256-
* If $dir is passed, and the first segment of the path is "Resources",
257-
* this method will look for a file named:
258-
*
259-
* $dir/<BundleName>/path/without/Resources
260-
*
261-
* before looking in the bundle resource folder.
262-
*
263-
* @param string $name A resource name to locate
264-
* @param string $dir A directory where to look for the resource first
265-
* @param bool $first Whether to return the first path or paths for all matching bundles
266-
*
267-
* @return string|array The absolute path of the resource or an array if $first is false
268-
*
269-
* @throws \InvalidArgumentException if the file cannot be found or the name is not valid
270-
* @throws \RuntimeException if the name contains invalid/unsafe
271-
* @throws \RuntimeException if a custom resource is hidden by a resource in a derived bundle
272-
*
273-
* @api
247+
* @throws \RuntimeException if a custom resource is hidden by a resource in a derived bundle
274248
*/
275249
public function locateResource($name, $dir = null, $first = true)
276250
{

src/Symfony/Component/HttpKernel/KernelInterface.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,15 +103,17 @@ public function getBundle($name, $first = true);
103103
*
104104
* The resource name must follow the following pattern:
105105
*
106-
* @BundleName/path/to/a/file.something
106+
* "@BundleName/path/to/a/file.something"
107107
*
108108
* where BundleName is the name of the bundle
109109
* and the remaining part is the relative path in the bundle.
110110
*
111-
* If $dir is passed, and the first segment of the path is Resources,
111+
* If $dir is passed, and the first segment of the path is "Resources",
112112
* this method will look for a file named:
113113
*
114-
* $dir/BundleName/path/without/Resources
114+
* $dir/<BundleName>/path/without/Resources
115+
*
116+
* before looking in the bundle resource folder.
115117
*
116118
* @param string $name A resource name to locate
117119
* @param string $dir A directory where to look for the resource first

src/Symfony/Component/Process/ProcessBuilder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ public function setInput($input)
187187
*
188188
* To disable the timeout, set this value to null.
189189
*
190-
* @param float|null
190+
* @param float|null $timeout
191191
*
192192
* @return ProcessBuilder
193193
*

src/Symfony/Component/Security/Core/Util/ClassUtils.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ private function __construct()
4848
/**
4949
* Gets the real class name of a class name that could be a proxy.
5050
*
51-
* @param string|object
51+
* @param string|object $object
5252
*
5353
* @return string
5454
*/

0 commit comments

Comments
 (0)
0