Skip to content

Commit 9700e54

Browse files
committed
Issue #40: Remove PHP 8.1 and add PHP 8.4 & 8.5 support
Signed-off-by: alexmerlin <alex.merlin.1985@gmail.com>
1 parent aaec8ea commit 9700e54

16 files changed

Lines changed: 154 additions & 112 deletions

.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-navigation
22

3-
`dot-navigation` is Dotkernel's component that allows you to easily define and parse menus inside templates, using a configuration based approach.
3+
`dot-navigation` is Dotkernel's component that allows you to easily define and parse menus inside templates, using a configuration-based approach.
44

55
## Documentation
66

@@ -9,7 +9,7 @@ Documentation is available at: https://docs.dotkernel.org/dot-navigation/.
99
## Badges
1010

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

1414
[![GitHub issues](https://img.shields.io/github/issues/dotkernel/dot-navigation)](https://github.com/dotkernel/dot-navigation/issues)
1515
[![GitHub forks](https://img.shields.io/github/forks/dotkernel/dot-navigation)](https://github.com/dotkernel/dot-navigation/network)
@@ -22,7 +22,7 @@ Documentation is available at: https://docs.dotkernel.org/dot-navigation/.
2222

2323
## Installation
2424

25-
Run
25+
Install `dotkernel/dot-navigation` by executing the following Composer command:
2626

2727
```shell
2828
composer require dotkernel/dot-navigation
@@ -40,17 +40,22 @@ Locate dot-navigation's distributable config file `vendor/dotkernel/dot-navigati
4040

4141
## Components
4242

43-
A menu, or navigation container, is a class implementing the \RecursiveIterator interface. It has a hierarchical structure, with nodes called pages(see the `Page` class) that may have children. It is basically a tree
43+
A menu, or navigation container, is a class implementing the `RecursiveIterator` interface.
44+
It has a hierarchical structure, with nodes called pages (see the `Page` class) that may have children. It is basically a tree
4445

45-
A Page extends the NavigationContainer class. The NavigationContainer is the top most node which represents the entire menu. The children of this node are Page instances that defines each navigation item.
46+
A Page extends the NavigationContainer class. The NavigationContainer is the top most node which represents the entire menu.
47+
The children of this node are Page instances that define each navigation item.
4648

47-
A page has a reference to its parent, and can have options and attributes. There are no limitation on what is accepted as options or attributes.
49+
A page has a reference to its parent and can have options and attributes. There is no limitation on what is accepted as options or attributes.
4850

49-
Options can be any piece of information that describes a page. Some predefined options exists, in order for the navigation module to work seamlessly with other dot modules.
51+
Options can be any piece of information that describes a page.
52+
Some predefined options exist in order for the navigation module to work seamlessly with other dot modules.
5053

51-
Attributes are key value pairs that defines the menu item. They are usually inserted as html attributes when parsing the menu, but of course, this is implementation specific.
54+
Attributes are key value pairs that define the menu item.
55+
They are usually inserted as HTML attributes when parsing the menu, but of course, this is implementation-specific.
5256

53-
A `NavigationService` class, is the service that handles all defined menu container. It can fetch the container from its provider, check if a page is active or not and get the page's generated URI.
57+
A `NavigationService` class, is the service that handles all defined menu containers.
58+
It can fetch the container from its provider, check if a page is active or not, and get the page's generated URI.
5459

5560
## Container providers
5661

@@ -62,20 +67,21 @@ We offer just one provider for now, `ArrayProvider`, that is able to fetch and c
6267

6368
## NavigationRenderer
6469

65-
Used to render the navigation container in a displayable format. It can render a simple HTML ul list or use a partial template, to render the menu in a template engine.
70+
Used to render the navigation container in a displayable format.
71+
It can render a simple HTML unordered list or use a partial template to render the menu in a template engine.
6672

6773
The partial method is usually the more flexible one, custom rules can be defined and checked in the template.
6874

69-
If you are using Twig, there is already a Twig extension provided in package dot-twigrenderer, that you can use to easily parse the menus inside your templates
75+
If you are using Twig, there is already a Twig extension provided in package dot-twigrenderer that you can use to easily parse the menus inside your templates
7076

71-
When using the partial method, the template will receive as parameters the container, the navigation service and any extra parameters set by the developer.
77+
When using the partial method, the template will receive as parameters the container, the navigation service, and any extra parameters set by the developer.
7278

73-
Navigation containers are referred, when parsed, by their name, as defined in the configuration file.
79+
Navigation containers are referred to, when parsed, by their name, as defined in the configuration file.
7480

7581
## Required page options and attributes
7682

7783
The following are options that each page should define in the configuration
7884

7985
* `label` - the text of the menu item
8086
* `route` or `uri` - defines the route or link the menu item will have
81-
* `permission` - can be used optionally, if authorization service is present, in order to omit menu items that are not authorized to visit.
87+
* `permission` - can be used optionally if authorization service is present, to omit menu items that are not authorized to visit.

SECURITY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
| Version | Supported | PHP Version |
66
|---------|--------------------|----------------------------------------------------------------------------------------------------------------|
7-
| 4.x | :white_check_mark: | ![PHP from Packagist (specify version)](https://img.shields.io/packagist/php-v/dotkernel/dot-navigation/4.0.0) |
7+
| 4.x | :white_check_mark: | ![PHP from Packagist (specify version)](https://img.shields.io/packagist/php-v/dotkernel/dot-navigation/4.2.0) |
88
| <= 3.x | :x: | |
99

1010
## Reporting Potential Security Issues

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
}
2525
},
2626
"require": {
27-
"php": "~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0",
27+
"php": "~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0",
2828
"dotkernel/dot-authorization": "^3.4.1",
2929
"dotkernel/dot-helpers": "^3.7.0",
3030
"laminas/laminas-escaper": "^2.13.0",
@@ -57,7 +57,7 @@
5757
],
5858
"cs-check": "phpcs",
5959
"cs-fix": "phpcbf",
60-
"test": "phpunit --colors=always",
61-
"static-analysis": "phpstan analyse --memory-limit 1G"
60+
"static-analysis": "phpstan analyse --memory-limit 1G",
61+
"test": "phpunit --colors=always"
6262
}
6363
}

docs/book/v3/components.md

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

3-
A menu, or navigation container, is a class implementing the \RecursiveIterator interface. It has a hierarchical structure, with nodes called pages(see the `Page` class) that may have children. It is basically a tree
3+
A menu, or navigation container, is a class implementing the `RecursiveIterator` interface.
4+
It has a hierarchical structure, with nodes called pages (see the `Page` class) that may have children. It is basically a tree
45

5-
A Page extends the NavigationContainer class. The NavigationContainer is the top most node which represents the entire menu. The children of this node are Page instances that defines each navigation item.
6+
A Page extends the NavigationContainer class. The NavigationContainer is the top most node which represents the entire menu.
7+
The children of this node are Page instances that define each navigation item.
68

7-
A page has a reference to its parent, and can have options and attributes. There are no limitation on what is accepted as options or attributes.
9+
A page has a reference to its parent and can have options and attributes. There is no limitation on what is accepted as options or attributes.
810

9-
Options can be any piece of information that describes a page. Some predefined options exists, in order for the navigation module to work seamlessly with other dot modules.
11+
Options can be any piece of information that describes a page.
12+
Some predefined options exist in order for the navigation module to work seamlessly with other dot modules.
1013

11-
Attributes are key value pairs that defines the menu item. They are usually inserted as html attributes when parsing the menu, but of course, this is implementation specific.
14+
Attributes are key value pairs that define the menu item.
15+
They are usually inserted as HTML attributes when parsing the menu, but of course, this is implementation-specific.
1216

13-
A `NavigationService` class, is the service that handles all defined menu container. It can fetch the container from its provider, check if a page is active or not and get the page's generated URI.
17+
A `NavigationService` class, is the service that handles all defined menu containers.
18+
It can fetch the container from its provider, check if a page is active or not, and get the page's generated URI.

docs/book/v3/container-providers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ Each menu can be created from different sources. The responsibility of creating
44

55
Each provider must implement the interface `ProviderInterface` and be registered in the ProviderPluginManager.
66

7-
We offer just one provider for now, `ArrayProvider`, that is able to fetch and create a menu container from a php array that is defined in the configuration file.
7+
We offer just one provider for now, `ArrayProvider`, that is able to fetch and create a menu container from a PHP array that is defined in the configuration file.
Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
# NavigationRenderer
22

3-
Used to render the navigation container in a displayable format. It can render a simple HTML ul list or use a partial template, to render the menu in a template engine.
3+
Used to render the navigation container in a displayable format.
4+
It can render a simple HTML unordered list or use a partial template to render the menu in a template engine.
45

56
The partial method is usually the more flexible one, custom rules can be defined and checked in the template.
67

7-
If you are using Twig, there is already a Twig extension provided in package dot-twigrenderer, that you can use to easily parse the menus inside your templates
8+
If you are using Twig, there is already a Twig extension provided in package dot-twigrenderer that you can use to easily parse the menus inside your templates
89

9-
When using the partial method, the template will receive as parameters the container, the navigation service and any extra parameters set by the developer.
10+
When using the partial method, the template will receive as parameters the container, the navigation service, and any extra parameters set by the developer.
1011

11-
Navigation containers are referred, when parsed, by their name, as defined in the configuration file.
12+
Navigation containers are referred to, when parsed, by their name, as defined in the configuration file.

docs/book/v3/overview.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
11
# Overview
22

33
`dot-navigation` is Dotkernel's component that allows you to easily define and parse menus inside templates, using a configuration based approach.
4+
5+
## Badges
6+
7+
![OSS Lifecycle](https://img.shields.io/osslifecycle/dotkernel/dot-navigation)
8+
![PHP from Packagist (specify version)](https://img.shields.io/packagist/php-v/dotkernel/dot-navigation/3.5.1)
9+
10+
[![GitHub issues](https://img.shields.io/github/issues/dotkernel/dot-navigation)](https://github.com/dotkernel/dot-navigation/issues)
11+
[![GitHub forks](https://img.shields.io/github/forks/dotkernel/dot-navigation)](https://github.com/dotkernel/dot-navigation/network)
12+
[![GitHub stars](https://img.shields.io/github/stars/dotkernel/dot-navigation)](https://github.com/dotkernel/dot-navigation/stargazers)
13+
[![GitHub license](https://img.shields.io/github/license/dotkernel/dot-navigation)](https://github.com/dotkernel/dot-navigation/blob/3.0/LICENSE.md)
14+
15+
[![Build Static](https://github.com/dotkernel/dot-navigation/actions/workflows/static-analysis.yml/badge.svg?branch=3.0)](https://github.com/dotkernel/dot-navigation/actions/workflows/static-analysis.yml)
16+
[![codecov](https://codecov.io/gh/dotkernel/dot-navigation/graph/badge.svg?token=AI9WFYDDX9)](https://codecov.io/gh/dotkernel/dot-navigation)

docs/book/v3/required-page-options.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ The following are options that each page should define in the configuration
44

55
* `label` - the text of the menu item
66
* `route` or `uri` - defines the route or link the menu item will have
7-
* `permission` - can be used optionally, if authorization service is present, in order to omit menu items that are not authorized to visit.
7+
* `permission` - can be used optionally if authorization service is present, to omit menu items that are not authorized to visit.

0 commit comments

Comments
 (0)