itsgoingd / clockwork

Clockwork - php dev tools in your browser - server-side component
https://underground.works/clockwork
MIT License
5.58k stars 321 forks source link

PhpUnit 10: Cannot override final method PHPUnit\Framework\Assert::assertThat() #708

Open michapietsch-streamline opened 3 weeks ago

michapietsch-streamline commented 3 weeks ago

With the latest version of Clockwork and PhpUnit 10, when I try to collect data from a test, I get:

Fatal error: Cannot override final method PHPUnit\Framework\Assert::assertThat() in vendor/itsgoingd/clockwork/Clockwork/Support/Laravel/Tests/UsesClockwork.php on line 71

As a quick and dirty fix I removed the final.

I'm now at:

Error: Call to undefined method Tests\Feature\SomeTest::getStatus()
/Users/Shared/Cloud/Repos/SaaS/saas/api/vendor/itsgoingd/clockwork/Clockwork/Support/Laravel/Tests/UsesClockwork.php:40

I pull in the trait into my Laravel feature tests, and I included the extension in phpunit.xml.

What am I possibly missing?

Thanks in advance for your help!

itsgoingd commented 3 weeks ago

Hey, for PHPUnit 10, you should only add the extension to phpunit.xml as described here - https://underground.works/clockwork/#docs-collected-data