Skip to content

Commit

Permalink
fix: fix error on install due to usage of use in factory closure (#283
Browse files Browse the repository at this point in the history
)

fixes an error on install with recent prestashop releases caused by the `psVersionFactory`

Fixes #281, Closes INT-695
  • Loading branch information
FreekVR authored Oct 23, 2024
1 parent c4dccd1 commit 1b4fdca
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ function bootPdk(
*/
function psVersionFactory(array $entries): FactoryDefinitionHelper
{
return factory(function () use ($entries) {
return factory(function (array $entries) {
$psVersion = PdkFacade::get('ps.version');
$fallback = Arr::first($entries, static function ($entry) {
return ! isset($entry['version']);
Expand All @@ -71,5 +71,5 @@ function psVersionFactory(array $entries): FactoryDefinitionHelper
}

return PdkFacade::get($fallback['class']);
});
})->parameter('entries', $entries);
}

0 comments on commit 1b4fdca

Please sign in to comment.