Skip to content

Commit

Permalink
Merge pull request #317 from FriendsOfCake/ci
Browse files Browse the repository at this point in the history
Update CI workflow
  • Loading branch information
ADmad authored Apr 17, 2023
2 parents e7929a2 + 58daeba commit 2a35f2c
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 15 deletions.
27 changes: 12 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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: |
Expand All @@ -42,22 +39,22 @@ 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
with:
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
Expand Down
3 changes: 3 additions & 0 deletions psalm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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"

>
<projectFiles>
<directory name="src" />
Expand Down
1 change: 1 addition & 0 deletions src/Listener/ViewSearchListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ public function fields(): array
$input['class'] = 'autocomplete';
}

/** @psalm-suppress PossiblyUndefinedArrayOffset */
if (
!empty($input['class'])
&& strpos($input['class'], 'autocomplete') !== false
Expand Down
1 change: 1 addition & 0 deletions src/View/Widget/DateTimeWidget.php
Original file line number Diff line number Diff line change
Expand Up @@ -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']);
Expand Down

0 comments on commit 2a35f2c

Please sign in to comment.