Skip to content
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
14 changes: 14 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,27 @@ jobs:
- name: "Install dependencies"
run: "composer install --no-interaction --no-progress"

- name: "Change to simple-downgrade PHP version"
if: matrix.php-version == '7.4' || matrix.php-version == '8.0' || matrix.php-version == '8.1'
uses: "shivammathur/setup-php@v2"
with:
coverage: "none"
php-version: "8.4"

- name: "Transform source code"
if: matrix.php-version == '7.4' || matrix.php-version == '8.0' || matrix.php-version == '8.1'
run: |
composer install --no-interaction --no-progress --working-dir=compiler
./compiler/vendor/bin/simple-downgrade downgrade -c build/downgrade.php ${{ matrix.php-version }}
composer dump

- name: "Re-store PHP version"
if: matrix.php-version == '7.4' || matrix.php-version == '8.0' || matrix.php-version == '8.1'
uses: "shivammathur/setup-php@v2"
with:
coverage: "none"
php-version: "${{ matrix.php-version }}"

- name: "Validate Composer"
run: "composer validate"

Expand Down
18 changes: 18 additions & 0 deletions .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,15 @@ jobs:
- name: "Install dependencies"
run: "composer install --no-interaction --no-progress"

- name: "Change to simple-downgrade PHP version"
if: matrix.php-version == '7.4' || matrix.php-version == '8.0' || matrix.php-version == '8.1'
uses: "shivammathur/setup-php@v2"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No if condition here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

with:
coverage: "none"
php-version: "8.4"
ini-file: development
extensions: mbstring

- name: "Transform source code"
if: matrix.php-version == '7.4' || matrix.php-version == '8.0' || matrix.php-version == '8.1'
shell: bash
Expand All @@ -65,6 +74,15 @@ jobs:
./compiler/vendor/bin/simple-downgrade downgrade -c build/downgrade.php ${{ matrix.php-version }}
composer dump

- name: "Re-store PHP version"
if: matrix.php-version == '7.4' || matrix.php-version == '8.0' || matrix.php-version == '8.1'
uses: "shivammathur/setup-php@v2"
with:
coverage: "none"
php-version: "${{ matrix.php-version }}"
ini-file: development
extensions: mbstring

- name: "PHPStan"
run: "make phpstan"

Expand Down
22 changes: 22 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -187,12 +187,34 @@ jobs:
shell: bash
run: "composer require --dev phpunit/phpunit:^9.6 brianium/paratest:^6.5 symfony/console:^5.4 symfony/process:^5.4 --update-with-dependencies --ignore-platform-reqs --working-dir=tests"

- name: "Change to simple-downgrade PHP version"
if: matrix.php-version == '7.4' || matrix.php-version == '8.0' || matrix.php-version == '8.1'
uses: "shivammathur/setup-php@v2"
with:
coverage: "none"
php-version: "8.4"
tools: pecl
extensions: ds,mbstring
ini-file: development
ini-values: memory_limit=2G

- name: "Transform source code"
shell: bash
run: |
composer install --no-interaction --no-progress --working-dir=compiler
./compiler/vendor/bin/simple-downgrade downgrade -c build/downgrade.php ${{ matrix.php-version }}
composer dump

- name: "Re-store PHP version"
if: matrix.php-version == '7.4' || matrix.php-version == '8.0' || matrix.php-version == '8.1'
uses: "shivammathur/setup-php@v2"
with:
coverage: "none"
php-version: "${{ matrix.php-version }}"
tools: pecl
extensions: ds,mbstring
ini-file: development
ini-values: memory_limit=2G

- name: "Tests"
run: "make tests"
6 changes: 3 additions & 3 deletions compiler/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
"description": "PHAR Compiler for PHPStan",
"license": ["MIT"],
"require": {
"php": "^8.0",
"php": "^8.2",
"nette/neon": "^3.0.0",
"ondrejmirtes/simple-downgrader": "^2.2.1",
"ondrejmirtes/simple-downgrader": "^2.2.2",
"seld/phar-utils": "^1.2",
"symfony/console": "^5.4.43",
"symfony/filesystem": "^5.4.43",
Expand All @@ -30,7 +30,7 @@
},
"config": {
"platform": {
"php": "8.0.99"
"php": "8.2.99"
},
"platform-check": false,
"sort-packages": true
Expand Down
140 changes: 10 additions & 130 deletions compiler/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -208,12 +208,14 @@ public function testBug10312b(): void
$this->analyse([__DIR__ . '/data/bug-10312b.php'], []);
}

#[RequiresPhp('>= 8.1')]
public function testBug10312c(): void
{
$this->checkProtectedAndPublicMethods = true;
$this->analyse([__DIR__ . '/data/bug-10312c.php'], []);
}

#[RequiresPhp('>= 8.1')]
public function testBug10312d(): void
{
$this->checkProtectedAndPublicMethods = true;
Expand Down
Loading