Closed aschempp closed 5 years ago
@discordier Do you see any problem if i change the widget class? See code below:
// Current Version
$GLOBALS['BE_FFL']['multiColumnWizarde'] = '\MenAtWork\MultiColumnWizardBundle\Contao\Widgets\MultiColumnWizard';
// new Version
$GLOBALS['BE_FFL']['multiColumnWizard'] = '\MultiColumnWizard';
aschempp is right, if i use the new class, i have a BC break, so i have to use the old one. Did we get any problems with MM or DCG with this change?
@aschempp my intention was to make a drop-in-replacement. I don't want any BC break in this version. So, this is a bug and must be fixed before i release the stable.
I think you can also try class_alias
, but not sure how you would load that (except maybe using the Contao class loader?). I wasn't aware this isn't stable yet, no idea how people came to install it then…
IMO it could be fixed by suffixing the \MenAtWork\MultiColumnWizardBundle\Contao\Widgets\MultiColumnWizard
with a class_alias
as @aschempp said.
Like Contao does in 4.6, so the file MultiColumnWizard.php
should become:
<?php
namespace MenAtWork\MultiColumnWizardBundle\Contao\Widgets;
class MultiColumnWizard
{
// ...
}
class_alias(MultiColumnWizard::class, 'MultiColumnWizard');
Have not tested as I lack an isotope installation but should work.
It might work for the method argument, but someone requiring \MultiColumnWizard
would still result in a class not found. Not really related to Isotope but anyone using that extension…
@stefanheimes maybe you should add a class loader for the deprecated class in root namespace as we do in MM
That work for me as hotfix
<?php namespace MenAtWork\MultiColumnWizardBundle\Contao\Widgets; class MultiColumnWizard { // ... } class_alias(MultiColumnWizard::class, 'MultiColumnWizard');
Should be fixed in version 3.4.0. (no beta)
@Ainschy can you test it with the new version 3.4.1 again?
Same issue with 3.4.1 in product-typs under isotope, when i set
class_alias(MultiColumnWizard::class, 'MultiColumnWizard');
its worked, but whitout
Type error: Argument 1 passed to Isotope\Backend\ProductType\AttributeWizard::getColumns() must be an instance of MultiColumnWizard, instance of MenAtWork\MultiColumnWizardBundle\Contao\Widgets\MultiColumnWizard given, called in E:\MAMP_2018\htdocs_eb\vendor\menatwork\contao-multicolumnwizard-bundle\src\Contao\Widgets\MultiColumnWizard.php on line 644
3.4.2 should finally fix this for good - closing therefore.
Due to the renaming of namespaces, this bundle contains BC breaks with the previous version! I think it should be release as version 4 instead of 3.x
see https://github.com/isotope/core/issues/2020