code: public function offsetSet($offset, $value)
      {
          //throw new BadMethodCallException(sprintf('Cannot modify items on an %s', __CLASS__));
  
          Deprecated::method(1.1, MutableBag::class);
  
          if ($offset === null) {
              $this->items[] = $value;
          } else {
              $this->items[$offset] = $value;
          }
      }
docs: Don't call directly. Used for ArrayAccess.
  
  @internal
  
  @inheritdoc