Skip to content
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

Improve handling of xhprof_prepend.php #28

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions config.xhgui.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,21 @@ hooks:
mysql -uroot -proot -e "CREATE DATABASE IF NOT EXISTS xhgui; GRANT ALL ON xhgui.* to 'db'@'%';"
fi
service: db
- exec: |
cat <<-EOF > .ddev/xhprof/xhprof_prepend.php
<?php
// DDEV's built in xhprof handler breaks our own.
// We'll temporarily override it here, but return control back later.
// If you don't want this behavior, comment out the hooks in ".ddev/config.xhgui.yaml".
return;
EOF
pre-stop:
- exec: |
cat <<-EOF > .ddev/xhprof/xhprof_prepend.php
<?php
// #ddev-generated
// We'll give back control of this file to DDEV. Next time it checks, it will see it has ownership
// and override this file with the current default.
// If you don't want this behavior, comment out the hooks in .ddev/config.xhgui.yaml.
return;
EOF
1 change: 0 additions & 1 deletion install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ project_files:
- xhgui/collector/xhgui.collector.config.php
- xhgui/collector/xhgui.collector.php
- xhgui/nginx.conf
- xhprof/xhprof_prepend.php
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you use cp you'd still have this, it would just be indirectly installed.


removal_actions:
- if [[ "$DDEV_DATABASE_FAMILY" == "postgres" ]]; then ddev psql -U db -c "drop database xhgui"; fi
Expand Down
5 changes: 0 additions & 5 deletions xhprof/xhprof_prepend.php

This file was deleted.