forked from symfony/symfony
-
-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
24 changed files
with
136 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,11 @@ | ||
CHANGELOG | ||
========= | ||
|
||
7.3 | ||
--- | ||
|
||
* Deprecate XmlDumper and XmlFileLoader | ||
|
||
7.2 | ||
--- | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,7 @@ | |
use Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument; | ||
use Symfony\Component\DependencyInjection\Argument\ServiceLocatorArgument; | ||
use Symfony\Component\DependencyInjection\Argument\TaggedIteratorArgument; | ||
use Symfony\Component\DependencyInjection\ContainerBuilder; | ||
use Symfony\Component\DependencyInjection\ContainerInterface; | ||
use Symfony\Component\DependencyInjection\Definition; | ||
use Symfony\Component\DependencyInjection\Exception\RuntimeException; | ||
|
@@ -29,11 +30,21 @@ | |
* | ||
* @author Fabien Potencier <[email protected]> | ||
* @author Martin Hasoň <[email protected]> | ||
* | ||
* @deprecated since Symfony 7.3 | ||
*/ | ||
class XmlDumper extends Dumper | ||
{ | ||
private \DOMDocument $document; | ||
|
||
public function __construct( | ||
protected ContainerBuilder $container, | ||
) { | ||
trigger_deprecation('symfony/dependency-injection', '7.3', \sprintf('The "%s" class is deprecated.', __CLASS__)); | ||
|
||
parent::__construct($container); | ||
} | ||
|
||
/** | ||
* Dumps the service container as an XML string. | ||
*/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,7 @@ | |
|
||
namespace Symfony\Component\DependencyInjection\Loader; | ||
|
||
use Symfony\Component\Config\FileLocatorInterface; | ||
use Symfony\Component\Config\Util\XmlUtils; | ||
use Symfony\Component\DependencyInjection\Alias; | ||
use Symfony\Component\DependencyInjection\Argument\AbstractArgument; | ||
|
@@ -34,13 +35,26 @@ | |
* XmlFileLoader loads XML files service definitions. | ||
* | ||
* @author Fabien Potencier <[email protected]> | ||
* | ||
* @deprecated since Symfony 7.3 | ||
*/ | ||
class XmlFileLoader extends FileLoader | ||
{ | ||
public const NS = 'http://symfony.com/schema/dic/services'; | ||
|
||
protected bool $autoRegisterAliasesForSinglyImplementedInterfaces = false; | ||
|
||
public function __construct( | ||
protected ContainerBuilder $container, | ||
FileLocatorInterface $locator, | ||
?string $env = null, | ||
protected bool $prepend = false, | ||
) { | ||
trigger_deprecation('symfony/dependency-injection', '7.3', \sprintf('The "%s" class is deprecated.', __CLASS__)); | ||
|
||
parent::__construct($container, $locator, $env, $prepend); | ||
} | ||
|
||
public function load(mixed $resource, ?string $type = null): mixed | ||
{ | ||
$path = $this->locator->locate($resource); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 0 additions & 11 deletions
11
...ymfony/Component/DependencyInjection/Tests/Fixtures/xml/services_inline_not_candidate.xml
This file was deleted.
Oops, something went wrong.
11 changes: 11 additions & 0 deletions
11
...mfony/Component/DependencyInjection/Tests/Fixtures/yaml/services_inline_not_candidate.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
services: | ||
foo: | ||
class: stdClass | ||
arguments: | ||
- !service | ||
class: Symfony\Component\DependencyInjection\Tests\Compiler\D | ||
|
||
autowired: | ||
class: Symfony\Component\DependencyInjection\Tests\Compiler\E | ||
autowire: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,11 @@ | ||
CHANGELOG | ||
========= | ||
|
||
7.3 | ||
--- | ||
|
||
* Deprecate XmlFileLoader | ||
|
||
7.2 | ||
--- | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,11 @@ | ||
CHANGELOG | ||
========= | ||
|
||
7.3 | ||
--- | ||
|
||
* Deprecate XmlFileLoader | ||
|
||
7.2 | ||
--- | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,6 +23,8 @@ | |
* Loads XML mapping files. | ||
* | ||
* @author Kévin Dunglas <[email protected]> | ||
* | ||
* @deprecated since Symfony 7.3 | ||
*/ | ||
class XmlFileLoader extends FileLoader | ||
{ | ||
|
@@ -33,6 +35,14 @@ class XmlFileLoader extends FileLoader | |
*/ | ||
private ?array $classes = null; | ||
|
||
public function __construct( | ||
protected string $file, | ||
) { | ||
trigger_deprecation('symfony/serializer', '7.3', \sprintf('The "%s" class is deprecated.', __CLASS__)); | ||
|
||
parent::__construct($file); | ||
} | ||
|
||
public function loadClassMetadata(ClassMetadataInterface $classMetadata): bool | ||
{ | ||
if (!$this->classes ??= $this->getClassesFromXml()) { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,6 +31,8 @@ | |
|
||
/** | ||
* @author Kévin Dunglas <[email protected]> | ||
* | ||
* @group legacy | ||
*/ | ||
class XmlFileLoaderTest extends TestCase | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,11 @@ | ||
CHANGELOG | ||
========= | ||
|
||
7.3 | ||
--- | ||
|
||
* Deprecate XmlFileLoader and XmlFilesLoader | ||
|
||
7.2 | ||
--- | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,6 +20,8 @@ | |
* Loads validation metadata from an XML file. | ||
* | ||
* @author Bernhard Schussek <[email protected]> | ||
* | ||
* @deprecated since Symfony 7.3 | ||
*/ | ||
class XmlFileLoader extends FileLoader | ||
{ | ||
|
@@ -30,9 +32,12 @@ class XmlFileLoader extends FileLoader | |
*/ | ||
protected array $classes; | ||
|
||
public function __construct(string $file) | ||
{ | ||
$this->file = $file; | ||
public function __construct( | ||
protected string $file, | ||
) { | ||
trigger_deprecation('symfony/validator', '7.3', \sprintf('The "%s" class is deprecated.', __CLASS__)); | ||
|
||
parent::__construct($file); | ||
} | ||
|
||
public function loadClassMetadata(ClassMetadata $metadata): bool | ||
|
Oops, something went wrong.