Download the PHP package lastdragon-ru/lara-asp-serializer without Composer
On this page you can find all versions of the php package lastdragon-ru/lara-asp-serializer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download lastdragon-ru/lara-asp-serializer
More information about lastdragon-ru/lara-asp-serializer
Files in lastdragon-ru/lara-asp-serializer
Package lara-asp-serializer
Short Description The Awesome Set of Packages for Laravel - The Serializer.
License MIT
Homepage https://github.com/LastDragon-ru/lara-asp
Informations about the package lara-asp-serializer
(Laravel) Symfony Serializer
This package provides a customizable wrapper around the Symfony Serializer Component to use it inside Laravel application.
[include:artisan]: <lara-asp-documentator:requirements "{$directory}">
Requirements
Requirement | Constraint | Supported by |
---|---|---|
PHP | ^8.3 |
HEAD ⋯ 5.0.0 |
^8.2 |
HEAD ⋯ 5.0.0-beta.0 |
|
^8.1 |
6.4.2 ⋯ 5.0.0-beta.0 |
|
Laravel | ^11.0.0 |
HEAD ⋯ 6.2.0 |
^10.34.0 |
HEAD ⋯ 6.2.0 |
|
^10.0.0 |
6.1.0 ⋯ 5.0.0-beta.0 |
|
^9.21.0 |
5.6.0 ⋯ 5.0.0-beta.1 |
|
^9.0.0 |
5.0.0-beta.0 |
Installation
Usage
The $serialized
is:
The $deserialized
is:
Partial deserialization
Sometimes you don't know (or do not want to support) the full structure of the object. In this case you can mark the class as Partial
to allow unserialize only known (wanted) properties:
The $deserialized
is:
Extending
Out of the box, the package supports only the following objects (see Factory
for more details):
- Any object that implement
SerializableNormalizer
) - Any object that implement
\DateTimeInterface
(seeDateTimeNormalizer
) \DateTimeZone
\DateInterval
- PHP Enums
Publish the config and add normalizers/denormalizers if you need more:
Eloquent Accessor/Mutator^1
You can use the Serialized
attribute to populate a model attribute to/from an object:
The $user->settings
is:
The $user->getAttributes()
is:
Upgrading
Please follow Upgrade Guide.
Contributing
This package is the part of Awesome Set of Packages for Laravel. Please use the main repository to report issues, send pull requests, or ask questions.
"\LastDragon_ru\LaraASP\Serializer\Casts\Serialized"
"\LastDragon_ru\LaraASP\Serializer\Contracts\Partial"
All versions of lara-asp-serializer with dependencies
illuminate/container Version ^10.34.0|^11.0.0
illuminate/contracts Version ^10.34.0|^11.0.0
illuminate/database Version ^10.34.0|^11.0.0
illuminate/support Version ^10.34.0|^11.0.0
lastdragon-ru/lara-asp-core Version self.version
phpdocumentor/type-resolver Version ^1.7
phpstan/phpdoc-parser Version ^1.25
symfony/deprecation-contracts Version ^3.0.0
symfony/property-access Version ^6.3.0|^7.0.0
symfony/property-info Version ^6.3.9|^7.0.0
symfony/serializer Version ^6.3.3|^7.0.0
symfony/polyfill-php83 Version ^1.28