-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #37 from DaveLiddament/tests/dependency-tests
ADD dependency-checks tests
- Loading branch information
Showing
3 changed files
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
* | ||
!.gitignore | ||
!check-phpstan-dependencies.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
# Remove any existing composer files from previous run of the script | ||
rm -f composer.* || true | ||
|
||
# Create composer.json | ||
cat <<- "EOF" > composer.json | ||
{ | ||
"name": "demo/test_dependencies", | ||
"repositories" : [ | ||
{ | ||
"type" : "path", | ||
"url" : "../" | ||
} | ||
] | ||
} | ||
EOF | ||
|
||
# Check PHPStan v1 is OK | ||
composer require --dev phpstan/phpstan:^1.0 | ||
composer require --dev dave-liddament/phpstan-php-language-extensions @dev | ||
composer update --prefer-lowest --no-interaction | ||
|
||
# Check PHPStan v2 is OK | ||
composer require --dev phpstan/phpstan:^2.0 |