Skip to content
This repository has been archived by the owner on Apr 18, 2024. It is now read-only.

php 8? #5

Closed
johnknl opened this issue Jun 22, 2021 · 12 comments
Closed

php 8? #5

johnknl opened this issue Jun 22, 2021 · 12 comments

Comments

@johnknl
Copy link

johnknl commented Jun 22, 2021

Wanted to try this out but the composer constraints don't include php 8, several dependencies as well

@paul-thebaud
Copy link
Owner

Hello,
Yes, package is not yet compatible with PHP8 because of some of the dependencies, sorry.
The issue paul-thebaud/phpunitgen-core#6 on the PhpUnitGen core package tracks this.
As soon as dependencies are available, I'll try to make this package compatible.

@paul-thebaud
Copy link
Owner

Hi @kleijnweb,
I released a new version (2.0.0-alpha1) of PhpUnitGen, which support PHP 8. It is currently in alpha stage because it uses a fork of roave/better-reflection (ondrejmirtes/better-reflection).
Feel free to try it using composer require phpunitgen/console and give me your thoughs.

@beataburczyk
Copy link

Thank you, tested with Lumen 8.2.1, unfortunately artisan trowing error, In ConsoleServiceProvider.php line 63:Call to a member function delegate() on null, phpunitgen/console 2.0.0-alpha2

@paul-thebaud
Copy link
Owner

Thanks for the feedback @beataburczyk, I'll try to look and fix it soon!

@paul-thebaud
Copy link
Owner

paul-thebaud commented Sep 15, 2021

Hi @beataburczyk, I found the problem. There are two issues:

  • First inside documentation: the service provider to register is \PhpUnitGen\Console\Adapters\Laravel\PhpUnitGenServiceProvider::class (instead of \PhpUnitGen\Console\Container\ConsoleServiceProvider::class). Documentation will be fixed on the website when V2 will be released online.
  • Second inside console package, where the PhpUnitGenServiceProvider and CommandFinishedListener were only accepting a Laravel application instance. I changed this one to accept both Laravel or Lumen app instance.This is released as 2.0.0-alpha3 and 1.4.0.

Feel free if you face any other issue, thanks again for the feedback!

@beataburczyk
Copy link

No luck with 2.0.0-alpha3 too, PHP 8.0.10, the same error like before, if I have chance will check with other fresh Lumen project or Laravel project too. Thanks

@paul-thebaud
Copy link
Owner

Hi @beataburczyk, did you update the register of the service provider inside your bootstrap/app.php.
This issue is related to the wrong service provider being registered.

@beataburczyk
Copy link

Yes, I did
use PhpUnitGen\Console\Container\ConsoleServiceProvider;

@paul-thebaud
Copy link
Owner

@beataburczyk as specified in my comment, there is an error in documentation, you must use the other one to get it working: \PhpUnitGen\Console\Adapters\Laravel\PhpUnitGenServiceProvider::class

@beataburczyk
Copy link

Apologise, my wrong reading... it's ok now, no more artisan errors.
Thank you for you effort.

@paul-thebaud
Copy link
Owner

No problem, feel free if you need anything else :)

@paul-thebaud
Copy link
Owner

PhpUnitGen version 2.0.0 stable released with PHP 8 support.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants