automapper-plus-bundle icon indicating copy to clipboard operation
automapper-plus-bundle copied to clipboard

Missing support for Symfony 7

Open tarlepp opened this issue 1 year ago • 4 comments
trafficstars

It would be great if this amazing library supports also new Symfony 7.

tarlepp avatar Dec 02 '23 12:12 tarlepp

Hi @tarlepp, I added support for Symfony 7 on a separate branch, feature/symfony-7. Once that's tested for a bit, I'll bump the version.

mark-gerarts avatar Dec 02 '23 15:12 mark-gerarts

I still get deprecation infos when using the bundle (on Symfony 6.4)

This is not fixed in the bundle if I see correctly.

So maybe we can add a "void" here?

class AutoMapperPlusExtension extends Extension
{
    private const DEFAULT_OPTIONS_CONFIGURATOR_SERVICE_ID = 'automapper_plus.default_options_configurator';


    /**
     * @inheritdoc
     */
    public function load(array $configs, ContainerBuilder $container)
    {

Deprecation warning:

[2023-12-12T16:14:13.083778+00:00] php.INFO: User Deprecated: Method "Symfony\Component\DependencyInjection\Extension\ExtensionInterface::load()" might add "void" as a native return type declaration in the future. Do the same in implementation "AutoMapperPlus\AutoMapperPlusBundle\DependencyInjection\AutoMapperPlusExtension" now to avoid errors or add an explicit @return annotation to suppress this message. {"exception":"[object] (ErrorException(code: 0): User Deprecated: Method \"Symfony\\Component\\DependencyInjection\\Extension\\ExtensionInterface::load()\" might add \"void\" as a native return type declaration in the future. Do the same in implementation \"AutoMapperPlus\\AutoMapperPlusBundle\\DependencyInjection\\AutoMapperPlusExtension\" now to avoid errors or add an explicit @return annotation to suppress this message. at /srv/app/vendor/symfony/error-handler/DebugClassLoader.php:337)
[stacktrace]

th-lange avatar Dec 13 '23 06:12 th-lange

Same goes for:

class ConfigurationLoaderPass implements CompilerPassInterface {

     // ....

    /**
     * @inheritdoc
     */
    public function process(ContainerBuilder $container)

th-lange avatar Dec 13 '23 06:12 th-lange

Hi @mark-gerarts, is this ready on Composer for Symfony 7?

shoaibgitrepo avatar Jan 18 '24 18:01 shoaibgitrepo

Thanks to #27, this should be fixed on master. Can you confirm this is working? I'll tag a new version then.

mark-gerarts avatar Mar 04 '24 06:03 mark-gerarts

Changes are available starting from release 1.5.0.

mark-gerarts avatar Apr 13 '24 13:04 mark-gerarts