Skip to content

Commit 1c70d6d

Browse files
committed
Support for PHP 8.3 and 8.4 only.
1 parent fb05977 commit 1c70d6d

File tree

12 files changed

+38
-46
lines changed

12 files changed

+38
-46
lines changed

.gitattributes

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
/.gitattributes export-ignore
22
/.github/ export-ignore
33
/.gitignore export-ignore
4-
/.unit-test export-ignore
54
/.version export-ignore
65
/README.md export-ignore
76
/build.xml export-ignore

.github/workflows/unit.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,8 @@ jobs:
1616
fail-fast: false
1717
matrix:
1818
php-version:
19-
- "8.1"
20-
- "8.2"
2119
- "8.3"
20+
- "8.4"
2221
mysql-version:
2322
- "mysql-5.7"
2423
- "mysql-8.0"

composer.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,22 @@
88
],
99
"license": "MIT",
1010
"require": {
11-
"php": ">=8.1",
11+
"php": ">=8.3",
1212
"ext-json": "*",
1313
"setbased/error-handler": "^1.3.0",
14-
"setbased/exception": "^2.3.0",
15-
"setbased/helper-code-store-mysql": "^2.2.0",
16-
"setbased/php-stratum-middle": "^5.12.0",
17-
"setbased/php-stratum-mysql": "^7.0.0",
14+
"setbased/exception": "^2.5.0",
15+
"setbased/helper-code-store-mysql": "^2.3.0",
16+
"setbased/php-stratum-middle": "^5.13.0",
17+
"setbased/php-stratum-mysql": "^7.1.0",
1818
"setbased/typed-config": "^2.0.0",
1919
"symfony/console": "^6.0|^7.0"
2020
},
2121
"require-dev": {
2222
"ext-pcntl": "*",
2323
"ext-posix": "*",
24-
"phing/phing": "^3.0.0",
25-
"phpunit/phpunit": "^10.5.35",
26-
"setbased/phing-extensions": "^3.1.0"
24+
"phing/phing": "^3.0.1",
25+
"phpunit/phpunit": "^11.5.22",
26+
"setbased/phing-extensions": "^3.2.0"
2727
},
2828
"autoload": {
2929
"psr-4": {

phpunit.xml

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,20 @@
1-
<?xml version="1.0"?>
2-
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="test/MySql/bootstrap.php" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
3-
<coverage processUncoveredFiles="true">
4-
<include>
5-
<directory suffix=".php">src</directory>
6-
</include>
7-
<exclude>
8-
<directory suffix=".php">vendor/setbased</directory>
9-
</exclude>
10-
<report>
11-
<clover outputFile="test/coverage.xml"/>
12-
<html outputDirectory="test/report"/>
13-
</report>
14-
</coverage>
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
4+
displayDetailsOnTestsThatTriggerDeprecations="true"
5+
displayDetailsOnTestsThatTriggerErrors="true"
6+
displayDetailsOnTestsThatTriggerNotices="true"
7+
displayDetailsOnTestsThatTriggerWarnings="true"
8+
displayDetailsOnPhpunitDeprecations="true">
159
<testsuites>
16-
<testsuite name="Tests">
10+
<testsuite name="default">
1711
<directory>test</directory>
1812
</testsuite>
1913
</testsuites>
20-
<logging/>
14+
15+
<source ignoreIndirectDeprecations="true" restrictNotices="true" restrictWarnings="true">
16+
<include>
17+
<directory>src</directory>
18+
</include>
19+
</source>
2120
</phpunit>

src/Audit/AlterAuditTable.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,6 @@ public function __construct(TypedConfig $config)
5656
//--------------------------------------------------------------------------------------------------------------------
5757
/**
5858
* The main method: executes the creates alter table statement actions for tables.
59-
*
60-
* return string
6159
*/
6260
public function main(): string
6361
{

src/Command/AlterAuditTableCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class AlterAuditTableCommand extends AuditCommand
1818
/**
1919
* @inheritdoc
2020
*/
21-
protected function configure()
21+
protected function configure(): void
2222
{
2323
$this->setName('alter-audit-table')
2424
->setDescription('Creates alter SQL statements for audit tables')

src/Command/AuditCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class AuditCommand extends BaseCommand
1919
/**
2020
* @inheritdoc
2121
*/
22-
protected function configure()
22+
protected function configure(): void
2323
{
2424
$this->setName('audit')
2525
->setDescription('Maintains audit tables and audit triggers')

src/Command/BaseCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,10 @@ public function readConfigFile(): void
8484
/**
8585
* Use for testing only.
8686
*
87-
* @param bool $rewriteConfigFile If true the config file must be rewritten. Otherwise the config must not be
87+
* @param bool $rewriteConfigFile If true, the config file must be rewritten. Otherwise, the config must not be
8888
* rewritten.
8989
*/
90-
public function setRewriteConfigFile(bool $rewriteConfigFile)
90+
public function setRewriteConfigFile(bool $rewriteConfigFile): void
9191
{
9292
$this->rewriteConfigFile = $rewriteConfigFile;
9393
}

src/Command/DiffCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class DiffCommand extends AuditCommand
1919
/**
2020
* @inheritdoc
2121
*/
22-
protected function configure()
22+
protected function configure(): void
2323
{
2424
$this->setName('diff')
2525
->setDescription('Compares data tables and audit tables')

src/Command/DropTriggersCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class DropTriggersCommand extends AuditCommand
1818
/**
1919
* @inheritdoc
2020
*/
21-
protected function configure()
21+
protected function configure(): void
2222
{
2323
$this->setName('drop-triggers')
2424
->setDescription('Drops all triggers')

src/Metadata/TableColumnsMetadata.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,6 @@ public static function notInOtherSet(TableColumnsMetadata $columns1,
116116
*
117117
* @param string $type The type of the metadata.
118118
* @param array $column The metadata of the column
119-
*
120-
* @return AlterColumnMetadata|AuditColumnMetadata|ColumnMetadata
121119
*/
122120
private static function columnFactory(string $type, array $column): ColumnMetadata
123121
{

test/MySql/AuditCommand/PhpPlaisio/PhpPlaisioTest.php

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -176,9 +176,9 @@ public function test02a(): void
176176
$row = $rows[0];
177177

178178
// Tests on fields.
179-
$time = new \DateTime();
179+
$time = new \DateTime('Europe/Amsterdam');
180180
self::assertLessThanOrEqual(date_format($time->add(new \DateInterval('PT1M')), 'Y-m-d H:i:s'), $row['audit_timestamp']);
181-
$time = new \DateTime();
181+
$time = new \DateTime('Europe/Amsterdam');
182182
self::assertGreaterThanOrEqual(date_format($time->sub(new \DateInterval('PT1M')), 'Y-m-d H:i:s'), $row['audit_timestamp']);
183183
self::assertSame('NEW', $row['audit_type']);
184184
self::assertNotEmpty($row['audit_uuid']);
@@ -224,9 +224,9 @@ public function test02b(): void
224224

225225
// Tests on 'OLD' fields.
226226
$row = $rows[RowSetHelper::searchInRowSet($rows, 'audit_type', 'OLD')];
227-
$time = new \DateTime();
227+
$time = new \DateTime('Europe/Amsterdam');
228228
self::assertLessThanOrEqual(date_format($time->add(new \DateInterval('PT1M')), 'Y-m-d H:i:s'), $row['audit_timestamp']);
229-
$time = new \DateTime();
229+
$time = new \DateTime('Europe/Amsterdam');
230230
self::assertGreaterThanOrEqual(date_format($time->sub(new \DateInterval('PT1M')), 'Y-m-d H:i:s'), $row['audit_timestamp']);
231231
self::assertSame('OLD', $row['audit_type']);
232232
self::assertNotEmpty($row['audit_uuid']);
@@ -239,9 +239,9 @@ public function test02b(): void
239239

240240
// Tests on 'NEW' fields.
241241
$row = $rows[RowSetHelper::searchInRowSet($rows, 'audit_type', 'NEW')];
242-
$time = new \DateTime();
242+
$time = new \DateTime('Europe/Amsterdam');
243243
self::assertLessThanOrEqual(date_format($time->add(new \DateInterval('PT1M')), 'Y-m-d H:i:s'), $row['audit_timestamp']);
244-
$time = new \DateTime();
244+
$time = new \DateTime('Europe/Amsterdam');
245245
self::assertGreaterThanOrEqual(date_format($time->sub(new \DateInterval('PT1M')), 'Y-m-d H:i:s'), $row['audit_timestamp']);
246246
self::assertSame('NEW', $row['audit_type']);
247247
self::assertNotEmpty($row['audit_uuid']);
@@ -282,9 +282,9 @@ public function test02c(): void
282282
$row = $rows[0];
283283

284284
// Tests on fields.
285-
$time = new \DateTime();
285+
$time = new \DateTime('Europe/Amsterdam');
286286
self::assertLessThanOrEqual(date_format($time->add(new \DateInterval('PT1M')), 'Y-m-d H:i:s'), $row['audit_timestamp']);
287-
$time = new \DateTime();
287+
$time = new \DateTime('Europe/Amsterdam');
288288
self::assertGreaterThanOrEqual(date_format($time->sub(new \DateInterval('PT1M')), 'Y-m-d H:i:s'), $row['audit_timestamp']);
289289
self::assertSame('OLD', $row['audit_type']);
290290
self::assertNotEmpty($row['audit_uuid']);
@@ -319,7 +319,6 @@ public function test02d(): void
319319
*/
320320
protected function setUp(): void
321321
{
322-
// Nothing to do.
323322
}
324323

325324
//--------------------------------------------------------------------------------------------------------------------

0 commit comments

Comments
 (0)