From 58daeba3c5223cf2405ff280148ed6fb40fabcae Mon Sep 17 00:00:00 2001 From: ADmad Date: Mon, 17 Apr 2023 19:00:40 +0530 Subject: [PATCH] Update CI workflow --- .github/workflows/ci.yml | 27 ++++++++++++--------------- psalm.xml | 3 +++ src/Listener/ViewSearchListener.php | 1 + src/View/Widget/DateTimeWidget.php | 1 + 4 files changed, 17 insertions(+), 15 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 36d3dbc..26fc712 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,18 +4,18 @@ on: [push, pull_request] jobs: testsuite: - runs-on: ubuntu-18.04 + runs-on: ubuntu-22.04 strategy: fail-fast: false matrix: - prefer-lowest: [''] - php-version: ['7.4', '8.0', '8.1'] + php-version: ['7.4', '8.0', '8.1', '8.2'] + dependencies: ['highest'] include: - php-version: '7.2' - prefer-lowest: 'prefer-lowest' + dependencies: 'lowest' steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Setup PHP uses: shivammathur/setup-php@v2 @@ -25,12 +25,9 @@ jobs: coverage: pcov - name: Composer install - run: | - if ${{ matrix.prefer-lowest == 'prefer-lowest' }}; then - composer update --prefer-lowest --prefer-stable - else - composer install - fi + uses: ramsey/composer-install@v2 + with: + dependency-versions: ${{ matrix.dependencies }} - name: Run PHPUnit run: | @@ -42,14 +39,14 @@ jobs: - name: Code Coverage Report if: matrix.php-version == '7.4' - uses: codecov/codecov-action@v2 + uses: codecov/codecov-action@v3 cs-stan: name: Coding Standard & Static Analysis - runs-on: ubuntu-18.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Setup PHP uses: shivammathur/setup-php@v2 @@ -57,7 +54,7 @@ jobs: php-version: '7.4' extensions: mbstring, intl coverage: none - tools: vimeo/psalm:4, phpstan:1.9 + tools: vimeo/psalm:5.9, phpstan:1.10 - name: Composer Install run: composer require --dev cakephp/cakephp-codesniffer:^4.1 diff --git a/psalm.xml b/psalm.xml index fa13ae4..d38a0ae 100644 --- a/psalm.xml +++ b/psalm.xml @@ -5,6 +5,9 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="https://getpsalm.org/schema/config" xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd" + findUnusedBaselineEntry="true" + findUnusedCode="false" + > diff --git a/src/Listener/ViewSearchListener.php b/src/Listener/ViewSearchListener.php index e46ba0e..4efca6d 100644 --- a/src/Listener/ViewSearchListener.php +++ b/src/Listener/ViewSearchListener.php @@ -134,6 +134,7 @@ public function fields(): array $input['class'] = 'autocomplete'; } + /** @psalm-suppress PossiblyUndefinedArrayOffset */ if ( !empty($input['class']) && strpos($input['class'], 'autocomplete') !== false diff --git a/src/View/Widget/DateTimeWidget.php b/src/View/Widget/DateTimeWidget.php index db8958b..6046507 100644 --- a/src/View/Widget/DateTimeWidget.php +++ b/src/View/Widget/DateTimeWidget.php @@ -110,6 +110,7 @@ public function render(array $data, ContextInterface $context): string $clearIcon = $this->clearIcon; $toggleIcon = $this->calendarIcon; + /** @psalm-suppress PossiblyUndefinedArrayOffset */ if (isset($datetimePicker['iconClass'])) { $toggleIcon = $datetimePicker['iconClass']; unset($datetimePicker['iconClass']);