Skip to content

PHP 8.5: Conditionally call deprecated functions#937

Merged
jtojnar merged 4 commits intosimplepie:masterfrom
TobiasBg:patch-1
Sep 2, 2025
Merged

PHP 8.5: Conditionally call deprecated functions#937
jtojnar merged 4 commits intosimplepie:masterfrom
TobiasBg:patch-1

Conversation

@TobiasBg
Copy link
Contributor

@TobiasBg TobiasBg commented Sep 1, 2025

Several PHP functions that have not been doing anything since PHP 8.0/8.1 will be deprecated in PHP 8.5 and will thus be throwing warnings: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_no-op_functions_from_the_resource_to_object_conversion

To solve this while supporting multiple versions of PHP, they can be called conditionally based on a PHP version check.

This PR adds this for affected functions throughout the SimplePie codebase.

@Art4 Art4 added this to the 1.9.0 milestone Sep 1, 2025
@jtojnar jtojnar merged commit e99dc85 into simplepie:master Sep 2, 2025
10 checks passed
Alkarex added a commit to FreshRSS/simplepie that referenced this pull request Sep 12, 2025
* bump SimplePie::VERSION to 1.9.0

* bump SimplePie::VERSION to 1.9.0

* Add CHANGELOG for 1.8.1 section

* Parenthesize author and PR link

* import changelog changes from simplepie#923

* Add 1.9.0 section, update unreleased section

* improve changelog

* Add missing authors of changes

* PHP 8.5: Conditionally call deprecated functions (simplepie#937)

Several PHP functions that have not been doing anything since PHP 8.0/8.1 will be deprecated in PHP 8.5 and will thus be throwing warnings: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_no-op_functions_from_the_resource_to_object_conversion

To solve this while supporting multiple versions of PHP, they can be called conditionally based on a PHP version check.

This PR adds this for affected functions throughout the SimplePie codebase.

* Update release date

---------

Co-authored-by: Art4 <art4@wlabs.de>
Co-authored-by: Tobias Bäthge <git@tobias.baethge.com>
Co-authored-by: Artur Weigandt <Art4@users.noreply.github.com>
Alkarex added a commit to Alkarex/FreshRSS that referenced this pull request Sep 12, 2025
Main change is simplepie/simplepie#937 (PHP 8.5: Conditionally call deprecated functions)
Alkarex added a commit to FreshRSS/FreshRSS that referenced this pull request Sep 12, 2025
Main change is simplepie/simplepie#937 (PHP 8.5: Conditionally call deprecated functions)

P.S. a sync with SimplePie upstream was already done recently, hence the limited changes:
* #7775
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants