Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(build): add PrestaShop nightly support #59

Merged
merged 4 commits into from
Feb 21, 2024

Conversation

jokesterfr
Copy link
Contributor

@jokesterfr jokesterfr commented Jan 11, 2024

Questions Answers
Description? Adds support to build PrestaShop with the latest nightly build
Type? new feature
BC breaks? no
Deprecations? no
Fixed ticket? Fixes #29
Sponsor company CloudSync team.
How to test? PS_VERSION=nightly ./build.sh

@jokesterfr jokesterfr self-assigned this Jan 11, 2024
@jokesterfr jokesterfr added the enhancement New feature or request label Jan 11, 2024
@jokesterfr
Copy link
Contributor Author

Stuck here for now: it seems the nightly zip does not embed exactly the same PrestaShop bundle. The installation is directly on error (see assets/hydrate.sh):

Error: Class "Symfony\Bundle\DebugBundle\DebugBundle" not found in /var/www/html/app/AppKernel.php:80
Stack trace:
#0 /var/www/html/vendor/symfony/http-kernel/Kernel.php(386): AppKernel->registerBundles()
#1 /var/www/html/vendor/symfony/http-kernel/Kernel.php(788): Symfony\Component\HttpKernel\Kernel->initializeBundles()
#2 /var/www/html/vendor/symfony/http-kernel/Kernel.php(128): Symfony\Component\HttpKernel\Kernel->preBoot()
#3 /var/www/html/app/AppKernel.php(102): Symfony\Component\HttpKernel\Kernel->boot()
#4 /var/www/html/install/controllers/console/process.php(367): AppKernel->boot()
#5 /var/www/html/install/controllers/console/process.php(146): InstallControllerConsoleProcess->initKernel()
#6 /var/www/html/install/classes/controllerConsole.php(139): InstallControllerConsoleProcess->process()
#7 /var/www/html/install/index_cli.php(57): InstallControllerConsole::execute(19, Array)
#8 {main}/var/www/html # 

Answer from matks:

The DebugBundle is a Symfony Bundle only included in dev and tests environment.
So when running Composer install to get PHP dependencies of prestashop, if you run composer install --no-dev it will NOT install the DebugBundle
If you run composer install or composer install --dev you will get the DebugBundle
My guess is that you ran composer install --no-dev BUT your docker image is trying to run PrestaShop in dev/test environment so it looks for DebugBundle and does not find it

@jokesterfr
Copy link
Contributor Author

Related to this issue: PrestaShop/PrestaShop#35179

@matks
Copy link

matks commented Feb 6, 2024

Today I have downloaded latest nightly ZIPs from https://nightly.prestashop-project.org/

The 8.1.4 ZIP contains DebugBundle
The 9.0.0 ZIP does not contain it

So the error is logical.

@matks
Copy link

matks commented Feb 6, 2024

@jolelievre found the explanation

Following commit https://github.com/PrestaShop/PrestaShop/blob/8f9df9b762f9210506856f6684f19f16f2682371/composer.json#L201 the DebugBundle dependency was moved from PROD Composer dependencies to DEV Composer dependencies. So DebugBundle was not included in the develop nightly ZIP.

PR PrestaShop/PrestaShop#35274 will move the DebugBundle dependency back into PROD dependencies because developers can choose to use the Debug Mode and Debug Tools in production shops.

@jolelievre
Copy link

@jokesterfr the fix was merged, so it should be available in the next nightly build tomorrow, hoping this was the only issue, feel free to warn us if there's other bug poping up

@jokesterfr
Copy link
Contributor Author

Thanks a lot guys! Will give this PR a spin tomorrow ;)

@jokesterfr jokesterfr marked this pull request as ready for review February 7, 2024 06:32
@jokesterfr
Copy link
Contributor Author

Unfortunately there is a new issue this morning:

#29 7.412 Twig\Error\LoaderError: The "/var/www/html/admin-dev/themes/new-theme" directory does not exist ("/var/www/html/admin-dev/themes/new-theme"). in /var/www/html/vendor/twig/twig/src/Loader/FilesystemLoader.php:92

@jolelievre

@matks
Copy link

matks commented Feb 7, 2024

Unfortunately there is a new issue this morning:

#29 7.412 Twig\Error\LoaderError: The "/var/www/html/admin-dev/themes/new-theme" directory does not exist ("/var/www/html/admin-dev/themes/new-theme"). in /var/www/html/vendor/twig/twig/src/Loader/FilesystemLoader.php:92

If I check the ZIP I downloaded yesterday, the correct path would be /var/www/html/admin/themes/new-theme : one folder is admin not admin-dev

Possibly this parameter here https://github.com/PrestaShop/PrestaShop/blob/develop/app/config/config.yml#L102

@jolelievre
Copy link

Hmm, so it could be related to the admin folder that is renamed after installation maybe? 🤔

@jokesterfr
Copy link
Contributor Author

@jolelievre do you mean I have to change the default admin directory from admin-dev to admin? Or should I expect a fix in the next nightly zip?

@Progi1984
Copy link
Member

May be link to this issue : PrestaShop/PrestaShop#35354

@jokesterfr
Copy link
Contributor Author

Should be fixed by PrestaShop/PrestaShop#35417

@jokesterfr jokesterfr added the ready to review Looking for a pair review label Feb 21, 2024
@jokesterfr jokesterfr requested a review from Venatum February 21, 2024 08:37
@jokesterfr jokesterfr merged commit c5ec691 into main Feb 21, 2024
11 checks passed
@jokesterfr jokesterfr deleted the feat/29-add-nightly-support branch February 21, 2024 09:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request ready to review Looking for a pair review
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

PrestaShop nightly image unavailable
5 participants