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

Support PHP8 #84

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Support PHP8 #84

wants to merge 3 commits into from

Conversation

dpi
Copy link

@dpi dpi commented Mar 8, 2021

Fixes #83

doctrine/coding-standard ^6 and ^7 only supports PHP ^7.1, so updated to branch 8. (9 is also available.)

Updated phpstan/phpstan + phpstan/phpstan-strict-rules from ^0.11 to ^0.12 to support PHP 8.

Removed PHP 5 reference from composer.json

Ran phpcbf, which fixed all CS fails as a result of updating.

The two removed sniffs no longer exist (didnt look for the replacements, if any)

__set magic method is only allowed to return void in PHP8: https://3v4l.org/uiGk3

@dpi dpi force-pushed the php8 branch 2 times, most recently from 830cfd2 to 4065ae6 Compare March 8, 2021 07:32
@holtkamp
Copy link

@jwage did you notice this Pull Request?

@holtkamp
Copy link

holtkamp commented Sep 16, 2022

@dpi on PHP 8.1 this kind of deprecation messages is generated:

PHP Deprecated: Return type of Purl\AbstractPart::offsetGet($key) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in .../vendor/jwage/purl/src/Purl/AbstractPart.php:139

PHP Deprecated: Return type of Purl\AbstractPart::offsetUnset($key) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

Might be useful to also resolve this in your patch?

https://github.com/dpi/purl/blob/php8/src/Purl/AbstractPart.php#L139

@dpi
Copy link
Author

dpi commented Sep 16, 2022

Id like to get a preference from the maintainer. Whether he prefers to litter the current branch with attributes or fix the issue with a new major/minor. Or both.

@holtkamp
Copy link

holtkamp commented Sep 16, 2022

@dpi yeah I agree

@jwage any thoughts on this?

I gave it a shot myself at https://github.com/holtkamp/purl/tree/patch-php-8.1 for PHP 8.1 to reduce the amount of errors reported by monitoring tools like New Relic

@barchard
Copy link

This a great util library, but it seems like it may be abandoned? Anyone have suggestions for an alternate library?

@jwage
Copy link
Owner

jwage commented Feb 20, 2023

I am no longer personally using this library and don't have the time to maintain it. Happy to hand over the maintenance to someone else. Here is an alternative maintained library https://uri.thephpleague.com/

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.

Support PHP8
5 participants