mirror of
https://github.com/maximebf/php-debugbar.git
synced 2025-07-25 02:31:25 +02:00
Add #[ReturnTypeWillChange] attribute to suppress deprecation warning… (#481)
* Add #[ReturnTypeWillChange] attribute to suppress deprecation warnings and fatal error Error occurs on php 7.4 >= * Same in other 4 methods #[\ReturnTypeWillChange] Add #[\ReturnTypeWillChange] in other 4 methods to avoid E_DEPRECATED or E_FATAL (php 7.4 >=)
This commit is contained in:
@@ -471,21 +471,25 @@ class DebugBar implements ArrayAccess
|
||||
// --------------------------------------------
|
||||
// ArrayAccess implementation
|
||||
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetSet($key, $value)
|
||||
{
|
||||
throw new DebugBarException("DebugBar[] is read-only");
|
||||
}
|
||||
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetGet($key)
|
||||
{
|
||||
return $this->getCollector($key);
|
||||
}
|
||||
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetExists($key)
|
||||
{
|
||||
return $this->hasCollector($key);
|
||||
}
|
||||
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetUnset($key)
|
||||
{
|
||||
throw new DebugBarException("DebugBar[] is read-only");
|
||||
|
Reference in New Issue
Block a user