public function removePackage(PackageInterface $package) { if ($this->packages->contains($package)) { $this->packages->removeElement($package); } }