Skip to content
This repository has been archived by the owner on Jan 6, 2022. It is now read-only.

Diff requires Symfony\Component\Yaml\Parser not found #13

Open
brideo opened this issue Nov 24, 2015 · 2 comments
Open

Diff requires Symfony\Component\Yaml\Parser not found #13

brideo opened this issue Nov 24, 2015 · 2 comments

Comments

@brideo
Copy link
Contributor

brideo commented Nov 24, 2015

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

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?!

@punkstar
Copy link
Owner

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants