From fbe232ce8d35fbb01ec723a12c354a5fd823e821 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?To=C3=B1o=20de=20Pedro?= Date: Mon, 18 Jun 2018 12:35:46 +0200 Subject: [PATCH 1/5] Updated symfony/dom-crawler and symfony/css-selector version constraints to avoid conflicts with Drupal >=8.4.x --- composer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index c308fce..2ec9e7b 100644 --- a/composer.json +++ b/composer.json @@ -14,8 +14,8 @@ ], "require": { "php": ">=5.4.0", - "symfony/dom-crawler": "2.8.*|3.2.*", - "symfony/css-selector": "2.8.*|3.2.*" + "symfony/dom-crawler": "2.8.*|3.4.*", + "symfony/css-selector": "2.8.*|3.4.*" }, "require-dev": { "phpunit/phpunit": "4.8.*" From 2a38605bd704f08117691cb7fdb58333f1691e93 Mon Sep 17 00:00:00 2001 From: Jens Beltofte Date: Wed, 19 Feb 2020 14:20:33 +0100 Subject: [PATCH 2/5] Add support support for dom-crawler 4.4, css-crawler 4.4, modern phpunit versions and fix unit tests --- .gitignore | 3 +++ composer.json | 6 +++--- tests/BorgerDk/ArticleService/UnitTests/BasicTest.php | 7 ++++--- .../UnitTests/Resources/Endpoints/GetAllArticlesTest.php | 2 +- .../UnitTests/Resources/Endpoints/GetAllSitesTest.php | 4 ++-- .../UnitTests/Resources/Endpoints/GetArticleByIDTest.php | 2 +- .../Resources/Endpoints/GetArticleIDByUrlTest.php | 2 +- .../Resources/Endpoints/GetArticleIDsBySiteIDTest.php | 2 +- .../UnitTests/Resources/Endpoints/GetArticlesByIDsTest.php | 2 +- .../Resources/Endpoints/GetMunicipalityListTest.php | 2 +- 10 files changed, 18 insertions(+), 14 deletions(-) diff --git a/.gitignore b/.gitignore index 338614f..14aefa0 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,6 @@ vendor // OSX .DS_Store + +// Phpunit +.phpunit.result.cache diff --git a/composer.json b/composer.json index 2ec9e7b..b71780d 100644 --- a/composer.json +++ b/composer.json @@ -14,11 +14,11 @@ ], "require": { "php": ">=5.4.0", - "symfony/dom-crawler": "2.8.*|3.4.*", - "symfony/css-selector": "2.8.*|3.4.*" + "symfony/dom-crawler": "2.8.* || 3.4.* || 4.4.*", + "symfony/css-selector": "2.8.* || 3.4.* || 4.4.*" }, "require-dev": { - "phpunit/phpunit": "4.8.*" + "phpunit/phpunit": "~6.5 || ~7 || ~8.4" }, "autoload": { "psr-4": { diff --git a/tests/BorgerDk/ArticleService/UnitTests/BasicTest.php b/tests/BorgerDk/ArticleService/UnitTests/BasicTest.php index ebf6a21..d24fa2c 100644 --- a/tests/BorgerDk/ArticleService/UnitTests/BasicTest.php +++ b/tests/BorgerDk/ArticleService/UnitTests/BasicTest.php @@ -11,7 +11,7 @@ namespace BorgerDk\ArticleService\UnitTests; -use PHPUnit_Framework_TestCase; +use PHPUnit\Framework\TestCase as UnitTestCase; use BorgerDk\ArticleService; use BorgerDk\ArticleService\Client as Client; @@ -20,7 +20,7 @@ * * @package BorgerDk\ArticleService */ -abstract class BasicTest extends \PHPUnit_Framework_TestCase +abstract class BasicTest extends UnitTestCase { /** * Client Connection @@ -83,8 +83,9 @@ public function __construct($name = null, array $data = array(), $dataName = '') /** * Initiate the new Soap Client in the setup method. */ - protected function setUp() + protected function setUp(): void { + parent::setUp(); $this->client = new Client(); } } diff --git a/tests/BorgerDk/ArticleService/UnitTests/Resources/Endpoints/GetAllArticlesTest.php b/tests/BorgerDk/ArticleService/UnitTests/Resources/Endpoints/GetAllArticlesTest.php index 63babb9..c3c9554 100644 --- a/tests/BorgerDk/ArticleService/UnitTests/Resources/Endpoints/GetAllArticlesTest.php +++ b/tests/BorgerDk/ArticleService/UnitTests/Resources/Endpoints/GetAllArticlesTest.php @@ -29,7 +29,7 @@ class GetAllArticlesTest extends BasicTest /** * Setup the endpoint request. */ - public function setUp() + public function setUp(): void { parent::setUp(); $this->endpoint = new GetAllArticles($this->client); diff --git a/tests/BorgerDk/ArticleService/UnitTests/Resources/Endpoints/GetAllSitesTest.php b/tests/BorgerDk/ArticleService/UnitTests/Resources/Endpoints/GetAllSitesTest.php index 0563b08..e1eddb7 100644 --- a/tests/BorgerDk/ArticleService/UnitTests/Resources/Endpoints/GetAllSitesTest.php +++ b/tests/BorgerDk/ArticleService/UnitTests/Resources/Endpoints/GetAllSitesTest.php @@ -19,7 +19,7 @@ * * @package BorgerDk\ArticleService */ -class GetAllSitesTEst extends BasicTest +class GetAllSitesTest extends BasicTest { /** * @var object @@ -29,7 +29,7 @@ class GetAllSitesTEst extends BasicTest /** * Setup the endpoint request. */ - public function setUp() + public function setUp(): void { parent::setUp(); $this->endpoint = new GetAllSites($this->client); diff --git a/tests/BorgerDk/ArticleService/UnitTests/Resources/Endpoints/GetArticleByIDTest.php b/tests/BorgerDk/ArticleService/UnitTests/Resources/Endpoints/GetArticleByIDTest.php index bcfaf14..c167f24 100644 --- a/tests/BorgerDk/ArticleService/UnitTests/Resources/Endpoints/GetArticleByIDTest.php +++ b/tests/BorgerDk/ArticleService/UnitTests/Resources/Endpoints/GetArticleByIDTest.php @@ -29,7 +29,7 @@ class GetArticleByIDTest extends BasicTest /** * Setup the endpoint request. */ - public function setUp() + public function setUp(): void { parent::setUp(); $params = array('articleID' => $this->articleId1, 'municipalityCode' => $this->municipalityCode); diff --git a/tests/BorgerDk/ArticleService/UnitTests/Resources/Endpoints/GetArticleIDByUrlTest.php b/tests/BorgerDk/ArticleService/UnitTests/Resources/Endpoints/GetArticleIDByUrlTest.php index 8e50c71..2793128 100644 --- a/tests/BorgerDk/ArticleService/UnitTests/Resources/Endpoints/GetArticleIDByUrlTest.php +++ b/tests/BorgerDk/ArticleService/UnitTests/Resources/Endpoints/GetArticleIDByUrlTest.php @@ -29,7 +29,7 @@ class GetArticleIDByUrlTest extends BasicTest /** * Setup the endpoint request. */ - public function setUp() + public function setUp(): void { parent::setUp(); $params = array('url' => $this->articleUrl); diff --git a/tests/BorgerDk/ArticleService/UnitTests/Resources/Endpoints/GetArticleIDsBySiteIDTest.php b/tests/BorgerDk/ArticleService/UnitTests/Resources/Endpoints/GetArticleIDsBySiteIDTest.php index 7ae3e77..1c7c533 100644 --- a/tests/BorgerDk/ArticleService/UnitTests/Resources/Endpoints/GetArticleIDsBySiteIDTest.php +++ b/tests/BorgerDk/ArticleService/UnitTests/Resources/Endpoints/GetArticleIDsBySiteIDTest.php @@ -29,7 +29,7 @@ class GetArticleIDsBySiteIDTest extends BasicTest /** * Setup the endpoint request. */ - public function setUp() + public function setUp(): void { parent::setUp(); $params = array('siteID' => $this->siteId); diff --git a/tests/BorgerDk/ArticleService/UnitTests/Resources/Endpoints/GetArticlesByIDsTest.php b/tests/BorgerDk/ArticleService/UnitTests/Resources/Endpoints/GetArticlesByIDsTest.php index 83c677c..035331a 100644 --- a/tests/BorgerDk/ArticleService/UnitTests/Resources/Endpoints/GetArticlesByIDsTest.php +++ b/tests/BorgerDk/ArticleService/UnitTests/Resources/Endpoints/GetArticlesByIDsTest.php @@ -29,7 +29,7 @@ class GetArticlesByIDsTest extends BasicTest /** * Setup the endpoint request. */ - public function setUp() + public function setUp(): void { parent::setUp(); $articleIds = array($this->articleId1, $this->articleId2); diff --git a/tests/BorgerDk/ArticleService/UnitTests/Resources/Endpoints/GetMunicipalityListTest.php b/tests/BorgerDk/ArticleService/UnitTests/Resources/Endpoints/GetMunicipalityListTest.php index 53427ec..abf0161 100644 --- a/tests/BorgerDk/ArticleService/UnitTests/Resources/Endpoints/GetMunicipalityListTest.php +++ b/tests/BorgerDk/ArticleService/UnitTests/Resources/Endpoints/GetMunicipalityListTest.php @@ -29,7 +29,7 @@ class GetMunicipalityListTest extends BasicTest /** * Setup the endpoint request. */ - public function setUp() + public function setUp(): void { parent::setUp(); $this->endpoint = new GetMunicipalityList($this->client); From 835162e5324a6d6f52790d4ed267b3cdee3977d6 Mon Sep 17 00:00:00 2001 From: Jens Beltofte Date: Wed, 19 Feb 2020 14:34:38 +0100 Subject: [PATCH 3/5] Remove old PHP 5 versions from Travis --- .travis.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 790b541..1522bf9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,11 +1,10 @@ language: php php: - - 5.4 - - 5.5 - - 5.6 - - 5.5 - 7.0 + - 7.1 + - 7.2 + - 7.3 before_install: - phpenv config-rm xdebug.ini From cced9615a02fcfb0b40370c2def74e6ea9e67970 Mon Sep 17 00:00:00 2001 From: Jens Beltofte Date: Wed, 19 Feb 2020 15:42:10 +0100 Subject: [PATCH 4/5] Change minimum PHP support to 7.1 --- .travis.yml | 1 - composer.json | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 1522bf9..938c688 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,6 @@ language: php php: - - 7.0 - 7.1 - 7.2 - 7.3 diff --git a/composer.json b/composer.json index b71780d..57f0f40 100644 --- a/composer.json +++ b/composer.json @@ -13,7 +13,7 @@ } ], "require": { - "php": ">=5.4.0", + "php": ">=7.1.0", "symfony/dom-crawler": "2.8.* || 3.4.* || 4.4.*", "symfony/css-selector": "2.8.* || 3.4.* || 4.4.*" }, From 8ae8e13abe90c122cf83d62f8951bf4686b201d4 Mon Sep 17 00:00:00 2001 From: Jens Beltofte Date: Wed, 19 Feb 2020 15:59:57 +0100 Subject: [PATCH 5/5] Update PHP requirements in README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 576224e..e86bdec 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ [![License](https://poser.pugx.org/ffwagency/borgerdk-php/license)](https://packagist.org/packages/ffwagency/borgerdk-php) ## Requirements -* PHP 5.4+ +* PHP 7.1+ ## Installation