Skip to content

Commit 01f3ced

Browse files
committed
Issue #47: Remove PHP 8.1 and add PHP 8.4 & 8.5 support
Signed-off-by: alexmerlin <[email protected]>
1 parent 29b0a51 commit 01f3ced

File tree

10 files changed

+65
-49
lines changed

10 files changed

+65
-49
lines changed

.github/workflows/codecov.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ jobs:
1515
- ubuntu-latest
1616

1717
php:
18-
- "8.1"
1918
- "8.2"
2019
- "8.3"
2120
- "8.4"
21+
- "8.5"
2222

2323
steps:
2424
- name: Checkout

.github/workflows/static-analysis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ jobs:
1515
- ubuntu-latest
1616

1717
php:
18-
- "8.1"
1918
- "8.2"
2019
- "8.3"
2120
- "8.4"
21+
- "8.5"
2222

2323
steps:
2424
- name: Checkout

README.md

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# dot-rbac-guard
22

3-
Defines authorization guards that authorize users for accessing certain parts of an application based on various criteria.
3+
Defines authorization guards that authorize users to access certain parts of an application based on various criteria.
44
If the authorization service can be used to check authorization on a narrow level, the guards are meant to work as gateways to bigger parts of an application.
55
Usually, you'll want to use both methods in an application for increased security.
66

@@ -11,7 +11,7 @@ Documentation is available at: https://docs.dotkernel.org/dot-rbac-guard/.
1111
## Badges
1212

