PHPackages                             attributes-php/options - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Validation &amp; Sanitization](/categories/validation)
4. /
5. attributes-php/options

ActiveLibrary[Validation &amp; Sanitization](/categories/validation)

attributes-php/options
======================

Serializes any object into a primitive type

v0.1.2(10mo ago)1519[1 issues](https://github.com/Attributes-PHP/options/issues)2MITPHPPHP ^8.1CI passing

Since Jun 16Pushed 10mo agoCompare

[ Source](https://github.com/Attributes-PHP/options)[ Packagist](https://packagist.org/packages/attributes-php/options)[ RSS](/packages/attributes-php-options/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (2)Versions (4)Used By (2)

Attributes Options
==================

[](#attributes-options)

 [![](https://camo.githubusercontent.com/47062efac12dcb797a215a8e66b93cc3811186bdf9f82c1eebcbc5cf598b8f34/68747470733a2f2f636f6465636f762e696f2f67682f417474726962757465732d5048502f6f7074696f6e732f67726170682f62616467652e7376673f746f6b656e3d4a326b714e703563686f)](https://codecov.io/gh/Attributes-PHP/options) [![Latest Version](https://camo.githubusercontent.com/b0c7f98e48c9a16f8934fc927be690e69ab73c5c63777eaf87c7cca04e48117b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f417474726962757465732d5048502f6f7074696f6e73)](https://packagist.org/packages/Attributes-PHP/options) [![Software License](https://camo.githubusercontent.com/dabf5f4e340f5feccb28b06b6248dca0d8a052fb5caf2abd614b1a656bc2edc9/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e63652d4d49542d627269676874677265656e)](https://packagist.org/packages/Attributes-PHP/options)

**Attributes Options** is a collection of Attributes that can be used to enhance the [validation](https://github.com/Attributes-PHP/validation)and/or [serialization](https://github.com/Attributes-PHP/serializer) stages.

Supported options
-----------------

[](#supported-options)

### Class specific options

[](#class-specific-options)

- *AliasGenerator*, generates an alias per each class property

### Property options

[](#property-options)

- *Alias*, specifies a given alias for a property
- *Ignore*, skips the validation and/or serialization of a property

Requirements
------------

[](#requirements)

- PHP 8.1+

We aim to support versions that haven't reached their end-of-life.

How it works?
-------------

[](#how-it-works)

```
