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

Allow autoloading in modules for services use in BO #8909

Merged
merged 1 commit into from Apr 13, 2018

Conversation

Projects
None yet
5 participants
@mickaelandrieu
Contributor

mickaelandrieu commented Apr 2, 2018

Questions Answers
Branch? develop
Description? If you declare services in modules and if your module is using Composer as autoloader, the service container breaks during compilation because PrestaShop is unaware of classes inside the module (the module may not be instantiated when the service container is built).
Type? bug fix
Category? BO
BC breaks? no
Deprecations? no
How to test? Declare a service in one of your modules and try to access a "modern" Back Office page.

Important guidelines


This change is Reviewable

@@ -67,9 +67,16 @@ public function registerBundles()
* @see https://symfony.com/doc/2.8/configuration/external_parameters.html#environment-variables
*/
if (extension_loaded('apc')) {
$_SERVER['CACHE_DRIVER'] = 'apc';
$_SERVER['CACHE__DRIVER'] = 'apc';

This comment has been minimized.

@jocel1

jocel1 Apr 2, 2018

Contributor

You'll need to change the %env(CACHE_DRIVER)% in the config_prod.yml as well

This comment has been minimized.

@mickaelandrieu

mickaelandrieu Apr 2, 2018

Contributor

true, but isn't already the case?

edit: ok i got it I've done a typo :)

I've reverted this typo, thanks

@Quetzacoalt91

This comment has been minimized.

Member

Quetzacoalt91 commented Apr 4, 2018

Do you have a module example to provide to the QA team?

@mickaelandrieu

This comment has been minimized.

Contributor

mickaelandrieu commented Apr 6, 2018

Sure => ps_test.zip

@mickaelandrieu

This comment has been minimized.

Contributor

mickaelandrieu commented Apr 12, 2018

@Quetzacoalt91 do I need to do something here, or is it mergeable? :)

@Quetzacoalt91 Quetzacoalt91 merged commit 6657c06 into PrestaShop:develop Apr 13, 2018

2 checks passed

Codacy/PR Quality Review Good work! A positive pull request.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@mickaelandrieu mickaelandrieu deleted the mickaelandrieu:allow-autoloading-in-modules branch Apr 13, 2018

@eternoendless eternoendless added this to the 1.7.4.0 milestone Apr 13, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment