diff --git a/.lando/build b/.lando/build index 329dfb5..a984e36 100755 --- a/.lando/build +++ b/.lando/build @@ -11,7 +11,6 @@ proj="$app/drupal" webroot="$proj/web" sites="$webroot/sites" default="$sites/default" -pingroot="$app/drupal-ping" set +e rm -rf "$proj" @@ -26,12 +25,16 @@ composer create-project drupal/recommended-project "$proj" chmod 755 "$default" rm -f "$default/settings.php" -ln -s "$pingroot/settings.php" "$default/" -ln -s "$pingroot/_ping.custom.php" "$webroot/" -ln -s "$pingroot/_ping.php" "$webroot/" -chmod 644 "$pingroot/settings.php" +ln -s "$app/settings.php" "$default/" +ln -s "$app/_ping.custom.php" "$webroot/" +ln -s "$app/_ping.php" "$webroot/" +chmod 644 "$app/settings.php" cd "$proj" composer require --dev drush/drush -composer require 'wunderio/code-quality:^2' --dev -composer require 'phpunit/phpunit:^9' --dev \ No newline at end of file +# @todo: Lock Code Quality atm because phpstan is failing. +# It's related to installing https://github.com/phpstan/extension-installer in Code Quality 2.4.0. Because it now loads +# phpstan extensions automatically, it starts do more scans with extensions like like mglaman/phpstan-drupal and +# phpstan/phpstan-deprecation-rules. +composer require 'wunderio/code-quality:2.3.0' --dev +composer require 'phpunit/phpunit:^9' --dev diff --git a/.lando/cmd-scan b/.lando/cmd-scan index db2d64d..fdec81a 100755 --- a/.lando/cmd-scan +++ b/.lando/cmd-scan @@ -11,4 +11,4 @@ set -x php -l _ping.php phpcs -sp --report=full --runtime-set testVersion 7.4 --standard=Drupal,DrupalPractice,Security,PHPCompatibility,VariableAnalysis,WunderDrupal,WunderSecurity _ping.php phpstan analyze --level=5 -- _ping.php -psalm --config=/app/drupal-ping/psalm.xml \ No newline at end of file +psalm --config=/app/psalm.xml diff --git a/.lando/cmd-test b/.lando/cmd-test index 0de4ca5..dc858f6 100755 --- a/.lando/cmd-test +++ b/.lando/cmd-test @@ -7,4 +7,4 @@ cd /app/drupal set -x -php -d memory_limit=-1 /app/drupal/vendor/bin/phpunit /app/drupal-ping/tests \ No newline at end of file +php -d memory_limit=-1 /app/drupal/vendor/bin/phpunit /app/tests diff --git a/README.md b/README.md index 719fcba..0d74316 100644 --- a/README.md +++ b/README.md @@ -173,25 +173,13 @@ If earlier fails (is empty), then next one is tried. ### Setting up development environment -1. Clone development and testing environment - * `git clone git@github.com:wunderio/drupal-project.git ~/projects/drupal-ping` - * Yes, save it as `drupal-ping`. -1. `cd drupal-ping/` -1. Clone the ping project itself - * `git clone git@github.com:wunderio/drupal-ping.git` - * Yes, save it as `drupal-ping` too, inside the folder of the same name. It is the actual repo we are going to work with. - * Checkout or create your development branch. -1. Link `.lando.yml` - * `rm -f .lando.yml` - at the top-level folder, remove the Lando conf file. - * `ln drupal-ping/.lando.yml` - link the Lando conf from the ping repo folder. Don't create this as a soft (`-s`) link because Lando would mount the project where the original file is. Therefore create the hard link which is indistinguishable for Lando. -1. Link `.lando/` - * `rm -rf .lando` - at the top-level folder, remove the Lando folder. - * `ln -s drupal-ping/.lando` - link the Lando scripts folder from the ping repo folder. -1. `lando start` -1. Note that the Drupal install will mess up `settings.php` a bit, don't commit. -1. https://ping.lndo.site/_ping.php -1. `lando scan` -1. `lando test` +1. Clone the ping project and cd into it + `git clone git@github.com:wunderio/drupal-ping.git` +2. Change into the drupal-ping folder `cd drupal-ping/` +3. Checkout or create your development branch. +4. Start Lando `lando start` +5. Note that the Drupal install will mess up `settings.php` a bit, don't commit. +6. https://ping.lndo.site/_ping.php ### Development commands