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

Doctrine 3+ support #720

Closed itsgoingd closed 4 weeks ago

itsgoingd commented 4 weeks ago

Using the configure helper to register the middleware:

$clockwork->addDataSource($dataSource = new \Clockwork\DataSource\DoctrineDataSource);

$config = ORMSetup::createAttributeMetadataConfiguration(paths: [__DIR__], isDevMode: true);
$config = $dataSource->configure($config);

Manually adding the middleware:

$clockwork->addDataSource($dataSource = new \Clockwork\DataSource\DoctrineDataSource);

$config = ORMSetup::createAttributeMetadataConfiguration(paths: [__DIR__], isDevMode: true)
    ->setMiddlewares([ $dataSource->middleware() ]);