Skip to content

Commit

Permalink
[CI] Add PHP 8.3 and 8.4 to tests workflow (#6703)
Browse files Browse the repository at this point in the history
* [CI] Add PHP 8.3 and 8.4 to tests workflow

* [ci-review] Rector Rectify

* fix name step

* fix naming

---------

Co-authored-by: GitHub Action <actions@github.com>
  • Loading branch information
samsonasik and actions-user authored Jan 29, 2025
1 parent c9818c7 commit d890784
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,19 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
php-versions: ['8.2', '8.3', '8.4']

runs-on: ${{ matrix.os }}
timeout-minutes: 3

name: PHP 8.2 tests
name: PHP ${{ matrix.php-versions }} tests (${{ matrix.os }})
steps:
- uses: actions/checkout@v4

-
uses: shivammathur/setup-php@v2
with:
php-version: 8.2
php-version: ${{ matrix.php-versions }}
coverage: none
# to display warning when assert() is called, eg: on direct getArgs() on CallLike
# and check against first class callable strlen(...)
Expand Down
14 changes: 7 additions & 7 deletions src/ChangesReporting/Output/GitlabOutputFormatter.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,25 +73,25 @@ private function appendSystemErrors(ProcessResult $processResult, Configuration
{
$errorsJson = [];

foreach ($processResult->getSystemErrors() as $error) {
foreach ($processResult->getSystemErrors() as $systemError) {
$filePath = $configuration->isReportingWithRealPath()
? ($error->getAbsoluteFilePath() ?? '')
: ($error->getRelativeFilePath() ?? '')
? ($systemError->getAbsoluteFilePath() ?? '')
: ($systemError->getRelativeFilePath() ?? '')
;

$fingerprint = $this->filehasher->hash($filePath . ';' . $error->getLine() . ';' . $error->getMessage());
$fingerprint = $this->filehasher->hash($filePath . ';' . $systemError->getLine() . ';' . $systemError->getMessage());

$errorsJson[] = [
'fingerprint' => $fingerprint,
'type' => self::ERROR_TYPE_ISSUE,
'categories' => [self::ERROR_CATEGORY_BUG_RISK],
'severity' => self::ERROR_SEVERITY_BLOCKER,
'description' => $error->getMessage(),
'check_name' => $error->getRectorClass() ?? '',
'description' => $systemError->getMessage(),
'check_name' => $systemError->getRectorClass() ?? '',
'location' => [
'path' => $filePath,
'lines' => [
'begin' => $error->getLine() ?? 0,
'begin' => $systemError->getLine() ?? 0,
],
],
];
Expand Down

0 comments on commit d890784

Please sign in to comment.