«Fatal error: Class \'PHPUnit\Framework\TestCase\' not found in /app/vendor/mage2pro/core/Core/TestCase.php on line 6» on compilation

‘Fatal error: Class ‘PHPUnit\Framework\TestCase’ not found in /app/vendor/mage2pro/core/Core/TestCase.php on line 6’, on latest version of Stripe. Is there anything I could do to fix this? thanks

How to reproduce it?

Magento won’t compile
remote: 0 => ‘Compilation was started.’,
remote: 1 => ‘%message% 0/7 [>---------------------------] 0% 1 sec 48.0 MiB%message% 0/7 [>---------------------------] 0% 1 sec 48.0 MiBProxies code generation… 0/7 [>---------------------------] 0% 1 sec 48.0 MiB’,
remote: 2 => ‘Proxies code generation… 1/7 [====>-----------------------] 14% 1 sec 54.0 MiB’,
remote: 3 => ‘Repositories code generation… 1/7 [====>-----------------------] 14% 1 sec 54.0 MiB’,
remote: 4 => ‘Fatal error: Class ‘PHPUnit\Framework\TestCase’ not found in /app/vendor/mage2pro/core/Core/TestCase.php on line 6’,
remote: )
remote:
remote: E: Error building project: The build hook failed with status code 255. Aborted build.
remote: E: Build failed: Builder process returned an error, aborting.
To git@git.ent.magento.cloud:65y2iwmymaini_stg.git

  • 9e67638…421e389 master -> master (forced update)

I have fixed it in the 1.8.18 version of the mage2pro/core package.