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

tweak(php 8.1): fix some php 8.1 issues #40

Closed
wants to merge 0 commits into from

Conversation

pschuele
Copy link

@pschuele pschuele commented Jun 5, 2023

No description provided.

@pschuele pschuele force-pushed the pu/ps/php8.1 branch 3 times, most recently from 18239ef to c487db2 Compare June 5, 2023 14:01
@hfig
Copy link
Owner

hfig commented Jun 12, 2023

I don't oppose this generally. However, the change in version requirements for ramsey/uuid raises the minimum PHP version from 7.1 to 7.2. Was there a reason why you changed this? There's no change in any code that touches the uuid library.

@pschuele
Copy link
Author

hi,
I updated 'ramsey/uuid' because the old version did not support php 8.1. but maybe there is a version which supports php 7.1 and php 8.1?
I can remove the change in composer.json if you like.

@pschuele
Copy link
Author

I updated the ramsey/uuid version requirement and rebased the PR branch.

tine20-ci pushed a commit to tine-groupware/tine that referenced this pull request Aug 7, 2023
to prevent php 8.1 deprecation notices

also switch to https://github.com/tine-groupware/MAPI.git

see hfig/MAPI#40

execute composer:
composer require "hfig/mapi:^1.3" "ramsey/uuid ^4.7" "pear/ole ^1.0.0RC9" "ramsey/collection ^1.2"
@Zombaya
Copy link
Contributor

Zombaya commented Nov 10, 2023

Could this PR be merged?

The current code is currently generating deprecation notices in symfony projects and this PR solves these notices.

Return type of Hfig\MAPI\OLE\Pear\DocumentElementCollection::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

Return type of Hfig\MAPI\OLE\Pear\DocumentElementCollection::offsetUnset($offset) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

...

@hfig
Copy link
Owner

hfig commented Nov 23, 2023

This PR will raise the project required PHP version to 8.0 (introduces the return pseudotype mixed)

I can merge a PR that adds a return typed for everything except offsetGet() and attributes it as #[\ReturnTypeWillChange]

Once this is done, I agree it's probably time so say bye to PHP7.x and make another release.

@m1ga
Copy link

m1ga commented Oct 24, 2024

would be great to have this merged. I've manually applied to return types so it won't show the deprecated messages (php 8.3). Works fine with php 8.1.2 and 8.3.12.

@hfig
Copy link
Owner

hfig commented Oct 26, 2024

I've merged and tagged the other PR that maintains PHP 7.1 compatibility.

PHP7.4 is now so far out of support, shifting the minimum PHP version to 8.1 or 8.2 is not unreasonable. If someone wants to rebase this and do a general dependency update for a minimum PHP 8.1, I will release it as v2.0.0.

@pschuele
Copy link
Author

oops, sorry - did not want to close the PR. a new one should created for the dependency update.

@hfig
Copy link
Owner

hfig commented Nov 16, 2024

I don't disagree with closing it - better to open a new one rebased on the current master HEAD with a more comprehensive set of PHP 8.1 hinting/annotating improvements.

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.

4 participants