MAPI icon indicating copy to clipboard operation
MAPI copied to clipboard

tweak(php 8.1): fix some php 8.1 issues

Open pschuele opened this issue 1 year ago • 5 comments

pschuele avatar Jun 05 '23 13:06 pschuele

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.

hfig avatar Jun 12 '23 07:06 hfig

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 avatar Jun 15 '23 13:06 pschuele

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

pschuele avatar Jun 15 '23 13:06 pschuele

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

...

Zombaya avatar Nov 10 '23 14:11 Zombaya

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.

hfig avatar Nov 23 '23 03:11 hfig