pronamic / wp-pay-core

Core components for the WordPress payment processing library. This library is used in the WordPress plugin Pronamic Pay: https://www.pronamicpay.com/, but also allows other plugin developers to set up a payment plugin.
https://www.wp-pay.org/
GNU General Public License v3.0
27 stars 3 forks source link

Deprecated messages in PHP version 8.1 #60

Closed knit-pay closed 2 years ago

knit-pay commented 2 years ago

Hello Team

Getting Deprecated messages while using plugin with PHP version 8.1 Many of these messages are from pronamic-ideal plugin. are you already working to fix them?

[09-Apr-2022 04:48:27 UTC] PHP Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in C:\xampp\htdocs\wordpress-dev\wp-includes\functions.php on line 6985 [09-Apr-2022 04:48:27 UTC] PHP Deprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in C:\xampp\htdocs\wordpress-dev\wp-includes\functions.php on line 2144 [09-Apr-2022 04:48:27 UTC] PHP Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in C:\xampp\htdocs\wordpress-dev\wp-includes\functions.php on line 6985 [09-Apr-2022 04:48:27 UTC] PHP Deprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in C:\xampp\htdocs\wordpress-dev\wp-includes\functions.php on line 2144 [09-Apr-2022 04:48:27 UTC] PHP Deprecated: Return type of Pronamic\WordPress\Pay\Upgrades\Upgrades::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in C:\xampp\htdocs\wordpress-dev\wp-content\plugins\pronamic-ideal\vendor\wp-pay\core\src\Upgrades\Upgrades.php on line 87 [09-Apr-2022 04:48:27 UTC] PHP Deprecated: Return type of Pronamic\WordPress\Pay\Upgrades\Upgrades::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in C:\xampp\htdocs\wordpress-dev\wp-content\plugins\pronamic-ideal\vendor\wp-pay\core\src\Upgrades\Upgrades.php on line 78 [09-Apr-2022 04:48:27 UTC] PHP Deprecated: Return type of Pronamic\WordPress\Pay\GatewayIntegrations::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in C:\xampp\htdocs\wordpress-dev\wp-content\plugins\pronamic-ideal\vendor\wp-pay\core\src\GatewayIntegrations.php on line 77 [09-Apr-2022 04:48:27 UTC] PHP Deprecated: Return type of ActionScheduler_DateTime::setTimezone($timezone) should either be compatible with DateTime::setTimezone(DateTimeZone $timezone): DateTime, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in C:\xampp\htdocs\wordpress-dev\wp-content\plugins\pronamic-ideal\packages\action-scheduler\classes\ActionScheduler_DateTime.php on line 60 [09-Apr-2022 04:48:27 UTC] PHP Deprecated: Return type of ActionScheduler_DateTime::getOffset() should either be compatible with DateTime::getOffset(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in C:\xampp\htdocs\wordpress-dev\wp-content\plugins\pronamic-ideal\packages\action-scheduler\classes\ActionScheduler_DateTime.php on line 48 [09-Apr-2022 04:48:27 UTC] PHP Deprecated: Return type of ActionScheduler_DateTime::getTimestamp() should either be compatible with DateTime::getTimestamp(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in C:\xampp\htdocs\wordpress-dev\wp-content\plugins\pronamic-ideal\packages\action-scheduler\classes\ActionScheduler_DateTime.php on line 27 [09-Apr-2022 04:48:27 UTC] PHP Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in C:\xampp\htdocs\wordpress-dev\wp-content\plugins\pronamic-ideal\vendor\wp-pay\core\src\Admin\AdminAboutPage.php on line 62 [09-Apr-2022 04:48:27 UTC] PHP Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in C:\xampp\htdocs\wordpress-dev\wp-content\plugins\pronamic-ideal\vendor\wp-pay\core\src\Admin\AdminReports.php on line 70 [09-Apr-2022 04:48:28 UTC] PHP Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in C:\xampp\htdocs\wordpress-dev\wp-content\plugins\pronamic-ideal\vendor\wp-pay\core\src\Admin\AdminSubscriptionPostType.php on line 199 [09-Apr-2022 04:48:28 UTC] PHP Deprecated: preg_split(): Passing null to parameter #2 ($subject) of type string is deprecated in C:\xampp\htdocs\wordpress-dev\wp-includes\functions.php on line 4764 [09-Apr-2022 04:48:28 UTC] PHP Deprecated: rtrim(): Passing null to parameter #1 ($string) of type string is deprecated in C:\xampp\htdocs\wordpress-dev\wp-includes\formatting.php on line 2761 [09-Apr-2022 04:48:28 UTC] PHP Deprecated: rtrim(): Passing null to parameter #1 ($string) of type string is deprecated in C:\xampp\htdocs\wordpress-dev\wp-includes\formatting.php on line 2761 [09-Apr-2022 04:48:28 UTC] PHP Deprecated: rtrim(): Passing null to parameter #1 ($string) of type string is deprecated in C:\xampp\htdocs\wordpress-dev\wp-includes\formatting.php on line 2761 [09-Apr-2022 04:48:28 UTC] PHP Deprecated: rtrim(): Passing null to parameter #1 ($string) of type string is deprecated in C:\xampp\htdocs\wordpress-dev\wp-includes\formatting.php on line 2761 [09-Apr-2022 04:48:28 UTC] PHP Deprecated: rtrim(): Passing null to parameter #1 ($string) of type string is deprecated in C:\xampp\htdocs\wordpress-dev\wp-includes\formatting.php on line 2761 [09-Apr-2022 04:48:28 UTC] PHP Deprecated: rtrim(): Passing null to parameter #1 ($string) of type string is deprecated in C:\xampp\htdocs\wordpress-dev\wp-includes\formatting.php on line 2761 [09-Apr-2022 04:48:28 UTC] PHP Deprecated: rtrim(): Passing null to parameter #1 ($string) of type string is deprecated in C:\xampp\htdocs\wordpress-dev\wp-includes\formatting.php on line 2761 [09-Apr-2022 04:48:28 UTC] PHP Deprecated: rtrim(): Passing null to parameter #1 ($string) of type string is deprecated in C:\xampp\htdocs\wordpress-dev\wp-includes\formatting.php on line 2761 [09-Apr-2022 04:48:28 UTC] PHP Deprecated: rtrim(): Passing null to parameter #1 ($string) of type string is deprecated in C:\xampp\htdocs\wordpress-dev\wp-includes\formatting.php on line 2761

rvdsteege commented 2 years ago

We use phpstan to check code issues like these, but are not actively testing with PHP 8.1 yet. Please feel free to open PRs for any issues you might find.