-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Add an option for setup:config:set to define the document root #29176
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
Conversation
Hi @AntonEvers. Thank you for your contribution
❗ Automated tests can be triggered manually with an appropriate comment:
You can find more information about the builds here ℹ️ Please run only needed test builds instead of all when developing. Please run all test builds before sending your PR for review. For more details, please, review the Magento Contributor Guide documentation. 🕙 You can find the schedule on the Magento Community Calendar page. 📞 The triage of Pull Requests happens in the queue order. If you want to speed up the delivery of your contribution, please join the Community Contributions Triage session to discuss the appropriate ticket. 🎥 You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel ✏️ Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel |
@magento run all tests |
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.
@AntonEvers good idea!
Could you cover this new command with any kind of test? I think unit will be ok there.
Based on the description i have few questions:
- What if we'll run just
bin/magento setup:config:set --document-root-is-pub
? Will it set to "true" or it will ask for setting true / false? - What if we'll run just
bin/magento setup:config:set --document-root-is-pub true
? Will it set to "true"? - What if we'll run
bin/magento setup:config:set --document-root-is-pub false
? Will it set it as "false"?
Would be nice to have more clear description for the command option
Hi @ihor-sviziev 'directories' => [
'document_root_is_pub' => true
] I will add some unit testing. Please let me know if the command should behave more like |
I changed the command to a boolean select option.
It accepts inputs: yes, no, 1, 0, true, false. |
Now I have set the default value to false, so that the key is always present in env.php. This should make developers more aware of the fact that this option exists. |
From first look - looks good! |
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.
Hi @AntonEvers ,
Could you fix static tests? Everything else looks good
@magento run Static Tests |
@magento run all tests |
setup/src/Magento/Setup/Model/ConfigOptionsList/Directories.php
Outdated
Show resolved
Hide resolved
setup/src/Magento/Setup/Model/ConfigOptionsList/Directories.php
Outdated
Show resolved
Hide resolved
setup/src/Magento/Setup/Model/ConfigOptionsList/Directories.php
Outdated
Show resolved
Hide resolved
setup/src/Magento/Setup/Test/Unit/Model/ConfigOptionsList/DirectoriesTest.php
Outdated
Show resolved
Hide resolved
setup/src/Magento/Setup/Test/Unit/Model/ConfigOptionsList/DirectoriesTest.php
Outdated
Show resolved
Hide resolved
setup/src/Magento/Setup/Test/Unit/Model/ConfigOptionsList/DirectoriesTest.php
Outdated
Show resolved
Hide resolved
setup/src/Magento/Setup/Test/Unit/Model/ConfigOptionsList/DirectoriesTest.php
Outdated
Show resolved
Hide resolved
Looks like that’s last part of requests changes, sorry for not requesting them earlier. |
No problem at all @ihor-sviziev! |
@magento run all tests |
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.
✔ Approved.
Failing tests looks not related to changes form this PR.
Hi @ihor-sviziev, thank you for the review. |
@magento run all tests |
@magento run all tests |
@magento run all tests |
@gabrieldagama @sidolov is there any reasons why this PR isn't getting merged? |
@ihor-sviziev We are having some issues with its tests that are being looked at internally. Just for reference, the internal ticket is https://jira.corp.magento.com/browse/MTS-1593 |
Hi @AntonEvers, Due to this change I think we could close this PR as not relevant anymore. |
Hi @AntonEvers, thank you for your contribution! |
@ihor-sviziev: nice find! But I really don't understand how they can make such a major change in a minor release? This change will probably be scheduled for Magento 2.4.2, even though it should be for 2.5.0. This might break a lot of installations. I'm not saying it's a bad thing, it should have happened much earlier, but big changes like these really shouldn't be done in a minor release. (sorry to interrupt here in this PR) |
@sivaschenko @sidolov could you provide more info why this commit was merged to 2.4-develop as it's introducing backward incompatible changes? 640cad5#diff-2323d6157444b3cf24d4d76635f27185a4e6ad979b0ec2af53e6592d3ca465d5R13 |
@hostep we updated Apache config to use pub directory. Since Apache reads configs on-fly, we didn't notice any issue having it updated. This solves a few issues:
Without this change, we saw a lot of issues while adding RemoteStorage functionality and saw possible issues for developers who work with FS API. Could you provide any possible risks which we might miss? |
@shiftedreality: I understand why this is a good improvement, it really is, I and many others have been wanting it even 2 years before Magento 2.0.0 was launched. But where I'm seeing problems is that certain users now will be surprised when they perform a minor update and notice they have to change their document root and somehow can't. I'm pretty sure that there are (cheap) hosting companies around which don't allow you to change the document root and make it very difficult to host magento from inside the |
@hostep my understanding is those Customers have an Apache which reads |
The |
It exists. Just serves from |
Aaaaaah ok, the github interface tricked me, I assumed it was removed when I saw all those red blocks 😄 |
Sure, thank you for paying so much attention and passion for Magento! |
@shiftedreality thx for good explanation! |
Description (*)
Add
bin/magento setup:config:set --document-root-is-pub
I think this is needed in order to raise awareness for https://devdocs.magento.com/guides/v2.3/install-gde/tutorials/change-docroot-to-pub.html section 3, and to simplify automating this setting in deployment scripts.
Related Pull Requests
Fixed Issues (if relevant)
Manual testing scenarios (*)
Questions or comments
Contribution checklist (*)
Resolved issues: