-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
301 additions
and
377 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# CHANGELOG for 2.0.x | ||
|
||
This changelog references the relevant changes done in 2.0 version. | ||
|
||
### 2.0.0(2018-03-26) | ||
|
||
* This new version is only for PHP ⩾7.1. | ||
* Update all dependencies (remove all doctrine dependencies) | ||
* DoctrineParamConverter is not used anymore | ||
* This bundle only converts hashid into an id | ||
* Replace `autowire` with `passthrough`. | ||
This new parameter which allows to continue with the next param converters available. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
# UPGRADE FROM 1.x to 2.0 | ||
|
||
### Configuration | ||
|
||
* Removed the `autowire` parameter in favor of the `passthrough` parameter. | ||
|
||
Before: | ||
|
||
```yml | ||
roukmoute_hashids: | ||
autowire: false | ||
``` | ||
After: | ||
```yml | ||
roukmoute_hashids: | ||
passthrough: false | ||
``` | ||
### HashidsParamConverter | ||
* Replace `id` key option with `hashid`. | ||
|
||
Before: | ||
|
||
```php | ||
/** | ||
* @Route("/users/{userHashid}/status/{statusHashid}") | ||
* @ParamConverter("user", class="RoukmouteBundle\Entity\User", options={"id" = "userHashid"}) | ||
* @ParamConverter("status", class="RoukmouteBundle\Entity\Notification", options={"id" = "statusHashid"}) | ||
*/ | ||
public function getAction(User $user, Status $status) | ||
{ | ||
} | ||
``` | ||
|
||
After: | ||
|
||
```php | ||
/** | ||
* @Route("/users/{userHashid}/status/{statusHashid}") | ||
* @ParamConverter("user", class="RoukmouteBundle\Entity\User", options={"hashid" = "userHashid"}) | ||
* @ParamConverter("status", class="RoukmouteBundle\Entity\Notification", options={"hashid" = "statusHashid"}) | ||
*/ | ||
public function getAction(User $user, Status $status) | ||
{ | ||
} | ||
``` | ||
|
||
* Remove the requirement to have `Hashid` at the end of the value option | ||
|
||
Before: | ||
|
||
```php | ||
/** | ||
* @Route("/users/{userHashid}/status/{statusHashid}") | ||
* @ParamConverter("user", class="RoukmouteBundle\Entity\User", options={"id" = "userHashid"}) | ||
* @ParamConverter("status", class="RoukmouteBundle\Entity\Notification", options={"id" = "statusHashid"}) | ||
*/ | ||
public function getAction(User $user, Status $status) | ||
{ | ||
} | ||
``` | ||
|
||
After: | ||
|
||
```php | ||
/** | ||
* @Route("/users/{user}/status/{status}") | ||
* @ParamConverter("user", class="RoukmouteBundle\Entity\User", options={"hashid" = "user"}) | ||
* @ParamConverter("status", class="RoukmouteBundle\Entity\Notification", options={"hashid" = "status"}) | ||
*/ | ||
public function getAction(User $user, Status $status) | ||
{ | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.