Loading core/lib/Drupal/Core/DependencyInjection/ContainerBuilder.php +0 −6 Original line number Diff line number Diff line Loading @@ -41,9 +41,6 @@ public function __construct(ParameterBagInterface $parameterBag = NULL) { * services in a frozen builder. */ public function set($id, $service) { if (strtolower($id) !== $id) { throw new \InvalidArgumentException("Service ID names must be lowercase: $id"); } SymfonyContainer::set($id, $service); } Loading @@ -51,9 +48,6 @@ public function set($id, $service) { * {@inheritdoc} */ public function register($id, $class = NULL): Definition { if (strtolower($id) !== $id) { throw new \InvalidArgumentException("Service ID names must be lowercase: $id"); } $definition = new Definition($class); // As of Symfony 5.2 all services are private by default, but in Drupal // services are still public by default. Loading core/tests/Drupal/Tests/Core/DependencyInjection/ContainerBuilderTest.php +0 −21 Original line number Diff line number Diff line Loading @@ -24,17 +24,6 @@ public function testGet() { $this->assertInstanceOf(BarClass::class, $result); } /** * @covers ::set */ public function testSetException() { $container = new ContainerBuilder(); $class = new BarClass(); $this->expectException(\InvalidArgumentException::class); $this->expectExceptionMessage('Service ID names must be lowercase: Bar'); $container->set('Bar', $class); } /** * @covers ::setParameter */ Loading @@ -45,16 +34,6 @@ public function testSetParameterException() { $container->setParameter('Buzz', 'buzz'); } /** * @covers ::register */ public function testRegisterException() { $container = new ContainerBuilder(); $this->expectException(\InvalidArgumentException::class); $this->expectExceptionMessage('Service ID names must be lowercase: Bar'); $container->register('Bar'); } /** * @covers ::register */ Loading Loading
core/lib/Drupal/Core/DependencyInjection/ContainerBuilder.php +0 −6 Original line number Diff line number Diff line Loading @@ -41,9 +41,6 @@ public function __construct(ParameterBagInterface $parameterBag = NULL) { * services in a frozen builder. */ public function set($id, $service) { if (strtolower($id) !== $id) { throw new \InvalidArgumentException("Service ID names must be lowercase: $id"); } SymfonyContainer::set($id, $service); } Loading @@ -51,9 +48,6 @@ public function set($id, $service) { * {@inheritdoc} */ public function register($id, $class = NULL): Definition { if (strtolower($id) !== $id) { throw new \InvalidArgumentException("Service ID names must be lowercase: $id"); } $definition = new Definition($class); // As of Symfony 5.2 all services are private by default, but in Drupal // services are still public by default. Loading
core/tests/Drupal/Tests/Core/DependencyInjection/ContainerBuilderTest.php +0 −21 Original line number Diff line number Diff line Loading @@ -24,17 +24,6 @@ public function testGet() { $this->assertInstanceOf(BarClass::class, $result); } /** * @covers ::set */ public function testSetException() { $container = new ContainerBuilder(); $class = new BarClass(); $this->expectException(\InvalidArgumentException::class); $this->expectExceptionMessage('Service ID names must be lowercase: Bar'); $container->set('Bar', $class); } /** * @covers ::setParameter */ Loading @@ -45,16 +34,6 @@ public function testSetParameterException() { $container->setParameter('Buzz', 'buzz'); } /** * @covers ::register */ public function testRegisterException() { $container = new ContainerBuilder(); $this->expectException(\InvalidArgumentException::class); $this->expectExceptionMessage('Service ID names must be lowercase: Bar'); $container->register('Bar'); } /** * @covers ::register */ Loading