-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[6.1] Variables from non natural environment #45523
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
base: 6.1-dev
Are you sure you want to change the base?
Conversation
Conflicts: composer.json composer.lock
|
I have tested this item ✅ successfully on ce36cf3 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/45523. |
|
tested using git branch - all worked fine BUT |
Co-authored-by: Richard Fath <richard67@users.noreply.github.com>
It is not critical for existing websites. Only for new and who decide to use to env. For this the documentation should be enough. I will do it later. @dautrich I think it something with Laragon, does CLI installation for latest Joomla! 6 nightly build works for you without this error? |
|
@Fedik I will try a CLI installation of the newest nightly build under Laragon today. |
|
@Fedik I get the same issue with a Nightly Build of 6.0. Therefore, the issue seems to be related to my Laragon environment. Unfortunately, I don't have on online test site at hand at the moment. |
|
@dautrich no problem, thank you for checking |
|
fyi my tests were with laragon 8 |
|
fyi I use Laragon 6 |
|
I have tested this item ✅ successfully on ce36cf3 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/45523. |
|
RTC This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/45523. |
|
@dautrich what changed to make it work? |
|
@brianteeman
|
|
Ok. Must have been a local config issue with your laragon 6 instance |
|
I've allowed myself to fix the conflict in the composer.lock file by updating the content hash with |
|
This pull request has been automatically rebased to 6.1-dev. |
|
@Fedik We would like to have this in 6.1. Can you please resolve the conflict? Thank you very much. |
HLeithner
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I talked to @SniperSister and we would like to request some changes:
- checking for an JOOMLA_ENVIRONMENT environment variable
- instead check that a .env file exists (always even if it's empty) to use $_ENV
- and .env file is not in JPATH_PUBLIC
This increases the security by using the public folder feature and allow to make people more aware of it.
Also it makes it "impossible" to extract any .env.* file per direct browser request
Another thing I would like to request is to follow the .env naming semantic used by symfony and mentioned by @voronkovich in this comment
and in this comment
would be great if you can update the pr so we can get it ready for 6.1
Conflicts: administrator/components/com_config/src/Model/ApplicationModel.php composer.lock
|
|


Pull Request for Issue #36898 .
Alternative to PR #45070 .
Summary of Changes
This is complete (I hope) implementation of environment variables in Joomla.
Key points:
.envin root folder to enable it (can be just an empty file).Testing Instructions
Test installation, test with Web and in CLI installer
.envwith DB options:And run installer. You should be asked for Site name, and User information.
Then installation should be completed, as usual.
.envwith all installation parameters and user information:And run installer. You will not be asked for Site name, and User information.
The installation should be completed, as usual.
Test the existing site
Create
.envwith DB options, and copy options from configuration.php.(skip this step if the site was installed with use of .env)
Then visit the site, all should work as before.
Link to documentations
Please select:
@Llewellynvdm please have a look if it will be good with Joomla Docker, thanks!