Skip to content

Commit 92ce2b9

Browse files
authored
[8.x] Throw deprecation errors in CI (#40324)
* Throw deprecation errors in CI * Fix return types * minimum ramsey/collection version * wip * Bump dotenv * wip
1 parent 679b8ac commit 92ce2b9

File tree

5 files changed

+12
-9
lines changed

5 files changed

+12
-9
lines changed

.github/workflows/tests.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ jobs:
5050
with:
5151
php-version: ${{ matrix.php }}
5252
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, gd, redis, memcached
53+
ini-values: error_reporting=E_ALL
5354
tools: composer:v2
5455
coverage: none
5556

@@ -66,7 +67,7 @@ jobs:
6667
with:
6768
timeout_minutes: 5
6869
max_attempts: 5
69-
command: composer require league/commonmark:^2.0.2 phpunit/phpunit:^9.5.8 --no-interaction --no-update
70+
command: composer require league/commonmark:^2.0.2 phpunit/phpunit:^9.5.8 ramsey/collection:^1.2 brick/math:^0.9.3 --no-interaction --no-update
7071
if: matrix.php >= 8.1
7172

7273
- name: Install dependencies

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
"symfony/routing": "^5.4",
4444
"symfony/var-dumper": "^5.4",
4545
"tijsverkoyen/css-to-inline-styles": "^2.2.2",
46-
"vlucas/phpdotenv": "^5.2",
46+
"vlucas/phpdotenv": "^5.4.1",
4747
"voku/portable-ascii": "^1.4.8"
4848
},
4949
"replace": {

src/Illuminate/Support/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
"ramsey/uuid": "Required to use Str::uuid() (^4.2.2).",
4747
"symfony/process": "Required to use the composer class (^5.4).",
4848
"symfony/var-dumper": "Required to use the dd function (^5.4).",
49-
"vlucas/phpdotenv": "Required to use the Env class and env helper (^5.2)."
49+
"vlucas/phpdotenv": "Required to use the Env class and env helper (^5.4.1)."
5050
},
5151
"config": {
5252
"sort-packages": true

tests/Support/SupportFacadeTest.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,22 +94,23 @@ public function instance($key, $instance)
9494
$this->attributes[$key] = $instance;
9595
}
9696

97-
public function offsetExists($offset)
97+
public function offsetExists($offset): bool
9898
{
9999
return isset($this->attributes[$offset]);
100100
}
101101

102+
#[\ReturnTypeWillChange]
102103
public function offsetGet($key)
103104
{
104105
return $this->attributes[$key];
105106
}
106107

107-
public function offsetSet($key, $value)
108+
public function offsetSet($key, $value): void
108109
{
109110
$this->attributes[$key] = $value;
110111
}
111112

112-
public function offsetUnset($key)
113+
public function offsetUnset($key): void
113114
{
114115
unset($this->attributes[$key]);
115116
}

tests/Support/SupportHelpersTest.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -795,22 +795,23 @@ public function __construct($attributes = [])
795795
$this->attributes = $attributes;
796796
}
797797

798-
public function offsetExists($offset)
798+
public function offsetExists($offset): bool
799799
{
800800
return array_key_exists($offset, $this->attributes);
801801
}
802802

803+
#[\ReturnTypeWillChange]
803804
public function offsetGet($offset)
804805
{
805806
return $this->attributes[$offset];
806807
}
807808

808-
public function offsetSet($offset, $value)
809+
public function offsetSet($offset, $value): void
809810
{
810811
$this->attributes[$offset] = $value;
811812
}
812813

813-
public function offsetUnset($offset)
814+
public function offsetUnset($offset): void
814815
{
815816
unset($this->attributes[$offset]);
816817
}

0 commit comments

Comments
 (0)