diff --git a/.travis.yml b/.travis.yml index 32d632e..b08308b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,6 +9,8 @@ cache: php: - 7.2 - 7.3 + - 7.4 + - 8.0 branches: only: @@ -21,10 +23,19 @@ matrix: env: SYMFONY_VERSION='^4.4' - php: 7.3 env: SYMFONY_VERSION='^4.4' + - php: 7.4 + env: SYMFONY_VERSION='^4.4' + - php: 8.0 + env: SYMFONY_VERSION='^4.4' + - php: 7.2 env: SYMFONY_VERSION='^5.0' - - php: 7.3 - env: SYMFONY_VERSION='^5.0' + - php: 7.3 + env: SYMFONY_VERSION='^5.0' + - php: 7.4 + env: SYMFONY_VERSION='^5.0' + - php: 8.0 + env: SYMFONY_VERSION='^5.0' before_install: - sh -c 'if [ "$SYMFONY_VERSION" != "" ]; then composer require --dev --no-update symfony/symfony=$SYMFONY_VERSION; fi;' diff --git a/Payline/WebTransaction.php b/Payline/WebTransaction.php index 9223467..d82940d 100644 --- a/Payline/WebTransaction.php +++ b/Payline/WebTransaction.php @@ -11,7 +11,7 @@ namespace Lolautruche\PaylineBundle\Payline; -use DateTime; +use DateTimeInterface; use Symfony\Component\PropertyAccess\PropertyAccess; /** @@ -110,7 +110,7 @@ class WebTransaction /** * The order date. * - * @var DateTime + * @var DateTimeInterface */ private $orderDate; @@ -161,7 +161,7 @@ class WebTransaction */ private $privateData = []; - public function __construct($amount, $orderRef, DateTime $orderDate) + public function __construct($amount, $orderRef, DateTimeInterface $orderDate) { $this->amount = $amount; $this->orderRef = $orderRef; @@ -370,7 +370,7 @@ public function setOrderCountry($orderCountry) } /** - * @return DateTime + * @return DateTimeInterface */ public function getOrderDate() { @@ -378,11 +378,11 @@ public function getOrderDate() } /** - * @param DateTime $orderDate + * @param DateTimeInterface $orderDate * * @return WebTransaction */ - public function setOrderDate(DateTime $orderDate) + public function setOrderDate(DateTimeInterface $orderDate) { $this->orderDate = $orderDate; diff --git a/composer.json b/composer.json index c4de973..74cfc95 100644 --- a/composer.json +++ b/composer.json @@ -10,7 +10,7 @@ } ], "require": { - "php": "^7.2.5", + "php": "^7.2.5|^8.0.2", "ext-soap": "*", "monext/payline-sdk": "^4.59", "symfony/framework-bundle": "^4.4|^5.0",