Skip to content

Commit 8a95763

Browse files
authored
Merge pull request #30 from dotkernel/issue-29
Added support for `laminas/laminas-servicemanager:4.x`
2 parents 18575eb + 0e3b857 commit 8a95763

19 files changed

Lines changed: 190 additions & 55 deletions

.laminas-ci.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"ignore_php_platform_requirements": {
3+
"8.4": true
4+
},
5+
"backwardCompatibilityCheck": true
6+
}

README.md

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

33
![OSS Lifecycle](https://img.shields.io/osslifecycle/dotkernel/dot-navigation)
4-
![PHP from Packagist (specify version)](https://img.shields.io/packagist/php-v/dotkernel/dot-navigation/3.5.1)
4+
![PHP from Packagist (specify version)](https://img.shields.io/packagist/php-v/dotkernel/dot-navigation/4.0.0)
55

66
[![GitHub issues](https://img.shields.io/github/issues/dotkernel/dot-navigation)](https://github.com/dotkernel/dot-navigation/issues)
77
[![GitHub forks](https://img.shields.io/github/forks/dotkernel/dot-navigation)](https://github.com/dotkernel/dot-navigation/network)
88
[![GitHub stars](https://img.shields.io/github/stars/dotkernel/dot-navigation)](https://github.com/dotkernel/dot-navigation/stargazers)
9-
[![GitHub license](https://img.shields.io/github/license/dotkernel/dot-navigation)](https://github.com/dotkernel/dot-navigation/blob/3.0/LICENSE.md)
9+
[![GitHub license](https://img.shields.io/github/license/dotkernel/dot-navigation)](https://github.com/dotkernel/dot-navigation/blob/4.0/LICENSE.md)
1010

11-
[![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)
11+
[![Build Static](https://github.com/dotkernel/dot-navigation/actions/workflows/static-analysis.yml/badge.svg?branch=4.0)](https://github.com/dotkernel/dot-navigation/actions/workflows/static-analysis.yml)
1212
[![codecov](https://codecov.io/gh/dotkernel/dot-navigation/graph/badge.svg?token=AI9WFYDDX9)](https://codecov.io/gh/dotkernel/dot-navigation)
1313

14-
[![SymfonyInsight](https://insight.symfony.com/projects/68b7c728-4cc9-40ac-a3be-cf17f9b2eaf1/big.svg)](https://insight.symfony.com/projects/68b7c728-4cc9-40ac-a3be-cf17f9b2eaf1)
15-
1614
Allows you to easily define and parse menus inside templates, configuration based approach.
1715

1816
## Installation
1917

2018
Run
2119

22-
composer require dotkernel/dot-navigation
20+
```shell
21+
composer require dotkernel/dot-navigation
22+
```
2323

2424
Merge `ConfigProvider` to your application's configuration.
2525

SECURITY.md

Lines changed: 10 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,38 +2,28 @@
22

33
## Supported Versions
44

5-
6-
| Version | Supported | PHP Version |
7-
|---------|--------------------|---------------------------------------------------------------------------------------------------------------|
8-
| 3.x | :white_check_mark: | ![PHP from Packagist (specify version)](https://img.shields.io/packagist/php-v/dotkernel/dot-navigation/3.4.2)|
9-
5+
| Version | Supported | PHP Version |
6+
|---------|--------------------|----------------------------------------------------------------------------------------------------------------|
7+
| 4.x | :white_check_mark: | ![PHP from Packagist (specify version)](https://img.shields.io/packagist/php-v/dotkernel/dot-navigation/4.0.0) |
8+
| <= 3.x | :x: | |
109

1110
## Reporting Potential Security Issues
1211

13-
If you have encountered a potential security vulnerability in this project,
14-
please report it to us at <security@dotkernel.com>. We will work with you to
15-
verify the vulnerability and patch it.
12+
If you have encountered a potential security vulnerability in this project, please report it to us at <security@dotkernel.com>.
13+
We will work with you to verify the vulnerability and patch it.
1614

1715
When reporting issues, please provide the following information:
1816

1917
- Component(s) affected
2018
- A description indicating how to reproduce the issue
2119
- A summary of the security vulnerability and impact
2220

23-
We request that you contact us via the email address above and give the
24-
project contributors a chance to resolve the vulnerability and issue a new
25-
release prior to any public exposure; this helps protect the project's
26-
users, and provides them with a chance to upgrade and/or update in order to
27-
protect their applications.
28-
21+
We request that you contact us via the email address above and give the project contributors a chance to resolve the vulnerability and issue a new release prior to any public exposure;
22+
this helps protect the project's users, and provides them with a chance to upgrade and/or update in order to protect their applications.
2923

3024
## Policy
3125

3226
If we verify a reported security vulnerability, our policy is:
3327

34-
- We will patch the current release branch, as well as the immediate prior minor
35-
release branch.
36-
37-
- After patching the release branches, we will immediately issue new security
38-
fix releases for each patched release branch.
39-
28+
- We will patch the current release branch, as well as the immediate prior minor release branch.
29+
- After patching the release branches, we will immediately issue new security fix releases for each patched release branch.

composer.json

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "dotkernel/dot-navigation",
33
"type": "library",
4-
"description": "DotKernel navigation component",
4+
"description": "Dotkernel navigation component",
55
"license": "MIT",
66
"homepage": "https://github.com/dotkernel/dot-navigation",
77
"keywords": [
@@ -13,7 +13,7 @@
1313
],
1414
"authors": [
1515
{
16-
"name": "DotKernel Team",
16+
"name": "Dotkernel Team",
1717
"email": "team@dotkernel.com"
1818
}
1919
],
@@ -24,17 +24,17 @@
2424
}
2525
},
2626
"require": {
27-
"php": "~8.1.0 || ~8.2.0 || ~8.3.0",
27+
"php": "~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0",
2828
"dotkernel/dot-authorization": "^3.4.1",
29-
"dotkernel/dot-helpers": "^3.5.1",
29+
"dotkernel/dot-helpers": "^3.7.0",
3030
"laminas/laminas-escaper": "^2.13.0",
31-
"laminas/laminas-servicemanager": "^3.22.1",
31+
"laminas/laminas-servicemanager": "^4.0",
3232
"mezzio/mezzio-template": "^2.9.0",
3333
"psr/http-message": "^1.0 || ^2.0",
3434
"psr/http-server-middleware": "^1.0.2"
3535
},
3636
"require-dev": {
37-
"laminas/laminas-coding-standard": "^2.5.0",
37+
"laminas/laminas-coding-standard": "^3.0.0",
3838
"phpunit/phpunit": "^10.4.2",
3939
"vimeo/psalm": "^5.16.0"
4040
},
@@ -51,7 +51,8 @@
5151
"scripts": {
5252
"check": [
5353
"@cs-check",
54-
"@test"
54+
"@test",
55+
"@static-analysis"
5556
],
5657
"cs-check": "phpcs",
5758
"cs-fix": "phpcbf",

docs/book/index.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

docs/book/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../README.md

docs/book/v3/overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# Overview
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.

docs/book/v4/components.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Components
2+
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
4+
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+
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.
8+
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.
10+
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.
12+
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.

docs/book/v4/configuration.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Configuration
2+
3+
After installation, register `dot-navigation` in your project by adding the below line to your configuration aggregator (usually: `config/config.php`):
4+
5+
Dot\Navigation\ConfigProvider::class,
6+
7+
Locate dot-navigation's distributable config file `vendor/dotkernel/dot-navigation/config/autoload/navigation.global.php.dist` and duplicate it in your project as `config/autoload/navigation.global.php`
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Container providers
2+
3+
Each menu can be created from different sources. The responsibility of creating a menu container from the source falls on a container provider.
4+
5+
Each provider must implement the interface `ProviderInterface` and be registered in the ProviderPluginManager.
6+
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.

0 commit comments

Comments
 (0)