Skip to content

Fix PHP 8.4+ deprecation warning for str_getcsv()#2622

Merged
obenland merged 1 commit intotrunkfrom
fix/str-getcsv-php-8.4-deprecation
Dec 11, 2025
Merged

Fix PHP 8.4+ deprecation warning for str_getcsv()#2622
obenland merged 1 commit intotrunkfrom
fix/str-getcsv-php-8.4-deprecation

Conversation

@obenland
Copy link
Member

Summary

Follow-up to #2590.

Fixes PHP 8.4+ deprecation warnings for str_getcsv() in the Blocklist Subscriptions class.

In PHP 8.4+, the $escape parameter must be explicitly provided as its default value is changing from "\\" to "". This PR explicitly passes all parameters to maintain the current behavior while avoiding the deprecation notice.

Changes

  • Explicitly pass separator, enclosure, and escape parameters to str_getcsv() calls in Blocklist_Subscriptions::parse_csv_string()

Testing

  • Verified no deprecation warnings in PHP 8.4+
  • Maintains compatibility with PHP 7.2+

Explicitly pass the escape parameter to str_getcsv() to avoid the deprecation warning in PHP 8.4+ while maintaining compatibility with PHP 7.2+.
Copilot AI review requested due to automatic review settings December 11, 2025 15:00
@obenland obenland added the Skip Changelog Disables the "Changelog Updated" action for PRs where changelog entries are not necessary. label Dec 11, 2025
@obenland obenland self-assigned this Dec 11, 2025
@obenland obenland requested a review from a team December 11, 2025 15:00
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR addresses PHP 8.4+ deprecation warnings by explicitly specifying all parameters for str_getcsv() calls in the Blocklist Subscriptions class. The changes ensure forward compatibility while maintaining backward compatibility with PHP 7.2+.

Key Changes:

  • Added explicit separator, enclosure, and escape parameters to two str_getcsv() calls

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@obenland obenland merged commit f47c079 into trunk Dec 11, 2025
19 of 22 checks passed
@obenland obenland deleted the fix/str-getcsv-php-8.4-deprecation branch December 11, 2025 15:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Skip Changelog Disables the "Changelog Updated" action for PRs where changelog entries are not necessary.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants