Skip to content

Commit

Permalink
Php 84 support (#330)
Browse files Browse the repository at this point in the history
* Upgrade to laravel-zero/framework v11

* Fix QA

* Change php support matrix

* Execute phpstan on latest php version

* Add typehint to repository
  • Loading branch information
markwalet authored Jan 21, 2025
1 parent df4438b commit 0c31559
Show file tree
Hide file tree
Showing 6 changed files with 1,292 additions and 603 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
fail-fast: true
matrix:
os: [ubuntu-22.04, windows-2019]
php: [8.1, 8.2, 8.3]
php: [8.2, 8.3, 8.4]

name: PHP ${{ matrix.php }} - ${{ matrix.os }}

Expand Down Expand Up @@ -54,7 +54,7 @@ jobs:

- name: Execute static analysis
run: vendor/bin/phpstan
if: matrix.php == '8.1'
if: matrix.php == '8.4'

- name: Execute unit/feature tests
run: vendor/bin/pest
2 changes: 1 addition & 1 deletion app/Factories/ConfigurationFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class ConfigurationFactory
/**
* Creates a PHP CS Fixer Configuration with the given array of rules.
*
* @param array<string, array<string, array<int|string, string|null>|bool|string>|bool> $rules
* @param array<string, array<string, array<int|string, string|int|string[]>|bool|string>|bool> $rules
* @return \PhpCsFixer\ConfigInterface
*/
public static function preset($rules)
Expand Down
1 change: 1 addition & 0 deletions app/Repositories/GitPathsRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ public function diff($branch)
'untracked' => tap(new Process(['git', 'ls-files', '--others', '--exclude-standard', '--', '**.php']))->run(),
];

/** @var Collection<int, string> $files */
$files = collect($files)
->each(fn ($process) => abort_if(
boolean: ! $process->isSuccessful(),
Expand Down
4 changes: 2 additions & 2 deletions app/ValueObjects/Issue.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class Issue
* @param string $path
* @param string $file
* @param string $symbol
* @param array<string, array<int, string>|\Throwable> $payload
* @param array<string, list<string>|string|\Throwable> $payload
*/
public function __construct(
protected $path,
Expand Down Expand Up @@ -93,7 +93,7 @@ public function symbol()
/**
* Returns the issue's diff, if any.
*
* @return string|null
* @return string|void
*/
protected function diff()
{
Expand Down
12 changes: 6 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,19 @@
}
],
"require": {
"php": "^8.1.0",
"php": "^8.2.0",
"ext-json": "*",
"ext-mbstring": "*",
"ext-tokenizer": "*",
"ext-xml": "*"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^3.66.0",
"illuminate/view": "^10.48.25",
"larastan/larastan": "^2.9.12",
"laravel-zero/framework": "^10.48.25",
"illuminate/view": "^11.36.1",
"larastan/larastan": "^3.0",
"laravel-zero/framework": "^11.36.1",
"mockery/mockery": "^1.6.12",
"nunomaduro/termwind": "^1.17.0",
"nunomaduro/termwind": "^2.0",
"pestphp/pest": "^2.36.0"
},
"autoload": {
Expand All @@ -49,7 +49,7 @@
"sort-packages": true,
"optimize-autoloader": true,
"platform": {
"php": "8.1.0"
"php": "8.2.0"
},
"allow-plugins": {
"pestphp/pest-plugin": true
Expand Down
Loading

0 comments on commit 0c31559

Please sign in to comment.