From 870dc07d0dc6ea6c45c96c6e14d55d13f1534edf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Gallego?= Date: Thu, 6 Feb 2014 15:30:44 +0100 Subject: [PATCH] Add upgrade note --- UPGRADE.md | 8 ++++++++ composer.json | 6 +++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/UPGRADE.md b/UPGRADE.md index caa7dc6..3d6c93e 100644 --- a/UPGRADE.md +++ b/UPGRADE.md @@ -1,5 +1,13 @@ # Upgrade guide +## From v2.0 to v2.1 + +- [Potential BC] A potential BC have been introduced in v2.1 to respect interfaces of RBAC component more strictly. +However there is great chance that you have nothing to do. Now, ZfcRbac no longer cast permissions to string before +passing it to your "hasPermission" method in the Role entity. If you used to call `isGranted` using a string permission, +like this: `isGranted('myPermission')`, then you have nothing to do. However, if you are passing a `PermissionInterface` +object, you will now receive this object instead of a string. It's up to you to getting the name from your permission. + ## From v1 to v2 Here are the major breaking changes from ZfcRbac 1 to ZfcRbac 2: diff --git a/composer.json b/composer.json index 8abada7..45d85a3 100644 --- a/composer.json +++ b/composer.json @@ -26,7 +26,7 @@ "php": ">=5.4", "zendframework/zend-mvc": "~2.2", "zendframework/zend-servicemanager": "~2.2", - "zfr/rbac": "~1.0" + "zfr/rbac": "~1.2" }, "require-dev": { "zendframework/zendframework": "~2.2", @@ -35,8 +35,8 @@ "squizlabs/php_codesniffer": "1.4.*", "satooshi/php-coveralls": "~0.6", "doctrine/common": "~2.4", - "doctrine/doctrine-module": "~0.8@beta", - "doctrine/doctrine-orm-module": "~0.8@beta" + "doctrine/doctrine-module": "~0.8", + "doctrine/doctrine-orm-module": "~0.8" }, "suggest": { "zendframework/zend-developer-tools": "if you want to show information about the roles",