πŸ‡ΊπŸ‡ΈUnited States @Todd Zebert

Los Angeles, CA
Account created on 26 March 2010, over 14 years ago
#

Recent comments

πŸ‡ΊπŸ‡ΈUnited States Todd Zebert Los Angeles, CA

here's the patch version of the fork change above, tested and working.

πŸ‡ΊπŸ‡ΈUnited States Todd Zebert Los Angeles, CA

This patch is for 'drupal/address:1.9' (last D8 module) and the resulting Composer dependency "commerceguys/addressing":"v1.4.x", tested and working.

πŸ‡ΊπŸ‡ΈUnited States Todd Zebert Los Angeles, CA

I agree with dratta that the 3302484-28-for-8.x-1.9.patch in #28 does not work, at least not with 'drupal/address:1.9' and the resulting "commerceguys/addressing":"v1.4.2" (resulting from the module's composer.json's requirement of "commerceguys/addressing": "^1.0.7".

πŸ‡ΊπŸ‡ΈUnited States Todd Zebert Los Angeles, CA

This is a reroll to backport PHP 8.1 trim null fix β†’

πŸ‡ΊπŸ‡ΈUnited States Todd Zebert Los Angeles, CA

Confirmed `$form_state` is not used in `blockreference_autocomplete_value()`, and new patch removes use.

πŸ‡ΊπŸ‡ΈUnited States Todd Zebert Los Angeles, CA

We're facing this same issue. I've narrowed it down to this code $fix = $phpcsFile->addFixableError($error, ($i + 1), 'BlankLinesFound'); returns TRUE, which makes the following conditional TRUE, so then the final line $phpcsFile->fixer->replaceToken(($i + 1), ''); replaces the brace with empty string. Unfortunately I'm not following the overall logic to know what's the real issue is.

I've included screenshots of xdebug vars, so one should be able to make out what's happening here.

         // We changed lines.
            if ($foundContent === false) {
                // Before we throw an error, make sure we are not looking
                // at a gap before the style definition.
                $prev = $phpcsFile->findPrevious(T_WHITESPACE, $i, null, true);
                if ($prev !== false
                    && isset($endTokens[$tokens[$prev]['code']]) === false
                ) {
                    $error = 'Blank lines are not allowed between class names';
                    $fix   = $phpcsFile->addFixableError($error, ($i + 1), 'BlankLinesFound');
                    if ($fix === true) {
                        $phpcsFile->fixer->replaceToken(($i + 1), '');
                    }
                }

                break;
            }
πŸ‡ΊπŸ‡ΈUnited States Todd Zebert Los Angeles, CA

I didn't see this fix in the last patch, but the error is in the phpcs output in the original post. The same error arrises from what's we're running (to confirm PHP8.1 compatibility) phpcs --runtime-set testVersion 8.1- --standard=PHPCompatibility.

-----------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------------------------------------
88 | ERROR | The behaviour of hexadecimal numeric strings was inconsistent prior to PHP 7 and support has been removed in PHP 7. Found: '0x0'
-----------------------------------------------------------------------------------------------------------------------------------------------

πŸ‡ΊπŸ‡ΈUnited States Todd Zebert Los Angeles, CA

I had to use patch -p1 to apply this to 7.x-1.9 as git apply failed, even though the line numbers match.

πŸ‡ΊπŸ‡ΈUnited States Todd Zebert Los Angeles, CA

There is a newer issue on this, with the same fix https://www.drupal.org/project/facetapi/issues/3352819 πŸ› PHP 8.1: deprecated function warnings due to missing return type Closed: duplicate

Production build 0.71.5 2024