Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions UPGRADE-7.4.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ DependencyInjection
* Add argument `$throwOnAbstract` to `ContainerBuilder::findTaggedResourceIds()`
* Deprecate registering a service without a class when its id is a non-existing FQCN
* Deprecate using `$this` or its internal scope from PHP config files; use the `$loader` variable instead
* Deprecate XML configuration format, use YAML or PHP instead
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we must have a more elaborate UPGRADE description. People will need some guidance on how to migrate their XML config to the other formats.
Do we tell them to use the documentation (related symfony/symfony-docs#21449 (comment))? Do we link any migration tool, if it's created? Let's brainstorm on how to best help the community here.


DoctrineBridge
--------------
Expand Down Expand Up @@ -94,6 +95,7 @@ Routing
* Deprecate class aliases in the `Annotation` namespace, use attributes instead
* Deprecate getters and setters in attribute classes in favor of public properties
* Deprecate accessing the internal scope of the loader in PHP config files, use only its public API instead
* Deprecate XML configuration format, use YAML, PHP or attributes instead

Security
--------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,14 @@

namespace Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection;

use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\IgnoreDeprecations;
use Symfony\Component\Config\FileLocator;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Loader\XmlFileLoader;

#[IgnoreDeprecations]
#[Group('legacy')]
class XmlFrameworkExtensionTest extends FrameworkExtensionTestCase
{
protected function loadFromFile(ContainerBuilder $container, $file)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,14 @@

namespace Symfony\Bundle\SecurityBundle\Tests\DependencyInjection;

use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\IgnoreDeprecations;
use Symfony\Component\Config\FileLocator;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Loader\XmlFileLoader;

#[IgnoreDeprecations]
#[Group('legacy')]
class XmlCompleteConfigurationTest extends CompleteConfigurationTestCase
{
public function testFirewallPatterns()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,17 @@
namespace Symfony\Bundle\SecurityBundle\Tests\DependencyInjection;

use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\IgnoreDeprecations;
use PHPUnit\Framework\TestCase;
use Symfony\Bundle\SecurityBundle\DependencyInjection\SecurityExtension;
use Symfony\Bundle\SecurityBundle\Tests\DependencyInjection\Fixtures\Authenticator\CustomAuthenticator;
use Symfony\Component\Config\FileLocator;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Loader\XmlFileLoader;

#[IgnoreDeprecations]
#[Group('legacy')]
class XmlCustomAuthenticatorTest extends TestCase
{
#[DataProvider('provideXmlConfigurationFile')]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,17 @@
namespace Symfony\Bundle\SecurityBundle\Tests\DependencyInjection;

use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\IgnoreDeprecations;
use PHPUnit\Framework\TestCase;
use Symfony\Bundle\SecurityBundle\DependencyInjection\SecurityExtension;
use Symfony\Bundle\SecurityBundle\Tests\DependencyInjection\Fixtures\UserProvider\CustomProvider;
use Symfony\Component\Config\FileLocator;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Loader\XmlFileLoader;

#[IgnoreDeprecations]
#[Group('legacy')]
class XmlCustomProviderTest extends TestCase
{
#[DataProvider('provideXmlConfigurationFile')]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@
use Symfony\Component\Config\FileLocator;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Extension\Extension;
use Symfony\Component\DependencyInjection\Loader\XmlFileLoader;
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;

class FirewallEntryPointExtension extends Extension
{
public function load(array $configs, ContainerBuilder $container): void
{
$loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
$loader->load('services.xml');
$loader = new YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
$loader->load('services.yml');
}
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
services:
firewall_entry_point.entry_point.stub:
class: Symfony\Bundle\SecurityBundle\Tests\Functional\Bundle\FirewallEntryPointBundle\Security\EntryPointStub
Loading
Loading