consolidation / site-alias

Manage alias records for local and remote sites.
Other
60 stars 15 forks source link

PHP 8.1 - Passing null to parameter #2 ($subject) of type string is deprecated in .../vendor/consolidation/site-alias/src/SiteSpecParser.php on line 144 #48

Closed mrweiner closed 2 years ago

mrweiner commented 2 years ago

I think this is a separate error from the one addressed in https://github.com/consolidation/site-alias/pull/46.

HnLn commented 2 years ago

preg_match_null_notification.patch.txt

   protected function match($spec)
    {
        if ($spec === null) {
            return [];
        }

Patch does an early return if $spec is empty.

https://php.watch/versions/8.1/internal-func-non-nullable-null-deprecation