Update craftcms
project type defaults
#4907
Merged
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 Craft team is gradually shifting its priority to MySQL support over MariaDB, and would prefer this as the default.
This PR also changes the default PHP version to 8.1. New projects/config can still choose their database driver and PHP version via the
--database
and--php-version
flags, if the user desires.The Issue
MariaDB has slowly drifted away from being a drop-in replacement for MySQL, and this has resulted in some frustration from our community, as well as an increased support burden.
How This PR Solves The Issue
We implemented a new
craftCmsConfigOverrideAction
function that sets thePHPVersion
andDatabase
properties for the currentDdevApp
, using predefined constants. This function is assigned to the project type’sconfigOverrideAction
so it runs during setup.Manual Testing Instructions
The current recommended
config
command…mkdir ddev-default-db-test cd ddev-default-db-test ddev config --project-type=craftcms --docroot=web --create-docroot
…should now produce output like this:
Overrides should still be reflected in the resolved config file, so this command…
…produces this output:
Automated Testing Overview
No automated tests have been added.
Related Issue Link(s)
None
Release/Deployment Notes