1
0
mirror of https://github.com/flarum/core.git synced 2025-08-01 22:20:21 +02:00

fix: PHP 8.1 deprecation warnings (#3384)

This commit is contained in:
Sami Mazouz
2022-04-19 21:14:52 +01:00
committed by GitHub
parent 09bed537b3
commit be2da3e12f
2 changed files with 6 additions and 5 deletions

View File

@@ -37,7 +37,6 @@
}, },
"require": { "require": {
"php": ">=7.3", "php": ">=7.3",
"axy/sourcemap": "^0.1.4",
"components/font-awesome": "^5.14.0", "components/font-awesome": "^5.14.0",
"dflydev/fig-cookies": "^3.0.0", "dflydev/fig-cookies": "^3.0.0",
"doctrine/dbal": "^2.7", "doctrine/dbal": "^2.7",
@@ -75,6 +74,8 @@
"psr/http-server-handler": "^1.0", "psr/http-server-handler": "^1.0",
"psr/http-server-middleware": "^1.0", "psr/http-server-middleware": "^1.0",
"s9e/text-formatter": "^2.3.6", "s9e/text-formatter": "^2.3.6",
"sycho/json-api": "^0.5.0",
"sycho/sourcemap": "^2.0.0",
"symfony/config": "^5.2.2", "symfony/config": "^5.2.2",
"symfony/console": "^5.2.2", "symfony/console": "^5.2.2",
"symfony/event-dispatcher": "^5.2.2", "symfony/event-dispatcher": "^5.2.2",
@@ -82,7 +83,6 @@
"symfony/polyfill-intl-messageformatter": "^1.22.0", "symfony/polyfill-intl-messageformatter": "^1.22.0",
"symfony/translation": "^5.1.5", "symfony/translation": "^5.1.5",
"symfony/yaml": "^5.2.2", "symfony/yaml": "^5.2.2",
"tobscure/json-api": "^0.3.0",
"wikimedia/less.php": "^3.0" "wikimedia/less.php": "^3.0"
}, },
"require-dev": { "require-dev": {

View File

@@ -53,22 +53,23 @@ class Config implements ArrayAccess
} }
} }
#[\ReturnTypeWillChange]
public function offsetGet($offset) public function offsetGet($offset)
{ {
return Arr::get($this->data, $offset); return Arr::get($this->data, $offset);
} }
public function offsetExists($offset) public function offsetExists($offset): bool
{ {
return Arr::has($this->data, $offset); return Arr::has($this->data, $offset);
} }
public function offsetSet($offset, $value) public function offsetSet($offset, $value): void
{ {
throw new RuntimeException('The Config is immutable'); throw new RuntimeException('The Config is immutable');
} }
public function offsetUnset($offset) public function offsetUnset($offset): void
{ {
throw new RuntimeException('The Config is immutable'); throw new RuntimeException('The Config is immutable');
} }