Skip to content

Commit

Permalink
Improve and document better developer tooling
Browse files Browse the repository at this point in the history
Updates the repository to include a developer niceties like XDebug, PsySH, MITM
Proxy and documentation on how they all fit together.
  • Loading branch information
jacobbednarz committed May 30, 2021
1 parent b12a706 commit 2ad7d18
Show file tree
Hide file tree
Showing 8 changed files with 867 additions and 78 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
*.DS_Store
vendor/
xdebug/*
21 changes: 21 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "xdebug",
"type": "php",
"request": "launch",
"port": 9003,
"hostname": "localhost",
"pathMappings": {
"/var/www/html/wp-content/plugins/cloudflare": "${workspaceFolder}",
},
"xdebugSettings": {
"max_data": 65535,
"show_hidden": 1,
"max_children": 100,
"max_depth": 5
}
}
]
}
16 changes: 13 additions & 3 deletions Dockerfile.wordpress
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
FROM wordpress:latest
FROM wpdiaries/wordpress-xdebug:5.7-php7.4-apache
RUN apt-get update && apt-get install -y git-core vim
RUN curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar \
&& chmod +x wp-cli.phar \
&& mv wp-cli.phar /usr/local/bin/wp
&& chmod +x wp-cli.phar \
&& mv wp-cli.phar /usr/local/bin/wp

# Want more than just the step debugger mode? Throw your additional modes in
# here. See documentation at https://xdebug.org/docs/all_settings#mode.
#
# RUN sed -i 's/xdebug.mode=debug/xdebug.mode=debug,develop,coverage,gcstats,profile,trace/g' /usr/local/etc/php/conf.d/xdebug.ini

RUN echo 'xdebug.client_host=host.docker.internal \n\
xdebug.start_with_request=yes \n\
xdebug.output_dir=/var/www/html/wp-content/plugins/cloudflare/xdebug' >> /usr/local/etc/php/conf.d/xdebug.ini
5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
"type": "wordpress-plugin",
"require": {
"cloudflare/cf-ip-rewrite": "^1.0.0",
"cloudflare/cloudflare-plugin-backend": "2.5.0"
"cloudflare/cloudflare-plugin-backend": "2.5.0",
"symfony/polyfill-intl-idn": "*"
},
"require-dev": {
"symfony/yaml": "~2.6",
Expand All @@ -22,7 +23,7 @@
"simplyadmire/composer-plugins": "*",
"dealerdirect/phpcodesniffer-composer-installer": "*",
"phpdocumentor/reflection-docblock": "*",
"symfony/polyfill-intl-idn": "*"
"psy/psysh": "@stable"
},
"scripts": {
"format": "php vendor/bin/phpcs -d date.timezone=UTC --standard=phpcs.xml",
Expand Down
Loading

0 comments on commit 2ad7d18

Please sign in to comment.