Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e1df1f7

Browse files
committed
disable http_method_override in tests to avoid deprecation trigger
1 parent 46b328c commit e1df1f7

File tree

289 files changed

+318
-99
lines changed

Some content is hidden

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

289 files changed

+318
-99
lines changed

src/Symfony/Bundle/FrameworkBundle/Tests/Command/AboutCommand/Fixture/TestAppKernel.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@ public function getProjectDir(): string
3232

3333
public function registerContainerConfiguration(LoaderInterface $loader)
3434
{
35+
$loader->load(static function (ContainerBuilder $container) {
36+
$container->loadFromExtension('framework', [
37+
'http_method_override' => false,
38+
]);
39+
});
3540
}
3641

3742
protected function build(ContainerBuilder $container)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
framework:
2+
http_method_override: false
23
secret: test

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

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class ConfigurationTest extends TestCase
3333
public function testDefaultConfig()
3434
{
3535
$processor = new Processor();
36-
$config = $processor->processConfiguration(new Configuration(true), [['secret' => 's3cr3t']]);
36+
$config = $processor->processConfiguration(new Configuration(true), [['http_method_override' => false, 'secret' => 's3cr3t']]);
3737

3838
$this->assertEquals(self::getBundleDefaultConfig(), $config);
3939
}
@@ -57,7 +57,7 @@ public function testInvalidSessionName($sessionName)
5757
$processor = new Processor();
5858
$processor->processConfiguration(
5959
new Configuration(true),
60-
[['session' => ['name' => $sessionName]]]
60+
[['http_method_override' => false, 'session' => ['name' => $sessionName]]]
6161
);
6262
}
6363

