Skip to content

Commit

Permalink
Merge pull request #24 from cacahouwete/up-php-support
Browse files Browse the repository at this point in the history
  • Loading branch information
lolautruche authored Apr 12, 2021
2 parents c9fd23d + 18721c7 commit de80e4a
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 9 deletions.
15 changes: 13 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ cache:
php:
- 7.2
- 7.3
- 7.4
- 8.0

branches:
only:
Expand All @@ -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;'
Expand Down
12 changes: 6 additions & 6 deletions Payline/WebTransaction.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace Lolautruche\PaylineBundle\Payline;

use DateTime;
use DateTimeInterface;
use Symfony\Component\PropertyAccess\PropertyAccess;

/**
Expand Down Expand Up @@ -110,7 +110,7 @@ class WebTransaction
/**
* The order date.
*
* @var DateTime
* @var DateTimeInterface
*/
private $orderDate;

Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -370,19 +370,19 @@ public function setOrderCountry($orderCountry)
}

/**
* @return DateTime
* @return DateTimeInterface
*/
public function getOrderDate()
{
return $this->orderDate;
}

/**
* @param DateTime $orderDate
* @param DateTimeInterface $orderDate
*
* @return WebTransaction
*/
public function setOrderDate(DateTime $orderDate)
public function setOrderDate(DateTimeInterface $orderDate)
{
$this->orderDate = $orderDate;

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit de80e4a

Please sign in to comment.