prooph / standard-projections

Standard projections to use with Prooph EventStore
http://getprooph.org/
BSD 3-Clause "New" or "Revised" License
15 stars 4 forks source link

Php81 compat #17

Closed basz closed 1 year ago

prolic commented 1 year ago
PHP Fatal error:  During inheritance of JsonSerializable: Uncaught Return type of Ramsey\Uuid\Uuid::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

I think Ramsey Uuid min-version must be bumped. I'd guess there is a newer minor version available for PHP 8.1 compat.

basz commented 1 year ago

I think it is a problem on 4 fronts

phpunit/phpunit 9.5.4 and below gives;

PHP Deprecated:  PHPUnit\Runner\DefaultTestResultCache implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in /Users/bas/Sandbox/prooph-standard-projections/vendor/phpunit/phpunit/src/Runner/DefaultTestResultCache.php on line 34

prooph/event-store 7.6.1 and below gives;

Fatal error: During inheritance of Iterator: Uncaught Return type of Prooph\EventStore\StreamIterator\MergedStreamIterator::current() should either be compatible with Iterator::current(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

So i fixed those.

ramsey/uuid and marc-mabe/php-enum also need minimal dependencies, but these are not hard dependencies in this package but rather prooph/event-store or prooph/pdo-event-store. Should we fix them there or here?

Adding them as hard dependencies solves the issues and tests then pass for 81+lowest

"ramsey/uuid": "^4.3",
"marc-mabe/php-enum": "^4.4"
prolic commented 1 year ago

since prooph/event-store is a requirement of this lib, let's fix it there.

basz commented 1 year ago

sure. that requires event-store to drop 7.3 and common to drop 7.1-7.3 and adopt ^8.0. i can do that. i'll also start using github actions on common then...

prolic commented 1 year ago

Sounds good to me Thanks

On Fri, Oct 21, 2022, 17:47 Bas Kamer @.***> wrote:

sure. that requires event-store to drop 7.3 and common to drop 7.1-7.3 and adopt ^8.0. i can do that. i'll also start using github actions on common then...

— Reply to this email directly, view it on GitHub https://github.com/prooph/standard-projections/pull/17#issuecomment-1287422023, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADAJPAEAILHXFIKZ5O4GXDWEL6MXANCNFSM6AAAAAARJPS42Q . You are receiving this because you were assigned.Message ID: @.***>

basz commented 1 year ago

alrighty. 8.2 threw me off. but all green now.