Closed Axxon closed 4 years ago
I tried this morning to install swarrotBundle (composer require swarrot/swarrot-bundle), and : (i use PHP7.3)
Using version ^1.7 for swarrot/swarrot-bundle ./composer.json has been updated Loading composer repositories with package information Updating dependencies (including require-dev) Restricting packages listed in "symfony/symfony" to "5.0.*" Nothing to install or update Generating autoload files Executing script cache:clear [KO] [KO] Script cache:clear returned with error code 255 !! !! Fatal error: Declaration of Swarrot\SwarrotBundle\DataCollector\SwarrotDataCollector::collect(Symfony\Component\HttpFoundation\Request $request, Symfony\Component\HttpFoundation\Response $response, ?Exception $exception = NULL) must be compatible with Symfony\Component\HttpKernel\DataCollector\DataCollectorInterface::collect(Symfony\Component\HttpFoundation\Request $request, Symfony\Component\HttpFoundation\Response $response, ?Throwable $exception = NULL) in /srv/vendor/swarrot/swarrot-bundle/DataCollector/SwarrotDataCollector.php on line 65 !! Symfony\Component\ErrorHandler\Error\FatalError {#5745 !! -error: array:4 [ !! "type" => 64 !! "message" => "Declaration of Swarrot\SwarrotBundle\DataCollector\SwarrotDataCollector::collect(Symfony\Component\HttpFoundation\Request $request, Symfony\Component\HttpFoundation\Response $response, ?Exception $exception = NULL) must be compatible with Symfony\Component\HttpKernel\DataCollector\DataCollectorInterface::collect(Symfony\Component\HttpFoundation\Request $request, Symfony\Component\HttpFoundation\Response $response, ?Throwable $exception = NULL)" !! "file" => "/srv/vendor/swarrot/swarrot-bundle/DataCollector/SwarrotDataCollector.php" !! "line" => 65 !! ] !! #message: "Compile Error: Declaration of Swarrot\SwarrotBundle\DataCollector\SwarrotDataCollector::collect(Symfony\Component\HttpFoundation\Request $request, Symfony\Component\HttpFoundation\Response $response, ?Exception $exception = NULL) must be compatible with Symfony\Component\HttpKernel\DataCollector\DataCollectorInterface::collect(Symfony\Component\HttpFoundation\Request $request, Symfony\Component\HttpFoundation\Response $response, ?Throwable $exception = NULL)" !! #code: 0 !! #file: "./vendor/swarrot/swarrot-bundle/DataCollector/SwarrotDataCollector.php" !! #line: 65 !! } !! Script @auto-scripts was called via post-update-cmd Installation failed, reverting ./composer.json to its original content.
In Symfony\Component\HttpKernel\DataCollector\DataCollectorInterface:
Symfony\Component\HttpKernel\DataCollector\DataCollectorInterface
public function collect(Request $request, Response $response, \Throwable $exception = null);
In Swarrot\SwarrotBundle\DataCollector\SwarrotDataCollector:
Swarrot\SwarrotBundle\DataCollector\SwarrotDataCollector
public function collect(Request $request, Response $response, \Exception $exception = null)
Yes, class Exception implements Throwable, but usage of interface inheritance in the context of method signature is not allowed (no?).
class Exception implements Throwable
It's appear when i install sf recipe.
It's seems to work without..
Hi @Axxon!
This issue have been fixed by #169 I just released v1.7.1 with this fix. :)
Perfect! Have a nice day :)
I tried this morning to install swarrotBundle (composer require swarrot/swarrot-bundle), and : (i use PHP7.3)
In
Symfony\Component\HttpKernel\DataCollector\DataCollectorInterface
:In
Swarrot\SwarrotBundle\DataCollector\SwarrotDataCollector
:Yes,
class Exception implements Throwable
, but usage of interface inheritance in the context of method signature is not allowed (no?).It's appear when i install sf recipe.
It's seems to work without..