Skip to content

Commit 924163a

Browse files
authored
Raise minimum required version codeception/codeception to ^5.0 (#4)
1 parent 5d9640a commit 924163a

File tree

10 files changed

+35
-33
lines changed

10 files changed

+35
-33
lines changed

Diff for: .github/workflows/build.yml

+6-11
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ jobs:
1919
- ubuntu-latest
2020

2121
php:
22-
- 7.4
23-
- 8.0
22+
- "8.0"
23+
- "8.1"
2424

2525
mysql:
26-
- 8.0
26+
- "8.0"
2727

2828
services:
2929
mysql:
@@ -37,7 +37,7 @@ jobs:
3737

3838
steps:
3939
- name: Checkout
40-
uses: actions/checkout@v2.3.4
40+
uses: actions/checkout@v3
4141

4242
- name: Install PHP
4343
uses: shivammathur/setup-php@v2
@@ -52,7 +52,7 @@ jobs:
5252
run: echo "COMPOSER_CACHE_DIR=$(composer config cache-dir)" >> $GITHUB_ENV
5353

5454
- name: Cache dependencies installed with composer
55-
uses: actions/cache@v2
55+
uses: actions/cache@v3
5656
with:
5757
path: ${{ env.COMPOSER_CACHE_DIR }}
5858
key: php${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }}
@@ -62,13 +62,8 @@ jobs:
6262
- name: Update composer
6363
run: composer self-update
6464

65-
- name: Install dependencies with composer php 7.4
66-
if: matrix.php == '7.4'
65+
- name: Install dependencies with composer
6766
run: composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi
6867

69-
- name: Install dependencies with composer php 8.0
70-
if: matrix.php == '8.0'
71-
run: composer update --ignore-platform-reqs --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi
72-
7368
- name: Run tests with codeception
7469
run: vendor/bin/codecept run

Diff for: .github/workflows/dependency.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ jobs:
1515
- ubuntu-latest
1616

1717
php:
18-
- 8.0
18+
- "8.0"
1919

2020
steps:
2121
- name: Checkout
22-
uses: actions/checkout@v2
22+
uses: actions/checkout@v3
2323

2424
- name: Install PHP
2525
uses: shivammathur/setup-php@v2
@@ -43,7 +43,7 @@ jobs:
4343
run: composer self-update
4444

4545
- name: Install maglnet/composer-require-checker
46-
run: composer require maglnet/composer-require-checker:^3.8
46+
run: composer require maglnet/composer-require-checker:^4.0
4747

4848
- name: Check dependency
4949
run: vendor/bin/composer-require-checker check --config-file=dependency-checker.json

Diff for: .github/workflows/static.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ jobs:
1616
- ubuntu-latest
1717

1818
php:
19-
- 7.4
20-
- 8.0
19+
- "8.0"
20+
- "8.1"
2121

2222
steps:
2323
- name: Checkout
24-
uses: actions/checkout@v2
24+
uses: actions/checkout@v3
2525

2626
- name: Install PHP
2727
uses: shivammathur/setup-php@v2
@@ -34,7 +34,7 @@ jobs:
3434
run: echo "COMPOSER_CACHE_DIR=$(composer config cache-dir)" >> $GITHUB_ENV
3535

3636
- name: Cache dependencies installed with composer
37-
uses: actions/cache@v2
37+
uses: actions/cache@v3
3838
with:
3939
path: ${{ env.COMPOSER_CACHE_DIR }}
4040
key: php${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }}
@@ -48,4 +48,4 @@ jobs:
4848
run: composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi
4949

5050
- name: Static analysis
51-
run: vendor/bin/psalm --shepherd --stats --output-format=checkstyle | cs2pr --graceful-warnings --colorize
51+
run: vendor/bin/psalm --shepherd --stats --output-format=checkstyle --php-version=${{ matrix.php }} | cs2pr --graceful-warnings --colorize

Diff for: CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Database Populator for Codeception DB Module Change Log
22

3+
## 1.1.0 under development
4+
5+
- Enh: Raise minimum required versions: PHP to `^8.0`, `codeception/codeception` to `^5.0` and
6+
`codeception/module-db` to `^3.0`.
7+
38
## 1.0.1 December 27, 2021
49

