Skip to content

Commit

Permalink
[PHP 8.2] Fix deprecated string interpolation patterns
Browse files Browse the repository at this point in the history
PHP 8.2 deprecates string interpolation patterns that place the
dollar sign outside the curly braces. This fixes such patterns
by replacing them with proper curly braced patterns.

See:
 - [PHP.Watch: `${var}` string interpolation deprecated](https://php.watch/versions/8.2/$%7Bvar%7D-string-interpolation-deprecated)
 - [wiki.php.net RFC](https://wiki.php.net/rfc/deprecate_dollar_brace_string_interpolation)
  • Loading branch information
Ayesh authored and alcohol committed May 23, 2022
1 parent a30d487 commit c49d870
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/SpdxLicenses.php
Expand Up @@ -309,10 +309,10 @@ private function isValidLicenseString($license)
(?<idstring>[\pL\pN.-]{1,})
# license-id: taken from list
(?<licenseid>${licenses})
(?<licenseid>{$licenses})
# license-exception-id: taken from list
(?<licenseexceptionid>${exceptions})
(?<licenseexceptionid>{$exceptions})
# license-ref: [DocumentRef-1*(idstring):]LicenseRef-1*(idstring)
(?<licenseref>(?:DocumentRef-(?&idstring):)?LicenseRef-(?&idstring))
Expand Down

0 comments on commit c49d870

Please sign in to comment.