@@ -77,7 +77,7 @@ public function testAssetsCanBeEnabled()
7777
{
7878
$processor = new Processor();
7979
$configuration = new Configuration(true);
80-
$config = $processor->processConfiguration($configuration, [['assets' => null]]);
80+
$config = $processor->processConfiguration($configuration, [['http_method_override' => false, 'assets' => null]]);
8181

8282
$defaultConfig = [
8383
'enabled' => true,
@@ -103,6 +103,7 @@ public function testValidAssetsPackageNameConfiguration($packageName)
103103
$configuration = new Configuration(true);
104104
$config = $processor->processConfiguration($configuration, [
105105
[
106+
'http_method_override' => false,
106107
'assets' => [
107108
'packages' => [
108109
$packageName => [],
@@ -135,6 +136,7 @@ public function testInvalidAssetsConfiguration(array $assetConfig, $expectedMess
135136
$configuration = new Configuration(true);
136137
$processor->processConfiguration($configuration, [
137138
[
139+
'http_method_override' => false,
138140
'assets' => $assetConfig,
139141
],
140142
]);
@@ -184,6 +186,7 @@ public function testValidLockConfiguration($lockConfig, $processedConfig)
184186
$configuration = new Configuration(true);
185187
$config = $processor->processConfiguration($configuration, [
186188
[
189+
'http_method_override' => false,
187190
'lock' => $lockConfig,
188191
],
189192
]);
@@ -244,11 +247,13 @@ public function testLockMergeConfigs()
244247
$configuration = new Configuration(true);
245248
$config = $processor->processConfiguration($configuration, [
246249
[
250+
'http_method_override' => false,
247251
'lock' => [
248252
'payload' => 'flock',
249253
],
250254
],
251255
[
256+
'http_method_override' => false,
252257
'lock' => [
253258
'payload' => 'semaphore',
254259
],
@@ -275,6 +280,7 @@ public function testValidSemaphoreConfiguration($semaphoreConfig, $processedConf
275280
$configuration = new Configuration(true);
276281
$config = $processor->processConfiguration($configuration, [
277282
[
283+
'http_method_override' => false,
278284
'semaphore' => $semaphoreConfig,
279285
],
280286
]);
@@ -327,6 +333,7 @@ public function testItShowANiceMessageIfTwoMessengerBusesAreConfiguredButNoDefau
327333

328334
$processor->processConfiguration($configuration, [
329335
'framework' => [
336+
'http_method_override' => false,
330337
'messenger' => [
331338
'default_bus' => null,
332339
'buses' => [
@@ -344,6 +351,7 @@ public function testBusMiddlewareDontMerge()
344351
$configuration = new Configuration(true);
345352
$config = $processor->processConfiguration($configuration, [
346353
[
354+
'http_method_override' => false,
347355
'messenger' => [
348356
'default_bus' => 'existing_bus',
349357
'buses' => [
@@ -358,6 +366,7 @@ public function testBusMiddlewareDontMerge()
358366
],
359367
],
360368
[
369+
'http_method_override' => false,
361370
'messenger' => [
362371
'buses' => [
363372
'common_bus' => [
@@ -406,6 +415,7 @@ public function testItErrorsWhenDefaultBusDoesNotExist()
406415

407416
$processor->processConfiguration($configuration, [
408417
[
418+
'http_method_override' => false,
409419
'messenger' => [
410420
'default_bus' => 'foo',
411421
'buses' => [
@@ -420,7 +430,7 @@ public function testItErrorsWhenDefaultBusDoesNotExist()
420430
protected static function getBundleDefaultConfig()
421431
{
422432
return [
423-
'http_method_override' => true,
433+
'http_method_override' => false,
424434
'trust_x_sendfile_type_header' => false,
425435
'ide' => '%env(default::SYMFONY_IDE)%',
426436
'default_locale' => 'en',

src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/assets.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<?php
22

33
$container->loadFromExtension('framework', [
4+
'http_method_override' => false,
45
'assets' => [
56
'version' => 'SomeVersionScheme',
67
'base_urls' => 'http://cdn.example.com',

src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/assets_disabled.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<?php
22

33
$container->loadFromExtension('framework', [
4+
'http_method_override' => false,
45
'assets' => [
56
'enabled' => false,
67
],

src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/assets_version_strategy_as_service.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<?php
22

33
$container->loadFromExtension('framework', [
4+
'http_method_override' => false,
45
'assets' => [
56
'version_strategy' => 'assets.custom_version_strategy',
67
'base_urls' => 'http://cdn.example.com',

src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/cache.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<?php
22

33
$container->loadFromExtension('framework', [
4+
'http_method_override' => false,
45
'cache' => [
56
'pools' => [
67
'cache.foo' => [

src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/cache_app_redis_tag_aware.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<?php
22

33
$container->loadFromExtension('framework', [
4+
'http_method_override' => false,
45
'cache' => [
56
'app' => 'cache.adapter.redis_tag_aware',
67
],

src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/cache_app_redis_tag_aware_pool.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<?php
22

33
$container->loadFromExtension('framework', [
4+
'http_method_override' => false,
45
'cache' => [
56
'app' => 'cache.redis_tag_aware.foo',
67
'pools' => [

src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/csrf.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<?php
22

33
$container->loadFromExtension('framework', [
4+
'http_method_override' => false,
45
'csrf_protection' => true,
56
'session' => [
67
'storage_factory_id' => 'session.storage.factory.native',

src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/csrf_needs_session.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<?php
22

33
$container->loadFromExtension('framework', [
4+
'http_method_override' => false,
45
'csrf_protection' => [
56
'enabled' => true,
67
],
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
<?php
22

3-
$container->loadFromExtension('framework', []);
3+
$container->loadFromExtension('framework', [
4+
'http_method_override' => false,]);

src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/esi_and_ssi_without_fragments.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<?php
22

33
$container->loadFromExtension('framework', [
4+
'http_method_override' => false,
45
'fragments' => [
56
'enabled' => false,
67
],

src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/esi_disabled.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<?php
22

33
$container->loadFromExtension('framework', [
4+
'http_method_override' => false,
45
'esi' => [
56
'enabled' => false,
67
],

src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/exceptions.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
44

55
$container->loadFromExtension('framework', [
6+
'http_method_override' => false,
67
'exceptions' => [
78
BadRequestHttpException::class => [
89
'log_level' => 'info',

src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/form_default_csrf.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<?php
22

33
$container->loadFromExtension('framework', [
4+
'http_method_override' => false,
45
'form' => [
56
'legacy_error_messages' => false,
67
],

src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/form_no_csrf.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<?php
22

33
$container->loadFromExtension('framework', [
4+
'http_method_override' => false,
45
'form' => [
56
'csrf_protection' => [
67
'enabled' => false,

src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/fragments_and_hinclude.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<?php
22

33
$container->loadFromExtension('framework', [
4+
'http_method_override' => false,
45
'fragments' => [
56
'enabled' => true,
67
'hinclude_default_template' => 'global_hinclude_template',

src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/html_sanitizer.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<?php
22

33
$container->loadFromExtension('framework', [
4+
'http_method_override' => false,
45
'html_sanitizer' => [
56
'default' => 'my.sanitizer',
67
'sanitizers' => [

src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/http_client_default_options.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<?php
22

33
$container->loadFromExtension('framework', [
4+
'http_method_override' => false,
45
'http_client' => [
56
'max_host_connections' => 4,
67
'default_options' => null,

src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/http_client_full_default_options.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<?php
22

33
$container->loadFromExtension('framework', [
4+
'http_method_override' => false,
45
'http_client' => [
56
'default_options' => [
67
'headers' => ['X-powered' => 'PHP'],

src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/http_client_mock_response_factory.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<?php
22

33
$container->loadFromExtension('framework', [
4+
'http_method_override' => false,
45
'http_client' => [
56
'default_options' => null,
67
'mock_response_factory' => 'my_response_factory',

src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/http_client_override_default_options.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<?php
22

33
$container->loadFromExtension('framework', [
4+
'http_method_override' => false,
45
'http_client' => [
56
'max_host_connections' => 4,
67
'default_options' => [

src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/http_client_retry.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<?php
22

33
$container->loadFromExtension('framework', [
4+
'http_method_override' => false,
45
'http_client' => [
56
'default_options' => [
67
'retry_failed' => [

src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/http_client_scoped_without_query_option.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<?php
22

33
$container->loadFromExtension('framework', [
4+
'http_method_override' => false,
45
'http_client' => [
56
'scoped_clients' => [
67
'foo' => [

src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/http_client_xml_key.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<?php
22

33
$container->loadFromExtension('framework', [
4+
'http_method_override' => false,
45
'http_client' => [
56
'default_options' => [
67
'resolve' => [

src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/legacy_translator_enabled_locales.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<?php
22

33
$container->loadFromExtension('framework', [
4+
'http_method_override' => false,
45
'secret' => 's3cr3t',
56
'default_locale' => 'fr',
67
'router' => [

src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/mailer.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<?php
22

33
$container->loadFromExtension('framework', [
4+
'http_method_override' => false,
45
'mailer' => [
56
'dsn' => 'smtp://example.com',
67
'envelope' => [

src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/mailer_with_disabled_message_bus.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<?php
22

33
$container->loadFromExtension('framework', [
4+
'http_method_override' => false,
45
'mailer' => [
56
'dsn' => 'smtp://example.com',
67
'message_bus' => false,

src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/mailer_with_dsn.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
return static function (ContainerConfigurator $container) {
66
$container->extension('framework', [
7+
'http_method_override' => false,
78
'mailer' => [
89
'dsn' => 'smtp://example.com',
910
'envelope' => [

src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/mailer_with_specific_message_bus.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<?php
22

33
$container->loadFromExtension('framework', [
4+
'http_method_override' => false,
45
'mailer' => [
56
'dsn' => 'smtp://example.com',
67
'message_bus' => 'app.another_bus',

src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/mailer_with_transports.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
return static function (ContainerConfigurator $container) {
66
$container->extension('framework', [
7+
'http_method_override' => false,
78
'mailer' => [
89
'transports' => [
910
'transport1' => 'smtp://example1.com',

src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/messenger.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
use Symfony\Bundle\FrameworkBundle\Tests\Fixtures\Messenger\FooMessage;
55

66
$container->loadFromExtension('framework', [
7+
'http_method_override' => false,
78
'messenger' => [
89
'routing' => [
910
FooMessage::class => ['sender.bar', 'sender.biz'],
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<?php
22

33
$container->loadFromExtension('framework', [
4+
'http_method_override' => false,
45
'messenger' => false,
56
]);

src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/messenger_middleware_factory_erroneous_format.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<?php
22

33
$container->loadFromExtension('framework', [
4+
'http_method_override' => false,
45
'messenger' => [
56
'buses' => [
67
'command_bus' => [

src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/messenger_multiple_buses.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<?php
22

33
$container->loadFromExtension('framework', [
4+
'http_method_override' => false,
45
'messenger' => [
56
'default_bus' => 'messenger.bus.commands',
67
'buses' => [

src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/messenger_multiple_failure_transports.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<?php
22

33
$container->loadFromExtension('framework', [
4+
'http_method_override' => false,
45
'messenger' => [
56
'transports' => [
67
'transport_1' => [

0 commit comments

Comments
 (0)