itsgoingd / clockwork

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

Incompatible clockwork version 5.2 with doctrine/dbal version 4.0 , 4.1 , 4.2 #721

Closed binahayat00 closed 2 weeks ago

binahayat00 commented 3 weeks ago

Hello, When I want to use: addDataSource(new DoctrineDataSource($entityManager)) I got this Error: "Doctrine\DBAL\Logging\SQLLogger" not found I checked your DBALDataSource class and you use Doctrine\DBAL\Logging\SQLLogger and use Doctrine\DBAL\Logging\LoggerChain which are deprecated in doctrine/dbal.

This is the full code:

Clockwork::class => function(EntityManager $entityManager) {
        $clockwork = new Clockwork();

        new DoctrineDataSource($entityManager);

        $clockwork->storage(new FileStorage(STORAGE_PATH . '/clockwork'));
        $clockwork->addDataSource(new DoctrineDataSource($entityManager));

        return $clockwork;
    }

Best Regards

itsgoingd commented 3 weeks ago

Hey, I've recently added support for Doctrine 3+ in master, check out the instructions in the PR https://github.com/itsgoingd/clockwork/pull/720.