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

Fix Context::getTranslator() cache #8380

Merged
merged 1 commit into from Oct 2, 2017

Conversation

Projects
None yet
4 participants
@rGaillard
Member

rGaillard commented Sep 29, 2017

Questions Answers
Branch? 1.7.2.x
Description? In the Context::getTranslator() method, the current translator is cached even if there is no translation file available. This leads to several problems like the translations of the fixtures with a CLI install.
Type? bug fix
Category? CO
BC breaks? no
Deprecations? no
How to test? try to install PrestaShop in CLI in a language different of english, fixtures are now translated

This change is Reviewable

@eternoendless

This comment has been minimized.

Show comment
Hide comment
@eternoendless

eternoendless Sep 29, 2017

Member

:lgtm:


Reviewed 1 of 1 files at r1.
Review status: all files reviewed at latest revision, all discussions resolved.


Comments from Reviewable

Member

eternoendless commented Sep 29, 2017

:lgtm:


Reviewed 1 of 1 files at r1.
Review status: all files reviewed at latest revision, all discussions resolved.


Comments from Reviewable

@codacy-bot

This comment has been minimized.

Show comment
Hide comment
@codacy-bot

codacy-bot Sep 29, 2017

Codacy Here is an overview of what got changed by this pull request:

Complexity increasing per file
==============================
- classes/Context.php  2
         

See the complete overview on Codacy

codacy-bot commented Sep 29, 2017

Codacy Here is an overview of what got changed by this pull request:

Complexity increasing per file
==============================
- classes/Context.php  2
         

See the complete overview on Codacy

@eternoendless

This comment has been minimized.

Show comment
Hide comment
@eternoendless

eternoendless Sep 29, 2017

Member

@Quetzacoalt91 what do you think?

Member

eternoendless commented Sep 29, 2017

@Quetzacoalt91 what do you think?

@eternoendless eternoendless changed the title from CO: fix Context::getTranslator() cache to Fix Context::getTranslator() cache Sep 29, 2017

->depth('==0')
->name('*.'.$this->language->locale.'.*');
(new Filesystem())->remove($cache_file);
if (is_dir($cacheDir)) {

This comment has been minimized.

@Quetzacoalt91

Quetzacoalt91 Sep 29, 2017

Member

Is there a case where this folder does not exist?

@Quetzacoalt91

Quetzacoalt91 Sep 29, 2017

Member

Is there a case where this folder does not exist?

This comment has been minimized.

@rGaillard

rGaillard Sep 29, 2017

Member

When you are clearing your cache.

@rGaillard

rGaillard Sep 29, 2017

Member

When you are clearing your cache.

@Quetzacoalt91 Quetzacoalt91 added this to the 1.7.2.3 milestone Oct 2, 2017

@Quetzacoalt91 Quetzacoalt91 merged commit a960a13 into PrestaShop:1.7.2.x Oct 2, 2017

2 checks passed

codacy/pr Good work! A positive pull request.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment