Deprecated PHP 8.1 error: Deprecated: Using ${var} in strings is deprecated, use {$var} instead

Created on 27 March 2025, about 1 month ago

Problem/Motivation

I'm trying to build the tests, but I got hit by this PHP 8 deprecation error:

Time: 00:41.297, Memory: 10.00 MB

There was 1 error:

1) Drupal\Tests\copyscape\Functional\CopyscapeAdminUserPagesTest::testCopyrightedContent
This test printed output: 
Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /var/www/html/web/modules/contrib/copyscape/src/Copyscape/Api.php on line 126

Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /var/www/html/web/modules/contrib/copyscape/src/Copyscape/Api.php on line 126

/var/www/html/vendor/phpunit/phpunit/src/Framework/TestResult.php:956

Steps to reproduce

1. Run the tests that I'm building in the issue #3514889 or take a look at the source code, /copyscape/src/Copyscape/Api.php on line 126

Proposed resolution

Replace ${var} with {$var}

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Active

Version

4.0

Component

Code

Created by

πŸ‡¨πŸ‡¦Canada danrod Ottawa

Live updates comments and jobs are added and updated live.
  • Novice

    It would make a good project for someone who is new to the Drupal contribution process. It's preferred over Newbie.

Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024