Skip to content

Commit 6005fe5

Browse files
Merge branch '2.8'
Conflicts: composer.json src/Symfony/Bundle/FrameworkBundle/Resources/config/annotations.xml src/Symfony/Bundle/FrameworkBundle/Resources/config/routing.xml src/Symfony/Bundle/FrameworkBundle/Resources/config/security_csrf.xml src/Symfony/Bundle/FrameworkBundle/composer.json src/Symfony/Component/DependencyInjection/ContainerBuilder.php src/Symfony/Component/Security/Core/composer.json src/Symfony/Component/Security/Csrf/composer.json src/Symfony/Component/Security/Http/composer.json src/Symfony/Component/Security/composer.json src/Symfony/Component/Translation/PluralizationRules.php src/Symfony/Component/VarDumper/Exception/ThrowingCasterException.php
2 parents f72a7c3 + f35a0d2 commit 6005fe5

File tree

49 files changed

+380
-541
lines changed

Some content is hidden

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

49 files changed

+380
-541
lines changed

appveyor.yml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,27 +13,27 @@ init:
1313
- SET SYMFONY_DEPRECATIONS_HELPER=strict
1414
- SET PHP=1
1515
- SET ANSICON=121x90 (121x90)
16-
- SET PHP_INI_MATRIX=php.ini-min-ext php.ini-max-ext
16+
- SET PHP_INI_MATRIX=php.ini-min php.ini-max
1717

