Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
5fcc625
feat(dependencies): update PHP and package versions in composer.json
frkcn Feb 20, 2025
fbda03f
feat(transformer): add TransformationContext parameter to transform m…
frkcn Feb 20, 2025
24dae53
feat(workflow): update PHP and Laravel versions in Pest configuration
frkcn Feb 20, 2025
25400b5
chore: Fix styling
frkcn Feb 20, 2025
031c845
feat(dependencies): update Pest package versions for compatibility
frkcn Feb 20, 2025
ab3e8ad
feat(workflow): add Laravel 10 and Pest 2 support in workflow configu…
frkcn Feb 20, 2025
76d6523
feat(dependencies): update Larastan version for compatibility with La…
frkcn Feb 20, 2025
6b11e0c
feat(workflow): add GITHUB_TOKEN environment variable to Pest workflow
frkcn Feb 20, 2025
e35f34a
fix(workflow): rename GITHUB_TOKEN to GH_TOKEN in Pest workflow
frkcn Feb 20, 2025
be7cbb9
fix(workflow): remove GH_TOKEN environment variable from Pest workflow
frkcn Feb 20, 2025
af38ab4
feat(dependencies): update Larastan version to ^3.1.0 for improved co…
frkcn Feb 21, 2025
23ca757
fix(workflow): simplify Laravel version specification in Pest workflow
frkcn Feb 21, 2025
2e93a63
fix(workflow): update branches and simplify matrix configuration in P…
frkcn Feb 21, 2025
adb1b39
fix(workflow): update dependency installation command in Pest workflo…
frkcn Feb 21, 2025
7da13de
fix(dependencies): update Pest and its plugins to version 3.0 for com…
frkcn Feb 21, 2025
e6cc077
fix(workflow): update dependency installation command in Pest workflo…
frkcn Feb 21, 2025
da71637
fix(workflow): simplify dependency installation command in Pest workflow
frkcn Feb 21, 2025
45438a4
fix(workflow): disable coverage reporting in Pest workflow and enhanc…
frkcn Feb 21, 2025
748dd58
fix(workflow): update Pest execution command to include color output …
frkcn Feb 21, 2025
2574b8d
fix(workflow): enable coverage reporting in Pest workflow and adjust …
frkcn Feb 21, 2025
57a6619
fix(tests): streamline log expectation in StateTest
frkcn Feb 21, 2025
7556236
fix(dependencies): update illuminate/contracts and orchestra/testbenc…
frkcn Feb 21, 2025
79620ec
fix(tests): enhance log expectation in StateTest to allow any arguments
frkcn Feb 21, 2025
6341d5e
fix(tests): update log expectation in StateTest to use Log::spy for b…
frkcn Feb 21, 2025
3cb2468
fix(tests): update StateTest to use Log::shouldReceive for log verifi…
frkcn Feb 21, 2025
94878b6
fix(workflow): update Pest workflow to use 'main' branch and adjust s…
frkcn Feb 21, 2025
6ed01b1
fix(workflow): update Pest workflow to use composer update for illumi…
frkcn Feb 21, 2025
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
28 changes: 14 additions & 14 deletions .github/workflows/pest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,26 @@ name: Pest

on:
push:
branches: [main]
branches:
- main
- '*.x'
pull_request:
branches: [main]

jobs:
test:
runs-on: ${{ matrix.os }}
runs-on: ubuntu-latest

strategy:
fail-fast: true
matrix:
os: [ubuntu-latest]
php: [8.2, 8.3]
laravel: [10.*, 11.*]
php: [8.2, 8.3, 8.4]
laravel: [10, 11, 12]
stability: [prefer-lowest, prefer-stable]
include:
- laravel: 10.*
testbench: 8.*
- laravel: 11.*
testbench: 9.*
exclude:
- php: 8.4
laravel: 10

name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }}

steps:
- name: Checkout code
Expand All @@ -33,7 +32,8 @@ jobs:
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo
coverage: pcov
coverage: xdebug
ini-values: xdebug.mode=coverage

- name: Setup problem matchers
run: |
Expand All @@ -42,7 +42,7 @@ jobs:

- name: Install dependencies
run: |
composer require "laravel/framework:${{ matrix.laravel }}" --${{ matrix.stability }} --prefer-dist --no-interaction
composer update --prefer-dist --no-interaction --no-progress --with="illuminate/contracts:^${{ matrix.laravel }}"

- name: List Installed Dependencies
run: composer show -D
Expand Down
18 changes: 9 additions & 9 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,21 @@
}
],
"require": {
"php": "^8.2|^8.3",
"illuminate/contracts": "^10.0|^11.0",
"php": "^8.2|^8.3|^8.4",
"illuminate/contracts": "^10.48.4|^11.0.8|^12.0",
"nikic/php-parser": "^5.4",
"spatie/laravel-data": "^3.3",
"spatie/laravel-data": "^4.13.0",
"spatie/laravel-package-tools": "^1.14.0"
},
"require-dev": {
"infection/infection": "^0.29.6",
"laravel/pint": "^1.0",
"larastan/larastan": "^2.0",
"orchestra/testbench": "^8.0|^9.0",
"pestphp/pest": "^2.34",
"pestphp/pest-plugin-arch": "^2.7",
"pestphp/pest-plugin-laravel": "^2.4",
"pestphp/pest-plugin-type-coverage": "^2.8"
"larastan/larastan": "^3.1.0",
"orchestra/testbench": "^8.23.1|^9.0|^10.0",
"pestphp/pest": "^3.0",
"pestphp/pest-plugin-arch": "^3.0",
"pestphp/pest-plugin-laravel": "^3.0",
"pestphp/pest-plugin-type-coverage": "^3.0"
},
"autoload": {
"psr-4": {
Expand Down
3 changes: 2 additions & 1 deletion src/Transformers/ModelTransformer.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

use Spatie\LaravelData\Support\DataProperty;
use Spatie\LaravelData\Transformers\Transformer;
use Spatie\LaravelData\Support\Transformation\TransformationContext;

/**
* Class ModelTransformer.
Expand All @@ -23,7 +24,7 @@ class ModelTransformer implements Transformer
*
* @return mixed The transformed value.
*/
public function transform(DataProperty $property, mixed $value): mixed
public function transform(DataProperty $property, mixed $value, TransformationContext $context): mixed
{
return $value->id;
}
Expand Down