Skip to content

Commit

Permalink
Improve CI & Fixes for earlier symfony versions (#1)
Browse files Browse the repository at this point in the history
* improve CI

* test on all branches

* add name

* symfony 6.0 fixes

* symfony 6.0 fixes

* add changelog
  • Loading branch information
priyadi authored Sep 17, 2023
1 parent cc3f752 commit 5c31084
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 8 deletions.
33 changes: 27 additions & 6 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: PHP Composer
name: Test

on:
push:
branches: [ "main" ]
branches: [ "*" ]
pull_request:
branches: [ "main" ]

Expand All @@ -12,11 +12,26 @@ permissions:
jobs:
build:

runs-on: ubuntu-latest
strategy:
matrix:
operating-system: [ubuntu-latest]
php: [ '8.1', '8.2' ]
symfony: [ '6.*' ]
dep: [highest,lowest]

runs-on: ${{ matrix.operating-system }}

name: Symfony ${{ matrix.symfony }}, ${{ matrix.dep }} deps, PHP ${{ matrix.php }}, ${{ matrix.operating-system }}

steps:
- uses: actions/checkout@v3

- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: intl

- name: Validate composer.json and composer.lock
run: composer validate --strict

Expand All @@ -30,7 +45,12 @@ jobs:
${{ runner.os }}-php-
- name: Install dependencies
run: composer install --prefer-dist --no-progress
uses: ramsey/composer-install@v2
with:
dependency-versions: ${{ matrix.dep }}
composer-options: --prefer-dist --no-progress
env:
SYMFONY_REQUIRE: ${{ matrix.symfony }}

- name: Run psalm
run: vendor/bin/psalm
Expand All @@ -39,5 +59,6 @@ jobs:
run: vendor/bin/phpstan analyse

- name: Run phpunit
run: vendor/bin/phpunit --testdox -v

run: |
export SYMFONY_DEPRECATIONS_HELPER='max[direct]=0'
vendor/bin/phpunit --testdox -v
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Changelog

## 1.0.1

* Improve CI
* Fixes for earlier Symfony versions
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@

class RekalogikaPsr16SimpleCacheExtension extends Extension
{
public function load(array $configs, ContainerBuilder $container)
/**
* @param array<array-key,mixed> $configs
*/
public function load(array $configs, ContainerBuilder $container): void
{
$env = $container->getParameter('kernel.environment');

Expand Down
2 changes: 1 addition & 1 deletion tests/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public function registerBundles(): iterable
];
}

public function registerContainerConfiguration(LoaderInterface $loader)
public function registerContainerConfiguration(LoaderInterface $loader): void
{
}
}

0 comments on commit 5c31084

Please sign in to comment.