thomasvargiu / RabbitMqModule

PHP implementation of AMQP protocol
15 stars 9 forks source link

Feature/php8 #26

Closed darckking closed 2 years ago

darckking commented 2 years ago

PHP Dropped support prior 7.3, added support for 8.0.

Dependencies I updated dependencies to higher versions.

Dev dependencies I removed laminas/laminas-test as there is no need for it anymore after migration to laminas-cli. I removed laminas/laminas-log, laminas/laminas-i18n, laminas/laminas-http - I haven't found usage of these dependencies, but let me know if there is some reason for them to be there. Upgraded PHPunit, PHPStan, etc

CLI This is part I've changed the most. The laminas/laminas-mvc-console and laminas/laminas-console are abandoned and laminas/laminas-console's latest version doesn't support php 8. As suggested by those dependencies, I migrated to laminas-cli. All console controllers and their unit tests rewritten to commands. I did some testing to make sure that I haven't broken anything but please thoroughly review this part.

All users that use php public/index.php to access RabbitMQModule CLI must switch to ./vendor/bin/laminas and update commands signature - I made them to look more like Doctrine's (e.g. rabbitmq:consumers:list)

PHPStan Because I upgraded PHPStan to 1.8.0 now it finds much more errors in code than previous version. I tried to fix them but it's just too much, I can't fix it without diving deep in source code, and it goes beyond initial goal of this PR - provide php 8.0 support. I just made sure that my changes don't introduce new errors.

Travis CI Honestly I'm not familiar with Travis CI so might need your help here. I just removed php 7.2 and added php 8.0 in same way as there is php 7.4, not sure if I had to do something else. And of course the build will fail as there are PHPStan errors.

thomasvargiu commented 2 years ago

I will add support for PHP 8.1