Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

qa/workflow-improvements #40

Merged
merged 7 commits into from
Jan 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 44 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ jobs:
run: "composer test-coverage"

- name: "Run PHP CS Check"
run: "PHP_CS_FIXER_IGNORE_ENV=1 composer cs-check"
run: "composer cs-check"

- name: "Run PHPStan"
run: "composer analyze"
Expand Down Expand Up @@ -119,7 +119,7 @@ jobs:
run: "composer test-coverage"

- name: "Run PHP CS Check"
run: "PHP_CS_FIXER_IGNORE_ENV=1 composer cs-check"
run: "composer cs-check"

- name: "Run PHPStan"
run: "composer analyze"
Expand All @@ -133,4 +133,46 @@ jobs:
- name: "Run infection"
env:
INFECTION_BADGE_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }}
run: "composer infection-ci"

php84:
name: PHP 8.4
runs-on: ubuntu-latest
steps:
- name: "Checkout"
uses: "actions/checkout@v4"
with:
fetch-depth: 2

- name: "Install PHP 8.4"
uses: "shivammathur/setup-php@v2"
with:
php-version: "8.4"

- name: "Cache composer packages"
uses: "actions/cache@v4"
with:
path: "vendor"
key: "php-composer-locked-php-8.4-${{ hashFiles('**/composer.lock') }}"
restore-keys: "php-composer-locked-php-8.3-"

- name: "Install dependencies with composer"
run: "composer install --no-interaction --prefer-dist"

- name: "Run PHPUnit Tests"
run: "composer test-coverage"

- name: "Run PHP CS Check"
run: "PHP_CS_FIXER_IGNORE_ENV=1 composer cs-check"

- name: "Run PHPStan"
run: "composer analyze"

- name: "Run Psalm"
run: "composer psalm"

- name: "PHP Lint"
run: "composer lint"

- name: "Run infection"
run: "composer infection-ci"
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# PHPUnit specific
.phpunit.result.cache
.php-cs-fixer.cache

# Composer
/vendor/
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ JMS-Serializer: https://github.com/schmittjoh/serializer

You are also welcome to use the Issue Tracker to set bugs, improvements or upgrade requests.

> Please use the new package https://github.com/Dropelikeit/laravel-responsefactory in the future. The new package contains some new and useful functions!
This package will only be supported until the end of Laravel 11. Until then, you should use the new package.

### Installation

``` composer require dropelikeit/laravel-jms-serializer ```
Expand Down
7 changes: 4 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"keywords": ["Lumen", "Laravel", "JMS Serializer", "JMS"],
"minimum-stability": "stable",
"license": "MIT",
"abandoned": "dropelikeit/laravel-responsefactory",
"authors": [
{
"name": "Marcel Strahl",
Expand Down Expand Up @@ -44,10 +45,10 @@
"phpstan/phpstan-phpunit": "^1.3",
"php-parallel-lint/php-parallel-lint": "^1.3",
"symfony/cache": "^6.3|^7.0",
"vimeo/psalm": "^5.23",
"psalm/plugin-laravel": "^2.10",
"vimeo/psalm": "^5.0|^6.0",
"psalm/plugin-laravel": "^2.11",
"psalm/plugin-phpunit": "^0.19",
"infection/infection": "^0.27.10",
"infection/infection": "0.27.10|^0.29.10",
"laravel/framework": "^10.0|^v11.0"
},
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion src/Config/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ private function __construct(
array $customHandlers,
) {
$cacheDir = sprintf('%s%s', $cacheDir, self::CACHE_DIR);
#Assert::stringNotEmpty($cacheDir);

// @phpstan-ignore-next-line
$this->cacheDir = $cacheDir;
$this->customHandlers = $customHandlers;
}
Expand Down