Skip to content
Snippets Groups Projects
Commit 213e9669 authored by catch's avatar catch
Browse files

Issue #3465836 by andypost: PHP 8.4 session.sid_length and...

Issue #3465836 by andypost: PHP 8.4 session.sid_length and session.sid_bits_per_character are deprecated

(cherry picked from commit 123216e5)
parent 6a3a4663
Branches
Tags
5 merge requests!122353526426-warning-for-missing,!11958Issue #3490507 by alexpott, smustgrave: Fix bogus mocking in...,!11769Issue #3517987: Add option to contextual filters to encode slashes in query parameter.,!11185Issue #3477324 by andypost, alexpott: Fix usage of str_getcsv() and fgetcsv() for PHP 8.4,!9944Issue #3483353: Consider making the createCopy config action optionally fail...
Pipeline #269273 passed with warnings
Pipeline: drupal

#269318

    Pipeline: drupal

    #269306

      Pipeline: drupal

      #269296

        +1
        ......@@ -58,6 +58,10 @@ public function getOptions(Request $request) {
        // 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;
        }
        ......
        ......@@ -269,8 +269,14 @@ public static function providerTestEnforcedSessionName() {
        public function testConstructorDefaultSettings(array $options, int $expected_sid_length, int $expected_sid_bits_per_character, string $expected_name_suffix): void {
        $config = $this->createSessionConfiguration($options);
        $options = $config->getOptions(Request::createFromGlobals());
        $this->assertSame($expected_sid_length, $options['sid_length']);
        $this->assertSame($expected_sid_bits_per_character, $options['sid_bits_per_character']);
        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']);
        }
        ......
        0% Loading or .
        You are about to add 0 people to the discussion. Proceed with caution.
        Please register or to comment