Skip to content

Commit

Permalink
Deprecations for PHP 8.1
Browse files Browse the repository at this point in the history
In scope of PHP8.1 compatibility static analysis it was discovered some deprecations in webflo/drupal-finder codebase:
line 222 vendor/pear/pear-core-minimal/src/PEAR.php get_class() without argument (tag 1.10.11)
line 235 vendor/pear/pear-core-minimal/src/PEAR.php get_class() without argument (tag 1.10.11)
  • Loading branch information
nkazarynava authored and cweiske committed Apr 19, 2023
1 parent ce66735 commit aed862e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/PEAR.php
Expand Up @@ -219,7 +219,7 @@ public function __call($method, $arguments)
);
}
return call_user_func_array(
array(get_class(), '_' . $method),
array(self::class, '_' . $method),
array_merge(array($this), $arguments)
);
}
Expand All @@ -232,7 +232,7 @@ public static function __callStatic($method, $arguments)
);
}
return call_user_func_array(
array(get_class(), '_' . $method),
array(self::class, '_' . $method),
array_merge(array(null), $arguments)
);
}
Expand Down

8 comments on commit aed862e

@alecpl
Copy link

@alecpl alecpl commented on aed862e Sep 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, this breaks compatibility with PHP 5.4. Any chance to have this back? Also, I suppose composer.json should specify minimum PHP version.

@cweiske
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minimum PHP version is a good idea.

@alecpl
Copy link

@alecpl alecpl commented on aed862e Sep 21, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see that this change didn't happen in https://github.com/pear/pear-core. Shouldn't both be in sync?

@cweiske
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They should, but nobody cares enough anymore.

@ashnazg
Copy link
Member

@ashnazg ashnazg commented on aed862e Sep 21, 2023 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alecpl
Copy link

@alecpl alecpl commented on aed862e Sep 21, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The background story how it is a problem for us.

Roundcube 1.4 is a few years old release that includes composer dependencies including pear-core-minimal. It is supposed to work on PHP >= 5.4. We set that requirement in the composer.json file. Because of a security issue we had to release an update. When we do that we run composer to get dependencies. It included recent pear-core-minimal package that is not compatible with PHP 5.4 anymore.

It went unnoticed by us because we do not have CI for this old branch. Also composer didn't complain because there's no min php version specified for pear-core-minimal. But our users noticed ;).

@CloCkWeRX
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alecpl shoot in a PR (probably best to set the composer min version) and we'll land it fairly quickly.

@ashnazg
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alecpl got this fixed now in v1.10.22. Also added explicit >=5.4 in both composer.json files now.

Please sign in to comment.