Skip to content

Commit

Permalink
bug #11778 Fixed compatibility with newer version of data collectors …
Browse files Browse the repository at this point in the history
…(stloyd)

This PR was merged into the 1.8 branch.

Discussion
----------

| Q               | A
| --------------- | -----
| Branch?         | 1.8
| Bug fix?        | yes
| New feature?    | no
| BC breaks?      | no
| Deprecations?   | no
| Related tickets | related #10928 
| License         | MIT

Error without this change:
```bash
HP Fatal error:  Declaration of Sylius\Bundle\ChannelBundle\Collector\ChannelCollector::collect(Symfony\Component\HttpFoundation\Request $request, Symfony\Component\HttpFoundation\Response $response, ?Exception $exception = NULL): void must be compatible with Symfony\Component\HttpKernel\DataCollector\DataCollectorInterface::collect(Symfony\Component\HttpFoundation\Request $request, Symfony\Component\HttpFoundation\Response $response, ?Throwable $exception = NULL) in /var/www/dimedic-reports/current/vendor/sylius/sylius/src/Sylius/Bundle/ChannelBundle/Collector/ChannelCollector.php on line 61
```

<!--
 - Bug fixes must be submitted against the 1.7 branch (the lowest possible)
 - Features and deprecations must be submitted against the master branch
 - Make sure that the correct base branch is set

 To be sure you are not breaking any Backward Compatibilities, check the documentation:
 https://docs.sylius.com/en/latest/book/organization/backward-compatibility-promise.html
-->


Commits
-------

b413575890a2ec1f11b5747b1a5795028e4daf03 Fixed compatibility with newer version of data collectors
  • Loading branch information
lchrusciel authored Sep 15, 2020
2 parents a944fce + 2f34c91 commit fda21f9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion DataCollector/TemplateBlockDataCollector.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public function __construct(TemplateBlockRenderingHistory $templateBlockRenderin
$this->reset();
}

public function collect(Request $request, Response $response): void
public function collect(Request $request, Response $response, \Throwable $exception = null): void
{
$this->data['renderedEvents'] = $this->templateBlockRenderingHistory->getRenderedEvents();
}
Expand Down

0 comments on commit fda21f9

Please sign in to comment.