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

Load commands explicit as auto-dicovery way deprecated in Symfony 3.4 #215

Closed
wants to merge 1 commit into from
Closed

Load commands explicit as auto-dicovery way deprecated in Symfony 3.4 #215

wants to merge 1 commit into from

Conversation

kevinpapst
Copy link
Contributor

@kevinpapst kevinpapst commented Jan 12, 2018

Hi guys,

with Symfony 3.4 auto-discovery for Commands was deprecated:
symfony/symfony#23488
symfony/symfony#23805

That means the AdminTheme Commands avanzu:admin:* are not available in case of deactivated auto-wiring. With Symfony 4 this is the default behaviour and the commands are never available.

While migrating a Project of mine to SF4, I couldn't properly initialize the theme as the commands wheren't available and I had to add the attached changes to services.yml to make them callable.

These 3 lines register the command directory for Service discovery and the commands will be available when executing bin/console.I tested it only with Symfony 4, but according to Symfony core devs it will at least work with 3.4 as well: symfony/symfony#23488 (comment)

@shakaran
Copy link
Collaborator

@kevinpapst thanks for this, but for merge in master, I need really know if it will not break symfony 2.X and 3.X version, so we need ensure the behaviour for current supported SF versions

@kevinpapst
Copy link
Contributor Author

kevinpapst commented Jan 12, 2018

I totally understand that. Is there a demo app repo which we can use for testing?
If not, we should add one, probably forking https://github.com/symfony/demo/ and adding AdminThemeBundle on top, that should make it easy to test things out.
I do not have any experience with Symfony 2, but I can help with testing Symfony 3.3 and lower.

Do you plan to support Symfony 2 and 3 for the v2 release? And what is your plan for deprecating/skipping support old Symfony versions? I am curious, because I have some more adjustments for Symfony 4 which I could sent in, but to be honest: I don't want to test the old versions for every change.

EDIT: There is a fork for the Symfony 3.4 and 4 users which includes these changes:
https://github.com/kevinpapst/AdminLTEBundle

@shakaran
Copy link
Collaborator

shakaran commented Mar 4, 2019

All this changes has been merged now via e449c13

In the new branch "experimental-symfony-4.x"

https://github.com/shakaran/AdminThemeBundle/tree/experimental-symfony-4.x

Since I am having some problems for update the packagist.org package (I already requested to be maintainer to avanzu main owner, but it could take time to it), I am maintaining the same commits and duplicating the work in a personal repo and packagist account:

composer require shakaran/admin-theme-bundle:dev-experimental-symfony-4.x

https://packagist.org/packages/shakaran/admin-theme-bundle

@shakaran shakaran closed this Mar 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants