Skip to content

Commit

Permalink
Rename dependencies config file
Browse files Browse the repository at this point in the history
  • Loading branch information
sowbiba committed Oct 27, 2023
1 parent 95468d3 commit 02eae86
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 5 deletions.
8 changes: 8 additions & 0 deletions phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,13 @@ parameters:
reportUnmatchedIgnoredErrors: false
ignoreErrors:
- '#Method PrestaShop\\PrestaShop\\Core\\Addon\\Module\\ModuleManager::install\(\) invoked with 2 parameters, 1 required.#'
- '#Call to function is_null\(\) with PrestaShop\\PrestaShop\\Core\\Addon\\Module\\ModuleManager will always evaluate to false.#'
- '#Call to function is_null\(\) with PrestaShop\\PrestaShop\\Core\\Module\\ModuleManager will always evaluate to false.#'
- '#Property Prestashop\\ModuleLibMboInstaller\\Installer::\$moduleManager has unknown class PrestaShop\\PrestaShop\\Core\\Addon\\Module\\ModuleManager as its type.#'
- '#Property Prestashop\\ModuleLibMboInstaller\\Installer::\$moduleManager has unknown class PrestaShop\\PrestaShop\\Core\\Module\\ModuleManager as its type.#'
- '#Call to method install\(\) on an unknown class PrestaShop\\PrestaShop\\Core\\Addon\\Module\\ModuleManager.#'
- '#Call to method install\(\) on an unknown class PrestaShop\\PrestaShop\\Core\\Module\\ModuleManager.#'
- '#Call to method enable\(\) on an unknown class PrestaShop\\PrestaShop\\Core\\Addon\\Module\\ModuleManager.#'
- '#Call to method enable\(\) on an unknown class PrestaShop\\PrestaShop\\Core\\Module\\ModuleManager.#'

level: max
3 changes: 3 additions & 0 deletions phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
convertWarningsToExceptions="true"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"
>
<php>
<ini name="memory_limit" value="-1"/>
</php>
<testsuites>
<testsuite name="Integration">
<directory suffix="Test.php">tests/Integration</directory>
Expand Down
4 changes: 1 addition & 3 deletions src/DependencyBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

class DependencyBuilder
{
const DEPENDENCY_FILENAME = 'ps_dependencies.json';
const DEPENDENCY_FILENAME = 'module_dependencies.json';
const GET_PARAMETER = 'mbo_action_needed';

/**
Expand Down Expand Up @@ -155,7 +155,6 @@ protected function buildDependenciesContext()
if ($this->isMboNeeded() && !isset($dependenciesContent['dependencies'][Installer::MODULE_NAME])) {
$dependenciesContent['dependencies'][] = [
'name' => Installer::MODULE_NAME,
'id' => Installer::MODULE_ID,
];
}

Expand Down Expand Up @@ -240,7 +239,6 @@ protected function addMboInDependencies()
'current_version' => (string) $mboStatus['version'],
'installed' => (bool) $mboStatus['isInstalled'],
'enabled' => false,
'id' => Installer::MODULE_ID,
'name' => Installer::MODULE_NAME,
], $mboRoutes);
}
Expand Down
3 changes: 1 addition & 2 deletions src/Installer.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
use Prestashop\ModuleLibGuzzleAdapter\ClientFactory;
use Prestashop\ModuleLibGuzzleAdapter\Interfaces\ClientExceptionInterface;
use Prestashop\ModuleLibGuzzleAdapter\Interfaces\HttpClientInterface;
use PrestaShop\PrestaShop\Core\Addon\AddonManagerInterface;
use PrestaShop\PrestaShop\Core\Addon\Module\ModuleManagerBuilder;

class Installer
Expand All @@ -21,7 +20,7 @@ class Installer
protected $marketplaceClient;

/**
* @var AddonManagerInterface
* @var \PrestaShop\PrestaShop\Core\Module\ModuleManager|\PrestaShop\PrestaShop\Core\Addon\Module\ModuleManager
*/
protected $moduleManager;

Expand Down

0 comments on commit 02eae86

Please sign in to comment.