-
Notifications
You must be signed in to change notification settings - Fork 17
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
Refactor: Change docroot to public to align with Symfony's best practice structure #101
base: 6.x
Are you sure you want to change the base?
Conversation
cc @mautic/education-team-leaders for when you've made the 6.x branch - let us know :) |
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 see no issues from the code change perspecitve. Will this work for people upgrading from Mautic 5?
I guess we would have to do some magic in the upgrade process to move/rename the folder, and/or make it very clear about it being a breaking change? I don't know why it was called docroot in the first place, but I suspect it's because the whole composer process took a lot of inspiration from Drupal's implementation, which I believe uses docroot. |
I don’t see any reason why it wouldn’t work for users upgrading from Mautic 5. Users upgrading from Mautic 5 have two choices:
When a user upgrading from Mautic 5 replaces the entire composer.json file with the newer version, the web root will change from |
I could add a Composer script that updates the web root from |
That would be helpful. Is the docroot present also in |
Config parameters containing <?php
$parameters = array(
// ...
'upload_dir' => '/var/www/vhosts/test.example.com/docroot/media/files',
// ...
'form_upload_dir' => '/var/www/vhosts/test.example.com/docroot/media/files/form',
// ...
'contact_export_dir' => '/var/www/vhosts/test.example.com/docroot/media/files/temp',
// ...
'report_temp_dir' => '/var/www/vhosts/test.example.com/docroot/media/files/temp',
// ...
); |
c827946
to
3155248
Compare
composer script for migrating web root Update README.md
README.md
Outdated
|
||
This project supports PHP 7.4 as minimum version, however it's possible that a `composer update` will upgrade some package that will then require PHP 7+ or 8+. | ||
This project supports PHP 8.1 as minimum version, however it's possible that a `composer update` will upgrade some package that will then require PHP 7+ or 8+. |
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.
When in it, can we also drop the mention of PHP 7?
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.
Yes, it makes sense to drop it. Done.
This PR updates the project structure to align with Symfony's best practices by renaming the
docroot
directory topublic
. This change ensures consistency with Symfony's default directory structure, as outlined in the Symfony Best Practices documentation.Fixes #6
Changes
composer.json
to referencepublic
instead ofdocroot
.README.md
to replace all references todocroot
withpublic
.A PR needs to be created in the
mautic/user-documentation
repository to update the Composer installation steps related to the web root for the 6.x version.