btcpayserver / btcpayserver-php-client

PHP implementation for the BTCPayServer cryptographically secure RESTful API
MIT License
29 stars 33 forks source link

Support for Symfony 4 #8

Closed elvismdev closed 5 years ago

elvismdev commented 5 years ago

It fails to install on Symfony 4

Selection_270

Needs to be tested with v4.* of symfony/config and symfony/dependency-injection and add ^4.0 in composer.json.

woutersamaey commented 5 years ago

I also need this to make it work with Magento 2, which already includes symfony/config 4.3.2. Can't combine the 2.

NicolasDorier commented 5 years ago

Does https://github.com/btcpayserver/btcpayserver-php-client/pull/12 can close this ?

sven-codeculture commented 5 years ago

No, there was only any v3 version included, which meight be possible for magento 2. Would prefer to also add 4.x as i can confirm its working fine on our production for about two weeks for me without any problems.

elvismdev commented 5 years ago

No, there was only any v3 version included, which meight be possible for magento 2. Would prefer to also add 4.x as i can confirm its working fine on our production for about two weeks for me without any problems.

If it helps I did this and it has been working for me so far all good: https://github.com/parenthesislab/btcpayserver-php-client/commit/82e86ba0a3aa9122ee6874b9db94af56445977e0#diff-b5d0ee8c97c7abd7e3fa29b9a27d1780R29-R30

NicolasDorier commented 5 years ago

@elvismdev can you try the PR of @woutersamaey which should fix this issue?

elvismdev commented 5 years ago

Sure thing. Will pull it to the Symfony project I'm working on this week and will post here the results.

woutersamaey commented 5 years ago

I've updated this repo so it no longer requires Symfony and thus doesn't include any Symfony parts anymore. This is a breaking change, so I've released this as v0.2.0.

If you need the Symfony service, you can get it from the branch old-master, which is now called version v0.1.2.

It just doesn't make sense for the repo to rely on a specific framework like Symfony, which is why I have cut away these couple of files.

For best practise, you should put Symfony specific code in your project or have a separate repo for the Symfony wrapping.

Hope this doesn't cause too much inconvenience but it just doesn't make sense to have Symfony specific code here.

NicolasDorier commented 5 years ago

@woutersamaey if it is a breaking change, you should bump the major version.

woutersamaey commented 5 years ago

@NicolasDorier Good point. I just bumped to 1.0.0 and updated the Magento 2 module to match.