Closed blixit closed 6 years ago
Indeed, the signature contains Exception
for 6 years now, mind sending us a PR? :)
Indeed, the signature contains
Exception
for 6 years now, mind sending us a PR? :)
Of course. let me fork the project.
I'm wondering how could I check that changing interface Throwable by class \Exception won't break any other part of the code ?
We need to check some more classes - #484 added doctrine/coding-standard which requires using Throwable
instead of Exception
.
We need to check some more classes - #484 added doctrine/coding-standard which requires using
Throwable
instead ofException
.
Yes, that's my point. please let me know if I should send the PR.
Yes please! 👍
ok it's done. Here is the PR link https://github.com/doctrine/DoctrineMongoDBBundle/pull/489
Symfony\Component\HttpKernel\DataCollector\DataCollectorInterface interface changed (again) with the 5.0 version !
we have got :
Symfony 4.2
public function collect(Request $request, Response $response, \Exception $exception = null);
https://github.com/symfony/symfony/blob/4.2/src/Symfony/Component/HttpKernel/DataCollector/DataCollectorInterface.php
Symfony 4.3 and 4.4
public function collect(Request $request, Response $response/*, \Throwable $exception = null*/);
Symfony 5.0
public function collect(Request $request, Response $response, \Throwable $exception = null);
See https://github.com/doctrine/DoctrineMongoDBBundle/pull/604 - 4.1.0 with a fix will be out shortly.
I'm trying to use the DoctrineMongoDBBundle with symfony4. After the bundle installation,
composer require doctrine/mongodb-odm-bundle
I got this error:Compile Error: Declaration of
Doctrine\Bundle\MongoDBBundle\DataCollector\CommandDataCollector::collect(Symfony\Component\HttpFoundation\Request $request, Symfony\Component\HttpFoundation\Response $response, ?Throwable $exception = NULL)
must be compatible withSymfony\Component\HttpKernel\DataCollector\DataCollectorInterface::collect(Symfony\Component\HttpFoundation\Request $request, Symfony\Component\HttpFoundation\Response $response, ?Exception $exception = NULL)
This error can be fixed by changing Throwable by Exception.