Skip to content

Commit 2547372

Browse files
committed
Merge branch '3.4' into 4.0
* 3.4: (26 commits) [Serializer] Fixed throwing exception with option JSON_PARTIAL_OUTPUT_ON_ERROR [HttpKernel] Fix session handling: decouple "save" from setting response "private" swap filter/function and package names [HttpFoundation] Always call proxied handler::destroy() in StrictSessionHandler [HttpKernel] Fix compile error when a legacy container is fresh again Add tests for the HttpKernel request collector and redirection via cookies Uses cookies to track the requests redirection Tweaked some styles in the profiler tables Add type string to docblock for Process::setInput() [Security] Fail gracefully if the security token cannot be unserialized from the session [Form] AbstractLayoutTest - fix DOMDocument casing Run simple-phpunit with --no-suggest option [FrameworkBundle] Fix using "annotations.cached_reader" in after-removing passes bumped Symfony version to 3.4.4 updated VERSION for 3.4.3 updated CHANGELOG for 3.4.3 bumped Symfony version to 3.3.16 updated VERSION for 3.3.15 updated CHANGELOG for 3.3.15 bumped Symfony version to 2.8.34 ...
2 parents 37788a4 + 7625c77 commit 2547372

File tree

38 files changed

+404
-98
lines changed

38 files changed

+404
-98
lines changed

CONTRIBUTORS.md

Lines changed: 59 additions & 26 deletions
Large diffs are not rendered by default.

src/Symfony/Bridge/PhpUnit/bin/simple-phpunit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ if (!file_exists("$PHPUNIT_DIR/phpunit-$PHPUNIT_VERSION/phpunit") || md5_file(__
9292
}
9393
$prevRoot = getenv('COMPOSER_ROOT_VERSION');
9494
putenv("COMPOSER_ROOT_VERSION=$PHPUNIT_VERSION.99");
95-
$exit = proc_close(proc_open("$COMPOSER install --no-dev --prefer-dist --no-progress --ansi", array(), $p, getcwd(), null, array('bypass_shell' => true)));
95+
$exit = proc_close(proc_open("$COMPOSER install --no-dev --prefer-dist --no-suggest --no-progress --ansi", array(), $p, getcwd(), null, array('bypass_shell' => true)));
9696
putenv('COMPOSER_ROOT_VERSION'.(false !== $prevRoot ? '='.$prevRoot : ''));
9797
if ($exit) {
9898
exit($exit);

src/Symfony/Bridge/Twig/UndefinedCallableHandler.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public static function onUndefinedFilter($name)
6262
}
6363

6464
// Twig will append the source context to the message, so that it will end up being like "[...] Unknown filter "%s" in foo.html.twig on line 123."
65-
throw new SyntaxError(sprintf('Did you forget to run "composer require symfony/%s"? Unknown filter "%s".', $name, self::$filterComponents[$name]));
65+
throw new SyntaxError(sprintf('Did you forget to run "composer require symfony/%s"? Unknown filter "%s".', self::$filterComponents[$name], $name));
6666
}
6767

6868
public static function onUndefinedFunction($name)
@@ -71,6 +71,6 @@ public static function onUndefinedFunction($name)
7171
return false;
7272
}
7373

74-
throw new SyntaxError(sprintf('Did you forget to run "composer require symfony/%s"? Unknown function "%s".', $name, self::$functionComponents[$name]));
74+
throw new SyntaxError(sprintf('Did you forget to run "composer require symfony/%s"? Unknown function "%s".', self::$functionComponents[$name], $name));
7575
}
7676
}

src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/AddAnnotationsCachedReaderPass.php

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
1515
use Symfony\Component\DependencyInjection\ContainerBuilder;
16-
use Symfony\Component\DependencyInjection\Reference;
1716

