src/Bag.php
public function removeItem($item)
    {
        Deprecated::method(1.1, MutableBag::class);

        $key = array_search($item, $this->items, true);

        if ($key !== false) {
            unset($this->items[$key]);
        }
    }
public function removeItem($item)
    {
        Deprecated::method(1.1, MutableBag::class);

        $key = array_search($item, $this->items, true);

        if ($key !== false) {
            unset($this->items[$key]);
        }
    }
Removes the given item from the bag if it is found.

@param mixed $item

@deprecated since 1.1 and will be removed in 2.0. Use {@see MutableBag} instead.