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

Class 'Goetas\Xsd\XsdToPhp\Jms\Handler\BaseTypesHandler' not found

Open ericnicolaas opened this issue 10 years ago • 9 comments

I'm running into problems with being unable to pull in all the required dependencies. I have cloned the repo and run composer update. But when I attempt to make a payment, I hit this fatal error:

[23-May-2016 12:11:18 UTC] PHP Warning:  include(/vagrant/content/plugins/charitable-authorize-net/includes/libraries/anet_php_sdk/vendor/goetas/xsd2php/lib/Jms/Handler/BaseTypesHandler.php): failed to open stream: No such file or directory in /vagrant/content/plugins/charitable-authorize-net/includes/libraries/anet_php_sdk/autoload.php on line 16
[23-May-2016 12:11:18 UTC] PHP Warning:  include(): Failed opening '/vagrant/content/plugins/charitable-authorize-net/includes/libraries/anet_php_sdk/vendor/goetas/xsd2php/lib/Jms/Handler/BaseTypesHandler.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /vagrant/content/plugins/charitable-authorize-net/includes/libraries/anet_php_sdk/autoload.php on line 16
[23-May-2016 12:11:18 UTC] PHP Fatal error:  Class 'Goetas\Xsd\XsdToPhp\Jms\Handler\BaseTypesHandler' not found in /vagrant/content/plugins/charitable-authorize-net/includes/libraries/anet_php_sdk/lib/net/authorize/api/controller/base/ApiOperationBase.php on line 82

Here is a screenshot of the goetas/xsd2php/lib/Jms directory. As you can see, there is no Handler folder.

screenshot 2016-05-24 08 57 18

Is this working for others?

ericnicolaas avatar May 23 '16 23:05 ericnicolaas

Just digging into the xsd2php repo and found that the Handler directory was removed as part of this commit: https://github.com/goetas/xsd2php/commit/db6c724ee4633968f16c5ca2d51bfcb7134fb925#diff-dab752bfae08ac54ebdeeec08972f84d

ericnicolaas avatar May 23 '16 23:05 ericnicolaas

hot-fix

"require-dev": {        
        "goetas/xsd2php": "2.0.x-dev#fdc2ab0bb3f2b3ab796ca567cf8c0f3446a7ea3a",
    },

works for me

asokol-teq avatar May 24 '16 13:05 asokol-teq

Thanks @asokol-teq We're going to make the hotfix for right now but we will follow up with a move to the new goetas runtime xsd2php which will be a slimmer dependency for us.

Thanks again,

Brian

brianmc avatar May 25 '16 16:05 brianmc

We put in the temporary fix and the SDK and Sample Code builds are green again. Thanks.

brianmc avatar May 27 '16 16:05 brianmc

If I run this code ("goetas/xsd2php": "2.0.x-dev#fdc2ab0bb3f2b3ab796ca567cf8c0f3446a7ea3a") the following error was occured, What to do???

Problem 1 - The requested package goetas/xsd2php 2.0.x-dev#fdc2ab0bb3f2b3ab796ca567cf8c0f3446a7ea3a exists as goetas/xsd2php[1.0.0, 1.0.1, 2.0.0, 2.0.0-alpha, 2.1.0, dev-goetas-runtime, dev-master, 2.1.x-dev, dev-official-serializer] but these are rejected by your constraint.

LawanyaD avatar Sep 01 '16 08:09 LawanyaD

Yes, what about the above question from Lawanya?

jhchnc avatar Sep 18 '16 19:09 jhchnc

Hi @LawanyaD & @jhchnc, Appologies for the delay in response. Are you using latest PHP SDK 1.9. We have updated the dependency of goetas/xsd2php library in the latest release. If you are still facing the issue, please provide us with the steps you are following.

akankaria avatar Sep 19 '16 05:09 akankaria

My client's server is running PHP 5.3.x The 1.8.8 authorizenet SDK would have worked (according to the composer.json file still displayed on http://developer.authorize.net/hello_world/ ) but because of the problem identified in this thread, it seems that there's no way to use PHP 5.3. The commit recommended by the hot fix says that it requires php 5.5. So, there's no way to run the authorizenet SDK on PHP 5.3 (or 5.4) anymore?

davidreedernst avatar Oct 03 '16 15:10 davidreedernst

To skip the following error:

Problem 1

  • The requested package goetas/xsd2php 2.0.x-dev#fdc2ab0bb3f2b3ab796ca567cf8c0f3446a7ea3a exists as goetas/xsd2php[1.0.0, 1.0.1, 2.0.0, 2.0.0-alpha, 2.1.0, dev-goetas-runtime, dev-master, 2.1.x-dev, dev-official-serializer] but these are rejected by your constraint.

Just add the following line to your composer.json file: "minimum-stability": "dev"

Works for me.

edwinricaurte avatar Oct 10 '16 18:10 edwinricaurte