Skip to content

Commit

Permalink
BUGFIX: Fix deprecation warning with PHP 8
Browse files Browse the repository at this point in the history
This removes the warning

`PHP Deprecated:  Required parameter $response follows optional parameter $id in Application/Flowpack.ElasticSearch/Classes/Domain/Factory/DocumentFactory.php on line 40`
  • Loading branch information
jonnitto authored Apr 6, 2022
1 parent 04d3bbe commit 7c87d7a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Classes/Domain/Factory/DocumentFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class DocumentFactory
* @return Model\Document
* @throws DocumentPropertiesMismatchException
*/
public function createFromResponse(Model\AbstractType $type, $id = null, Response $response)
public function createFromResponse(Model\AbstractType $type, $id, Response $response)
{
$content = $response->getTreatedContent();

Expand Down

1 comment on commit 7c87d7a

@DrillSergeant
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jonnitto thanks for that fix. Currently we deactivated the deprecation-warnings in our local docker php-environments because of this. Would love to re-enable them. Looking forward for a release of this package.

Please sign in to comment.