1313
![OSS Lifecycle](https://img.shields.io/osslifecycle/dotkernel/dot-rbac-guard)
14-
![PHP from Packagist (specify version)](https://img.shields.io/packagist/php-v/dotkernel/dot-rbac-guard/4.1.0)
14+
![PHP from Packagist (specify version)](https://img.shields.io/packagist/php-v/dotkernel/dot-rbac-guard/4.2.0)
1515

1616
[![GitHub issues](https://img.shields.io/github/issues/dotkernel/dot-rbac-guard)](https://github.com/dotkernel/dot-rbac-guard/issues)
1717
[![GitHub forks](https://img.shields.io/github/forks/dotkernel/dot-rbac-guard)](https://github.com/dotkernel/dot-rbac-guard/network)
@@ -36,7 +36,7 @@ You'll have to first configure dot-rbac before using this module.
3636

3737
## Configuration
3838

39-
As with many Dotkernel modules, we focus on the configuration based approach of customizing the module for your needs.
39+
As with many Dotkernel modules, we focus on the configuration-based approach of customizing the module for your needs.
4040

4141
After installing, merge the module's `ConfigProvider` with your application's config to make sure required dependencies and default module configuration are registered.
4242
Create a configuration file for this module in your 'config/autoload' folder.
@@ -63,8 +63,8 @@ return [
6363
//register custom guards providers here
6464
'guards_provider_manager' => [],
6565

66-
//define which guards provider to use, along with its configuration
67-
//the guards provider should know how to build a list of GuardInterfaces based on its configuration
66+
//define which guard provider to use, along with its configuration
67+
//the guard provider should know how to build a list of GuardInterfaces based on its configuration
6868
'guards_provider' => [
6969
'type' => 'ArrayGuards',
7070
'options' => [
@@ -97,9 +97,11 @@ return [
9797
'rules' => [
9898
[
9999
'route' => 'controller route name',
100-
'actions' => [//list of actions to apply, or empty array for all actions],
101-
//by default, authorization pass if all permissions are present(AND)
102-
'roles' => [//list of roles to allow],
100+
//list of actions to apply, or empty array for all actions
101+
'actions' => [],
102+
//by default, authorization pass if all permissions are present (AND)
103+
//list of roles to allow
104+
'roles' => [],
103105
],
104106
]
105107
]
@@ -110,16 +112,20 @@ return [
110112
'rules' => [
111113
[
112114
'route' => 'controller route name',
113-
'actions' => [//list of actions to apply, or empty array for all actions],
114-
//by default, authorization pass if all permissions are present(AND)
115-
'permissions' => [//list of permissions to allow],
115+
//list of actions to apply, or empty array for all actions
116+
'actions' => [],
117+
//by default, authorization pass if all permissions are present (AND)
118+
//list of permissions to allow
119+
'permissions' => [],
116120
],
117121
[
118122
'route' => 'controller route name',
119-
'actions' => [//list of actions to apply, or empty array for all actions],
123+
//list of actions to apply, or empty array for all actions
124+
'actions' => [],
120125
'permissions' => [
121126
//permission can be defined in this way too, for all permission type guards
122-
'permissions' => [//list of permissions],
127+
//list of permissions
128+
'permissions' => [],
123129
'condition' => \Dot\Rbac\Guard\GuardInterface::CONDITION_OR,
124130
]
125131
]
@@ -143,7 +149,7 @@ return [
143149

144150
## Register the RbacGuardMiddleware in the pipe
145151

146-
The last step in order to use this package is to register the middleware.
152+
The last step to use this package is to register the middleware.
147153
This middleware triggers the authorization event.
148154
You MUST insert this middleware between the routing middleware and the dispatch middleware of the application, because the guards need the `RouteResult` in order to get the matched route and params.
149155

SECURITY.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,12 @@
22

33
## Supported Versions
44

5-
65
| Version | Supported | PHP Version |
76
|---------|--------------------|----------------------------------------------------------------------------------------------------------------|
8-
| 4.x | :white_check_mark: | ![PHP from Packagist (specify version)](https://img.shields.io/packagist/php-v/dotkernel/dot-rbac-guard/4.0.0) |
9-
| 3.x | :x: | ![PHP from Packagist (specify version)](https://img.shields.io/packagist/php-v/dotkernel/dot-rbac-guard/3.4.3) |
7+
| 4.x | :white_check_mark: | ![PHP from Packagist (specify version)](https://img.shields.io/packagist/php-v/dotkernel/dot-rbac-guard/4.2.0) |
8+
| 3.x | :x: | ![PHP from Packagist (specify version)](https://img.shields.io/packagist/php-v/dotkernel/dot-rbac-guard/3.7.0) |
109
| <= 2.x | :x: | |
1110

12-
1311
## Reporting Potential Security Issues
1412

1513
If you have encountered a potential security vulnerability in this project,
@@ -25,7 +23,7 @@ When reporting issues, please provide the following information:
2523
We request that you contact us via the email address above and give the
2624
project contributors a chance to resolve the vulnerability and issue a new
2725
release prior to any public exposure; this helps protect the project's
28-
users, and provides them with a chance to upgrade and/or update in order to
26+
users and provides them with a chance to upgrade and/or update to
2927
protect their applications.
3028

3129

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
}
2020
],
2121
"require": {
22-
"php": "~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0",
22+
"php": "~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0",
2323
"dotkernel/dot-authentication": "^2.3.4",
2424
"dotkernel/dot-controller": "^4.0",
2525
"dotkernel/dot-rbac": "^4.0",
@@ -62,7 +62,7 @@
6262
],
6363
"cs-check": "phpcs",
6464
"cs-fix": "phpcbf",
65-
"test": "phpunit --colors=always",
66-
"static-analysis": "phpstan analyse --memory-limit 1G"
65+
"static-analysis": "phpstan analyse --memory-limit 1G",
66+
"test": "phpunit --colors=always"
6767
}
6868
}

docs/book/v3/configuration.md

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Configuration
22

3-
As with many Dotkernel modules, we focus on the configuration based approach of customizing the module for your needs.
3+
As with many Dotkernel modules, we focus on the configuration-based approach of customizing the module for your needs.
44

55
After installing, merge the module's `ConfigProvider` with your application's config to make sure required dependencies and default module configuration are registered.
66
Create a configuration file for this module in your 'config/autoload' folder.
@@ -27,8 +27,8 @@ return [
2727
//register custom guards providers here
2828
'guards_provider_manager' => [],
2929

30-
//define which guards provider to use, along with its configuration
31-
//the guards provider should know how to build a list of GuardInterfaces based on its configuration
30+
//define which guard provider to use, along with its configuration
31+
//the guard provider should know how to build a list of GuardInterfaces based on its configuration
3232
'guards_provider' => [
3333
'type' => 'ArrayGuards',
3434
'options' => [
@@ -61,9 +61,11 @@ return [
6161
'rules' => [
6262
[
6363
'route' => 'controller route name',
64-
'actions' => [//list of actions to apply, or empty array for all actions],
65-
//by default, authorization pass if all permissions are present(AND)
66-
'roles' => [//list of roles to allow],
64+
//list of actions to apply, or empty array for all actions
65+
'actions' => [],
66+
//by default, authorization pass if all permissions are present (AND)
67+
//list of roles to allow
68+
'roles' => [],
6769
],
6870
]
6971
]
@@ -74,16 +76,20 @@ return [
7476
'rules' => [
7577
[
7678
'route' => 'controller route name',
77-
'actions' => [//list of actions to apply, or empty array for all actions],
78-
//by default, authorization pass if all permissions are present(AND)
79-
'permissions' => [//list of permissions to allow],
79+
//list of actions to apply, or empty array for all actions
80+
'actions' => [],
81+
//by default, authorization pass if all permissions are present (AND)
82+
//list of permissions to allow
83+
'permissions' => [],
8084
],
8185
[
8286
'route' => 'controller route name',
83-
'actions' => [//list of actions to apply, or empty array for all actions],
87+
//list of actions to apply, or empty array for all actions
88+
'actions' => [],
8489
'permissions' => [
8590
//permission can be defined in this way too, for all permission type guards
86-
'permissions' => [//list of permissions],
91+
//list of permissions
92+
'permissions' => [],
8793
'condition' => \Dot\Rbac\Guard\GuardInterface::CONDITION_OR,
8894
]
8995
]

docs/book/v3/overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ The rbac authorization guards service authorizes users for accessing certain par
55
## Badges
66

77
![OSS Lifecycle](https://img.shields.io/osslifecycle/dotkernel/dot-rbac-guard)
8-
![PHP from Packagist (specify version)](https://img.shields.io/packagist/php-v/dotkernel/dot-rbac-guard/3.6.0)
8+
![PHP from Packagist (specify version)](https://img.shields.io/packagist/php-v/dotkernel/dot-rbac-guard/3.7.0)
99

1010
[![GitHub issues](https://img.shields.io/github/issues/dotkernel/dot-rbac-guard)](https://github.com/dotkernel/dot-rbac-guard/issues)
1111
[![GitHub forks](https://img.shields.io/github/forks/dotkernel/dot-rbac-guard)](https://github.com/dotkernel/dot-rbac-guard/network)

docs/book/v4/configuration.md

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Configuration
22

3-
As with many Dotkernel modules, we focus on the configuration based approach of customizing the module for your needs.
3+
As with many Dotkernel modules, we focus on the configuration-based approach of customizing the module for your needs.
44

55
After installing, merge the module's `ConfigProvider` with your application's config to make sure required dependencies and default module configuration are registered.
66
Create a configuration file for this module in your 'config/autoload' folder.
@@ -27,8 +27,8 @@ return [
2727
//register custom guards providers here
2828
'guards_provider_manager' => [],
2929

30-
//define which guards provider to use, along with its configuration
31-
//the guards provider should know how to build a list of GuardInterfaces based on its configuration
30+
//define which guard provider to use, along with its configuration
31+
//the guard provider should know how to build a list of GuardInterfaces based on its configuration
3232
'guards_provider' => [
3333
'type' => 'ArrayGuards',
3434
'options' => [
@@ -61,9 +61,11 @@ return [
6161
'rules' => [
6262
[
6363
'route' => 'controller route name',
64-
'actions' => [//list of actions to apply, or empty array for all actions],
65-
//by default, authorization pass if all permissions are present(AND)
66-
'roles' => [//list of roles to allow],
64+
//list of actions to apply, or empty array for all actions
65+
'actions' => [],
66+
//by default, authorization pass if all permissions are present (AND)
67+
//list of roles to allow
68+
'roles' => [],
6769
],
6870
]
6971
]
@@ -74,16 +76,20 @@ return [
7476
'rules' => [
7577
[
7678
'route' => 'controller route name',
77-
'actions' => [//list of actions to apply, or empty array for all actions],
78-
//by default, authorization pass if all permissions are present(AND)
79-
'permissions' => [//list of permissions to allow],
79+
//list of actions to apply, or empty array for all actions
80+
'actions' => [],
81+
//by default, authorization pass if all permissions are present (AND)
82+
//list of permissions to allow
83+
'permissions' => [],
8084
],
8185
[
8286
'route' => 'controller route name',
83-
'actions' => [//list of actions to apply, or empty array for all actions],
87+
//list of actions to apply, or empty array for all actions
88+
'actions' => [],
8489
'permissions' => [
8590
//permission can be defined in this way too, for all permission type guards
86-
'permissions' => [//list of permissions],
91+
//list of permissions
92+
'permissions' => [],
8793
'condition' => \Dot\Rbac\Guard\GuardInterface::CONDITION_OR,
8894
]
8995
]

docs/book/v4/overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ The rbac authorization guards service authorizes users for accessing certain par
55
## Badges
66

77
![OSS Lifecycle](https://img.shields.io/osslifecycle/dotkernel/dot-rbac-guard)
8-
![PHP from Packagist (specify version)](https://img.shields.io/packagist/php-v/dotkernel/dot-rbac-guard/4.1.0)
8+
![PHP from Packagist (specify version)](https://img.shields.io/packagist/php-v/dotkernel/dot-rbac-guard/4.2.0)
99

1010
[![GitHub issues](https://img.shields.io/github/issues/dotkernel/dot-rbac-guard)](https://github.com/dotkernel/dot-rbac-guard/issues)
1111
[![GitHub forks](https://img.shields.io/github/forks/dotkernel/dot-rbac-guard)](https://github.com/dotkernel/dot-rbac-guard/network)

docs/book/v4/updating-pipeline.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Register the RbacGuardMiddleware in the pipeline
22

3-
The last step in order to use this package is to register the middleware.
3+
The last step to use this package is to register the middleware.
44
This middleware triggers the authorization event.
55
You MUST insert this middleware between the routing middleware and the dispatch middleware of the application, because the guards need the `RouteResult` in order to get the matched route and params.
66

0 commit comments

Comments
 (0)