Skip to content

Commit 2f1066a

Browse files
authored
[PWA-2401] Support PHP 8.0 and 8.1 for all PWA related repo's (#7)
* PWA-2401 Update PHP requirements to support PHP 8.0 and 8.1 * PWA-2401 Remove 8.1 support for now * Revert "PWA-2401 Remove 8.1 support for now" This reverts commit e9f08c5da986ba80119386436543b2afffcd7832. * PWA-2401 Remove 8.0 support to follow core * PWA-2401 Replace third party module with forked module compatible with PHP 8.1 * PWA-2401 Remove config * PWA-2401 Fix php 8.1 issues
1 parent 552c612 commit 2f1066a

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
"type": "library",
55
"license": "OSL-3.0",
66
"require": {
7-
"php": ">= 7.1",
7+
"php": "~7.4.0||~8.1.0",
88
"mustache/mustache": "^2.12",
9-
"ralouphie/mimey": "^2.0",
9+
"xantios/mimey": "^2.2",
1010
"symfony/yaml": "^2.3 || ^3.3 || ^4.0 || ^5.0",
1111
"laminas/laminas-http": "^2.6.0",
1212
"laminas/laminas-stdlib": "^3.2.1"

src/AbstractKeyValueStore.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public function count(): int
2727
return \count($this->data);
2828
}
2929

30-
public function current()
30+
public function current(): mixed
3131
{
3232
return $this->get($this->key());
3333
}
@@ -126,12 +126,12 @@ public function isList(): bool
126126
*
127127
* @return array
128128
*/
129-
public function jsonSerialize()
129+
public function jsonSerialize(): mixed
130130
{
131131
return $this->toArray();
132132
}
133133

134-
public function key()
134+
public function key(): mixed
135135
{
136136
return key($this->data);
137137
}

src/Context.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ public function isBuiltinValue($value): bool
105105
*/
106106
public function isStatusCode($value): bool
107107
{
108-
return (\is_int($value) || ctype_digit($value)) && 100 <= $value && $value < 600;
108+
return (\is_int($value) || (\is_string($value) && ctype_digit($value))) && 100 <= $value && $value < 600;
109109
}
110110

111111
/**

0 commit comments

Comments
 (0)