Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/check-pr-title.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ on:
jobs:
check-pr-title:
name: Check PR title
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- uses: blumilksoftware/action-pr-title@e05fc76a1cc45b33644f1de51218be43ac121dd0 # v1.2.0
4 changes: 2 additions & 2 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ on:
jobs:
build:
name: "Checking the package: testing and linting"
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04

strategy:
matrix:
php: ["8.2", "8.3"]
php: ["8.3", "8.4"]

steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
Expand Down
7 changes: 4 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
{
"name": "blumilksoftware/codestyle",
"version": "5.0.0",
"description": "Blumilk codestyle configurator",
"license": "MIT",
"type": "library",
"require": {
"php": "^8.2",
"friendsofphp/php-cs-fixer": "^3.75.0",
"kubawerlos/php-cs-fixer-custom-fixers": "^3.25.0"
"php": "^8.3",
"friendsofphp/php-cs-fixer": "^3.80.0",
"kubawerlos/php-cs-fixer-custom-fixers": "^3.29.0"
},
"require-dev": {
"jetbrains/phpstorm-attributes": "^1.2",
Expand Down
17 changes: 17 additions & 0 deletions tests/codestyle/CommonRulesetTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,13 @@ public static function providePhp82Fixtures(): array
];
}

public static function providePhp84Fixtures(): array
{
return [
["php84"],
];
}

/**
* @throws Exception
*/
Expand Down Expand Up @@ -87,4 +94,14 @@ public function testPhp82Fixtures(string $name): void
{
$this->testFixture($name);
}

/**
* @throws Exception
*/
#[DataProvider("providePhp84Fixtures")]
#[RequiresPhp(">= 8.4")]
public function testPhp84Fixtures(string $name): void
{
$this->testFixture($name);
}
}
13 changes: 13 additions & 0 deletions tests/fixtures/php84/actual.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

class Php84
{
public private(set) string $version = "8.4";

public function increment(): void
{
[$major, $minor] = explode(".", $this->version);
$minor++;
$this->version = "{$major}.{$minor}";
}
}
15 changes: 15 additions & 0 deletions tests/fixtures/php84/expected.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php

declare(strict_types=1);

class Php84
{
public private(set) string $version = "8.4";

public function increment(): void
{
[$major, $minor] = explode(".", $this->version);
$minor++;
$this->version = "{$major}.{$minor}";
}
}