Skip to content

Commit 41cd2ca

Browse files
committed
remove getNamespace() and getXsdValidationBasePath() from ExtensionInterface
1 parent 6a2c5f4 commit 41cd2ca

File tree

6 files changed

+1
-66
lines changed

6 files changed

+1
-66
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ CHANGELOG
44
8.0
55
---
66

7+
* Remove `ExtensionInterface::getXsdValidationBasePath()` and `getNamespace()` without alternatives, the XML configuration format is no longer supported
78
* Add argument `$throwOnAbstract` to `ContainerBuilder::findTaggedResourceIds()`
89
* Registering a service without a class when its id is a non-existing FQCN throws an error
910
* Remove `#[TaggedIterator]` and `#[TaggedLocator]` attributes, replaced by `#[AutowireLocator]` and `#[AutowireIterator]`

ContainerBuilder.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -200,10 +200,6 @@ public function setProxyInstantiator(InstantiatorInterface $proxyInstantiator):
200200
public function registerExtension(ExtensionInterface $extension): void
201201
{
202202
$this->extensions[$extension->getAlias()] = $extension;
203-
204-
if (false !== $extension->getNamespace()) {
205-
$this->extensionsByNs[$extension->getNamespace() ?? ''] = $extension;
206-
}
207203
}
208204

209205
/**

Extension/Extension.php

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -28,22 +28,6 @@ abstract class Extension implements ExtensionInterface, ConfigurationExtensionIn
2828
{
2929
private array $processedConfigs = [];
3030

31-
/**
32-
* @deprecated since Symfony 7.4, to be removed in Symfony 8.0 together with XML support.
33-
*/
34-
public function getXsdValidationBasePath(): string|false
35-
{
36-
return false;
37-
}
38-
39-
/**
40-
* @deprecated since Symfony 7.4, to be removed in Symfony 8.0 together with XML support.
41-
*/
42-
public function getNamespace(): string
43-
{
44-
return 'http://example.org/schema/dic/'.$this->getAlias();
45-
}
46-
4731
/**
4832
* Returns the recommended alias to use in XML.
4933
*

Extension/ExtensionInterface.php

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -29,20 +29,6 @@ interface ExtensionInterface
2929
*/
3030
public function load(array $configs, ContainerBuilder $container): void;
3131

32-
/**
33-
* Returns the namespace to be used for this extension (XML namespace).
34-
*
35-
* @deprecated since Symfony 7.4, to be removed in Symfony 8.0 together with XML support.
36-
*/
37-
public function getNamespace(): string;
38-
39-
/**
40-
* Returns the base path for the XSD files.
41-
*
42-
* @deprecated since Symfony 7.4, to be removed in Symfony 8.0 together with XML support.
43-
*/
44-
public function getXsdValidationBasePath(): string|false;
45-
4632
/**
4733
* Returns the recommended alias to use in XML.
4834
*

Tests/Fixtures/includes/AcmeExtension.php

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,6 @@ public function load(array $configs, ContainerBuilder $configuration): void
1010
$configuration->setParameter('acme.configs', $configs);
1111
}
1212

13-
/**
14-
* @deprecated since Symfony 7.4, to be removed in Symfony 8.0 together with XML support.
15-
*/
16-
public function getXsdValidationBasePath(): string|false
17-
{
18-
return false;
19-
}
20-
21-
/**
22-
* @deprecated since Symfony 7.4, to be removed in Symfony 8.0 together with XML support.
23-
*/
24-
public function getNamespace(): string
25-
{
26-
return 'http://www.example.com/schema/acme';
27-
}
28-
2913
public function getAlias(): string
3014
{
3115
return 'acme';

Tests/Fixtures/includes/ProjectExtension.php

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -23,22 +23,6 @@ public function load(array $configs, ContainerBuilder $configuration): void
2323
$configuration->setParameter('project.parameter.foo', $config['foo'] ?? 'foobar');
2424
}
2525

26-
/**
27-
* @deprecated since Symfony 7.4, to be removed in Symfony 8.0 together with XML support.
28-
*/
29-
public function getXsdValidationBasePath(): string|false
30-
{
31-
return false;
32-
}
33-
34-
/**
35-
* @deprecated since Symfony 7.4, to be removed in Symfony 8.0 together with XML support.
36-
*/
37-
public function getNamespace(): string
38-
{
39-
return 'http://www.example.com/schema/project';
40-
}
41-
4226
public function getAlias(): string
4327
{
4428
return 'project';

0 commit comments

Comments
 (0)