Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Symfony 5.x compatablity #114

Open
hafkenscheid opened this issue Dec 27, 2020 · 2 comments
Open

Symfony 5.x compatablity #114

hafkenscheid opened this issue Dec 27, 2020 · 2 comments

Comments

@hafkenscheid
Copy link

Today I installed this bundle in my SF 5.1 project and encountered the following issues:

Routing not working properly

Changed:

# Dmishh\SettingsBundle\Resources\config\routing.yml
dmishh_settings_manage_global:
    path:         /global
    defaults:     { _controller: DmishhSettingsBundle:Settings:manageGlobal }

dmishh_settings_manage_own:
    path:         /personal
    defaults:     { _controller: DmishhSettingsBundle:Settings:manageOwn }

into:

# Dmishh\SettingsBundle\Resources\config\routing.yml
dmishh_settings_manage_global:
    path:         /global
    defaults:
        _controller: Dmishh\SettingsBundle\Controller\SettingsController::manageGlobalAction

dmishh_settings_manage_own:
    path:         /personal
    defaults:
        _controller: Dmishh\SettingsBundle\Controller\SettingsController::manageOwnAction

Autowiring not working properly

Changed:

# Dmishh\SettingsBundle\Resources\config\services.yml
    Dmishh\SettingsBundle\Controller\SettingsController:
        arguments:
            - '@translator'
            - '@Dmishh\SettingsBundle\Manager\SettingsManagerInterface'
            - ~ # template
            - ~ # manage own settings
            - ~ # security role

Into:

# Dmishh\SettingsBundle\Resources\config\services.yml
    Dmishh\SettingsBundle\Controller\SettingsController:
        public: true
        autowire: true
        tags: ['container.service_subscriber']
        arguments:
            - '@translator'
            - '@Dmishh\SettingsBundle\Manager\SettingsManagerInterface'
            - ~ # template
            - ~ # manage own settings
            - ~ # security role

Using deprecated templating paths

Changed:

// Dmishh\SettingsBundle\DependencyInjection/Configuration.php

//...
        $rootNode
            ->children()
                ->scalarNode('template')
                    ->defaultValue('DmishhSettingsBundle:Settings:manage.html.twig')
//...

Into:

// Dmishh\SettingsBundle\DependencyInjection/Configuration.php

// ...
        $rootNode
            ->children()
                ->scalarNode('template')
                    ->defaultValue('@DmishhSettings/Settings/manage.html.twig')
//...

If I have the time, I will open a PR.

@rvanlaak
Copy link
Owner

Would be great if you can open a PR, so we can get this resolved.

@hafkenscheid
Copy link
Author

In that case, it might also be time to loose SF3.4 compatibility and update the dependencies.

@hafkenscheid hafkenscheid changed the title Symfony 5.1 compatablity Symfony 5.x compatablity May 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants