Skip to content

Commit ace0cd4

Browse files
authored
PHP8.1 - \ReturnTypeWillChange for offsetGet (#15)
* `ReturnTypeWillChange` for `offsetGet` (php 8.1) * Update PHP deps
1 parent 257364a commit ace0cd4

File tree

3 files changed

+15
-4
lines changed

3 files changed

+15
-4
lines changed

.phan.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
// Libs
3030
'vendor/jbzoo/utils',
3131
'vendor/symfony/yaml',
32+
'vendor/symfony/polyfill-php81'
3233
]
3334
]);
3435

composer.json

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,15 @@
1717
},
1818

1919
"require-dev" : {
20-
"jbzoo/toolbox-dev" : "^3.1.0",
21-
"jbzoo/utils" : "^4.4.0",
22-
"symfony/yaml" : "^4.4|^5.0"
20+
"jbzoo/toolbox-dev" : "^3.1.0",
21+
"jbzoo/utils" : "^4.4.0",
22+
"symfony/yaml" : ">=4.4",
23+
24+
"symfony/polyfill-ctype" : ">=1.23.0",
25+
"symfony/polyfill-mbstring" : ">=1.23.0",
26+
"symfony/polyfill-php73" : ">=1.23.0",
27+
"symfony/polyfill-php80" : ">=1.23.0",
28+
"symfony/polyfill-php81" : ">=1.23.0"
2329
},
2430

2531
"suggest" : {
@@ -41,7 +47,10 @@
4147
},
4248

4349
"config" : {
44-
"optimize-autoloader" : true
50+
"optimize-autoloader" : true,
51+
"allow-plugins" : {
52+
"composer/package-versions-deprecated" : true
53+
}
4554
},
4655

4756
"extra" : {

src/Data.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,7 @@ protected static function isMulti(array $array): bool
283283
* @param int|string $key
284284
* @return mixed|null
285285
*/
286+
#[\ReturnTypeWillChange]
286287
public function offsetGet($key)
287288
{
288289
if (!\property_exists($this, (string)$key)) {

0 commit comments

Comments
 (0)