SettingsBundle
SettingsBundle copied to clipboard
Symfony 5.x compatablity
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.
Would be great if you can open a PR, so we can get this resolved.
In that case, it might also be time to loose SF3.4 compatibility and update the dependencies.