Issue #3483978 by spokje, longwave, andypost: Update to Symfony 7.2.0-BETA1
parent
a9bf63fd79
commit
e39157a2ad
|
@ -34,12 +34,12 @@
|
|||
"phpstan/phpstan": "^1.12.4",
|
||||
"phpstan/phpstan-phpunit": "^1.3.16",
|
||||
"phpunit/phpunit": "^10.5.19",
|
||||
"symfony/browser-kit": "^7.1",
|
||||
"symfony/css-selector": "^7.1",
|
||||
"symfony/dom-crawler": "^7.1",
|
||||
"symfony/error-handler": "^7.1",
|
||||
"symfony/lock": "^7.1",
|
||||
"symfony/var-dumper": "^7.1"
|
||||
"symfony/browser-kit": "^7.2@beta",
|
||||
"symfony/css-selector": "^7.2@beta",
|
||||
"symfony/dom-crawler": "^7.2@beta",
|
||||
"symfony/error-handler": "^7.2@beta",
|
||||
"symfony/lock": "^7.2@beta",
|
||||
"symfony/var-dumper": "^7.2@beta"
|
||||
},
|
||||
"replace": {
|
||||
"symfony/polyfill-php72": "*",
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -33,35 +33,35 @@
|
|||
"ralouphie/getallheaders": "~3.0.3",
|
||||
"revolt/event-loop": "~v1.0.6",
|
||||
"sebastian/diff": "~5.1.1",
|
||||
"symfony/console": "~v7.1.5",
|
||||
"symfony/dependency-injection": "~v7.1.3",
|
||||
"symfony/console": "~v7.2.0-BETA1",
|
||||
"symfony/dependency-injection": "~v7.2.0-BETA1",
|
||||
"symfony/deprecation-contracts": "~v3.5.0",
|
||||
"symfony/error-handler": "~v7.1.3",
|
||||
"symfony/event-dispatcher": "~v7.1.1",
|
||||
"symfony/error-handler": "~v7.2.0-BETA1",
|
||||
"symfony/event-dispatcher": "~v7.2.0-BETA1",
|
||||
"symfony/event-dispatcher-contracts": "~v3.5.0",
|
||||
"symfony/filesystem": "~v7.1.5",
|
||||
"symfony/finder": "~v7.1.4",
|
||||
"symfony/http-foundation": "~v7.1.3",
|
||||
"symfony/http-kernel": "~v7.1.3",
|
||||
"symfony/mailer": "~v7.1.2",
|
||||
"symfony/mime": "~v7.1.2",
|
||||
"symfony/filesystem": "~v7.2.0-BETA1",
|
||||
"symfony/finder": "~v7.2.0-BETA1",
|
||||
"symfony/http-foundation": "~v7.2.0-BETA1",
|
||||
"symfony/http-kernel": "~v7.2.0-BETA1",
|
||||
"symfony/mailer": "~v7.2.0-BETA1",
|
||||
"symfony/mime": "~v7.2.0-BETA1",
|
||||
"symfony/polyfill-ctype": "~v1.31.0",
|
||||
"symfony/polyfill-iconv": "~v1.30.0",
|
||||
"symfony/polyfill-iconv": "~v1.31.0",
|
||||
"symfony/polyfill-intl-grapheme": "~v1.31.0",
|
||||
"symfony/polyfill-intl-idn": "~v1.30.0",
|
||||
"symfony/polyfill-intl-idn": "~v1.31.0",
|
||||
"symfony/polyfill-intl-normalizer": "~v1.31.0",
|
||||
"symfony/polyfill-mbstring": "~v1.31.0",
|
||||
"symfony/process": "~v7.1.5",
|
||||
"symfony/psr-http-message-bridge": "~v7.1.3",
|
||||
"symfony/routing": "~v7.1.3",
|
||||
"symfony/serializer": "~v7.1.3",
|
||||
"symfony/process": "~v7.2.0-BETA1",
|
||||
"symfony/psr-http-message-bridge": "~v7.2.0-BETA1",
|
||||
"symfony/routing": "~v7.2.0-BETA1",
|
||||
"symfony/serializer": "~v7.2.0-BETA1",
|
||||
"symfony/service-contracts": "~v3.5.0",
|
||||
"symfony/string": "~v7.1.5",
|
||||
"symfony/string": "~v7.1.6",
|
||||
"symfony/translation-contracts": "~v3.5.0",
|
||||
"symfony/validator": "~v7.1.3",
|
||||
"symfony/var-dumper": "~v7.1.3",
|
||||
"symfony/var-exporter": "~v7.1.2",
|
||||
"symfony/yaml": "~v7.1.1",
|
||||
"symfony/validator": "~v7.2.0-BETA1",
|
||||
"symfony/var-dumper": "~v7.2.0-BETA1",
|
||||
"symfony/var-exporter": "~v7.1.6",
|
||||
"symfony/yaml": "~v7.2.0-BETA1",
|
||||
"twig/twig": "~v3.14.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,11 +26,11 @@
|
|||
"phpstan/phpstan": "^1.12.4",
|
||||
"phpstan/phpstan-phpunit": "^1.3.16",
|
||||
"phpunit/phpunit": "^10.5.19",
|
||||
"symfony/browser-kit": "^7.1",
|
||||
"symfony/css-selector": "^7.1",
|
||||
"symfony/dom-crawler": "^7.1",
|
||||
"symfony/error-handler": "^7.1",
|
||||
"symfony/lock": "^7.1",
|
||||
"symfony/var-dumper": "^7.1"
|
||||
"symfony/browser-kit": "^7.2@beta",
|
||||
"symfony/css-selector": "^7.2@beta",
|
||||
"symfony/dom-crawler": "^7.2@beta",
|
||||
"symfony/error-handler": "^7.2@beta",
|
||||
"symfony/lock": "^7.2@beta",
|
||||
"symfony/var-dumper": "^7.2@beta"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -79,10 +79,10 @@
|
|||
"sirbrillig/phpcs-variable-analysis": "v2.11.19",
|
||||
"slevomat/coding-standard": "8.15.0",
|
||||
"squizlabs/php_codesniffer": "3.10.2",
|
||||
"symfony/browser-kit": "v7.1.1",
|
||||
"symfony/css-selector": "v7.1.1",
|
||||
"symfony/dom-crawler": "v7.1.1",
|
||||
"symfony/lock": "v7.1.1",
|
||||
"symfony/browser-kit": "v7.2.0-BETA1",
|
||||
"symfony/css-selector": "v7.2.0-BETA1",
|
||||
"symfony/dom-crawler": "v7.2.0-BETA1",
|
||||
"symfony/lock": "v7.2.0-BETA1",
|
||||
"theseer/tokenizer": "1.2.3",
|
||||
"webflo/drupal-finder": "1.3.1",
|
||||
"webmozart/assert": "1.11.0"
|
||||
|
|
|
@ -31,3 +31,7 @@
|
|||
|
||||
# Twig 3.
|
||||
%Since twig/twig 3.12: Twig Filter "spaceless" is deprecated%
|
||||
|
||||
# Symfony 7.2
|
||||
%Since symfony/http-foundation 7.2: NativeSessionStorage's "sid_length" option is deprecated and will be ignored in Symfony 8.0.%
|
||||
%Since symfony/http-foundation 7.2: NativeSessionStorage's "sid_bits_per_character" option is deprecated and will be ignored in Symfony 8.0.%
|
||||
|
|
|
@ -51,23 +51,6 @@ parameters:
|
|||
# information.
|
||||
# @default no value
|
||||
cookie_samesite: Lax
|
||||
#
|
||||
# Set the session ID string length. The length can be between 22 to 256. The
|
||||
# PHP recommended value is 48. See
|
||||
# https://www.php.net/manual/session.security.ini.php for more information.
|
||||
# This value should be kept in sync with
|
||||
# \Drupal\Core\Session\SessionConfiguration::__construct()
|
||||
# @default 48
|
||||
sid_length: 48
|
||||
#
|
||||
# Set the number of bits in encoded session ID character. The possible
|
||||
# values are '4' (0-9, a-f), '5' (0-9, a-v), and '6' (0-9, a-z, A-Z, "-",
|
||||
# ","). The PHP recommended value is 6. See
|
||||
# https://www.php.net/manual/session.security.ini.php for more information.
|
||||
# This value should be kept in sync with
|
||||
# \Drupal\Core\Session\SessionConfiguration::__construct()
|
||||
# @default 6
|
||||
sid_bits_per_character: 6
|
||||
# By default, Drupal generates a session cookie name based on the full
|
||||
# domain name. Set the name_suffix to a short random string to ensure this
|
||||
# session cookie name is unique on different installations on the same
|
||||
|
|
|
@ -19,21 +19,21 @@
|
|||
"ext-xml": "*",
|
||||
"ext-zlib": "*",
|
||||
"php": ">=8.3.0",
|
||||
"symfony/console": "^7.1",
|
||||
"symfony/dependency-injection": "^7.1",
|
||||
"symfony/event-dispatcher": "^7.1",
|
||||
"symfony/filesystem": "^7.1",
|
||||
"symfony/finder": "^7.1",
|
||||
"symfony/http-foundation": "^7.1",
|
||||
"symfony/http-kernel": "^7.1",
|
||||
"symfony/mailer": "^7.1",
|
||||
"symfony/mime": "^7.1",
|
||||
"symfony/routing": "^7.1",
|
||||
"symfony/serializer": "^7.1",
|
||||
"symfony/validator": "^7.1",
|
||||
"symfony/process": "^7.1",
|
||||
"symfony/console": "^7.2@beta",
|
||||
"symfony/dependency-injection": "^7.2@beta",
|
||||
"symfony/event-dispatcher": "^7.2@beta",
|
||||
"symfony/filesystem": "^7.2@beta",
|
||||
"symfony/finder": "^7.2@beta",
|
||||
"symfony/http-foundation": "^7.2@beta",
|
||||
"symfony/http-kernel": "^7.2@beta",
|
||||
"symfony/mailer": "^7.2@beta",
|
||||
"symfony/mime": "^7.2@beta",
|
||||
"symfony/routing": "^7.2@beta",
|
||||
"symfony/serializer": "^7.2@beta",
|
||||
"symfony/validator": "^7.2@beta",
|
||||
"symfony/process": "^7.2@beta",
|
||||
"symfony/polyfill-iconv": "^1.26",
|
||||
"symfony/yaml": "^7.1",
|
||||
"symfony/yaml": "^7.2@beta",
|
||||
"revolt/event-loop": "^1.0",
|
||||
"twig/twig": "^3.14.0",
|
||||
"doctrine/annotations": "^2.0",
|
||||
|
@ -42,7 +42,7 @@
|
|||
"guzzlehttp/psr7": "^2.4.5",
|
||||
"egulias/email-validator": "^3.2.1|^4.0",
|
||||
"masterminds/html5": "^2.7",
|
||||
"symfony/psr-http-message-bridge": "^7.1",
|
||||
"symfony/psr-http-message-bridge": "^7.2@beta",
|
||||
"composer-runtime-api": "^2.1",
|
||||
"composer/semver": "^3.3",
|
||||
"asm89/stack-cors": "^2.1",
|
||||
|
|
|
@ -15,8 +15,6 @@ parameters:
|
|||
gc_maxlifetime: 200000
|
||||
cookie_lifetime: 2000000
|
||||
cookie_samesite: Lax
|
||||
sid_length: 48
|
||||
sid_bits_per_character: 6
|
||||
name_suffix: ''
|
||||
twig.config:
|
||||
debug: false
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
},
|
||||
"require": {
|
||||
"php": ">=8.3.0",
|
||||
"symfony/dependency-injection": "^7.1",
|
||||
"symfony/dependency-injection": "^7.2@beta",
|
||||
"symfony/service-contracts": "v3.5.0"
|
||||
},
|
||||
"suggest": {
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
"license": "GPL-2.0-or-later",
|
||||
"require": {
|
||||
"php": ">=8.3.0",
|
||||
"symfony/dependency-injection": "^7.1",
|
||||
"symfony/event-dispatcher": "^7.1",
|
||||
"symfony/dependency-injection": "^7.2@beta",
|
||||
"symfony/event-dispatcher": "^7.2@beta",
|
||||
"symfony/event-dispatcher-contracts": "v3.5.0"
|
||||
},
|
||||
"autoload": {
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
"license": "GPL-2.0-or-later",
|
||||
"require": {
|
||||
"php": ">=8.3.0",
|
||||
"symfony/http-foundation": "^7.1"
|
||||
"symfony/http-foundation": "^7.2@beta"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
"license": "GPL-2.0-or-later",
|
||||
"require": {
|
||||
"php": ">=8.3.0",
|
||||
"symfony/validator": "^7.1"
|
||||
"symfony/validator": "^7.2@beta"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
"license": "GPL-2.0-or-later",
|
||||
"require": {
|
||||
"php": ">=8.3.0",
|
||||
"symfony/yaml": "^7.1"
|
||||
"symfony/yaml": "^7.2@beta"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
|
|
|
@ -120,6 +120,17 @@ class CoreServiceProvider implements ServiceProviderInterface, ServiceModifierIn
|
|||
|
||||
$container->registerForAutoconfiguration(ModuleUninstallValidatorInterface::class)
|
||||
->addTag('module_install.uninstall_validator');
|
||||
|
||||
// Deprecated parameters.
|
||||
if ($container->hasParameter('session.storage.options')) {
|
||||
$session_storage_options = $container->getParameter('session.storage.options');
|
||||
if (array_key_exists('sid_length', $session_storage_options)) {
|
||||
@trigger_error('The "sid_length" parameter is deprecated in drupal:11.1.0 and will be removed in drupal:12.0.0. This setting should be removed from the settings file, since its usage has been removed. See https://www.drupal.org/node/3469305', E_USER_DEPRECATED);
|
||||
}
|
||||
if (array_key_exists('sid_bits_per_character', $session_storage_options)) {
|
||||
@trigger_error('The "sid_bits_per_character" parameter is deprecated in drupal:11.1.0 and will be removed in drupal:12.0.0. This setting should be removed from the settings file, since its usage has been removed. See https://www.drupal.org/node/3469305', E_USER_DEPRECATED);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -25,12 +25,9 @@ class SessionConfiguration implements SessionConfigurationInterface {
|
|||
* @see https://www.php.net/manual/session.security.ini.php
|
||||
*/
|
||||
public function __construct($options = []) {
|
||||
// Provide sensible defaults for sid_length, sid_bits_per_character and
|
||||
// name_suffix.
|
||||
// Provide sensible defaults for name_suffix.
|
||||
// @see core/assets/scaffold/files/default.services.yml
|
||||
$this->options = $options + [
|
||||
'sid_length' => 48,
|
||||
'sid_bits_per_character' => 6,
|
||||
'name_suffix' => '',
|
||||
];
|
||||
}
|
||||
|
@ -58,10 +55,6 @@ class SessionConfiguration implements SessionConfigurationInterface {
|
|||
// Set the session cookie name.
|
||||
$options['name'] = $this->getName($request);
|
||||
|
||||
if (\PHP_VERSION_ID >= 80400) {
|
||||
// See https://wiki.php.net/rfc/deprecations_php_8_4#sessionsid_length_and_sessionsid_bits_per_character
|
||||
unset($options['sid_length'], $options['sid_bits_per_character']);
|
||||
}
|
||||
return $options;
|
||||
}
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ class ComposerProjectTemplatesTest extends ComposerBuildTestBase {
|
|||
*
|
||||
* @see https://getcomposer.org/doc/04-schema.md#minimum-stability
|
||||
*/
|
||||
protected const MINIMUM_STABILITY = 'RC';
|
||||
protected const MINIMUM_STABILITY = 'beta';
|
||||
|
||||
/**
|
||||
* The order of stability strings from least stable to most stable.
|
||||
|
|
|
@ -263,37 +263,15 @@ class SessionConfigurationTest extends UnitTestCase {
|
|||
* Tests constructor's default settings.
|
||||
*
|
||||
* @covers ::__construct
|
||||
*
|
||||
* @dataProvider providerTestConstructorDefaultSettings
|
||||
*/
|
||||
public function testConstructorDefaultSettings(array $options, int $expected_sid_length, int $expected_sid_bits_per_character, string $expected_name_suffix): void {
|
||||
$config = $this->createSessionConfiguration($options);
|
||||
public function testConstructorDefaultSettings(): void {
|
||||
$config = $this->createSessionConfiguration([]);
|
||||
$options = $config->getOptions(Request::createFromGlobals());
|
||||
if (\PHP_VERSION_ID >= 80400) {
|
||||
$this->assertArrayNotHasKey('sid_length', $options);
|
||||
$this->assertArrayNotHasKey('sid_bits_per_character', $options);
|
||||
}
|
||||
else {
|
||||
$this->assertSame($expected_sid_length, $options['sid_length']);
|
||||
$this->assertSame($expected_sid_bits_per_character, $options['sid_bits_per_character']);
|
||||
}
|
||||
$this->assertSame($expected_name_suffix, $options['name_suffix']);
|
||||
}
|
||||
$this->assertSame('', $options['name_suffix']);
|
||||
|
||||
/**
|
||||
* Data provider for the constructor test.
|
||||
*
|
||||
* @return array
|
||||
* Test data
|
||||
*/
|
||||
public static function providerTestConstructorDefaultSettings() {
|
||||
return [
|
||||
[[], 48, 6, ''],
|
||||
[['sid_length' => 100], 100, 6, ''],
|
||||
[['sid_bits_per_character' => 5], 48, 5, ''],
|
||||
[['name_suffix' => 'some-suffix'], 48, 6, 'some-suffix'],
|
||||
[['sid_length' => 100, 'sid_bits_per_character' => 5, 'name_suffix' => 'some-suffix'], 100, 5, 'some-suffix'],
|
||||
];
|
||||
$config = $this->createSessionConfiguration(['name_suffix' => 'some-suffix']);
|
||||
$options = $config->getOptions(Request::createFromGlobals());
|
||||
$this->assertSame('some-suffix', $options['name_suffix']);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -51,23 +51,6 @@ parameters:
|
|||
# information.
|
||||
# @default no value
|
||||
cookie_samesite: Lax
|
||||
#
|
||||
# Set the session ID string length. The length can be between 22 to 256. The
|
||||
# PHP recommended value is 48. See
|
||||
# https://www.php.net/manual/session.security.ini.php for more information.
|
||||
# This value should be kept in sync with
|
||||
# \Drupal\Core\Session\SessionConfiguration::__construct()
|
||||
# @default 48
|
||||
sid_length: 48
|
||||
#
|
||||
# Set the number of bits in encoded session ID character. The possible
|
||||
# values are '4' (0-9, a-f), '5' (0-9, a-v), and '6' (0-9, a-z, A-Z, "-",
|
||||
# ","). The PHP recommended value is 6. See
|
||||
# https://www.php.net/manual/session.security.ini.php for more information.
|
||||
# This value should be kept in sync with
|
||||
# \Drupal\Core\Session\SessionConfiguration::__construct()
|
||||
# @default 6
|
||||
sid_bits_per_character: 6
|
||||
# By default, Drupal generates a session cookie name based on the full
|
||||
# domain name. Set the name_suffix to a short random string to ensure this
|
||||
# session cookie name is unique on different installations on the same
|
||||
|
|
Loading…
Reference in New Issue