Closed haivala closed 4 years ago
I guess adding
public function buildEditForm(FormMapper $formMapper, BlockInterface $block)
{
$this->buildCreateForm($formMapper, $block);
}
to MediaBlockService would be enough? Is this how this should be handled?
I'm still waiting for an answer.
Can you provide a PR with a fix @haivala ?
@core23 Is that how it should be handled?
This commit is problem. https://github.com/sonata-project/SonataMediaBundle/commit/95332475d1c1a0ae24c23f923a9dad40e4d4dad1 After change AbstractAdminBlockService to AbstractBlockService some methods are missing (for Block 3 support). We should also add EditebleBlockServie to this change to keep info about using in Admin(required in Block 4).
cc @franmomu
Sorry I didn't see the mention, IMHO we should fix the BC break and then (in another PR) see how to be compatible with BlockBundle 4.
Environment
Sonata packages
Symfony packages
PHP version
Subject
Open PageBundles composer and try to add this bundles Block I get this error:
Attempted to call an undefined method named "buildCreateForm" of class "Sonata\MediaBundle\Block\FeatureMediaBlockService". Did you mean to call "buildEditForm"?
The blocks from this bundle don't even have names in page bundles composer.Steps to reproduce
Open composer in page bundle. Try to add media block anywhere.
Expected results
No error.
Actual results
Attempted to call an undefined method named "buildCreateForm" of class "Sonata\MediaBundle\Block\FeatureMediaBlockService". Did you mean to call "buildEditForm"?