fix(cakephp): do not override APP_DEFAULT_LOCALE#7653
Merged
Conversation
|
Download the artifacts for this pull request:
See Testing a PR. |
stasadev
approved these changes
Sep 25, 2025
Member
stasadev
left a comment
There was a problem hiding this comment.
I tested it with CakePHP 5, looks good to me.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Issue
Today, I cloned an internal CakePHP4 project.
It appeared to work but some translation strings were not displaying correctly.
DDEV generated a
config/.envbased onconfig/.env.example.DDEV (correctly) overrode
DATABASE_URL&EMAIL_TRANSPORT_DEFAULT_URLto point to itself.However, it overrides
APP_DEFAULT_LOCALEtoen_USwhich resulted in CakePHP looking for English translation instead of using the Japanese.Since DDEV does NOT override
APP_DEFAULT_TIMEZONE, this feels like unexpected.How This PR Solves The Issue
The PR does not explicitly set
APP_DEFAULT_LOCALE, thus falling back toconfig/.env.examplesettings.Tested on CakePHP4 & CakePHP5
Manual Testing Instructions
config/.envconfig/.envconfig/.env.examplewhich might normally be configured in a existing project.config/.envconfig/.envcontains expected values set above.Automated Testing Overview
Release/Deployment Notes