-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TestListener object argument loader regression #4754
Comments
Although you provide a lot of information, I am sorry to say that I do not understand what you are reporting. |
Well, in summary, when I run the command I got This is the argument used as parameter of the class listener Hope my new explains are better ! PS: if you want to see a real implementation of concept, check on my project https://github.com/llaville/phpunit-LoggerTestListener (branch master was recently updated to allow PHPUnit 8.x and PHPUnit9) |
I have to admit that debugging and fixing issues related to test listeners is not very high on my list. Test listeners have been deprecated for years and will be removed in PHPUnit 10. I will probably not work on this issue, but would review/accept a pull request that fixes your problem. |
I don't want to hurt you, but I'm a bit sad to hear that it won't be fixed. At the base, the request to support PHPUnit 9.x come to a user of the community of my project https://github.com/llaville/phpunit-LoggerTestListener When I tried to add support to PHPUnit 9, I've begun by a POC on Test Hooks, just before reading the essential post : Finally, I won't add support to PHPUnit 9 and release a new version of my project that will at least support PHPUnit 7.5 and PHPUnit 8.5 After all, PHPUnit 8 is supposed to support as PHPUnit 9 both PHP 7.3 and PHP 7.4 (https://phpunit.de/supported-versions.html) Thanks to spent time to reply, I'd appreciated a lot ! |
I briefly looked at it and the root cause appears to be that we're trying to create the object before the autoloader, which is also configured in the XML configuration file, has been loaded. I will try to find time to work on this. |
Anything related to |
Summary
I've detected a regression on PHPUnit 9.5 when we use an object/class as argument of a testlistener
Current behavior
Class 'MyLoggerObjArg' not found
How to reproduce
Here are code I used to reproduce issue
source code
WARNING I've noticed also that a
startTestSuite
endendTestSuite
with no entry are generated only with PHPUnit 9.5,while it was not on PHPUnit 8.5 and even PHPUnit 7.5
See
output
Expected behavior
With following commands:
phpunit -c examples/listener_no_arg.xml
or evenphpunit -c examples/listener_obj_arg.xml
output
The text was updated successfully, but these errors were encountered: