Skip to content

Commit

Permalink
fix(install): fix error on install
Browse files Browse the repository at this point in the history
  • Loading branch information
EdieLemoine committed Mar 14, 2024
1 parent bbc4667 commit 2a65ae3
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions config/pdk.php
Original file line number Diff line number Diff line change
Expand Up @@ -154,19 +154,12 @@
* Miscellaneous
*/
ClientAdapterInterface::class => factory(function () {
$comparePsVersion = '1.8.0';
$currentPsVersion = constant('_PS_VERSION_');

if (version_compare($currentPsVersion, $comparePsVersion, '<')) {
return get(Guzzle5ClientAdapter::class);
}

return get(Guzzle7ClientAdapter::class);
return _PS_VERSION_ >= 8 ? Pdk::get(Guzzle7ClientAdapter::class) : Pdk::get(Guzzle5ClientAdapter::class);
}),

LoggerInterface::class => get(PsLogger::class),
MigrationServiceInterface::class => get(PsMigrationService::class),
ScriptServiceInterface::class => get(PsScriptService::class),
LoggerInterface::class => get(PsLogger::class),
MigrationServiceInterface::class => get(PsMigrationService::class),
ScriptServiceInterface::class => get(PsScriptService::class),

InstallerServiceInterface::class => factory(function () {
/** @var \MyParcelNL\PrestaShop\Pdk\Installer\Service\PsPreInstallService $preInstallService */
Expand Down

0 comments on commit 2a65ae3

Please sign in to comment.