Fatal Error Class 'Symfony\Component\Yaml\Yaml' not found in
I'm running into a this fatal error:
Fatal error: Class 'Symfony\Component\Yaml\Yaml' not found in ...includes\gateways\authorize-sdk-php\vendor\jms\serializer\src\JMS\Serializer\Metadata\Driver\YamlDriver.php on line 35
I've run composer update and am not sure what the issue is...
I see this issue as well. Does anyone have an update on this?
you can download it from github + add references to classmap.php
......
'Symfony\Component\Yaml\Yaml' => $vendorDir . '/symfony/src/Symfony/Component/Yaml/Yaml.php',
'Symfony\Component\Yaml\Parser' => $vendorDir . '/symfony/src/Symfony/Component/Yaml/Parser.php',
'Symfony\Component\Yaml\Inline' => $vendorDir . '/symfony/src/Symfony/Component/Yaml/Inline.php',
.......
https://github.com/symfony/yaml
Hi guys, should be fixed in our latest 1.8.7 release. Thank-you for opening the issue.
Hey Brian (@brianmc),
This problem is still happening.
Appending to @vovik64's comment, these referenced lines are already included in classmap.php:
'PhpOption\Some' => $vendorDir . '/phpoption/phpoption/src/PhpOption/Some.php',
'Symfony\Component\Yaml\Yaml' => $vendorDir . '/symfony/yaml/Yaml.php',
'Symfony\Component\Yaml\Parser' => $vendorDir . '/symfony/yaml/Parser.php',
'Symfony\Component\Yaml\Inline' => $vendorDir . '/symfony/yaml/Inline.php',
I fixed this by running in console composer require symfony/yaml
Hi @BenGeocth ,
I had tried that method as well, but to no avail.
composer require symfony/yaml
While the process appeared to be successful in its installation / update of Yaml, the error message generated in the error_log file remained the same.
This is a sample of the error message (with a directory name removed):
PHP Fatal error: Class 'Symfony\Component\Yaml\Yaml' not found in /home/h____s/public_html/vendor/jms/serializer/src/JMS/Serializer/Metadata/Driver/YamlDriver.php on line 35
@HealingRooms What does your composer.json look like? Here's mine:
{
"require": {
"php": ">=5.5",
"ext-curl": "*",
"authorizenet/authorizenet": "^1.9",
"jms/serializer": "serializer-master-dev as 1.0",
"symfony/yaml": "^3.1"
},
"repositories": [{
"type": "vcs",
"url": "https://github.com/goetas/serializer.git"
}]
}
Keep in mind composer likes to set things up in a project oriented fashion, so place the composer.json in the same location and move the command prompt to that directory with the command cd (DIRECTORY)
My composer problems disappeared when I realized this.
My composer file looks almost identical, although with a slightly more recent authorize.net version, with the symfony line, without the jms line, and without the repositories section.
To update the issue, I manually removed each of those three folders via FTP and reinstalled authorize.net via the puTTY command prompt, then installed the authorize.net test folder as well (although it already existed). Progress was made.