diff --git a/.github/.release-please-manifest.json b/.github/.release-please-manifest.json index 3eb51cf..ba67087 100644 --- a/.github/.release-please-manifest.json +++ b/.github/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "2.0.0" + ".": "2.1.0" } diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index a085750..11a9129 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -65,7 +65,7 @@ jobs: run: composer test:cc - name: 📤 Upload code coverage report to Codecov - uses: codecov/codecov-action@v4.4.1 + uses: codecov/codecov-action@v4.5.0 with: files: .build/phpunit/logs/clover.xml token: ${{ secrets.CODECOV_TOKEN }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 3f3fee3..efbf81f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [2.1.0](https://github.com/wayofdev/laravel-symfony-serializer/compare/v2.0.0...v2.1.0) (2024-06-19) + + +### Features + +* add static types to Manager Facade ([c4dfdf8](https://github.com/wayofdev/laravel-symfony-serializer/commit/c4dfdf8ea1d91cd6401cd4ed6d72cee3e27c08bd)) + ## [2.0.0](https://github.com/wayofdev/laravel-symfony-serializer/compare/v1.2.60...v2.0.0) (2024-06-18) diff --git a/config/serializer.php b/config/serializer.php index 006073d..4451221 100644 --- a/config/serializer.php +++ b/config/serializer.php @@ -2,15 +2,13 @@ declare(strict_types=1); -use Symfony\Component\Serializer\Mapping\Loader\LoaderInterface; - /** * @return array{ * default: string, * debug: bool, * normalizerRegistrationStrategy: class-string, * encoderRegistrationStrategy: class-string, - * metadataLoader: class-string|null, + * metadataLoader: class-string|null, * } */ return [ @@ -59,6 +57,8 @@ /* * Allows you to register your custom metadata loader. + * + * By default Symfony\Component\Serializer\Mapping\Loader\AttributeLoader is used. */ 'metadataLoader' => null, ]; diff --git a/src/Bridge/Laravel/Facades/Manager.php b/src/Bridge/Laravel/Facades/Manager.php index 39c4c2c..3546b5e 100644 --- a/src/Bridge/Laravel/Facades/Manager.php +++ b/src/Bridge/Laravel/Facades/Manager.php @@ -5,7 +5,17 @@ namespace WayOfDev\Serializer\Bridge\Laravel\Facades; use Illuminate\Support\Facades\Facade; +use Stringable; +use WayOfDev\Serializer\Contracts\SerializerInterface; +/** + * @method static string format() + * @method static SerializerInterface serializer(?string $format = null) + * @method static string serialize(mixed $payload, ?string $format = null, ?array $context = []) + * @method static mixed deserialize(string|Stringable $payload, string|object|null $type = null, ?string $format = null, ?array $context = []) + * + * @see \WayOfDev\Serializer\Manager\SerializerManager + */ class Manager extends Facade { protected static function getFacadeAccessor(): string