Skip to content

Commit

Permalink
Stop testing PHP 7.2 and 7.3
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrejmirtes committed Sep 6, 2024
1 parent 767698a commit bf12209
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 66 deletions.
20 changes: 0 additions & 20 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ jobs:
fail-fast: false
matrix:
php-version:
- "7.2"
- "7.3"
- "7.4"
- "8.0"
- "8.1"
Expand All @@ -45,10 +43,6 @@ jobs:
if: matrix.php-version == '8.4'
run: "composer config platform.php 8.3.99"

- name: "Downgrade PHPUnit"
if: matrix.php-version == '7.2' || matrix.php-version == '7.3'
run: "composer require --dev phpunit/phpunit:^8.5.31 --no-update --update-with-dependencies"

- name: "Install dependencies"
run: "composer install --no-interaction --no-progress"

Expand Down Expand Up @@ -103,8 +97,6 @@ jobs:
fail-fast: false
matrix:
php-version:
- "7.2"
- "7.3"
- "7.4"
- "8.0"
- "8.1"
Expand Down Expand Up @@ -139,18 +131,10 @@ jobs:
if: matrix.php-version == '8.4'
run: "composer config platform.php 8.3.99"

- name: "Downgrade PHPUnit"
if: matrix.php-version == '7.2' || matrix.php-version == '7.3'
run: "composer require --dev phpunit/phpunit:^8.5.31 --no-update --update-with-dependencies"

- name: "Install lowest dependencies"
if: ${{ matrix.dependencies == 'lowest' }}
run: "composer update --prefer-lowest --no-interaction --no-progress"

- name: "Update Doctrine DBAl to ^3"
if: matrix.php-version != '7.2' && matrix.dependencies == 'lowest'
run: "composer require --dev doctrine/dbal:^3.3.8 --no-interaction --no-progress"

- name: "Install highest dependencies"
if: ${{ matrix.dependencies == 'highest' }}
run: "composer update --no-interaction --no-progress"
Expand Down Expand Up @@ -198,10 +182,6 @@ jobs:
if: matrix.php-version == '8.4'
run: "composer config platform.php 8.3.99"

- name: "Downgrade PHPUnit"
if: matrix.php-version == '7.2' || matrix.php-version == '7.3'
run: "composer require --dev phpunit/phpunit:^8.5.31 --no-update --update-with-dependencies"

- name: "Install dependencies"
run: "composer update --no-interaction --no-progress"

Expand Down
10 changes: 5 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@
"cache/array-adapter": "^1.1",
"composer/semver": "^3.3.2",
"cweagans/composer-patches": "^1.7.3",
"doctrine/annotations": "^1.11 || ^2.0",
"doctrine/collections": "^1.6 || ^2.1",
"doctrine/annotations": "^2.0",
"doctrine/collections": "^2.1",
"doctrine/common": "^2.7 || ^3.0",
"doctrine/dbal": "^2.13.8 || ^3.3.3",
"doctrine/lexer": "^2.0 || ^3.0",
"doctrine/mongodb-odm": "^1.3 || ^2.4.3",
"doctrine/dbal": "^3.3.8",
"doctrine/lexer": "^3.0",
"doctrine/mongodb-odm": "^2.4.3",
"doctrine/orm": "^2.16.0",
"doctrine/persistence": "^2.2.1 || ^3.2",
"gedmo/doctrine-extensions": "^3.8",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,8 @@ public function dataFileAsserts(): iterable
$versionParser = new VersionParser();
if (InstalledVersions::satisfies($versionParser, 'doctrine/dbal', '>=4.0')) {
yield from $this->gatherAssertTypes(__DIR__ . '/data/mysqli-result-row-count.php');
} elseif (InstalledVersions::satisfies($versionParser, 'doctrine/dbal', '>=3.0')) {
yield from $this->gatherAssertTypes(__DIR__ . '/data/mysqli-result-row-count-dbal-3.php');
} else {
yield from $this->gatherAssertTypes(__DIR__ . '/data/mysqli-result-row-count-dbal-2.php');
yield from $this->gatherAssertTypes(__DIR__ . '/data/mysqli-result-row-count-dbal-3.php');
}
}

Expand Down
9 changes: 1 addition & 8 deletions tests/Type/Doctrine/DBAL/PDOResultRowCountReturnTypeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

namespace PHPStan\Type\Doctrine\DBAL;

use Composer\InstalledVersions;
use Composer\Semver\VersionParser;
use PHPStan\Testing\TypeInferenceTestCase;

class PDOResultRowCountReturnTypeTest extends TypeInferenceTestCase
Expand All @@ -12,12 +10,7 @@ class PDOResultRowCountReturnTypeTest extends TypeInferenceTestCase
/** @return iterable<mixed> */
public function dataFileAsserts(): iterable
{
$versionParser = new VersionParser();
if (InstalledVersions::satisfies($versionParser, 'doctrine/dbal', '<3')) {
yield from $this->gatherAssertTypes(__DIR__ . '/data/pdo-result-row-count-dbal-2.php');
} else {
yield from $this->gatherAssertTypes(__DIR__ . '/data/pdo-result-row-count.php');
}
yield from $this->gatherAssertTypes(__DIR__ . '/data/pdo-result-row-count.php');
}

/**
Expand Down
15 changes: 0 additions & 15 deletions tests/Type/Doctrine/DBAL/data/mysqli-result-row-count-dbal-2.php

This file was deleted.

15 changes: 0 additions & 15 deletions tests/Type/Doctrine/DBAL/data/pdo-result-row-count-dbal-2.php

This file was deleted.

0 comments on commit bf12209

Please sign in to comment.