Skip to content

Commit 7ec282d

Browse files
committed
Support for PHP 8.3 and 8.4 only.
1 parent 2a741fc commit 7ec282d

5 files changed

Lines changed: 27 additions & 27 deletions

File tree

.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

2322
steps:
2423
- name: "Checkout"

.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
/.phpunit.result.cache
33
/bin/
44
/composer.lock
5-
/custom.task.properties
6-
/custom.type.properties
75
/test/coverage.xml
86
/test/report/
97
/vendor/

composer.json

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,21 @@
88
],
99
"license": "MIT",
1010
"require": {
11-
"php": ">=8.1",
11+
"php": ">=8.3",
1212
"plaisio/cgi": "^1.3.0",
1313
"plaisio/exception": "^1.2.0",
1414
"plaisio/helper-html": "^4.1.0",
1515
"plaisio/helper-url": "^1.2.0",
1616
"plaisio/kernel": "^3.2.1",
1717
"plaisio/obfuscator": "^2.1.0",
18-
"setbased/helper-cast": "^3.0.0"
18+
"setbased/helper-cast": "^3.1.0"
1919
},
20-
"minimum-stability": "dev",
21-
"prefer-stable": true,
2220
"require-dev": {
23-
"phing/phing": "^3.0.0-RC4",
24-
"phpunit/phpunit": "^9.6.3",
25-
"plaisio/cgi-test": "^1.5.0",
26-
"plaisio/console-kernel": "^1.0.1",
27-
"plaisio/obfuscator-core": "^3.1.0"
21+
"phing/phing": "^3.0.1",
22+
"phpunit/phpunit": "^11.5.22",
23+
"plaisio/cgi-test": "^1.6.0",
24+
"plaisio/console-kernel": "^1.1.0",
25+
"plaisio/obfuscator-core": "^3.3.0"
2826
},
2927
"autoload": {
3028
"psr-4": {

src/CoreCgi.php

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,10 @@ public function getManUrl(string $name, ?string $default = null, bool $forceRela
183183
public function getOptBool(string $name, ?bool $default = null): ?bool
184184
{
185185
$value = $_GET[$name] ?? null;
186-
if ($value==='') $value = null;
186+
if ($value==='')
187+
{
188+
$value = null;
189+
}
187190

188191
try
189192
{
@@ -210,7 +213,10 @@ public function getOptBool(string $name, ?bool $default = null): ?bool
210213
public function getOptFloat(string $name, ?float $default = null): ?float
211214
{
212215
$value = $_GET[$name] ?? null;
213-
if ($value==='') $value = null;
216+
if ($value==='')
217+
{
218+
$value = null;
219+
}
214220

215221
try
216222
{
@@ -265,7 +271,10 @@ public function getOptId(string $name, string $label, ?int $default = null): ?in
265271
public function getOptInt(string $name, ?int $default = null): ?int
266272
{
267273
$value = $_GET[$name] ?? null;
268-
if ($value==='') $value = null;
274+
if ($value==='')
275+
{
276+
$value = null;
277+
}
269278

270279
try
271280
{
@@ -294,7 +303,10 @@ public function getOptInt(string $name, ?int $default = null): ?int
294303
public function getOptString(string $name, ?string $default = null): ?string
295304
{
296305
$value = $_GET[$name] ?? null;
297-
if ($value==='') $value = null;
306+
if ($value==='')
307+
{
308+
$value = null;
309+
}
298310

299311
try
300312
{

test/CoreCgiTest.php

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,20 @@
33

44
namespace Plaisio\Cgi\Test;
55

6+
use Plaisio\Kernel\Nub;
7+
68
/**
79
* Concrete implementation of the unit test.
810
*/
911
class CoreCgiTest extends CgiTest
1012
{
11-
//--------------------------------------------------------------------------------------------------------------------
12-
/**
13-
* @inheritDoc
14-
*/
15-
public function setUp(): void
16-
{
17-
$this->kernel = new TestKernel();
18-
}
19-
2013
//--------------------------------------------------------------------------------------------------------------------
2114
/**
2215
* Test cases for putLeader.
2316
*/
2417
public function testPutLeader(): void
2518
{
26-
$value = $this->kernel->cgi->putLeader();
19+
$value = Nub::$nub->cgi->putLeader();
2720
self::assertSame('', $value);
2821
}
2922

0 commit comments

Comments
 (0)