Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix PHP 8.4 deprecation notices updating type hints and improving test assertions #79

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jfredon
Copy link

@jfredon jfredon commented Dec 10, 2024

The code now uses nullable type hints for better clarity and stricter type enforcement need by PHP 8.4.

The deprecated assertInternalType method is replaced with assertIsInt in tests to ensure compatibility with newer PHPUnit versions.

The minimum required PHP version in the composer.json file is increased to 7.1 due to the use of nullable type hints, which are incompatible with PHP 5.6.

The code now uses nullable type hints for better clarity and stricter type enforcement. The deprecated assertInternalType method is replaced with assertIsInt in tests to ensure compatibility with newer PHPUnit versions. The minimum required PHP version in the composer.json file is increased to 7.1 due to the use of nullable type hints, which are incompatible with PHP 5.6.
@jfredon
Copy link
Author

jfredon commented Dec 10, 2024

Hello @vanderlee

I am testing the phpSyllable library on a project with PHP 8.4, and I’ve noticed some deprecation warnings.

There are just three parameters affected by the implicitly nullable parameter declarations, which are now deprecated.
I also took the opportunity to update the two PHPUnit methods that were also marked as deprecated.

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.

1 participant