diff --git a/CHANGELOG.md b/CHANGELOG.md index c3cd6bd..2de8e7c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [3.5.5] - 2025-10-09 +### Fixes +- Fix deprecation warnings on PHP 8.4 +- Restrict supported PHP versions to 7.1 and above. + ## [3.5.4] - 2025-09-12 ### Added - Provide `setFormTemplate` method to set `form_template` for the `createPaymentRequest`. diff --git a/README.md b/README.md index bad80c2..c248c36 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ try { ## Requirements -The AltaPay API PHP requires PHP 7.0.0 or greater with the following extensions installed: +The AltaPay API PHP requires PHP 7.1.0 or greater with the following extensions installed: - date - filter diff --git a/composer.json b/composer.json index 464c6f7..3e2f6c2 100644 --- a/composer.json +++ b/composer.json @@ -22,7 +22,7 @@ ] }, "require": { - "php": "^7.0 || ^8.0", + "php": "^7.1 || ^8.0", "ext-date": "*", "ext-filter": "*", "ext-mbstring": "*", diff --git a/src/AbstractApi.php b/src/AbstractApi.php index d5eba3f..0b66785 100644 --- a/src/AbstractApi.php +++ b/src/AbstractApi.php @@ -55,7 +55,7 @@ abstract class AbstractApi /** * PHP API version */ - const PHP_API_VERSION = '3.5.3'; + const PHP_API_VERSION = '3.5.5'; /** * Event dispatcher diff --git a/src/Factory.php b/src/Factory.php index f5b9899..49082c7 100644 --- a/src/Factory.php +++ b/src/Factory.php @@ -63,7 +63,7 @@ class Factory * @return T * @throws ClassDoesNotExistsException */ - public static function create($class, Authentication $authentication = null) + public static function create($class, ?Authentication $authentication = null) { if (class_exists($class)) { return new $class($authentication); diff --git a/src/Request/Customer.php b/src/Request/Customer.php index f04cb8e..2b98747 100644 --- a/src/Request/Customer.php +++ b/src/Request/Customer.php @@ -267,7 +267,7 @@ class Customer extends AbstractSerializer * * @param Address|null $billingAddress Billing address */ - public function __construct(Address $billingAddress = null) + public function __construct(?Address $billingAddress = null) { $this->billing = $billingAddress; } diff --git a/src/Response/AbstractResponse.php b/src/Response/AbstractResponse.php index c15783c..d6fac30 100644 --- a/src/Response/AbstractResponse.php +++ b/src/Response/AbstractResponse.php @@ -49,7 +49,7 @@ abstract class AbstractResponse * @return void * @throws \InvalidArgumentException */ - public function headerSetter(\SimpleXMLElement $xml = null) + public function headerSetter(?\SimpleXMLElement $xml = null) { if ($xml) { $this->Header = ResponseSerializer::serialize(Header::class, $xml); @@ -64,7 +64,7 @@ public function headerSetter(\SimpleXMLElement $xml = null) * @return static * @throws \InvalidArgumentException */ - public function deserialize(\SimpleXMLElement $xml = null) + public function deserialize(?\SimpleXMLElement $xml = null) { $object = clone $this; diff --git a/src/Serializer/ResponseSerializer.php b/src/Serializer/ResponseSerializer.php index 7403e27..ecb0908 100644 --- a/src/Serializer/ResponseSerializer.php +++ b/src/Serializer/ResponseSerializer.php @@ -45,7 +45,7 @@ class ResponseSerializer public static function serialize( $objectName, \SimpleXMLElement $data, - \SimpleXMLElement $header = null + ?\SimpleXMLElement $header = null ) { $object = new $objectName(); $object->headerSetter($header);