Skip to content
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

PHPUnit\Event\Test\DataProviderMethodCalledSubscriber" does not exist or is not an interface #5417

Closed
atrialabir opened this issue Jun 21, 2023 · 1 comment
Labels
type/bug Something is broken version/10 Something affects PHPUnit 10

Comments

@atrialabir
Copy link

Q A
PHPUnit version ^10.0
PHP version ^8.1
Installation Method Composer / PHAR

after runing vendor/bin/phpunit in my package I get this error

vendor/bin/phpunit

An error occurred inside PHPUnit.

Message: Subscriber "PHPUnit\Event\Test\DataProviderMethodCalledSubscriber" does not exist or is not an interface
Location: C:\xampp\htdocs\atriatech\auth\vendor\phpunit\phpunit\src\Event\TypeMap.php:43

#0 C:\xampp\htdocs\atriatech\auth\vendor\phpunit\phpunit\src\Event\Facade.php(244): PHPUnit\Event\TypeMap->addMapping('PHPUnit\Event\T...', 'PHPUnit\Event\T...')
#1 C:\xampp\htdocs\atriatech\auth\vendor\phpunit\phpunit\src\Event\Facade.php(158): PHPUnit\Event\Facade->registerDefaultTypes(Object(PHPUnit\Event\TypeMap))
#2 C:\xampp\htdocs\atriatech\auth\vendor\phpunit\phpunit\src\Event\Facade.php(146): PHPUnit\Event\Facade->typeMap()
#3 C:\xampp\htdocs\atriatech\auth\vendor\phpunit\phpunit\src\Event\Facade.php(128): PHPUnit\Event\Facade->deferredDispatcher()
#4 C:\xampp\htdocs\atriatech\auth\vendor\phpunit\phpunit\src\Event\Facade.php(45): PHPUnit\Event\Facade->createDispatchingEmitter()
#5 C:\xampp\htdocs\atriatech\auth\vendor\phpunit\phpunit\src\Event\Facade.php(32): PHPUnit\Event\Facade->__construct()
#6 C:\xampp\htdocs\atriatech\auth\vendor\phpunit\phpunit\src\Event\Facade.php(40): PHPUnit\Event\Facade::instance()
#7 C:\xampp\htdocs\atriatech\auth\vendor\phpunit\phpunit\src\TextUI\Application.php(80): PHPUnit\Event\Facade::emitter()
#8 C:\xampp\htdocs\atriatech\auth\vendor\phpunit\phpunit\phpunit(99): PHPUnit\TextUI\Application->run(Array)
#9 C:\xampp\htdocs\atriatech\auth\vendor\bin\phpunit(123): include('C:\xampp\htdocs...')

@atrialabir atrialabir added type/bug Something is broken version/10 Something affects PHPUnit 10 labels Jun 21, 2023
@sebastianbergmann
Copy link
Owner

It appears that you have different installations of PHPUnit mixed up.

For instance, you may have used Composer to install PHPUnit and have configured the autoloader generated by Composer as PHPUnit's bootstrap script but then you invoke PHPUnit using an executable other than vendor/bin/phpunit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Something is broken version/10 Something affects PHPUnit 10
Projects
None yet
Development

No branches or pull requests

2 participants