Skip to content

Commit e8ac349

Browse files
authored
Add #[ReturnTypeWillChange] attribute to suppress deprecation warning… (php-debugbar#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 >=)
1 parent 3541f09 commit e8ac349

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/DebugBar/DebugBar.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -471,21 +471,25 @@ public function getJavascriptRenderer($baseUrl = null, $basePath = null)
471471
// --------------------------------------------
472472
// ArrayAccess implementation
473473

474+
#[\ReturnTypeWillChange]
474475
public function offsetSet($key, $value)
475476
{
476477
throw new DebugBarException("DebugBar[] is read-only");
477478
}
478479

480+
#[\ReturnTypeWillChange]
479481
public function offsetGet($key)
480482
{
481483
return $this->getCollector($key);
482484
}
483485

486+
#[\ReturnTypeWillChange]
484487
public function offsetExists($key)
485488
{
486489
return $this->hasCollector($key);
487490
}
488491

492+
#[\ReturnTypeWillChange]
489493
public function offsetUnset($key)
490494
{
491495
throw new DebugBarException("DebugBar[] is read-only");

0 commit comments

Comments
 (0)