Skip to content

Commit

Permalink
Laravel 10.x compatiblity (#54)
Browse files Browse the repository at this point in the history
* Add Laravel 10

* Add Laravel 10 to config

* PHP Linting (Pint)

---------

Co-authored-by: rawilk <[email protected]>
  • Loading branch information
rawilk and rawilk authored Feb 15, 2023
1 parent bbdda64 commit 2f913ce
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 29 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,11 @@ jobs:
fail-fast: true
matrix:
php: [8.1]
laravel: [9.*, 8.*]
laravel: [10.*, 9.*, 8.*]
stability: [prefer-lowest, prefer-stable]
include:
- laravel: 10.*
testbench: 8.*
- laravel: 9.*
testbench: 7.*
- laravel: 8.*
Expand Down
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@
"require": {
"php": "^8.0|^8.1",
"guzzlehttp/guzzle": "^7.5",
"illuminate/support": "^8.0|^9.0",
"illuminate/support": "^8.0|^9.0|^10.0",
"mike42/escpos-php": "^4.0",
"spatie/laravel-package-tools": "^1.2|^1.13"
},
"require-dev": {
"laravel/pint": "^1.2",
"laravel/pint": "^1.5",
"mockery/mockery": ">=1.4",
"orchestra/testbench": "^6.0|^7.0",
"orchestra/testbench": "^6.0|^7.0|^8.0",
"pestphp/pest": "^1.20",
"pestphp/pest-plugin-parallel": "^1.0",
"php-http/socket-client": "^2.1",
Expand All @@ -57,7 +57,7 @@
"@php ./vendor/bin/testbench package:discover --ansi"
],
"test": "vendor/bin/pest -p",
"format": "vendor/bin/pint"
"format": "vendor/bin/pint --dirty"
},
"config": {
"sort-packages": true,
Expand Down
1 change: 0 additions & 1 deletion src/Drivers/Cups/Entity/Printer.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ public function trays(): array
* - Possible Params:
* -- limit => int
* -- status => 'completed', 'not-completed'
* @return \Illuminate\Support\Collection
*/
public function jobs(array $params = []): Collection
{
Expand Down
13 changes: 0 additions & 13 deletions src/Drivers/PrintNode/PrintNode.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,6 @@ public function printer($printerId = null): null|Printer
}

/**
* @param int|null $limit
* @param int|null $offset
* @param string|null $dir
* @return \Illuminate\Support\Collection<int, RawilkPrinter>
*/
public function printers(?int $limit = null, ?int $offset = null, ?string $dir = null): Collection
Expand All @@ -68,9 +65,6 @@ public function printJob($jobId = null): ?PrintJob
}

/**
* @param int|null $limit
* @param int|null $offset
* @param string|null $dir
* @return \Illuminate\Support\Collection<int, \Rawilk\Printing\Contracts\PrintJob>
*/
public function printJobs(?int $limit = null, ?int $offset = null, ?string $dir = null): Collection
Expand All @@ -81,13 +75,6 @@ public function printJobs(?int $limit = null, ?int $offset = null, ?string $dir
->map(fn (PrintNodePrintJob $j) => new RawilkPrintJob($j));
}

/**
* @param $printerId
* @param int|null $limit
* @param int|null $offset
* @param string|null $dir
* @return \Illuminate\Support\Collection
*/
public function printerPrintJobs($printerId, ?int $limit = null, ?int $offset = null, ?string $dir = null): Collection
{
return $this->api
Expand Down
10 changes: 0 additions & 10 deletions src/Printing.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,6 @@ public function printer($printerId = null): ?Printer
}

/**
* @param int|null $limit
* @param int|null $offset
* @param string|null $dir
* @return \Illuminate\Support\Collection<int, \Rawilk\Printing\Contracts\Printer>
*/
public function printers(?int $limit = null, ?int $offset = null, ?string $dir = null): Collection
Expand All @@ -78,9 +75,6 @@ public function printers(?int $limit = null, ?int $offset = null, ?string $dir =
}

/**
* @param int|null $limit
* @param int|null $offset
* @param string|null $dir
* @return \Illuminate\Support\Collection<int, \Rawilk\Printing\Contracts\PrintJob>
*/
public function printJobs(?int $limit = null, ?int $offset = null, ?string $dir = null): Collection
Expand Down Expand Up @@ -110,10 +104,6 @@ public function printJob($jobId = null): ?PrintJob
}

/**
* @param $printerId
* @param int|null $limit
* @param int|null $offset
* @param string|null $dir
* @return \Illuminate\Support\Collection<int, \Rawilk\Printing\Contracts\PrintJob>
*/
public function printerPrintJobs($printerId, ?int $limit = null, ?int $offset = null, ?string $dir = null): Collection
Expand Down

0 comments on commit 2f913ce

Please sign in to comment.