Skip to content

Commit

Permalink
Raise min version to PHP 7.3, check compatibility PHP 8.3.
Browse files Browse the repository at this point in the history
  • Loading branch information
terabytesoftw committed Sep 26, 2023
1 parent 620af43 commit 7ad5a6b
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 61 deletions.
20 changes: 18 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,22 @@
name: build

on: [push, pull_request]
on:
pull_request:
paths-ignore:
- 'docs/**'
- 'README.md'
- 'CHANGELOG.md'
- '.gitignore'
- '.gitattributes'

push:
branches: ['master']
paths-ignore:
- 'docs/**'
- 'README.md'
- 'CHANGELOG.md'
- '.gitignore'
- '.gitattributes'

env:
DEFAULT_COMPOSER_FLAGS: "--prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi"
Expand All @@ -23,7 +39,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
php: ['5.4', '5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2']
php: ['7.3', '7.4', '8.1', '8.2', '8.3']

steps:
- name: Checkout
Expand Down
19 changes: 2 additions & 17 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@
],
"minimum-stability": "dev",
"require": {
"php": ">=7.3",
"yiisoft/yii2": "~2.0.46",
"phpspec/php-diff": "^1.1.0"
},
"require-dev": {
"yiisoft/yii2-coding-standards": "~2.0",
"cweagans/composer-patches": "^1.7",
"phpunit/phpunit": "4.8.34"
"phpunit/phpunit": "^9.6"
},
"autoload": {
"psr-4": {
Expand All @@ -44,20 +44,6 @@
"extra": {
"branch-alias": {
"dev-master": "2.0.x-dev"
},
"composer-exit-on-patch-failure": true,
"patches": {
"phpunit/phpunit-mock-objects": {
"Fix PHP 7 and 8 compatibility": "https://yiisoft.github.io/phpunit-patches/phpunit_mock_objects.patch"
},
"phpunit/php-file-iterator": {
"Fix PHP 8.1 compatibility": "https://yiisoft.github.io/phpunit-patches/phpunit_path_file_iterator.patch"
},
"phpunit/phpunit": {
"Fix PHP 7 compatibility": "https://yiisoft.github.io/phpunit-patches/phpunit_php7.patch",
"Fix PHP 8 compatibility": "https://yiisoft.github.io/phpunit-patches/phpunit_php8.patch",
"Fix PHP 8.1 compatibility": "https://yiisoft.github.io/phpunit-patches/phpunit_php81.patch"
}
}
},
"config": {
Expand All @@ -66,7 +52,6 @@
"enabled": false
},
"allow-plugins": {
"cweagans/composer-patches": true,
"yiisoft/yii2-composer": true
}
},
Expand Down
4 changes: 2 additions & 2 deletions tests/GiiTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class GiiTestCase extends TestCase
{
protected $driverName = 'sqlite';

protected function setUp()
protected function setUp(): void
{
parent::setUp();

Expand Down Expand Up @@ -49,4 +49,4 @@ protected function setUp()
}
}
}
}
}
2 changes: 1 addition & 1 deletion tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ abstract class TestCase extends \PHPUnit\Framework\TestCase
* Clean up after test.
* By default the application created with [[mockApplication]] will be destroyed.
*/
protected function tearDown()
protected function tearDown(): void
{
parent::tearDown();
$this->destroyApplication();
Expand Down
2 changes: 0 additions & 2 deletions tests/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,3 @@

Yii::setAlias('@yiiunit/gii', __DIR__);
Yii::setAlias('@yii/gii', dirname(__DIR__) . '/src');

require_once(__DIR__ . '/compatibility.php');
37 changes: 0 additions & 37 deletions tests/compatibility.php

This file was deleted.

0 comments on commit 7ad5a6b

Please sign in to comment.