PrestaShop / prestashop-flashlight

A docker based testing utility for PrestaShop
MIT License
24 stars 10 forks source link

PrestaShop 1.6 does not support the console: no module auto-install can be performed yet #22

Closed jokesterfr closed 1 month ago

jokesterfr commented 10 months ago

The PrestaShop console has been introduced by branch 1.7, but it is really handy when it comes to installing modules in many use cases.

PrestaShop Flashlight does not intend to backport features, nor fix security issues to any PrestaShop version in the nature. However for compatibility testing, extending this capability is likely to match CI/CD users eager at extending support of their modules to the maximum audience possible.

I suggest to copy, repack, and commit a light version of the console within the 1.6 Docker images of PrestaShop Flashlight. This can be done through the editing of the assets/patch.sh file, and removing the check made in ./assets/run.sh:

echo "Auto-installing modules with PrestaShop v1.6 is not yet supported";

I guess it is a very good "first issue" to take for anyone wanting to give a hand on this project. Thank you for your support!

nenes25 commented 10 months ago

Hello @jokesterfr ,

In order to install module through CLI for prestashop 1.6 you can use the console tool i have done. Just download the latest phar file and then you can call the command :

php prestashopConsole.phar module:install modulename

You can read more about this project here : https://github.com/nenes25/prestashop_console

Feel free to ask if you need more information or if you want me to do a PR for its implementation, Regards,

jokesterfr commented 9 months ago

This is awesome @nenes25, I will check this out!

jokesterfr commented 3 months ago

Another hint by @kpodemski, would be creating a file with:

<?php
require_once dirname(__FILE__) . '/config/config.inc.php';
Module::getInstanceByName('ps_accounts')->install();