510
- Enh: Add support for `codeception/module-db` version `^2.0`.

Diff for: README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ So for a test you could load only needed tables or rows. As a result it dramatic
1515

1616
## Requirements
1717

18-
- PHP 7.4 or higher.
19-
- Codeception 4.1 or higher.
20-
- Codeception Module DB 1.1 or higher.
18+
- PHP 8.0 or higher.
19+
- Codeception 5.0 or higher.
20+
- Codeception Module DB 3.0 or higher.
2121

2222
## Installation
2323

Diff for: composer.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@
1515
},
1616
"minimum-stability": "stable",
1717
"require": {
18-
"php": "^7.4|^8.0",
18+
"php": "^8.0",
1919
"ext-pdo": "*",
20-
"codeception/codeception": "^4.1",
21-
"codeception/module-db": "^1.1|^2.0"
20+
"codeception/codeception": "^5.0",
21+
"codeception/module-db": "^3.0"
2222
},
2323
"require-dev": {
2424
"vimeo/psalm": "^4.16",

Diff for: src/Module.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ final class Module extends \Codeception\Module
2121
* @psalm-suppress InvalidPropertyAssignmentValue
2222
* @psalm-var ModuleConfigArray
2323
*/
24-
protected $config = [
24+
protected array $config = [
2525
'preloadDump' => null,
2626
'preloadRows' => null,
2727
];
@@ -30,14 +30,14 @@ final class Module extends \Codeception\Module
3030
* @psalm-suppress NonInvariantDocblockPropertyType
3131
* @var string[]
3232
*/
33-
protected $requiredFields = [
33+
protected array $requiredFields = [
3434
'dumpsPath',
3535
'rowsPath',
3636
];
3737

3838
private ?DatabasePopulator $popualtor = null;
3939

40-
public function _beforeSuite($settings = []): void
40+
public function _beforeSuite(array $settings = []): void
4141
{
4242
if ($this->config['preloadDump'] !== null) {
4343
$dumps = is_array($this->config['preloadDump'])

Diff for: tests/_support/_generated/IntegrationTesterActions.php

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?php //[STAMP] b0f4e34cc85e2868044e220d003d5a70
1+
<?php //[STAMP] 6e30fe49b98241f00675a6d908595f79
22
namespace Vjik\Codeception\DatabasePopulator\Tests\_generated;
33

44
// This class was automatically generated by build task
@@ -79,7 +79,8 @@ public function performInDatabase($databaseKey, $actions): void {
7979
/**
8080
* [!] Method is generated. Documentation taken from corresponding module.
8181
*
82-
* Inserts an SQL record into a database. This record will be erased after the test.
82+
* Inserts an SQL record into a database. This record will be erased after the test,
83+
* unless you've configured "skip_cleanup_if_failed", and the test fails.
8384
*
8485
* ```php
8586
* <?php

Diff for: tests/_support/_generated/PreloadTesterActions.php

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?php //[STAMP] 66320f01f33e14d83360742660e014a3
1+
<?php //[STAMP] 78061c39e9f162a915156832d14fa395
22
namespace Vjik\Codeception\DatabasePopulator\Tests\_generated;
33

44
// This class was automatically generated by build task
@@ -79,7 +79,8 @@ public function performInDatabase($databaseKey, $actions): void {
7979
/**
8080
* [!] Method is generated. Documentation taken from corresponding module.
8181
*
82-
* Inserts an SQL record into a database. This record will be erased after the test.
82+
* Inserts an SQL record into a database. This record will be erased after the test,
83+
* unless you've configured "skip_cleanup_if_failed", and the test fails.
8384
*
8485
* ```php
8586
* <?php

Diff for: tests/_support/_generated/UnitTesterActions.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?php //[STAMP] 0620f8bd878951e674910de3da6e247d
1+
<?php //[STAMP] 5e0b51bf6e208b455aa2e30848cda7a5
22
namespace Vjik\Codeception\DatabasePopulator\Tests\_generated;
33

44
// This class was automatically generated by build task

0 commit comments

Comments
 (0)