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

Dependency issue

Open blakemckeeby opened this issue 11 years ago • 17 comments

In tag 1.8.3 the composer.json file indicated a dependency on "jms/serializer": “*”. In subsequent versions, your composer file indicates a dependency on "jms/serializer": "xsd2php-dev as 0.18.0" but it does not seem like that version of serializer package is available?

https://packagist.org/packages/jms/serializer

authorizenet/authorizenet 1.8.5.1 requires jms/serializer xsd2php-dev as 0 .18.0 -> no matching package found.

blakemckeeby avatar Sep 28 '15 16:09 blakemckeeby

This line in the composer file is actually indicating that we are using the xsd2php-dev fork in place of the main serializer packages. You can find this on packagist at https://packagist.org/packages/goetas/xsd2php

This fork addresses a bug that has not yet been addressed in the main serializer packages.

TrevorW avatar Oct 02 '15 21:10 TrevorW

I'm having the same issue. I added a comment in the composer.json file here, this probably would have been a better place, so, here I am.

So, we need to add https://packagist.org/packages/goetas/xsd2php in order to install 1.8.5.1?

danmcadams avatar Oct 06 '15 19:10 danmcadams

@blakemckeeby Did you ever get it working? I'm still stuck :-/

danmcadams avatar Oct 09 '15 15:10 danmcadams

@danmcadams I was helping a remote developer who sent me this error message. I never actually experienced myself. When I went to deploy the code I didn't have the issue so I wasn't able to troubleshoot further. Sorry :(

mixnetworks avatar Oct 09 '15 15:10 mixnetworks

I was able to get this working by changing my composer.json from the basic {"require": {"authorizenet/authorizenet": "~1.8"} } to the one listed further down in the readme

{

  "require": {
  "php": ">=5.2.0",
  "ext-curl": "*",
  "authorizenet/authorizenet": "1.8.3",
  "jms/serializer": "xsd2php-dev as 0.18.0"
},
"require-dev": {
  "goetas/xsd2php": "2.*@dev",
  "goetas/xsd-reader": "2.*@dev"
},
"repositories": [{
    "type": "vcs",
    "url": "https://github.com/goetas/serializer.git"
    }]

}

The only thing I changed was the authorizenet version to 1.8.5.1 and PHP to 5.3.

Another important caveat is that the require-dev must be installed as well (composer default behavior). I was trying to composer install --no-dev and still running into issues, but it worked fine with composer install.

gRegorLove avatar Oct 12 '15 22:10 gRegorLove

Thanks @gRegorLove! After pasting the above to composer.json and updating both the PHP and authorize.net versions, I ran composer update. This worked for me.

steveperrito avatar Oct 13 '15 15:10 steveperrito

@gRegorLove Yes, the xsd libraries should be moved out of require-dev and into require. Good catch!

texdc avatar Oct 13 '15 15:10 texdc

@gRegorLove Hey, thanks! Got it working. I was missing

"repositories": [{
    "type": "vcs",
    "url": "https://github.com/goetas/serializer.git"
    }]

danmcadams avatar Oct 13 '15 20:10 danmcadams

@gRegorLove thanks!

macagua avatar Nov 19 '15 21:11 macagua

It'd be nice, for those of us who don't or can't use composer, if the README.md listed the jms/serialzer under the requirements section...

EDIT: I see now there are a load of dependencies for jms/serializer and they have their own dependencies.

Wardevour avatar Jan 19 '16 18:01 Wardevour

that file should be a text file with the md extension on it. I’ve always seen it that way and practiced that even back when I was on github three years ago.

Blake D. Hoffman Sr. Systems Engineer homesite.com [email protected] | M: 425-442-1039

From: Kenneth Brockert <[email protected]mailto:[email protected]> Reply-To: AuthorizeNet/sdk-php <[email protected]mailto:[email protected]> Date: Tuesday, January 19, 2016 at 11:20 AM To: AuthorizeNet/sdk-php <[email protected]mailto:[email protected]> Subject: Re: [sdk-php] Dependency issue (#73)

It'd be nice, for those of us who don't or can't use composer, if the README.md listed the jms/serialzer under the requirements section...

— Reply to this email directly or view it on GitHubhttps://github.com/AuthorizeNet/sdk-php/issues/73#issuecomment-172939837. This message (including any attachments) is intended only for the use of the individual or entity to which it is addressed and may contain information that is non-public, proprietary, privileged, confidential, and exempt from disclosure under applicable law or may constitute as attorney work product. If you are not the intended recipient, you are hereby notified that any use, dissemination, distribution, or copying of this communication is strictly prohibited. If you have received this communication in error, notify us immediately by telephone and (i) destroy this message if a facsimile or (ii) delete this message immediately if this is an electronic communication.

Thank you.

ghost avatar Jan 19 '16 19:01 ghost

That repository should be added to the package's composer.json

arleslie avatar Mar 14 '16 23:03 arleslie

it would be great to lose the new dependency on jms serializer or work with the owner to get ti merged, as I already use a customized version of JMS Serializer.

bassrock avatar Mar 26 '16 06:03 bassrock

It would be great if the directions here got updated or the package to install got updated. I've just downloaded everything from here and I can't make heads or tails to which configuration I should be using to resolve the Yaml dependency that throws an error as not being found.

SirMontu avatar May 08 '16 21:05 SirMontu

AuthorizeNet library size is 2.4 MB, but it loads about 30 dependencies with overall size over 60 MB. It is too much. The library size should be as small as possible. Please, make library without dependencies (in ideal) or find alternatives with smaller size.

yutv avatar May 16 '16 07:05 yutv

this new release https://github.com/goetas/xsd2php/releases/tag/2.1.0 should be interesting for you

goetas avatar Aug 03 '16 14:08 goetas

Closing this issue, feel free to reopen in case of any queries. Closing note: Issues related to goetas repositories moving to goetas-webservices, have been resolved. As such jms-serializer version concluded by composer update will work. Use the latest version of the PHP SDK.

chsriniv9 avatar Jul 16 '18 11:07 chsriniv9