Problem/Motivation

Running a phpcs PHP 8.0 compatibility scan produces a false positive in dfp/tests/src/Functional/DisplayTagTest.php:

The behaviour of hexadecimal numeric strings was inconsistent prior to PHP 7 and support has been removed in PHP 7. Found: '0x0'

Steps to reproduce

phpcs -p . --extensions=php,module,inc,install,profile --standard=PHPCompatibility --runtime-set testVersion 8.0

Proposed resolution

Change

$edit['breakpoints[0][browser_size]'] = '0x0';

to

$edit['breakpoints[0][browser_size]'] = '0' . 'x' . '0';

Remaining tasks

N/A

User interface changes

N/A

API changes

N/A

Data model changes

N/A

CommentFileSizeAuthor
dfp-php-8-0-compat-fix.patch792 bytesjosh.estep

Issue fork dfp-3324603

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

josh.estep created an issue. See original summary.

anybody’s picture

Version: 8.x-1.2 » 3.0.x-dev
Status: Active » Needs work

@josh.estep could you please turn this into a MR against 3.x?

jannakha made their first commit to this issue’s fork.

jannakha’s picture

Status: Needs work » Needs review

MR created

anybody’s picture

Status: Needs review » Reviewed & tested by the community

Thanks for the fix. Test failures are unrelated.

vladimiraus’s picture

Status: Reviewed & tested by the community » Fixed

Thank you. Commited.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

  • vladimiraus committed 2347ec3c on 3.0.x
    feat: #3324603 Correct PHP 8.0 compat. false-positive
    
    By: josh.estep
    By...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.