Skip to content

ADD dependency-checks tests #37

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/full-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,8 @@ jobs:

- name: "Full CI"
run: "composer ci"

- name: "Check dependencies"
run: |
cd dependency-tests
./check-phpstan-dependencies.sh
3 changes: 3 additions & 0 deletions dependency-tests/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*
!.gitignore
!check-phpstan-dependencies.sh
27 changes: 27 additions & 0 deletions dependency-tests/check-phpstan-dependencies.sh
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
Loading