Skip to content

Commit

Permalink
Fix signature of HandleErrors middleware
Browse files Browse the repository at this point in the history
In Laravel 5.8, the `Container::tagged()` method was changed to return
an iterator [1].

We only use the result for iteration, or, in this case, to pass a bunch
of "reporters" to the error handler middleware, therefore we need to
accept an iterable here.

[1]: https://laravel.com/docs/5.8/upgrade#container-generators
  • Loading branch information
franzliedke committed May 8, 2020
1 parent 484933d commit 220c8c6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Http/Middleware/HandleErrors.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class HandleErrors implements Middleware
*/
protected $reporters;

public function __construct(Registry $registry, HttpFormatter $formatter, array $reporters)
public function __construct(Registry $registry, HttpFormatter $formatter, iterable $reporters)
{
$this->registry = $registry;
$this->formatter = $formatter;
Expand Down

0 comments on commit 220c8c6

Please sign in to comment.