WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Conversation

@ttgrules
Copy link
Contributor

This changes the PHPUnit to show Deprecation warnings and convert them to exceptions. This may not be the desired behavior, but it does enable earlier detection and correction of obsolete code in new versions of php.

Prompted by the missing offset class property fixed in #49

@ttgrules
Copy link
Contributor Author

You can test this by commenting out any class property and running the unit tests in php8.3+ to see the failure because dynamic class properties were deprecated

@sanmai sanmai self-requested a review October 15, 2025 09:43
Copy link
Member

@sanmai sanmai left a comment

Choose a reason for hiding this comment

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

Tested, works.

  1. error_reporting=-1 makes PHP report deprecations
  2. convertDeprecationsToExceptions makes PHPUnit convert them to errors

@sanmai sanmai merged commit e56f7bc into pear:master Oct 15, 2025
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants