dephpend icon indicating copy to clipboard operation
dephpend copied to clipboard

Upgrade to PHP8.1

Open juampi92 opened this issue 2 years ago • 4 comments

This PR upgrades the entire package and its dependencies to rely on php 8.1. The main drive for the php update is to be able to use all latest versions of the existing packages.

Special mention

This specific commit prevents PHP Enum classes from breaking.

It used to break saying that $node->isAbstract() doesn't exist for Node\Stmt\Enum_.

This PR includes

  • Added github actions to include tests
  • Updated PHPUnit assertions to work with phpunit 9.5
  • Updated php-cs-fixer --rules label. And updated the codebase afterwards with the new psr12 standard.
  • $method->getReturnType()->getName() update.
  • The Dockerfile is also updated to use PHP8.1 too.

There are some failing tests that I can't make it work with github actions:

  • Install json.so extension: I added json to the list of extensions, but it didn't seem to work.
  • I added a new test for Enums, and now there is a new error for the test. I couldn't figure out how the tests well too well, but I have a suspicion that the Enums are not printing anything. I run this updated version against my codebase and it was able to generate the Text version correctly.

I opened it as a draft to get feedback and assistance before committing to fix the tests. Thanks in advance for this package and for the help!

juampi92 avatar Sep 24 '22 21:09 juampi92

Hey, thank you so much for this PR and sorry for letting you wait this long. Work's been very busy, but I'm getting on it right now :)

mihaeu avatar Oct 08 '22 16:10 mihaeu

@mihaeu what is the progress here?

djschilling avatar Sep 26 '23 08:09 djschilling

@mihaeu please? 1.5 years for a PR!

pierrekttipay avatar Mar 14 '24 00:03 pierrekttipay

@mihaeu Necesitas ayuda? Need help? would love to see this get pushed through

tellojsu avatar Mar 18 '24 17:03 tellojsu

@juampi92 @mihaeu any update on this PR or PHP 8.1 support

vasanth-kumar-m-y avatar Jun 05 '24 18:06 vasanth-kumar-m-y

@juampi92 @mihaeu Thanks for merging! Could you please release this?

vasanth-kumar-m-y avatar Aug 04 '24 16:08 vasanth-kumar-m-y