diff --git a/LICENSE b/LICENSE index 74cdc2dbf..7536caeae 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2018-2022 Fabien Potencier +Copyright (c) 2018-present Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 41e054a10..42841a57d 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ Symfony Service Contracts A set of abstractions extracted out of the Symfony components. -Can be used to build on semantics that the Symfony components proved useful - and +Can be used to build on semantics that the Symfony components proved useful and that already have battle tested implementations. See https://github.com/symfony/contracts/blob/main/README.md for more information. diff --git a/ResetInterface.php b/ResetInterface.php index 1af1075ee..a4f389b01 100644 --- a/ResetInterface.php +++ b/ResetInterface.php @@ -26,5 +26,8 @@ */ interface ResetInterface { + /** + * @return void + */ public function reset(); } diff --git a/ServiceProviderInterface.php b/ServiceProviderInterface.php index a28fd82ea..c05e4bfe7 100644 --- a/ServiceProviderInterface.php +++ b/ServiceProviderInterface.php @@ -19,7 +19,7 @@ * @author Nicolas Grekas * @author Mateusz Sip * - * @template T of mixed + * @template-covariant T of mixed */ interface ServiceProviderInterface extends ContainerInterface { diff --git a/ServiceSubscriberTrait.php b/ServiceSubscriberTrait.php index f7cd3a941..f3b450cd6 100644 --- a/ServiceSubscriberTrait.php +++ b/ServiceSubscriberTrait.php @@ -66,12 +66,13 @@ public static function getSubscribedServices(): array #[Required] public function setContainer(ContainerInterface $container): ?ContainerInterface { - $this->container = $container; - + $ret = null; if (method_exists(get_parent_class(self::class) ?: '', __FUNCTION__)) { - return parent::setContainer($container); + $ret = parent::setContainer($container); } - return null; + $this->container = $container; + + return $ret; } }