Skip to content

Commit

Permalink
Minor tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
ogizanagi committed Dec 30, 2021
1 parent 2aefece commit c9852a5
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Elao Enumerations
=================
[![Latest Stable Version](https://poser.pugx.org/elao/enum/v/stable?format=flat-square)](https://packagist.org/packages/elao/enum)
[![Latest Version](https://poser.pugx.org/elao/enum/v?format=flat-square)](https://packagist.org/packages/elao/enum)
[![Total Downloads](https://poser.pugx.org/elao/enum/downloads?format=flat-square)](https://packagist.org/packages/elao/enum)
[![Monthly Downloads](https://poser.pugx.org/elao/enum/d/monthly?format=flat-square)](https://packagist.org/packages/elao/enum)
[![Tests](https://github.com/Elao/PhpEnums/actions/workflows/ci.yml/badge.svg)](https://github.com/Elao/PhpEnums/actions/workflows/ci.yml)
Expand Down Expand Up @@ -35,10 +35,24 @@ enum Suit: string implements ReadableEnumInterface
<p align="center">
<strong>📢 This project used to emulate enumerations before PHP 8.1.</strong><br/>
For the 1.x documentation, <a href="https://github.com/Elao/PhpEnums/tree/1.x">click here</a>
<br/><br/>
You can also consult <a href="https://github.com/Elao/PhpEnums/issues/124">this issue</a> to follow objectives & progress for the V2 of this lib.
</p>

---

## Installation

```bash
composer require "elao/enum:^2.0-alpha"
```

Or, in order to help and test latest changes:

```bash
composer require "elao/enum:^2.x-dev"
```

## Readable enums

Readable enums provide a way to expose human-readable labels for your enum cases, by adding a
Expand Down Expand Up @@ -193,7 +207,7 @@ class CardType extends AbstractType

#### Resolve controller arguments from route path

As of Symfony 6.1+, backed enum cases can be resolved from route path parameters:
As of Symfony 6.1+, [backed enum cases will be resolved](https://github.com/symfony/symfony/pull/44831) from route path parameters:

```php
class CardController
Expand Down

0 comments on commit c9852a5

Please sign in to comment.