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

Drupal 9.2.6 - Class PHPUnit\Framework\TestCase not found. #245

Closed
stef-van-looveren opened this issue Sep 28, 2021 · 4 comments
Closed

Comments

@stef-van-looveren
Copy link

How is drupal-check installed?

bash-5.0$ composer require --dev mglaman/drupal-check
Using version ^1.1 for mglaman/drupal-check
./composer.json has been updated
Running composer update mglaman/drupal-check
Gathering patches for root package.
Loading composer repositories with package information
Updating dependencies
Lock file operations: 9 installs, 0 updates, 0 removals
  - Locking composer/xdebug-handler (2.0.2)
  - Locking jean85/pretty-package-versions (2.0.4)
  - Locking mglaman/drupal-check (1.1.10)
  - Locking mglaman/phpstan-drupal (0.12.13)
  - Locking nette/finder (v2.5.2)
  - Locking nette/neon (v3.2.2)
  - Locking nette/utils (v3.2.5)
  - Locking phpstan/phpstan (0.12.99)
  - Locking phpstan/phpstan-deprecation-rules (0.12.6)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 9 installs, 0 updates, 0 removals
Gathering patches for root package.
Gathering patches for dependencies. This might take a minute.
  - Installing phpstan/phpstan (0.12.99): Extracting archive
  - Installing phpstan/phpstan-deprecation-rules (0.12.6): Extracting archive
  - Installing nette/neon (v3.2.2): Extracting archive
  - Installing nette/utils (v3.2.5): Extracting archive
  - Installing nette/finder (v2.5.2): Extracting archive
  - Installing mglaman/phpstan-drupal (0.12.13): Extracting archive
  - Installing jean85/pretty-package-versions (2.0.4): Extracting archive
  - Installing composer/xdebug-handler (2.0.2): Extracting archive
  - Installing mglaman/drupal-check (1.1.10): Extracting archive

Environment:

  • OS: Linux
  • PHP Version: 7.4
  • Drupal core: 9.2.6

Describe the bug
Result after running drupal-check is multiple lines of
Class PHPUnit\Framework\TestCase not found.

@stef-van-looveren
Copy link
Author

I found a similar issue here: #143
But doing
composer require --dev --with-all-dependencies 'drupal/core-dev:^9.2.1'
Does not fix the issue.

@esolitos
Copy link

I also encoutered this issue, but requiring drupal/core-dev fixed it in my case.
You might also need phpspec/prophecy-phpunit:^2.

@prudloff-insite
Copy link

This looks similar to mglaman/phpstan-drupal#215.

@mglaman
Copy link
Owner

mglaman commented Feb 2, 2022

Fixed with latest phpstan-drupal

@mglaman mglaman closed this as completed Feb 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants