-
Notifications
You must be signed in to change notification settings - Fork 74
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
Support Symfony 5.x #123
Comments
I am also seeing this warning (only occurs immediately after clearing cache)
Reviewing the docs I can see the apply tag was introduced in Twig 1.40 and 2.9 Currently the bundle's composer.json defines:
Which is too old for us to switch to apply. However, we depend on Symfony 3.4 or greater, and Symfony 3.4's composer.json defines:
https://github.com/symfony/symfony/blob/3.4/composer.json (looking in the symfony commit history I see they bumped to 1.40 for exactly this issue, then bumped to 1.41 for PHP 7.4 support) Therefore I see no reason not to increase our minimum version to match Symfony's, which will allow us to use apply and remove that deprecation warning. |
Third deprecation:
The namespaced version has been available since twig 1.34 and 2.4, so this is a simple fix. |
The old version has been deprecated
Fourth deprecation:
Further documentation is at https://symfony.com/blog/new-in-symfony-4-1-deprecated-the-bundle-notation The suggested fix is supported in Symfony 3.4, so again this will be a simple change (in three places). |
Fifth deprecation:
This is documented at https://symfony.com/blog/new-in-symfony-4-1-deprecated-the-bundle-notation |
That's all the deprecation messages that I can see. These changes are working well for me in Symfony 4.4 and based on the documentation should work with the older versions that are supported. I'm happy with these changes. |
in case controller has not been registered with controller.service_arguments
Register the controller as a service with autowiring
…#123 As documented in UPGRADE-4.2.md. Minimum Symfony version raised from 3.4 to 4.2. Explict dependency added for symfony/translation.
Use of Symfony\Component\Translation\TranslatorInterface prevents Symfony 5 working at all when the bundle is enabled. |
Hi @thelem Thx for your contribution and sorry for the delay. Thx |
@comur Thanks for the response. No worries, I know what it's like to be an open source maintainer. I've merged master into my branch which includes the removal of twig extensions. The JMSTranslation issue is still open and it's still listed as a dependency in composer.json. I've got a separate problem with my Symfony 5 upgrade at the moment so I can't say for sure whether the current changes are enough for Symfony 5. I'll comment again once Symfony 5 is working. |
Interface was introduced on twig 1.23. Required for twig 2/3.
With that last commit this is now working for me on Symfony 5 and twig 3. I have tested uploading, cropping and using an existing image and everything worked well. |
What... how is that possible. First of all, the docs on this repo says to install "composer require comur/content-admin-bundle" - which has no inclusion of this repo. Second, trying to install this repo on a Symfony 5 project will fail because http foundation is not updated in composer.json. |
@Mecanik I think that's just a readme error - a block of text that has been copy-pasted from the admin bundle readme without being modified for the image bundle. Try composer require comur/comur-image-bundle. This is an open PR though. At the moment the master branch does not support symfony 5. |
@thelem I saw... Pitty the author made a joke of this bundle. Actually, I took one of your branches from your fork and it works completely fine with Symphony 5. I had to make other changes as well to fit my needs with BS5, etc. Overall the bundle works well, just scattered everywhere. |
The author has provided and maintains this bundle for free. Yes, it would be good if he was able to be more responsive to pull requests and other improvements, but he's got his own life to lead and a bundle that he wrote several years ago isn't necessarily his top priority any more. You mention you've made other changes. Are these changes that other people would find useful? You don't seem to have made any effort to contribute them back to the community. |
After upgrading Symfony I see this warning in the console:
This is due to the change at symfony/symfony#27476
We need to maintain compatibility with Symfony 3 and 4.2, so suggested fix is:
$treeBuilder = new TreeBuilder("my_node");
$rootNode = method_exists($treeBuilder, "getRootNode")
? $treeBuilder->getRootNode()
: $treeBuilder->root("my_node"); // BC layer for symfony/config 4.2 and older
The text was updated successfully, but these errors were encountered: