sdk-php icon indicating copy to clipboard operation
sdk-php copied to clipboard

Fatal Error Class 'Symfony\Component\Yaml\Yaml' not found in

Open DevinWalker opened this issue 11 years ago • 9 comments

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...

DevinWalker avatar Nov 07 '15 00:11 DevinWalker

I see this issue as well. Does anyone have an update on this?

twvm avatar Dec 07 '15 15:12 twvm

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',
.......

vovik64 avatar Dec 09 '15 15:12 vovik64

https://github.com/symfony/yaml

vovik64 avatar Dec 09 '15 15:12 vovik64

Hi guys, should be fixed in our latest 1.8.7 release. Thank-you for opening the issue.

brianmc avatar Feb 26 '16 11:02 brianmc

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',

HealingRooms avatar Dec 07 '16 20:12 HealingRooms

I fixed this by running in console composer require symfony/yaml

BenGeocth avatar Dec 07 '16 20:12 BenGeocth

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 avatar Dec 07 '16 21:12 HealingRooms

@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.

BenGeocth avatar Dec 08 '16 14:12 BenGeocth

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.

HealingRooms avatar Dec 08 '16 16:12 HealingRooms