-
-
Notifications
You must be signed in to change notification settings - Fork 436
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
Introduced pub/ structure for webserver home folder mapping #1210
Conversation
Ahh, I've always wished the repo root was not the web root. That's a clever way to avoid renaming every file in the repo. I like it! 👍 |
Questions:
|
|
this PR is tricky nowadays, htaccess and index.php are very different and we've to rebase it to main or next branch :-\ |
30a0c74
to
e90ff37
Compare
I think this PR can be closed. Moving some directories does not bring any improvement, on the contrary, it complicates a structure that has been working for more than 15 years. In addition, there are files that will create a conflict with what already exists in the repository. |
I think this PR has it's merits. Every other web project I've ever seen has a separate pub directory so that every project file is not in the root. M2, Laravel, Rails, etc.. I've never seen another one that relies on You know what happens if you are migrating files from one directory to another and you forget to copy or delete a .htaccess file? Boom, your files are wide open! Ask me how I know.. :( Also every time someone adds a new file to the repo it is a risk that it isn't protected.. Example: https://demo.openmage.org/LICENSE.html I would actually be in favor of moving index.php into pub for the next major version and making this mandatory. It's worth the effort to reorganize the code to expose only what you want, but probably very few do. In my opinion the project should set an example for a good deployment, not encourage bad practice. Yes, I know, kinda late to be tackling this now... :D |
…mage environment to use pub/default directory.
…den in pub/*/index.php file.
b060eb3
to
8515b6f
Compare
@colinmollenhour - The argument you offered is enough to find PR utility, but I have never encountered the mentioned problems and I hope this never happens. PR still needs polish and documentation. It was proposed in main branch. |
Please provide specifics regarding polish. Where do you propose this should be documented?
As implemented currently this actually doesn't break BC in any way so I think this could be added to "main". If there is support for breaking BC on purpose then it should definitely be in "next" but I think that will be too controversial.. I see @fballiano just merged while I was typing. 😄 I'm happy to add docs for this, just let me know where. It can be improved upon if any issues are found but I currently do not know of any issues with it. |
when my question was answered I was ok with that, we can add docs in any moment ;-) |
and i was also sure it's not BC |
@fballiano you can pro provide a post script that inspects the copy strategy and fixes symlinks if those fail to be copied and need to be recreated |
Shouldn't we include steps how to use this feature in OM? Also, is there any solution when OM is used together with composer as @fballiano reported above? |
Since the "pub" folder is totally incompatible with composer installation, which is for use the best way to install/upgrade/manage OpenMage, I'm not even sure this folder should be in our repo, because it's simply broken now (with composer) |
Shall we revert this PR? |
This PR has some other things not really related to the "pub/" structure so I'd not revert but I'd evaluate the removal of just the pub/ folder, converting it to a documentation on how to create it... |
Perhaps the composer modules which deploy the Magento repo could be fixed to support copying the symlinks? Which one did you use, @fballiano ? |
@colinmollenhour I use "aydin-hassan/magento-core-composer-installer", both for php7 and php8 (depending on the project) |
I think we could just introduce an exclude for the pub directoy
the feature is still good and it's good to have it in the vendor, but deploying it is not very usefull cause it will have to be customized anyway (per website) so if we don't deploy it at all we've no problem. |
perhaps the |
Ref magento-lts/errors/processor.php Lines 113 to 116 in 611bbe7
Line 113 For anyone who is wondering why the error page is rendering the default skin and not the expected skin, remove the following lines: magento-lts/pub/default/index.php Lines 20 to 23 in 611bbe7
in your |
@kiatng is this still valid https://github.com/OpenMage/magento-lts/blob/main/docs/ERROR_PAGE.md ? |
|
introducing pub/{n}_website folder structure to serve public assets while hiding away magento_root from public areas.
Description (*)
Fixed Issues (if relevant)
Manual testing scenarios (*)
Questions or comments
Contribution checklist (*)