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

Class 'Doctrine\Instantiator\Instantiator' not found

Open ghost opened this issue 10 years ago • 4 comments

Fatal error: Class 'Doctrine\Instantiator\Instantiator' not found in /var/www/html/app-name/authorizenet-php/vendor/jms/serializer/src/JMS/Serializer/Construction/UnserializeObjectConstructor .php

Using version 1.8.9

Just to be thorough in my explanation this is what I did.

  1. Downloaded and uncompressed version 1.8.9 to /authorizenet-php subfolder in my app
  2. ran composer update from within the /authorizenet-php folder and everything resolved correctly
  3. pointed my include at the autoload.php within /authorizenet-php folder
  4. visit script, error occurs

ghost avatar Jun 17 '16 20:06 ghost

The classmap.php needs to be updated for the new dependencies, or abandoned for composer's autoload.

Point your 'include' to path/to/sdk/vendor/autoload.php, instead.

texdc avatar Jun 17 '16 20:06 texdc

@texdc this was exactly my problem, not sure how i got so mixed up on how to properly install this SDK but for whatever reason the readme seems to be relatively vague on this subject. Thank you so much @texdc!

ghost avatar Jun 17 '16 21:06 ghost

@texdc Right now mine is pointing to sites/all/libraries/anet_php_sdk/autoload.php are you suggesting to change it to sites/all/libraries/anet_php_sdk/vendor/autoload.php?

natem avatar Aug 09 '16 19:08 natem

@natem yes, that's the composer autoload, if you're not already using it.

texdc avatar Aug 09 '16 21:08 texdc