Download the PHP package invis1ble/serializer-extension-bundle without Composer
On this page you can find all versions of the php package invis1ble/serializer-extension-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download invis1ble/serializer-extension-bundle
More information about invis1ble/serializer-extension-bundle
Files in invis1ble/serializer-extension-bundle
Package serializer-extension-bundle
Short Description Symfony Bundle for symfony/serializer extension.
License MIT
Informations about the package serializer-extension-bundle
SerializerExtensionBundle
The SerializerExtensionBundle integrates invis1ble/symfony-serializer-extension into the Symfony framework.
Requirements
- PHP 8.1 or later.
- Symfony 6.4, 7.x, or 8.x. Symfony 8 requires PHP 8.4.1 or later.
invis1ble/symfony-serializer-extension1.2 or later in the 1.x release line.
Version 1.1 adds Symfony 8 support while preserving the existing service IDs,
URI factory alias, and normalizer priority. Existing ^1.0 Composer constraints
accept this release. To explicitly select it:
Installation
Make sure Composer is installed globally, as explained in the installation chapter of the Composer documentation.
Applications that use Symfony Flex
Open a command console, enter your project directory and execute:
Applications that don't use Symfony Flex
Step 1: Download the Bundle
Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:
Step 2: Enable the Bundle
Then, enable the bundle by adding it to the list of registered bundles
in the config/bundles.php file of your project:
Usage
Enable the Symfony serializer in your application:
Inject Symfony\Component\Serializer\SerializerInterface and use the json
format to serialize a PSR-7 UriInterface to a JSON string or deserialize one to
Psr\Http\Message\UriInterface or GuzzleHttp\Psr7\Uri.
The bundle registers one serializer.normalizer service,
invis1ble_serializer_extension.normalizer.uri, with priority 10, ahead of
Symfony's object and property normalizers. The public service
invis1ble_serializer_extension.uri_factory uses GuzzleHttp\Psr7\HttpFactory
and is aliased to Psr\Http\Message\UriFactoryInterface for autowiring.
Service definitions now load from config/services.php, because Symfony 8 no
longer supports XML service configuration. Applications that register the bundle
need no configuration changes. The legacy XML files remain available for older
Symfony applications that imported them directly; such imports must use the PHP
files when upgrading to Symfony 8.
Development
Getting started
- If not already done, install Docker Compose (v2.10+)
- Run
docker compose build --no-cacheto build fresh images - Run
docker compose up -d --waitto start the Docker containers - Run
docker compose exec -T php composer installto install dependencies - Run
docker compose down --remove-orphansto stop the Docker containers.
The development image defaults to PHP 8.4. Set PHP_VERSION before building and
starting Compose to select another version. CI checks PHP 8.1 / Symfony 6.4,
PHP 8.2 / Symfony 7.4, PHP 8.4 / Symfony 8.0, and PHP 8.5 / Symfony 8.1 with stable
dependencies and real platform requirements.
Validate the package and installed platform requirements with:
Check for Coding Standards violations
Run PHP_CodeSniffer checks:
Run PHP-CS-Fixer checks:
Run Rector checks:
Testing
The tests compile a minimal Symfony kernel, check service tags and autowiring, and exercise URI round trips, invalid data, normalizer ordering, and an HTTP request through the container serializer. To run them during development:
To run with coverage
License
The MIT License
All versions of serializer-extension-bundle with dependencies
symfony/http-kernel Version ^6.4 || ^7.0 || ^8.0
symfony/dependency-injection Version ^6.4 || ^7.0 || ^8.0
symfony/config Version ^6.4 || ^7.0 || ^8.0
invis1ble/symfony-serializer-extension Version ^1.2
guzzlehttp/guzzle Version ^7.3