mollie / reseller-api

Reseller API voor het aanmaken en beheren van Mollie-accounts
https://www.mollie.com/
BSD 2-Clause "Simplified" License
13 stars 4 forks source link

Function create_function() is deprecated on PHP 7.2 #15

Closed PaulKruijt closed 6 years ago

PaulKruijt commented 6 years ago

On PHP 7.2 i get a deprecated exception on "create_function":

public function __construct ($partner_id, $profile_key, $app_secret)
{
    // Set persistent parameters
    $this->setPersistentParam('partner_id',  $partner_id);
    $this->setPersistentParam('profile_key', $profile_key);

    // Make a private secret callable
    $this->_callableSecret = create_function('', 'return '.var_export($app_secret, TRUE).';');
}
willemstuursma commented 6 years ago

Thanks for bringing this up.

@mvdpanne could you have a look at this?

You can up the minimum PHP to 5.6, check the .travis.yml from the mollie/mollie-api-php for some more tips. Any brush ups are appreciated.

TomasVotruba commented 5 years ago

If you ever need to upgrade more create_function cases, Rector does it pretty well.