Lakion / CmsPlugin

Simple CMS on top of SymfonyCMF for Sylius applications.
http://lakion.com
26 stars 20 forks source link

ImagineBlock Deprecated in CMF Bundle #72

Closed silverbackdan closed 6 years ago

silverbackdan commented 6 years ago

My web application uses: Lakion\CmsPlugin\Document\CustomBlock - https://github.com/Lakion/CmsPlugin/blob/master/src/Document/CustomBlock.php

This extends Symfony\Cmf\Bundle\BlockBundle\Doctrine\Phpcr\ImagineBlock which is removed because the CMF media bundle is deprecated.

A quick solution would be to bring the old ImagineBlock class into this repository to extend instead: https://github.com/symfony-cmf/block-bundle/blob/1.3/Doctrine/Phpcr/ImagineBlock.php

Thoughts?

silverbackdan commented 6 years ago

Turns out by doing this we get another issue. The CMF media bundle tried to inject the service liip_imagine.templating.helper - the class has now changed. If it was just the alias it'd be easy to just add an alias from liip_imagine.templating.helper to liip_imagine.templating.filter_helper - but as the argument in the constructor has a typehint and the class name has changed, it'll cause an error. Looks like a more major issue of moving away from the CmfMediaBundle which is probably the right move anyway as it is deprecated.

Are there plans for this already?

stefandoorn commented 6 years ago

@silverbackdan Advise is to migrate to https://github.com/BitBagCommerce/SyliusCmsPlugin. This plugin is deprecated. I can merge any fixes for it, but I'm not an expert on this plugin, only became maintainer to support PR fixes temporary until my own projects are also migrated.

silverbackdan commented 6 years ago

Will do - thanks @stefandoorn