From 7cb330118691c9dabd2ea8b03efe497f4f49377a Mon Sep 17 00:00:00 2001 From: Yoan Arnaudov Date: Thu, 27 Oct 2022 09:44:58 +0300 Subject: [PATCH 01/16] Update client compatibility --- src/Transport/Client.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Transport/Client.php b/src/Transport/Client.php index 27218f2..ff12d5c 100644 --- a/src/Transport/Client.php +++ b/src/Transport/Client.php @@ -12,6 +12,7 @@ use Http\Client\Socket\Client as SocketHttpClient; use Http\Message\MessageFactory\GuzzleMessageFactory; use Psr\Http\Message\RequestInterface; +use Psr\Http\Message\ResponseInterface; use Smalot\Cups\CupsException; /** @@ -116,7 +117,7 @@ public function setAuthType($authType) /** * (@inheritdoc} */ - public function sendRequest(RequestInterface $request) + public function sendRequest(RequestInterface $request): ResponseInterface { if ($this->username || $this->password) { switch ($this->authType) { From bb5e2814762fc338692dcee2698980033198b165 Mon Sep 17 00:00:00 2001 From: Yoan Arnaudov Date: Thu, 27 Oct 2022 09:53:26 +0300 Subject: [PATCH 02/16] Remove php 5.6 support --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 788e635..40ae3fd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,6 @@ language: php dist: trusty php: - - 5.6 - 7.0 - 7.1 - 7.2 From ec9fed4ac73f8181591cacc628fa2d9a65867681 Mon Sep 17 00:00:00 2001 From: Yoan Arnaudov Date: Thu, 27 Oct 2022 09:57:16 +0300 Subject: [PATCH 03/16] Fix tests --- .travis.yml | 2 ++ tests/Transport/Client.php | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 40ae3fd..2573952 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,6 +5,8 @@ php: - 7.0 - 7.1 - 7.2 + - 7.3 + - 7.4 env: global: diff --git a/tests/Transport/Client.php b/tests/Transport/Client.php index 67270f3..48c6142 100644 --- a/tests/Transport/Client.php +++ b/tests/Transport/Client.php @@ -3,6 +3,7 @@ namespace Smalot\Cups\Tests\Units\Transport; use Psr\Http\Message\RequestInterface; +use Psr\Http\Message\ResponseInterface; use Smalot\Cups\Transport\Client as BaseClient; /** @@ -26,7 +27,7 @@ class Client extends BaseClient /** * @inheritDoc */ - public function sendRequest(RequestInterface $request) + public function sendRequest(RequestInterface $request): ResponseInterface { $this->lastRequest = $request; $this->lastResponse = parent::sendRequest($request); From 1c316229f63bc9cca426dfca0743adab1183d457 Mon Sep 17 00:00:00 2001 From: Yoan Arnaudov Date: Thu, 27 Oct 2022 10:05:32 +0300 Subject: [PATCH 04/16] Update dependencies --- composer.json | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/composer.json b/composer.json index 57053ba..29a153c 100644 --- a/composer.json +++ b/composer.json @@ -10,16 +10,16 @@ } ], "require": { - "php": ">=5.6", - "php-http/socket-client": "*", - "php-http/client-common": "*", - "php-http/message": "*", - "guzzlehttp/psr7": "*", - "symfony/yaml": "*" + "php": ">=7.1", + "php-http/socket-client": "^2.1", + "php-http/client-common": "^2.6", + "php-http/message": "^1.13", + "guzzlehttp/psr7": "^2.4", + "symfony/yaml": "^4.4||^5.4" }, "require-dev": { - "symfony/debug": "*", - "atoum/atoum": "*" + "symfony/debug": "^4.4||^5.4", + "atoum/atoum": "^3.2" }, "minimum-stability": "dev", "prefer-stable": true, From b8940152bf16adae67f1b7976fe4b2ea238273f7 Mon Sep 17 00:00:00 2001 From: Yoan Arnaudov Date: Thu, 27 Oct 2022 10:09:35 +0300 Subject: [PATCH 05/16] Downgrade guzzle --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 29a153c..9a4707a 100644 --- a/composer.json +++ b/composer.json @@ -14,7 +14,7 @@ "php-http/socket-client": "^2.1", "php-http/client-common": "^2.6", "php-http/message": "^1.13", - "guzzlehttp/psr7": "^2.4", + "guzzlehttp/psr7": "^1.9", "symfony/yaml": "^4.4||^5.4" }, "require-dev": { From 4bccdb569e9a13e9b05240103e29cbe173733da4 Mon Sep 17 00:00:00 2001 From: Yoan Arnaudov Date: Thu, 27 Oct 2022 10:15:29 +0300 Subject: [PATCH 06/16] Update php versions --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 2573952..360a8d7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,11 +2,12 @@ language: php dist: trusty php: - - 7.0 - 7.1 - 7.2 - 7.3 - 7.4 + - 8.0 + - 8.1 env: global: From 7eb7198e1972231ce639587809b9b2245592106b Mon Sep 17 00:00:00 2001 From: Yoan Arnaudov Date: Thu, 27 Oct 2022 10:21:47 +0300 Subject: [PATCH 07/16] CHange dist --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 360a8d7..f0c632b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,5 @@ language: php -dist: trusty +dist: bionic php: - 7.1 From 03f9763956d6217ae11d8c89f2f58340cb77e8c9 Mon Sep 17 00:00:00 2001 From: Yoan Arnaudov Date: Thu, 27 Oct 2022 10:25:12 +0300 Subject: [PATCH 08/16] Remove php 8 from travis --- .travis.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index f0c632b..ef728a3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,13 +1,11 @@ language: php -dist: bionic +dist: trusty php: - 7.1 - 7.2 - 7.3 - 7.4 - - 8.0 - - 8.1 env: global: From 7b5caf87f6c16220e4ba001558fe8adc41aae046 Mon Sep 17 00:00:00 2001 From: Yoan Arnaudov Date: Thu, 27 Oct 2022 10:27:35 +0300 Subject: [PATCH 09/16] Update atoum and bring back php 8 tests in travis --- .travis.yml | 2 ++ composer.json | 2 +- tests/Builder/Builder.php | 2 +- tests/Manager/JobManager.php | 2 +- tests/Manager/PrinterManager.php | 2 +- tests/Model/Job.php | 2 +- tests/Model/Printer.php | 2 +- 7 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index ef728a3..360a8d7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,6 +6,8 @@ php: - 7.2 - 7.3 - 7.4 + - 8.0 + - 8.1 env: global: diff --git a/composer.json b/composer.json index 9a4707a..b44e2f7 100644 --- a/composer.json +++ b/composer.json @@ -19,7 +19,7 @@ }, "require-dev": { "symfony/debug": "^4.4||^5.4", - "atoum/atoum": "^3.2" + "atoum/atoum": "^4.0" }, "minimum-stability": "dev", "prefer-stable": true, diff --git a/tests/Builder/Builder.php b/tests/Builder/Builder.php index 3aae968..387022d 100644 --- a/tests/Builder/Builder.php +++ b/tests/Builder/Builder.php @@ -2,7 +2,7 @@ namespace Smalot\Cups\Tests\Units\Builder; -use mageekguy\atoum; +use atoum\atoum; use Smalot\Cups\Model\Job; use Smalot\Cups\Model\Printer; use Smalot\Cups\Transport\Client; diff --git a/tests/Manager/JobManager.php b/tests/Manager/JobManager.php index 95772da..173ab96 100644 --- a/tests/Manager/JobManager.php +++ b/tests/Manager/JobManager.php @@ -2,7 +2,7 @@ namespace Smalot\Cups\Tests\Units\Manager; -use mageekguy\atoum; +use atoum\atoum; use Smalot\Cups\Builder\Builder; use Smalot\Cups\Model\Job; use Smalot\Cups\Model\Printer; diff --git a/tests/Manager/PrinterManager.php b/tests/Manager/PrinterManager.php index 4d86c49..56e120b 100644 --- a/tests/Manager/PrinterManager.php +++ b/tests/Manager/PrinterManager.php @@ -2,7 +2,7 @@ namespace Smalot\Cups\Tests\Units\Manager; -use mageekguy\atoum; +use atoum\atoum; use Smalot\Cups\Builder\Builder; use Smalot\Cups\Model\Printer; use Smalot\Cups\Model\PrinterInterface; diff --git a/tests/Model/Job.php b/tests/Model/Job.php index fff60bb..0ebbc13 100644 --- a/tests/Model/Job.php +++ b/tests/Model/Job.php @@ -2,7 +2,7 @@ namespace Smalot\Cups\Tests\Units\Model; -use mageekguy\atoum; +use atoum\atoum; /** * Class Job diff --git a/tests/Model/Printer.php b/tests/Model/Printer.php index 32729b9..2a78fa3 100644 --- a/tests/Model/Printer.php +++ b/tests/Model/Printer.php @@ -2,7 +2,7 @@ namespace Smalot\Cups\Tests\Units\Model; -use mageekguy\atoum; +use atoum\atoum; /** * Class Printer From fae8e4b8b10d2c175aadb590409a5219004956da Mon Sep 17 00:00:00 2001 From: Yoan Arnaudov Date: Thu, 27 Oct 2022 10:34:04 +0300 Subject: [PATCH 10/16] Fix test --- .atoum.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.atoum.php b/.atoum.php index 15ce53f..2e1122f 100644 --- a/.atoum.php +++ b/.atoum.php @@ -2,7 +2,7 @@ include 'vendor/autoload.php'; -use mageekguy\atoum; +use atoum\atoum; use Symfony\Component\Debug\ErrorHandler; use Symfony\Component\Debug\ExceptionHandler; From 139bcd7fd1db127ff3f64fe42c41ef074f8f4438 Mon Sep 17 00:00:00 2001 From: Yoan Arnaudov Date: Thu, 27 Oct 2022 10:37:23 +0300 Subject: [PATCH 11/16] Update --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 360a8d7..f0c632b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,5 @@ language: php -dist: trusty +dist: bionic php: - 7.1 From 22ee626143d2cfa75f8443444edae53739225c95 Mon Sep 17 00:00:00 2001 From: Yoan Arnaudov Date: Thu, 27 Oct 2022 10:40:40 +0300 Subject: [PATCH 12/16] Remove 7.1 support --- .travis.yml | 1 - composer.json | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index f0c632b..48f778a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,6 @@ language: php dist: bionic php: - - 7.1 - 7.2 - 7.3 - 7.4 diff --git a/composer.json b/composer.json index b44e2f7..94578c4 100644 --- a/composer.json +++ b/composer.json @@ -10,7 +10,7 @@ } ], "require": { - "php": ">=7.1", + "php": ">=7.2", "php-http/socket-client": "^2.1", "php-http/client-common": "^2.6", "php-http/message": "^1.13", From 2e70c0ba763c520b8bed2fd7eb5f8ad6d6981946 Mon Sep 17 00:00:00 2001 From: Yoan Arnaudov Date: Thu, 27 Oct 2022 10:48:28 +0300 Subject: [PATCH 13/16] Add cups client --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 48f778a..869b047 100644 --- a/.travis.yml +++ b/.travis.yml @@ -27,7 +27,7 @@ before_script: script: # Reset CUPS and PDF Printer - sudo apt-get remove -yqq cups cups-pdf - - sudo apt-get install -yqq cups cups-pdf + - sudo apt-get install -yqq cups cups-pdf cups-client - sudo adduser travis lpadmin - sudo service cups restart # Test PDF Printer From f6d223054b86f7d6b4e58fbc7c66045e7168e476 Mon Sep 17 00:00:00 2001 From: Yoan Arnaudov Date: Thu, 27 Oct 2022 10:58:49 +0300 Subject: [PATCH 14/16] Test lp command --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 869b047..0df959d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -31,6 +31,7 @@ script: - sudo adduser travis lpadmin - sudo service cups restart # Test PDF Printer + - which lp - lp -d PDF LICENSE && sleep 10 # Run Tests - ./vendor/bin/atoum -d tests/ -ncc -utr From bfcb2f57e3c3536c3891b15ea839f90aa2c88c2b Mon Sep 17 00:00:00 2001 From: Yoan Arnaudov Date: Thu, 27 Oct 2022 11:01:12 +0300 Subject: [PATCH 15/16] Remove debug --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 0df959d..869b047 100644 --- a/.travis.yml +++ b/.travis.yml @@ -31,7 +31,6 @@ script: - sudo adduser travis lpadmin - sudo service cups restart # Test PDF Printer - - which lp - lp -d PDF LICENSE && sleep 10 # Run Tests - ./vendor/bin/atoum -d tests/ -ncc -utr From 6178947e9717ed705aca50f592984841250095b1 Mon Sep 17 00:00:00 2001 From: Yoan Arnaudov Date: Thu, 27 Oct 2022 11:03:43 +0300 Subject: [PATCH 16/16] Add lp debug --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 869b047..0df959d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -31,6 +31,7 @@ script: - sudo adduser travis lpadmin - sudo service cups restart # Test PDF Printer + - which lp - lp -d PDF LICENSE && sleep 10 # Run Tests - ./vendor/bin/atoum -d tests/ -ncc -utr