Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 4b71fe0

Browse filesBrowse files
committed
Merge branch '2.7' into 2.8
* 2.7: fixed CS fixed CS fixed CS Fix WebProfilerBundle compatiblity with HttpKernel < 2.7 [Validator] Deprecated PHP7-incompatible constraints and related validators [DebugBundle] Allow alternative destination for dumps [DebugBundle] Use output mechanism of dumpers instead of echoing [DebugBundle] Always collect dumps [FrameworkBundle] Applied new styles to the config:debug & config:dump-reference commands Fix tests in HHVM CS: Pre incrementation/decrementation should be used if possible Conflicts: src/Symfony/Bundle/FrameworkBundle/composer.json
2 parents 2119bf3 + 0c613fb commit 4b71fe0
Copy full SHA for 4b71fe0

File tree

Expand file treeCollapse file tree

79 files changed

+248
-161
lines changed
Filter options

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Dismiss banner
Expand file treeCollapse file tree

79 files changed

+248
-161
lines changed

‎UPGRADE-2.7.md

Copy file name to clipboardExpand all lines: UPGRADE-2.7.md
+6Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -528,3 +528,9 @@ Config
528528
* The `__toString()` method of the `\Symfony\Component\Config\ConfigCache` is marked as
529529
deprecated in favor of the new `getPath()` method.
530530

531+
Validator
532+
---------
533+
534+
* The PHP7-incompatible constraints (Null, True, False) and related validators
535+
(NullValidator, TrueValidator, FalseValidator) are marked as deprecated
536+
in favor of their `Is`-prefixed equivalent.

‎src/Symfony/Bridge/Doctrine/Tests/Logger/DbalLoggerTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/Doctrine/Tests/Logger/DbalLoggerTest.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ public function testLogUTF8LongString()
121121

