nette / php-generator

🐘 Generates neat PHP code for you. Supports new PHP 8.3 features.
https://doc.nette.org/php-generator
Other
2.11k stars 138 forks source link

WIP: add php8 support #66

Closed ChrisB9 closed 3 years ago

ChrisB9 commented 4 years ago

(using php 8.0alpha3 with this container: https://hub.docker.com/r/chrisb9/php8-nginx-xdebug)

I started on the new php 8.0 features and realized, that a bunch of things won't work anymore with the new version.

Todos:

(i hope i didnt forget anything?)

This is still a draft, because I still have issues fixing this problem here: -- FAILED: Nette\PhpGenerator generator. | ClassType.from.phpt Exited with error code 255 (expected 0) E_DEPRECATED: Required parameter $c follows optional parameter $a

dg commented 4 years ago

Great! I fixed tests so they all pass on PHP 8 nightly https://travis-ci.org/github/nette/php-generator/jobs/713438049

ChrisB9 commented 4 years ago

Thanks, that's perfect. I'll merge it back into my branch. Since union types are currently the only supported in phpstorm, I'll start with that.

ChrisB9 commented 4 years ago

Should we use this and create a new version of php-generator and drop therefore php 7.1 support or do we try to keep compatibility?

dg commented 4 years ago

It would definitely be better to try to maintain compatibility.

dg commented 3 years ago

PHP 8 support is done in v3.5