Skip to content

Commit

Permalink
#85 - drop PHP 8.0 support (#89)
Browse files Browse the repository at this point in the history
* #85 - drop PHP 8.0 support

* #85 - drop PHP 8.0 support
  • Loading branch information
krzysztofrewak authored Mar 14, 2023
1 parent c66b3f0 commit 10c8eba
Show file tree
Hide file tree
Showing 7 changed files with 76 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:

strategy:
matrix:
php: ["8.0", "8.1"]
php: ["8.1", "8.2"]

steps:
- uses: actions/checkout@v2
Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
"license": "MIT",
"type": "library",
"require": {
"php": "^8.0",
"friendsofphp/php-cs-fixer": "^3.13.1",
"kubawerlos/php-cs-fixer-custom-fixers": "^3.11.3"
"php": "^8.1",
"friendsofphp/php-cs-fixer": "^3.15",
"kubawerlos/php-cs-fixer-custom-fixers": "^3.13"
},
"require-dev": {
"jetbrains/phpstorm-attributes": "^1.0",
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: "3.7"

services:
php:
image: ghcr.io/blumilksoftware/php:8.1.0.0
image: ghcr.io/blumilksoftware/php:8.2
container_name: blumilk-codestyle-php
working_dir: /application
user: ${CURRENT_UID:-1000}
Expand Down
3 changes: 2 additions & 1 deletion src/Configuration/Defaults/LaravelPaths.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ class LaravelPaths extends Paths
{
public const LARAVEL_8_PATHS = ["app", "bootstrap/app.php", "config", "database", "public/index.php", "resources/lang", "routes", "tests"];
public const LARAVEL_9_PATHS = ["app", "bootstrap/app.php", "config", "database", "lang", "public/index.php", "routes", "tests"];
public const LARAVEL_10_PATHS = self::LARAVEL_9_PATHS;

public function __construct(array $paths = self::LARAVEL_9_PATHS)
public function __construct(array $paths = self::LARAVEL_10_PATHS)
{
parent::__construct(...$paths);
}
Expand Down
15 changes: 15 additions & 0 deletions tests/codestyle/CodestyleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,21 @@ public function testPhp81Fixtures(): void
}
}

/**
* @requires PHP >= 8.2
* @throws Exception
*/
public function testPhp82Fixtures(): void
{
$fixtures = [
"php82",
];

foreach ($fixtures as $fixture) {
$this->testFixture($fixture);
}
}

/**
* @throws Exception
*/
Expand Down
26 changes: 26 additions & 0 deletions tests/codestyle/fixtures/php82/actual.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?php

readonly class Php82
{
use Usable;

public function always(): true
{
return true;
}

public function never(): false
{
return false;
}

public function null(): null
{
return null;
}
}

trait Usable
{
public const X = "x";
}
28 changes: 28 additions & 0 deletions tests/codestyle/fixtures/php82/expected.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?php

declare(strict_types=1);

readonly class Php82
{
use Usable;

public function always(): true
{
return true;
}

public function never(): false
{
return false;
}

public function null(): null
{
return null;
}
}

trait Usable
{
public const X = "x";
}

0 comments on commit 10c8eba

Please sign in to comment.