phpstan-drupal, drupal-check, drupal-rector, upgrade_status — OH MY 🚀

composer require  --dev phpstan/phpstan \
phpstan/extension-installer \
mglaman/phpstan-drupal \
phpstan/phpstan-deprecation-rules
parameters:
level: 5
php vendor/bin/phpstan.phar analyze web/modules/custom

2) Can’t a standard phpstan.neon be dropped in? It's easier to configure or rename a configuration file, than to create one from scratch, especially if you don't have your your blog post in front of you.

composer require --dev mglaman/drupal-check
$output = [];
$error_filename = $this->temporaryDirectory . '/phpstan_error_output';
$command = $this->binPath . '/phpstan analyse --memory-limit=-1 --error-format=json -c ' . $this->phpstanNeonPath . ' ' . $project_dir . ' 2> ' . $error_filename;
exec($command, $output);
php vendor/bin/drush upgrade_status:analyze --all --ignore-uninstalled
phpcs:
docker:
- image: circleci/php:7.3-cli
steps:
- setup-build
- install-composer
- run:
name: phpcs
command: ./bin/phpcs web/modules/custom
phpstan:
docker:
- image: circleci/php:7.3-cli
steps:
- setup-build
- install-composer
- run:
name: phpstan
command: ./bin/phpstan analyse web/modules/custom --debug
upgrade_status:
docker:
- image: circleci/php:7.3-cli
steps:
- setup-build
- install-composer
- run:
name: Install backend
command: ./bin/drush -y site-install --account-pass=admin
- run:
name: upgrade_status
command: ./bin/drush upgrade_status:analyze --all --ignore-uninstalled
composer require --dev palantirnet/drupal-rector
cp vendor/palantirnet/drupal-rector/rector.php .
php vendor/bin/rector process web/modules/custom

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store