Skip to content

Commit

Permalink
✨ Adding DependencyBuilder (#5)
Browse files Browse the repository at this point in the history
* ✨ Adding DependencyBuilder

In order to correctly build the dependencies variable to instanciate the CDC, add an helper to ease the work of module devs.

* ✨ Adding locale in context of DependencyBuilder.php

* ✨ Adding routes to be called in context

* ✨ Handle the MBO module installation.

Set up new context variable to interact with the CDC.
Install or enable the MBO module if needed.

* ✨ Only add MBO if needed in PS

* ✨ Make the mbo installation through ajax process

* ✨ Adding id to the dependencies_file tpl

* Avoid using deprecated methods

* Rename dependencies config file

* Add method to check if dependencies are met

* Fix for module activation check

---------

Co-authored-by: Ibrahima SOW <[email protected]>
  • Loading branch information
intraordinaire and sowbiba authored Dec 5, 2023
1 parent 866cadc commit 97ff9a2
Show file tree
Hide file tree
Showing 6 changed files with 439 additions and 8 deletions.
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"license": "AFL-3.0",
"require": {
"php": ">=5.6",
"prestashop/module-lib-guzzle-adapter": "^0.6"
"prestashop/module-lib-guzzle-adapter": "^0.6",
"ext-json": "*"
},
"config": {
"platform": {
Expand Down
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
Loading

0 comments on commit 97ff9a2

Please sign in to comment.