-
-
Notifications
You must be signed in to change notification settings - Fork 6
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
Automate Drupal setup #33
Conversation
Was asked on slack
Thoughts? |
It is possible to ask questions at install time, but it's tweaky. ddev-platformsh asks for config items (keys). and |
Hopefully, we can do something when ddev/ddev/pull/6406 gets merged. |
Mabe we can split this to make it work for all? For Drupal it seems to be required to update the settings.php ... for OpenMage it would be enough to copy default settings - For me this works perfect ... no need to edit Mage.php as i added to README :( if (getenv('IS_DDEV_PROJECT') && getenv('NO_XHGUI') !== '1') {
if (file_exists($xhgui = '/mnt/ddev_config/xhgui/collector/xhgui.collector.php')) {
require_once $xhgui;
}
} Note: With having xhgui.collector included phpunit (9.6, php7.4) fails with ... running testsSerialization of 'Closure' is not allowed To fix, i added this to <php>
<env name="NO_XHGUI" value="1"/>
</php> |
@rfay why confused? |
I asked why you reacted with a "confused" emoji. |
I don't have very good vision. I thought it was a smiley. |
chmod +x xhgui/scripts/setup-drupal.sh | ||
xhgui/scripts/setup-drupal.sh |
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.
chmod +x xhgui/scripts/setup-drupal.sh | |
xhgui/scripts/setup-drupal.sh | |
chmod +x xhgui/scripts/setup.sh | |
xhgui/scripts/setup.sh |
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.
Are you suggesting to use a generic
setup script?
The original though was that each framework would use it's own setup
file, if required.
This would help isolate all the framework-specific command making it easier to add/update/remove as required.
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, that was my idea.
I thought it would be easier to maintain.
For OpenMage it would be enough to copy settings.ddev.xhgui.php
to a given location thats autoloaded.
Made some suggestions. |
- xhgui/scripts/setup-drupal.sh | ||
- xhgui/scripts/settings.ddev.xhgui.php |
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.
- xhgui/scripts/setup-drupal.sh | |
- xhgui/scripts/settings.ddev.xhgui.php | |
- xhgui/scripts/setup.sh | |
- xhgui/scripts/ddev.xhgui.php |
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.
see #33 (comment)
Untested #!/usr/bin/env bash
#ddev-generated
set -e
XHGUI_SETTINGS=ddev.xhgui.php
case $DDEV_PROJECT_TYPE in
magento)
# Copy over settings
cp xhgui/scripts/$XHGUI_SETTINGS $DDEV_APPROOT/$DDEV_DOCROOT/app/etc/includes/
;;
drupal | drupal)
# Early return if disable_settings_management is true.
if ( ddev debug configyaml 2>/dev/null | grep 'disable_settings_management:\s*true' >/dev/null 2>&1 ) ; then
exit 0
fi
# Copy over settings
cp xhgui/scripts/$XHGUI_SETTINGS $DDEV_APPROOT/$DDEV_DOCROOT/sites/default/
# Add settings
SETTINGS_FILE_NAME="${DDEV_APPROOT}/${DDEV_DOCROOT}/sites/default/settings.php"
echo "Settings file name: ${SETTINGS_FILE_NAME}"
grep -qF $XHGUI_SETTINGS $SETTINGS_FILE_NAME || echo "
// Include settings required for XHGUI.
if ((file_exists(__DIR__ . '/$XHGUI_SETTINGS') && getenv('IS_DDEV_PROJECT') == 'true')) {
include __DIR__ . '/$XHGUI_SETTINGS';
}" >> $SETTINGS_FILE_NAME
;;
*)
# echo -n "?"
;;
esac
# Add perftools/php-profiler
if ( ddev composer show --all | grep -v perftools/php-profiler >/dev/null 2>&1 ) ; then
ddev composer require perftools/php-profiler --dev
fi
|
Can i help? |
Hi @sreichel, Thank you for your suggestion. We apologize for the delay in addressing your changes. The maintainer is currently unavailable but is expected to return in about a week. Your patience is greatly appreciated! |
Thank you for your patience. I'm still wondering if I prefer the suggested single script approach of the per-framework approach. There is also a TYPO-3 budget discussion about wether to incorporate XHGui directly into DDEV. |
This PR is an attempt to automate the steps for installtion on Drupal.
This address issues #30 .
Hopefully, this will trigger similar PRs for other frameworks when this is merge.