mageconfigsync icon indicating copy to clipboard operation
mageconfigsync copied to clipboard

Diff requires Symfony\Component\Yaml\Parser not found

Open brideo opened this issue 9 years ago • 2 comments

Fatal error: Class 'Symfony\Component\Yaml\Parser' not found in phar:///mageconfigsync.phar/src/MageConfigSync/Command/DiffCommand.php on line 48

brideo avatar Nov 24 '15 13:11 brideo

This is probably caused by some extension in Magento messing with the autoloader.

In my case it was Aitoc_Aitsys with this beauty:

        // unregistering all, and varien autoloaders to make our performing first
        $autoloaders = spl_autoload_functions();
        if ($autoloaders and is_array($autoloaders) && !empty($autoloaders))
        {
            foreach ($autoloaders as $autoloader)
            {
                spl_autoload_unregister($autoloader);
            }
        }
        if (version_compare(Mage::getVersion(),'1.3.1','>'))
        {
            spl_autoload_unregister(array(Varien_Autoload::instance(), 'autoload'));
        }
        spl_autoload_register(array(self::instance(), 'autoload'), false);
        if (version_compare(Mage::getVersion(),'1.3.1','>'))
        {
            Varien_Autoload::register();
        }
        else
        {
            spl_autoload_register(array(self::instance(), 'performStandardAutoload'));
            #self::_loadOverwrittenClasses();
        }

Who needs other autoloaders when you've got Aitoc, right?! right?!

tgerulaitis avatar Jan 18 '16 17:01 tgerulaitis

Fix for this is to require the vendor/autoload.php again after initialising Magento, I suppose, registering the composer autoloading process again.

punkstar avatar Jan 19 '16 17:01 punkstar