1817
/**
1918
* @internal
@@ -29,14 +28,14 @@ public function process(ContainerBuilder $container)
2928
// "annotation_reader" at build time don't get any cache
3029
if ($container->hasDefinition('annotations.cached_reader')) {
3130
$reader = $container->getDefinition('annotations.cached_reader');
32-
$tags = $reader->getTags();
31+
$properties = $reader->getProperties();
3332

34-
if (isset($tags['annotations.cached_reader'][0]['provider'])) {
35-
if ($container->hasAlias($provider = $tags['annotations.cached_reader'][0]['provider'])) {
36-
$provider = (string) $container->getAlias($provider);
37-
}
33+
if (isset($properties['cacheProviderBackup'])) {
34+
$provider = $properties['cacheProviderBackup']->getValues()[0];
35+
unset($properties['cacheProviderBackup']);
36+
$reader->setProperties($properties);
3837
$container->set('annotations.cached_reader', null);
39-
$container->setDefinition('annotations.cached_reader', $reader->replaceArgument(1, new Reference($provider)));
38+
$container->setDefinition('annotations.cached_reader', $reader->replaceArgument(1, $provider));
4039
}
4140
}
4241
}

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
use Symfony\Component\Console\Application;
2929
use Symfony\Component\Console\Command\Command;
3030
use Symfony\Component\DependencyInjection\Alias;
31+
use Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument;
3132
use Symfony\Component\DependencyInjection\ChildDefinition;
3233
use Symfony\Component\DependencyInjection\ContainerBuilder;
3334
use Symfony\Component\DependencyInjection\ContainerInterface;
@@ -1107,7 +1108,8 @@ private function registerAnnotationsConfiguration(array $config, ContainerBuilde
11071108
$container
11081109
->getDefinition('annotations.cached_reader')
11091110
->replaceArgument(2, $config['debug'])
1110-
->addTag('annotations.cached_reader', array('provider' => $cacheService))
1111+
// temporary property to lazy-reference the cache provider without using it until AddAnnotationsCachedReaderPass runs
1112+
->setProperty('cacheProviderBackup', new ServiceClosureArgument(new Reference($cacheService)))
11111113
;
11121114
$container->setAlias('annotation_reader', 'annotations.cached_reader')->setPrivate(true);
11131115
$container->setAlias(Reader::class, new Alias('annotations.cached_reader', false));

src/Symfony/Bundle/FrameworkBundle/FrameworkBundle.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ public function build(ContainerBuilder $container)
9494
$container->addCompilerPass((new RegisterListenersPass())->setHotPathEvents($hotPathEvents), PassConfig::TYPE_BEFORE_REMOVING);
9595
$container->addCompilerPass(new TemplatingPass());
9696
$this->addCompilerPassIfExists($container, AddConstraintValidatorsPass::class, PassConfig::TYPE_BEFORE_REMOVING);
97-
$container->addCompilerPass(new AddAnnotationsCachedReaderPass(), PassConfig::TYPE_BEFORE_REMOVING);
97+
$container->addCompilerPass(new AddAnnotationsCachedReaderPass(), PassConfig::TYPE_AFTER_REMOVING, -255);
9898
$this->addCompilerPassIfExists($container, AddValidatorInitializersPass::class);
9999
$this->addCompilerPassIfExists($container, AddConsoleCommandPass::class);
100100
$this->addCompilerPassIfExists($container, TranslatorPass::class);

src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/TestBundle.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
namespace Symfony\Bundle\FrameworkBundle\Tests\Functional\Bundle\TestBundle;
1313

1414
use Symfony\Component\HttpKernel\Bundle\Bundle;
15+
use Symfony\Component\DependencyInjection\Compiler\PassConfig;
1516
use Symfony\Component\DependencyInjection\ContainerBuilder;
1617
use Symfony\Bundle\FrameworkBundle\Tests\Functional\Bundle\TestBundle\DependencyInjection\AnnotationReaderPass;
1718
use Symfony\Bundle\FrameworkBundle\Tests\Functional\Bundle\TestBundle\DependencyInjection\Config\CustomConfig;
@@ -27,6 +28,6 @@ public function build(ContainerBuilder $container)
2728

2829
$extension->setCustomConfig(new CustomConfig());
2930

30-
$container->addCompilerPass(new AnnotationReaderPass());
31+
$container->addCompilerPass(new AnnotationReaderPass(), PassConfig::TYPE_AFTER_REMOVING);
3132
}
3233
}

src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/events.html.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
{% endif %}
7575

7676
<tr>
77-
<td class="text-right">{{ listener.priority|default('-') }}</td>
77+
<td class="text-right nowrap">{{ listener.priority|default('-') }}</td>
7878
<td class="font-normal">{{ profiler_dump(listener.stub) }}</td>
7979
</tr>
8080

src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/translation.html.twig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,9 +199,9 @@
199199
<tbody>
200200
{% for message in messages %}
201201
<tr>
202-
<td class="font-normal text-small">{{ message.locale }}</td>
202+
<td class="font-normal text-small nowrap">{{ message.locale }}</td>
203203
<td class="font-normal text-small text-bold nowrap">{{ message.domain }}</td>
204-
<td class="font-normal text-small">{{ message.count }}</td>
204+
<td class="font-normal text-small nowrap">{{ message.count }}</td>
205205
<td>
206206
<span class="nowrap">{{ message.id }}</span>
207207

src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/profiler.css.twig

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -178,10 +178,6 @@ table tbody td {
178178
border-width: 1px 0;
179179
}
180180

181-
table tbody td {
182-
{{ mixins.break_long_words|raw }}
183-
}
184-
185181
table tbody div {
186182
margin: .25em 0;
187183
}

0 commit comments

Comments
 (0)