122122
$shortString = '';
123123
$longString = '';
124-
for ($i = 1; $i <= DbalLogger::MAX_STRING_LENGTH; $i++) {
124+
for ($i = 1; $i <= DbalLogger::MAX_STRING_LENGTH; ++$i) {
125125
$shortString .= $testStringArray[$i % $testStringCount];
126126
$longString .= $testStringArray[$i % $testStringCount];
127127
}

‎src/Symfony/Bridge/Twig/Extension/CodeExtension.php

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/Twig/Extension/CodeExtension.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ public function fileExcerpt($file, $line)
141141
$content = preg_split('#<br />#', $code);
142142

143143
$lines = array();
144-
for ($i = max($line - 3, 1), $max = min($line + 3, count($content)); $i <= $max; $i++) {
144+
for ($i = max($line - 3, 1), $max = min($line + 3, count($content)); $i <= $max; ++$i) {
145145
$lines[] = '<li'.($i == $line ? ' class="selected"' : '').'><code>'.self::fixCodeMarkup($content[$i - 1]).'</code></li>';
146146
}
147147

‎src/Symfony/Bundle/DebugBundle/DebugBundle.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/DebugBundle/DebugBundle.php
+1-2Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
use Symfony\Bundle\DebugBundle\DependencyInjection\Compiler\DumpDataCollectorPass;
1515
use Symfony\Component\DependencyInjection\ContainerBuilder;
1616
use Symfony\Component\HttpKernel\Bundle\Bundle;
17-
use Symfony\Component\VarDumper\Dumper\CliDumper;
1817
use Symfony\Component\VarDumper\VarDumper;
1918

2019
/**
@@ -31,7 +30,7 @@ public function boot()
3130
// configuration for CLI mode is overridden in HTTP mode on
3231
// 'kernel.request' event
3332
VarDumper::setHandler(function ($var) use ($container) {
34-
$dumper = new CliDumper();
33+
$dumper = $container->get('var_dumper.cli_dumper');
3534
$cloner = $container->get('var_dumper.cloner');
3635
$handler = function ($var) use ($dumper, $cloner) {
3736
$dumper->dump($cloner->cloneVar($var));

‎src/Symfony/Bundle/DebugBundle/DependencyInjection/Configuration.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/DebugBundle/DependencyInjection/Configuration.php
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@ public function getConfigTreeBuilder()
4141
->min(-1)
4242
->defaultValue(-1)
4343
->end()
44+
->scalarNode('dump_destination')
45+
->info('A stream URL where dumps should be written to')
46+
->example('php://stderr')
47+
->defaultNull()
48+
->end()
4449
->end()
4550
;
4651

‎src/Symfony/Bundle/DebugBundle/DependencyInjection/DebugExtension.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/DebugBundle/DependencyInjection/DebugExtension.php
+11-1Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
use Symfony\Component\Config\FileLocator;
1515
use Symfony\Component\DependencyInjection\ContainerBuilder;
1616
use Symfony\Component\DependencyInjection\Loader\XmlFileLoader;
17+
use Symfony\Component\DependencyInjection\Reference;
1718
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
1819

1920
/**
@@ -35,8 +36,17 @@ public function load(array $configs, ContainerBuilder $container)
3536
$loader->load('services.xml');
3637

3738
$container->getDefinition('var_dumper.cloner')
38-
->addMethodCall('setMaxItems', array($config['max_items']))
39+
->addMethodCall('setMaxItems', array($config['max_items']))
3940
->addMethodCall('setMaxString', array($config['max_string_length']));
41+
42+
if (null !== $config['dump_destination']) {
43+
$container->getDefinition('var_dumper.cli_dumper')
44+
->replaceArgument(0, $config['dump_destination'])
45+
;
46+
$container->getDefinition('data_collector.dump')
47+
->replaceArgument(4, new Reference('var_dumper.cli_dumper'))
48+
;
49+
}
4050
}
4151

4252
/**

‎src/Symfony/Bundle/DebugBundle/Resources/config/services.xml

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/DebugBundle/Resources/config/services.xml
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
<argument>null</argument><!-- %templating.helper.code.file_link_format% -->
1717
<argument>%kernel.charset%</argument>
1818
<argument type="service" id="request_stack" />
19+
<argument>null</argument><!-- var_dumper.cli_dumper when debug.dump_destination is set -->
1920
</service>
2021

2122
<service id="debug.dump_listener" class="Symfony\Component\HttpKernel\EventListener\DumpListener">
@@ -25,6 +26,10 @@
2526
</service>
2627

2728
<service id="var_dumper.cloner" class="Symfony\Component\VarDumper\Cloner\VarCloner" />
29+
<service id="var_dumper.cli_dumper" class="Symfony\Component\VarDumper\Dumper\CliDumper">
30+
<argument>null</argument><!-- debug.dump_destination -->
31+
<argument>%kernel.charset%</argument>
32+
</service>
2833
</services>
2934

3035
</container>

‎src/Symfony/Bundle/FrameworkBundle/Command/AbstractConfigCommand.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Command/AbstractConfigCommand.php
+11-13Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
use Symfony\Component\Config\Definition\ConfigurationInterface;
1515
use Symfony\Component\Console\Helper\Table;
1616
use Symfony\Component\Console\Output\OutputInterface;
17+
use Symfony\Component\Console\Style\StyleInterface;
1718
use Symfony\Component\DependencyInjection\Extension\ExtensionInterface;
1819

1920
/**
@@ -27,24 +28,21 @@ abstract class AbstractConfigCommand extends ContainerDebugCommand
2728
{
2829
protected function listBundles(OutputInterface $output)
2930
{
30-
$output->writeln('Available registered bundles with their extension alias if available:');
31-
32-
if (class_exists('Symfony\Component\Console\Helper\Table')) {
33-
$table = new Table($output);
34-
} else {
35-
$table = $this->getHelperSet()->get('table');
36-
}
37-
38-
$table->setHeaders(array('Bundle name', 'Extension alias'));
31+
$headers = array('Bundle name', 'Extension alias');
32+
$rows = array();
3933
foreach ($this->getContainer()->get('kernel')->getBundles() as $bundle) {
4034
$extension = $bundle->getContainerExtension();
41-
$table->addRow(array($bundle->getName(), $extension ? $extension->getAlias() : ''));
35+
$rows[] = array($bundle->getName(), $extension ? $extension->getAlias() : '');
4236
}
4337

44-
if (class_exists('Symfony\Component\Console\Helper\Table')) {
45-
$table->render();
38+
$message = 'Available registered bundles with their extension alias if available:';
39+
if ($output instanceof StyleInterface) {
40+
$output->writeln(' '.$message);
41+
$output->table($headers, $rows);
4642
} else {
47-
$table->render($output);
43+
$output->writeln($message);
44+
$table = new Table($output);
45+
$table->setHeaders($headers)->setRows($rows)->render($output);
4846
}
4947
}
5048

‎src/Symfony/Bundle/FrameworkBundle/Command/ConfigDebugCommand.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Command/ConfigDebugCommand.php
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
use Symfony\Component\Console\Input\InputArgument;
1616
use Symfony\Component\Console\Input\InputInterface;
1717
use Symfony\Component\Console\Output\OutputInterface;
18+
use Symfony\Component\Console\Style\SymfonyStyle;
1819
use Symfony\Component\Yaml\Yaml;
1920

2021
/**
@@ -57,8 +58,9 @@ protected function configure()
5758
*/
5859
protected function execute(InputInterface $input, OutputInterface $output)
5960
{
61+
$output = new SymfonyStyle($input, $output);
6062
if (false !== strpos($input->getFirstArgument(), ':d')) {
61-
$output->writeln('<comment>The use of "config:debug" command is deprecated since version 2.7 and will be removed in 3.0. Use the "debug:config" instead.</comment>');
63+
$output->caution('The use of "config:debug" command is deprecated since version 2.7 and will be removed in 3.0. Use the "debug:config" instead.');
6264
}
6365

6466
$name = $input->getArgument('name');

‎src/Symfony/Bundle/FrameworkBundle/Command/ConfigDumpReferenceCommand.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Command/ConfigDumpReferenceCommand.php
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
use Symfony\Component\Console\Input\InputOption;
1818
use Symfony\Component\Console\Input\InputInterface;
1919
use Symfony\Component\Console\Output\OutputInterface;
20+
use Symfony\Component\Console\Style\SymfonyStyle;
2021

2122
/**
2223
* A console command for dumping available configuration reference.
@@ -66,6 +67,7 @@ protected function configure()
6667
*/
6768
protected function execute(InputInterface $input, OutputInterface $output)
6869
{
70+
$output = new SymfonyStyle($input, $output);
6971
$name = $input->getArgument('name');
7072

7173
if (empty($name)) {

‎src/Symfony/Bundle/FrameworkBundle/Command/ContainerDebugCommand.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Command/ContainerDebugCommand.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ protected function validateInput(InputInterface $input)
145145
$optionsCount = 0;
146146
foreach ($options as $option) {
147147
if ($input->getOption($option)) {
148-
$optionsCount++;
148+
++$optionsCount;
149149
}
150150
}
151151

‎src/Symfony/Bundle/FrameworkBundle/Command/RouterDebugCommand.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Command/RouterDebugCommand.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ protected function configure()
5555
))
5656
->setDefinition(array(
5757
new InputArgument('name', InputArgument::OPTIONAL, 'A route name'),
58-
new InputOption('show-controllers', null, InputOption::VALUE_NONE, 'Show assigned controllers in overview'),
58+
new InputOption('show-controllers', null, InputOption::VALUE_NONE, 'Show assigned controllers in overview'),
5959
new InputOption('format', null, InputOption::VALUE_REQUIRED, 'To output route(s) in other formats', 'txt'),
6060
new InputOption('raw', null, InputOption::VALUE_NONE, 'To output raw route(s)'),
6161
))

‎src/Symfony/Bundle/FrameworkBundle/Console/Helper/DescriptorHelper.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Console/Helper/DescriptorHelper.php
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ class DescriptorHelper extends BaseDescriptorHelper
3030
public function __construct()
3131
{
3232
$this
33-
->register('txt', new TextDescriptor())
34-
->register('xml', new XmlDescriptor())
33+
->register('txt', new TextDescriptor())
34+
->register('xml', new XmlDescriptor())
3535
->register('json', new JsonDescriptor())
36-
->register('md', new MarkdownDescriptor())
36+
->register('md', new MarkdownDescriptor())
3737
;
3838
}
3939
}

‎src/Symfony/Bundle/FrameworkBundle/Templating/Helper/CodeHelper.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Templating/Helper/CodeHelper.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ public function fileExcerpt($file, $line)
135135
$content = preg_split('#<br />#', $code);
136136

137137
$lines = array();
138-
for ($i = max($line - 3, 1), $max = min($line + 3, count($content)); $i <= $max; $i++) {
138+
for ($i = max($line - 3, 1), $max = min($line + 3, count($content)); $i <= $max; ++$i) {
139139
$lines[] = '<li'.($i == $line ? ' class="selected"' : '').'><code>'.self::fixCodeMarkup($content[$i - 1]).'</code></li>';
140140
}
141141

‎src/Symfony/Bundle/FrameworkBundle/Translation/PhpExtractor.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Translation/PhpExtractor.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ protected function parseTokens($tokens, MessageCatalogue $catalog)
147147
{
148148
$tokenIterator = new \ArrayIterator($tokens);
149149

150-
for ($key = 0; $key < $tokenIterator->count(); $key++) {
150+
for ($key = 0; $key < $tokenIterator->count(); ++$key) {
151151
foreach ($this->sequences as $sequence) {
152152
$message = '';
153153
$tokenIterator->seek($key);

‎src/Symfony/Bundle/FrameworkBundle/composer.json

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/composer.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"require-dev": {
3636
"symfony/phpunit-bridge": "~2.7|~3.0.0",
3737
"symfony/browser-kit": "~2.4|~3.0.0",
38-
"symfony/console": "~2.6|~3.0.0",
38+
"symfony/console": "~2.7|~3.0.0",
3939
"symfony/css-selector": "~2.0,>=2.0.5|~3.0.0",
4040
"symfony/dom-crawler": "~2.0,>=2.0.5|~3.0.0",
4141
"symfony/finder": "~2.0,>=2.0.5|~3.0.0",

‎src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/config.html.twig

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/config.html.twig
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<span>
99
{% if collector.applicationname %}
1010
{{ collector.applicationname }} {{ collector.applicationversion }}
11-
{% else %}
11+
{% elseif collector.symfonyState is defined %}
1212
{% if 'unknown' == collector.symfonyState -%}
1313
<span class="sf-toolbar-status sf-toolbar-info-piece-additional" title="Unable to retrieve information about the Symfony version.">
1414
{%- elseif 'eol' == collector.symfonyState -%}

‎src/Symfony/Component/ClassLoader/ClassMapGenerator.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/ClassLoader/ClassMapGenerator.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ private static function findClasses($path)
9595
$classes = array();
9696

9797
$namespace = '';
98-
for ($i = 0, $max = count($tokens); $i < $max; $i++) {
98+
for ($i = 0, $max = count($tokens); $i < $max; ++$i) {
9999
$token = $tokens[$i];
100100

101101
if (is_string($token)) {

‎src/Symfony/Component/Config/Loader/FileLoader.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Config/Loader/FileLoader.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ public function import($resource, $type = null, $ignoreErrors = false, $sourceRe
9191
}
9292

9393
$resources = is_array($resource) ? $resource : array($resource);
94-
for ($i = 0; $i < $resourcesCount = count($resources); $i++) {
94+
for ($i = 0; $i < $resourcesCount = count($resources); ++$i) {
9595
if (isset(self::$loading[$resources[$i]])) {
9696
if ($i == $resourcesCount - 1) {
9797
throw new FileLoaderImportCircularReferenceException(array_keys(self::$loading));

‎src/Symfony/Component/Console/Application.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Console/Application.php
+7-7Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -717,7 +717,7 @@ public function renderException($e, $output)
717717
'args' => array(),
718718
));
719719

720-
for ($i = 0, $count = count($trace); $i < $count; $i++) {
720+
for ($i = 0, $count = count($trace); $i < $count; ++$i) {
721721
$class = isset($trace[$i]['class']) ? $trace[$i]['class'] : '';
722722
$type = isset($trace[$i]['type']) ? $trace[$i]['type'] : '';
723723
$function = $trace[$i]['function'];
@@ -925,12 +925,12 @@ protected function getDefaultInputDefinition()
925925
return new InputDefinition(array(
926926
new InputArgument('command', InputArgument::REQUIRED, 'The command to execute'),
927927

928-
new InputOption('--help', '-h', InputOption::VALUE_NONE, 'Display this help message'),
929-
new InputOption('--quiet', '-q', InputOption::VALUE_NONE, 'Do not output any message'),
930-
new InputOption('--verbose', '-v|vv|vvv', InputOption::VALUE_NONE, 'Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug'),
931-
new InputOption('--version', '-V', InputOption::VALUE_NONE, 'Display this application version'),
932-
new InputOption('--ansi', '', InputOption::VALUE_NONE, 'Force ANSI output'),
933-
new InputOption('--no-ansi', '', InputOption::VALUE_NONE, 'Disable ANSI output'),
928+
new InputOption('--help', '-h', InputOption::VALUE_NONE, 'Display this help message'),
929+
new InputOption('--quiet', '-q', InputOption::VALUE_NONE, 'Do not output any message'),
930+
new InputOption('--verbose', '-v|vv|vvv', InputOption::VALUE_NONE, 'Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug'),
931+
new InputOption('--version', '-V', InputOption::VALUE_NONE, 'Display this application version'),
932+
new InputOption('--ansi', '', InputOption::VALUE_NONE, 'Force ANSI output'),
933+
new InputOption('--no-ansi', '', InputOption::VALUE_NONE, 'Disable ANSI output'),
934934
new InputOption('--no-interaction', '-n', InputOption::VALUE_NONE, 'Do not ask any interactive question'),
935935
));
936936
}

‎src/Symfony/Component/Console/Helper/DialogHelper.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Console/Helper/DialogHelper.php
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ public function ask(OutputInterface $output, $question, $default = null, array $
145145
// Backspace Character
146146
if ("\177" === $c) {
147147
if (0 === $numMatches && 0 !== $i) {
148-
$i--;
148+
--$i;
149149
// Move cursor backwards
150150
$output->write("\033[1D");
151151
}
@@ -198,7 +198,7 @@ public function ask(OutputInterface $output, $question, $default = null, array $
198198
} else {
199199
$output->write($c);
200200
$ret .= $c;
201-
$i++;
201+
++$i;
202202

203203
$numMatches = 0;
204204
$ofs = 0;

‎src/Symfony/Component/Console/Input/ArgvInput.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Console/Input/ArgvInput.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ private function parseShortOption($token)
123123
private function parseShortOptionSet($name)
124124
{
125125
$len = strlen($name);
126-
for ($i = 0; $i < $len; $i++) {
126+
for ($i = 0; $i < $len; ++$i) {
127127
if (!$this->definition->hasShortcut($name[$i])) {
128128
throw new \RuntimeException(sprintf('The "-%s" option does not exist.', $name[$i]));
129129
}

‎src/Symfony/Component/CssSelector/XPath/Extension/FunctionExtension.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/CssSelector/XPath/Extension/FunctionExtension.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ public function translateNthChild(XPathExpr $xpath, FunctionNode $function, $las
8484

8585
if ($last) {
8686
$expr = 'last() - '.$expr;
87-
$b--;
87+
--$b;
8888
}
8989

9090
if (0 !== $b) {

‎src/Symfony/Component/Debug/Tests/Exception/FlattenExceptionTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Debug/Tests/Exception/FlattenExceptionTest.php
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -189,9 +189,9 @@ public function testRecursionInArguments()
189189
public function testTooBigArray()
190190
{
191191
$a = array();
192-
for ($i = 0; $i < 20; $i++) {
193-
for ($j = 0; $j < 50; $j++) {
194-
for ($k = 0; $k < 10; $k++) {
192+
for ($i = 0; $i < 20; ++$i) {
193+
for ($j = 0; $j < 50; ++$j) {
194+
for ($k = 0; $k < 10; ++$k) {
195195
$a[$i][$j][$k] = 'value';
196196
}
197197
}

‎src/Symfony/Component/Filesystem/Filesystem.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Filesystem/Filesystem.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ public function makePathRelative($endPath, $startPath)
340340
// Find for which directory the common path stops
341341
$index = 0;
342342
while (isset($startPathArr[$index]) && isset($endPathArr[$index]) && $startPathArr[$index] === $endPathArr[$index]) {
343-
$index++;
343+
++$index;
344344
}
345345

346346
// Determine how deep the start path is relative to the common path (ie, "web/bundles" = 2 levels)

‎src/Symfony/Component/Finder/Glob.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Finder/Glob.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public static function toRegex($glob, $strictLeadingDot = true, $strictWildcardS
5252
$inCurlies = 0;
5353
$regex = '';
5454
$sizeGlob = strlen($glob);
55-
for ($i = 0; $i < $sizeGlob; $i++) {
55+
for ($i = 0; $i < $sizeGlob; ++$i) {
5656
$car = $glob[$i];
5757
if ($firstByte) {
5858
if ($strictLeadingDot && '.' !== $car) {

‎src/Symfony/Component/Finder/Tests/FinderTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Finder/Tests/FinderTest.php
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,7 @@ public function testCountDirectories()
475475
$i = 0;
476476

477477
foreach ($directory as $dir) {
478-
$i++;
478+
++$i;
479479
}
480480

481481
$this->assertCount($i, $directory);
@@ -487,7 +487,7 @@ public function testCountFiles()
487487
$i = 0;
488488

489489
foreach ($files as $file) {
490-
$i++;
490+
++$i;
491491
}
492492

493493
$this->assertCount($i, $files);

‎src/Symfony/Component/Finder/Tests/GlobTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Finder/Tests/GlobTest.php
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,4 @@ public function testGlobToRegexDelimiters()
2222
$this->assertEquals(Glob::toRegex('.*', true, true, ''), '^\.[^/]*$');
2323
$this->assertEquals(Glob::toRegex('.*', true, true, '/'), '/^\.[^/]*$/');
2424
}
25-
2625
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.