1818
install:
1919
- IF EXIST c:\php (SET PHP=0) ELSE (mkdir c:\php)
2020
- cd c:\php
2121
- IF %PHP%==1 appveyor DownloadFile http://windows.php.net/downloads/releases/archives/php-5.5.9-nts-Win32-VC11-x86.zip
2222
- IF %PHP%==1 7z x php-5.5.9-nts-Win32-VC11-x86.zip -y > 7z.log
2323
- IF %PHP%==1 echo @php %%~dp0composer.phar %%* > composer.bat
24-
- IF %PHP%==1 copy /Y php.ini-development php.ini-min-ext
25-
- IF %PHP%==1 echo date.timezone="UTC" >> php.ini-min-ext
26-
- IF %PHP%==1 echo extension_dir=ext >> php.ini-min-ext
27-
- IF %PHP%==1 echo extension=php_openssl.dll >> php.ini-min-ext
28-
- IF %PHP%==1 copy /Y php.ini-min-ext php.ini-max-ext
29-
- IF %PHP%==1 echo extension=php_apc.dll >> php.ini-max-ext
30-
- IF %PHP%==1 echo extension=php_intl.dll >> php.ini-max-ext
31-
- IF %PHP%==1 echo extension=php_mbstring.dll >> php.ini-max-ext
32-
- IF %PHP%==1 echo extension=php_fileinfo.dll >> php.ini-max-ext
33-
- IF %PHP%==1 echo extension=php_pdo_sqlite.dll >> php.ini-max-ext
34-
- IF %PHP%==1 echo extension=php_ldap.dll >> php.ini-max-ext
24+
- IF %PHP%==1 copy /Y php.ini-development php.ini-min
25+
- IF %PHP%==1 echo date.timezone="UTC" >> php.ini-min
26+
- IF %PHP%==1 echo extension_dir=ext >> php.ini-min
27+
- IF %PHP%==1 echo extension=php_openssl.dll >> php.ini-min
28+
- IF %PHP%==1 copy /Y php.ini-min php.ini-max
29+
- IF %PHP%==1 echo extension=php_apc.dll >> php.ini-max
30+
- IF %PHP%==1 echo extension=php_intl.dll >> php.ini-max
31+
- IF %PHP%==1 echo extension=php_mbstring.dll >> php.ini-max
32+
- IF %PHP%==1 echo extension=php_fileinfo.dll >> php.ini-max
33+
- IF %PHP%==1 echo extension=php_pdo_sqlite.dll >> php.ini-max
34+
- IF %PHP%==1 echo extension=php_ldap.dll >> php.ini-max
3535
- appveyor DownloadFile https://getcomposer.org/composer.phar
36-
- copy /Y php.ini-max-ext php.ini
36+
- copy /Y php.ini-max php.ini
3737
- cd c:\projects\symfony
3838
- php phpunit install
3939
- IF %APPVEYOR_REPO_BRANCH%==master (SET COMPOSER_ROOT_VERSION=dev-master) ELSE (SET COMPOSER_ROOT_VERSION=%APPVEYOR_REPO_BRANCH%.x-dev)

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919
"php": ">=5.5.9",
2020
"doctrine/common": "~2.4",
2121
"twig/twig": "~1.20|~2.0",
22-
"psr/log": "~1.0"
22+
"psr/log": "~1.0",
23+
"paragonie/random_compat": "~1.0"
2324
},
2425
"replace": {
2526
"symfony/asset": "self.version",

phpunit

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,6 @@ if (!file_exists($COMPOSER = __DIR__.'/composer.phar')) {
2424
$PHP = ProcessUtils::escapeArgument($PHP);
2525
$COMPOSER = $PHP.' '.ProcessUtils::escapeArgument($COMPOSER);
2626

27-
if (!(isset($argv[1]) && 'install' === $argv[1]) && !file_exists(__DIR__.'/vendor')) {
28-
passthru("$COMPOSER update --no-progress --ansi");
29-
}
30-
3127
if (!file_exists("$PHPUNIT_DIR/phpunit-$PHPUNIT_VERSION/phpunit")) {
3228
// Build a standalone phpunit without symfony/yaml
3329

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

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,6 @@ public function load(array $configs, ContainerBuilder $container)
8787
$this->registerRequestConfiguration($config['request'], $container, $loader);
8888
}
8989

90-
$loader->load('security.xml');
91-
9290
if ($this->isConfigEnabled($container, $config['form'])) {
9391
$this->formConfigEnabled = true;
9492
$this->registerFormConfiguration($config, $container, $loader);
@@ -809,22 +807,22 @@ private function registerAnnotationsConfiguration(array $config, ContainerBuilde
809807
{
810808
$loader->load('annotations.xml');
811809

812-
if ('file' === $config['cache']) {
813-
$cacheDir = $container->getParameterBag()->resolveValue($config['file_cache_dir']);
814-
if (!is_dir($cacheDir) && false === @mkdir($cacheDir, 0777, true) && !is_dir($cacheDir)) {
815-
throw new \RuntimeException(sprintf('Could not create cache directory "%s".', $cacheDir));
810+
if ('none' !== $config['cache']) {
811+
if ('file' === $config['cache']) {
812+
$cacheDir = $container->getParameterBag()->resolveValue($config['file_cache_dir']);
813+
if (!is_dir($cacheDir) && false === @mkdir($cacheDir, 0777, true) && !is_dir($cacheDir)) {
814+
throw new \RuntimeException(sprintf('Could not create cache directory "%s".', $cacheDir));
815+
}
816+
817+
$container
818+
->getDefinition('annotations.php_file_cache')
819+
->replaceArgument(0, $cacheDir)
820+
;
816821
}
817822

818-
$container
819-
->getDefinition('annotations.file_cache_reader')
820-
->replaceArgument(1, $cacheDir)
821-
->replaceArgument(2, $config['debug'])
822-
;
823-
$container->setAlias('annotation_reader', 'annotations.file_cache_reader');
824-
} elseif ('none' !== $config['cache']) {
825823
$container
826824
->getDefinition('annotations.cached_reader')
827-
->replaceArgument(1, new Reference($config['cache']))
825+
->replaceArgument(1, new Reference('file' !== $config['cache'] ? $config['cache'] : 'annotations.php_file_cache'))
828826
->replaceArgument(2, $config['debug'])
829827
;
830828
$container->setAlias('annotation_reader', 'annotations.cached_reader');

src/Symfony/Bundle/FrameworkBundle/Resources/config/annotations.xml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,8 @@
1313
<argument /><!-- Debug-Flag -->
1414
</service>
1515

16-
<service id="annotations.file_cache_reader" class="Doctrine\Common\Annotations\FileCacheReader" public="false">
17-
<argument type="service" id="annotations.reader" />
16+
<service id="annotations.php_file_cache" class="Doctrine\Common\Cache\PhpFileCache" public="false">
1817
<argument /><!-- Cache-Directory -->
19-
<argument /><!-- Debug Flag -->
2018
</service>
2119

2220
<service id="annotation_reader" alias="annotations.reader" />

src/Symfony/Bundle/FrameworkBundle/Resources/config/routing.xml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,7 @@
4747
</service>
4848

4949
<service id="routing.loader" class="Symfony\Bundle\FrameworkBundle\Routing\DelegatingLoader">
50-
<tag name="monolog.logger" channel="router" />
5150
<argument type="service" id="controller_name_converter" />
52-
<argument type="service" id="logger" on-invalid="null" />
5351
<argument type="service" id="routing.resolver" />
5452
</service>
5553

src/Symfony/Bundle/FrameworkBundle/Resources/config/security.xml

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

src/Symfony/Bundle/FrameworkBundle/Resources/config/security_csrf.xml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@
55
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
66

77
<services>
8-
<service id="security.csrf.token_generator" class="Symfony\Component\Security\Csrf\TokenGenerator\UriSafeTokenGenerator" public="false">
9-
<argument type="service" id="security.secure_random" />
10-
</service>
8+
<service id="security.csrf.token_generator" class="Symfony\Component\Security\Csrf\TokenGenerator\UriSafeTokenGenerator" public="false" />
119

1210
<service id="security.csrf.token_storage" class="Symfony\Component\Security\Csrf\TokenStorage\SessionTokenStorage" public="false">
1311
<argument type="service" id="session" />

src/Symfony/Bundle/FrameworkBundle/Routing/DelegatingLoader.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
use Symfony\Component\Config\Exception\FileLoaderLoadException;
1616
use Symfony\Component\Config\Loader\DelegatingLoader as BaseDelegatingLoader;
1717
use Symfony\Component\Config\Loader\LoaderResolverInterface;
18-
use Psr\Log\LoggerInterface;
1918

2019
/**
2120
* DelegatingLoader delegates route loading to other loaders using a loader resolver.
@@ -28,20 +27,17 @@
2827
class DelegatingLoader extends BaseDelegatingLoader
2928
{
3029
protected $parser;
31-
protected $logger;
3230
private $loading = false;
3331

3432
/**
3533
* Constructor.
3634
*
3735
* @param ControllerNameParser $parser A ControllerNameParser instance
38-
* @param LoggerInterface $logger A LoggerInterface instance
3936
* @param LoaderResolverInterface $resolver A LoaderResolverInterface instance
4037
*/
41-
public function __construct(ControllerNameParser $parser, LoggerInterface $logger = null, LoaderResolverInterface $resolver)
38+
public function __construct(ControllerNameParser $parser, LoaderResolverInterface $resolver)
4239
{
4340
$this->parser = $parser;
44-
$this->logger = $logger;
4541

4642
parent::__construct($resolver);
4743
}

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

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -69,13 +69,6 @@ public function testCsrfProtectionForFormsEnablesCsrfProtectionAutomatically()
6969
$this->assertTrue($container->hasDefinition('security.csrf.token_manager'));
7070
}
7171

72-
public function testSecureRandomIsAvailableIfCsrfIsDisabled()
73-
{
74-
$container = $this->createContainerFromFile('csrf_disabled');
75-
76-
$this->assertTrue($container->hasDefinition('security.secure_random'));
77-
}
78-
7972
public function testProxies()
8073
{
8174
$container = $this->createContainerFromFile('full');
@@ -319,8 +312,9 @@ public function testAnnotations()
319312
{
320313
$container = $this->createContainerFromFile('full');
321314

322-
$this->assertEquals($container->getParameter('kernel.cache_dir').'/annotations', $container->getDefinition('annotations.file_cache_reader')->getArgument(1));
323-
$this->assertInstanceOf('Doctrine\Common\Annotations\FileCacheReader', $container->get('annotation_reader'));
315+
$this->assertEquals($container->getParameter('kernel.cache_dir').'/annotations', $container->getDefinition('annotations.php_file_cache')->getArgument(0));
316+
$this->assertSame('annotations.cached_reader', (string) $container->getAlias('annotation_reader'));
317+
$this->assertSame('annotations.php_file_cache', (string) $container->getDefinition('annotations.cached_reader')->getArgument(1));
324318
}
325319

326320
public function testFileLinkFormat()

0 commit comments

Comments
 (0)