Skip to content

Commit

Permalink
Merge pull request #119 from mglaman/phpstan-drupal-update
Browse files Browse the repository at this point in the history
Bump to phpstan-drupal 0.12
  • Loading branch information
mglaman authored Jan 28, 2020
2 parents aa08156 + 2e112a3 commit 58a51a8
Show file tree
Hide file tree
Showing 14 changed files with 213 additions and 743 deletions.
18 changes: 13 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ commands:
- checkout
- run: sudo apt-get update && sudo apt-get install -y libpng-dev libjpeg62-turbo-dev
- run: sudo docker-php-ext-install gd
- run:
name: Disable PHP memory limit
command: echo 'memory_limit=-1' | sudo tee -a /usr/local/etc/php/php.ini
- run:
name: Disable xdebug PHP extension
command: sudo rm /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
- restore_cache:
keys:
- *composer-cache
Expand All @@ -23,7 +29,6 @@ commands:
key: *composer-cache
paths:
- ~/.composer/cache

build-phar:
steps:
- run: echo "Downloading box.phar version $BOX_VERSION"
Expand Down Expand Up @@ -51,14 +56,17 @@ commands:
- run: composer require << parameters.project >> --working-dir /tmp/drupal
global-require:
steps:
- run:
name: Remove existing vendor dir
command: |
rm -rf ~/repo/vendor
- run:
name: Add project as a global dependency
command: |
composer global config minimum-stability dev
composer global config prefer-stable true
composer global config repositories.0 '{"type": "path", "url": "'$CIRCLE_WORKING_DIRECTORY'", "options": { "symlink": false }}'
composer global require mglaman/drupal-check "*"
rm -rf ~/.composer/vendor/mglaman/drupal-check/vendor
- run:
name: Add Composer global path
command: |
Expand Down Expand Up @@ -197,11 +205,11 @@ jobs:
- build-phar
- create-drupal-project
- require-contrib:
project: drupal/ctools:^3
project: drupal/ctools:3.x-dev
- run:
name: Phar - Run against a module
command: |
php drupal-check.phar /tmp/drupal/web/modules/contrib/ctools || if (($? == 255)); then false; else true; fi
php -d memory_limit=-1 drupal-check.phar /tmp/drupal/web/modules/contrib/ctools || if (($? == 255)); then false; else true; fi
test_global_require_with_drush:
<<: *defaults
steps:
Expand Down Expand Up @@ -245,7 +253,7 @@ jobs:
- run:
name: Phar - Run against a file
command: |
php drupal-check.phar /tmp/drupal/web/modules/contained_not_initialized -vvv | grep "invoked the Drupal container outside of the scope of a function or class method."
php drupal-check.phar /tmp/drupal/web/modules/contained_not_initialized -vvv
workflows:
version: 2
test_and_deploy:
Expand Down
3 changes: 2 additions & 1 deletion box.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"directories": ["phpstan", "src", "vendor"],
"directories": ["src", "vendor"],
"files": ["error-bootstrap.php"],
"stub": "stub.php"
}
9 changes: 5 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@
"php": "~7.2",
"composer/xdebug-handler": "^1.3",
"jean85/pretty-package-versions": "^1.2",
"mglaman/phpstan-drupal": "^0.11.1",
"mglaman/phpstan-junit": "^0.11.1",
"phpstan/phpstan": "^0.11.17",
"phpstan/phpstan-deprecation-rules": "^0.11.0",
"mglaman/phpstan-drupal": "^0.12",
"nette/neon": "^3.1",
"phpstan/phpstan": "^0.12",
"phpstan/phpstan-deprecation-rules": "^0.12",
"symfony/console": "~3.2 || ~4.0",
"symfony/process": "~3.2 || ~4.0",
"webflo/drupal-finder": "^1.1"
},
"require-dev": {
Expand Down
Loading

0 comments on commit 58a51a8

Please sign in to comment.