braintree / braintree_php

Braintree PHP library
https://developer.paypal.com/braintree/docs/start/overview
MIT License
546 stars 224 forks source link

PHP 7.0 deprecation update is missing from changelog #271

Closed teleclimber closed 4 years ago

teleclimber commented 4 years ago

General information

Issue description

In the changelog linked below I see that SDK 4.0 adds support for PHP 7.0. That same version removes support for PHP 5.

https://github.com/braintree/braintree_php/blob/master/CHANGELOG.md

Nowhere does it say that support for PHP 7.0 is removed.

However on this page, it says SDK 5.0 requires PHP 7.2:

https://developers.braintreepayments.com/start/hello-server/php

As someone who is stuck with PHP 7.0 I am unable to know what version of the Braintree SDK I can use because the changelog does not give me the necessary information.

Thanks.

crookedneighbor commented 4 years ago

You're right, that was a miss not to include that the SDK supports PHP 7.2 or higher in the Changelog. I've made that adjustment.

We dropped support for PHP 7.0 and 7.1 because they are both end of life and not receiving security updates. https://www.php.net/supported-versions.php

Although 7.0 may work with version 5 of the SDK, we do not explicitly test against it and we do not offer support for it as it is not end of life.

crookedneighbor commented 4 years ago

we do not offer support for it as it is not end of life.

Should have been we do not offer support for it as it is end of life.

teleclimber commented 4 years ago

Hi @crookedneighbor , Thanks but unfortunately something is still not right. In the change you made to the changelog, you indicate that requirement of 7.2+ starts at 5.0.0. So I downloaded 4.8.0 thinking it would work with 7.0, but it's a hard no. The README says it requires 7.2 and the code insists on it to:

<?php
/**
 * Braintree PHP Library
 * Creates class_aliases for old class names replaced by PSR-4 Namespaces
 */

require_once(__DIR__ . DIRECTORY_SEPARATOR . 'autoload.php');

if (version_compare(PHP_VERSION, '7.2.0', '<')) {
    throw new Braintree_Exception('PHP version >= 7.2.0 required');
}

//...

Can you please tell me what version of the SDK I can use if I'm stuck with 7.0?

Thank you.

crookedneighbor commented 4 years ago

I thought it was a change we made in v5, but looking at the git history, it looks like we added that change in v4.0.0. Any version before that should not have that check to throw an error, but I can't recommend using v7.0 of PHP as it is end of life.