Skip to content

Commit b1c5883

Browse files
authored
Drop PHP 7.4 support (#107)
1 parent 628ba5a commit b1c5883

File tree

10 files changed

+14
-17
lines changed

10 files changed

+14
-17
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@ jobs:
1515
strategy:
1616
matrix:
1717
php-version:
18-
- "7.4"
18+
- "8.0"
1919
- "8.0"
2020
- "8.1"
2121
dependencies:
2222
- "highest"
2323
include:
2424
- dependencies: "lowest"
25-
php-version: "7.4"
25+
php-version: "8.0"
2626

2727
steps:
2828
- name: "Checkout"

.github/workflows/coding-standards.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
strategy:
1515
matrix:
1616
php-version:
17-
- "7.4"
17+
- "8.0"
1818

1919
steps:
2020
- name: "Checkout"

.github/workflows/infection.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
- name: "Install PHP"
2020
uses: "shivammathur/setup-php@v2"
2121
with:
22-
php-version: 7.4
22+
php-version: 8.0
2323
coverage: "pcov"
2424

2525
- name: "Install dependencies with Composer"

.github/workflows/static-analysis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
strategy:
1515
matrix:
1616
php-version:
17-
- "7.4"
17+
- "8.0"
1818

1919
steps:
2020
- name: "Checkout code"
@@ -40,7 +40,7 @@ jobs:
4040
strategy:
4141
matrix:
4242
php-version:
43-
- "7.4"
43+
- "8.0"
4444

4545
steps:
4646
- name: "Checkout code"

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
}
1919
},
2020
"require": {
21-
"php": "^7.4 || ^8.0",
21+
"php": "^8.0",
2222
"thecodingmachine/safe": "^1.0.2",
2323
"webonyx/graphql-php": "^14.0"
2424
},

phpcs.xml.dist

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
<arg name="cache" value=".phpcs-cache" />
77
<arg name="colors" />
88

9+
<config name="php_version" value="80000"/>
10+
911
<!-- Ignore warnings, show progress of the run and show sniff names -->
1012
<arg value="nps" />
1113

src/Builder/FieldBuilder.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,9 @@ public function setDescription(string $description): self
3737
}
3838

3939
/**
40-
* @param mixed $defaultValue
41-
*
4240
* @return static
4341
*/
44-
public function addArgument(string $name, Type $type, ?string $description = null, $defaultValue = null): self
42+
public function addArgument(string $name, Type $type, ?string $description = null, mixed $defaultValue = null): self
4543
{
4644
$this->parameters['args'][$name] = ['type' => $type];
4745

src/Builder/ObjectBuilder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public function addInterface(InterfaceType $interfaceType): self
4242
*
4343
* @return static
4444
*/
45-
public function setFields($fields): self
45+
public function setFields(callable|array $fields): self
4646
{
4747
$this->fields = $fields;
4848

src/Exception/InvalidArgument.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ public static function invalidNameFormat(string $invalidName): self
2424
return new self(sprintf('Name "%s" does not match pattern "%s"', $invalidName, TypeBuilder::VALID_NAME_PATTERN));
2525
}
2626

27-
/** @param mixed $invalidValue */
28-
public static function valueNotIso8601Compliant($invalidValue): self
27+
public static function valueNotIso8601Compliant(mixed $invalidValue): self
2928
{
3029
return new self(sprintf(
3130
'DateTime type expects input value to be ISO 8601 compliant. Given invalid value "%s"',

src/Type/DateTimeType.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,7 @@ public function __construct()
4949
);
5050
}
5151

52-
/** @param mixed $value */
53-
public function serialize($value): string
52+
public function serialize(mixed $value): string
5453
{
5554
if (! $value instanceof DateTimeInterface) {
5655
throw new InvariantViolation(
@@ -61,8 +60,7 @@ public function serialize($value): string
6160
return $value->format(DateTimeInterface::ATOM);
6261
}
6362

64-
/** @param mixed $value */
65-
public function parseValue($value): DateTimeImmutable
63+
public function parseValue(mixed $value): DateTimeImmutable
6664
{
6765
if (! is_string($value)) {
6866
throw new InvalidArgumentException();

0 commit comments

Comments
 (0)