Skip to content

Hidden Items #57

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 76 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: 🐛 Bug Report
description: Create a report to help us improve
title: 'bug: '

body:
- type: checkboxes
id: prerequisites
attributes:
label: Prerequisites
description: Please ensure you have completed all of the following.
options:
- label: I have searched for [existing issues](https://github.com/KyleMassacre/laravel-menus/issues) that already report this problem, without success.
required: true

- type: dropdown
id: affected-versions
attributes:
label: Version
description: Which version(s) of Laravel Menus does this issue impact?
options:
- v8.x
multiple: true
validations:
required: true

- type: dropdown
id: affected-laravel-versions
attributes:
label: Version
description: Which version(s) of Laravel does this issue impact?
options:
- v10.x
multiple: false
validations:
required: true

- type: textarea
id: current-behavior
attributes:
label: Current Behavior
description: A clear description of what the bug is and how it manifests.
validations:
required: true

- type: textarea
id: expected-behavior
attributes:
label: Expected Behavior
description: A clear description of what you expected to happen.
validations:
required: true

- type: textarea
id: steps-to-reproduce
attributes:
label: Steps to Reproduce
description: Please explain the steps required to duplicate this issue.
placeholder: |
1.
2.
3.
validations:
required: true

- type: input
id: reproduction-url
attributes:
label: Code Reproduction URL
description: Please reproduce this issue in a blank Laravel Invoices starter application and provide a link to the repo.
placeholder: https://github.com/...

- type: textarea
id: additional-information
attributes:
label: Additional Information
description: List any other information that is relevant to your issue. Stack traces, related issues, suggestions on how to fix, Stack Overflow links, forum links, etc.
53 changes: 53 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: 💡 Feature Request
description: Suggest an idea for Laravel Invoices
title: 'feat: '

body:
- type: checkboxes
id: prerequisites
attributes:
label: Prerequisites
description: Please ensure you have completed all of the following.
options:
- label: I have searched for [existing issues](https://github.com/KyleMassacre/laravel-menus/issues) that already report this problem, without success.
required: true

- type: textarea
id: description
attributes:
label: Describe the Feature Request
description: A clear and concise description of what the feature does.
validations:
required: true

- type: textarea
id: use-case
attributes:
label: Describe the Use Case
description: A clear and concise use case for what problem this feature would solve.
validations:
required: true

- type: textarea
id: proposed-solution
attributes:
label: Describe Preferred Solution
description: A clear and concise description of what you how you want this feature to be added to Laravel Invoices.

- type: textarea
id: alternatives-considered
attributes:
label: Describe Alternatives
description: A clear and concise description of any alternative solutions or features you have considered.

- type: textarea
id: related-code
attributes:
label: Related Code
description: If you are able to illustrate the feature request with an example, please provide a sample Laravel Invoices application. Try out our [Getting Started Wizard](https://ionicframework.com/start#basics) to quickly spin up an Laravel Invoices starter app.

- type: textarea
id: additional-information
attributes:
label: Additional Information
description: List any other information that is relevant to your issue. Stack traces, related issues, suggestions on how to implement, Stack Overflow links, forum links, etc.
37 changes: 37 additions & 0 deletions .github/workflows/laravel.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Laravel

on:
push:
branches: [ "master", "develop" ]
pull_request:
branches: [ "master", "develop" ]

jobs:
run:
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system: [ ubuntu-latest ]
php-versions: ['8.1', '8.2','8.3']
name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }}
steps:
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
- uses: actions/checkout@v3
with:
fetch-depth: 5
- name: Copy .env
run: php -r "file_exists('.env') || copy('.env.example', '.env');"
- name: Install Dependencies
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
- name: Execute tests (Unit and Feature tests) via PHPUnit
env:
DB_CONNECTION: sqlite
DB_DATABASE: database/database.sqlite
run: vendor/bin/phpunit
- name: action-scrutinizer
uses: sudo-bot/action-scrutinizer@latest
with:
cli-args: "--format=php-clover build/logs/clover.xml --revision=${{ github.event.pull_request.head.sha || github.sha }}"

4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@
composer.phar
composer.lock
build
.php_cs.cache
.php-cs-fixer.cache
.idea/
.phpunit.cache/
21 changes: 12 additions & 9 deletions .php_cs.dist → .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
@@ -1,24 +1,25 @@
<?php

$finder = PhpCsFixer\Finder::create()
use PhpCsFixer\Config;
use PhpCsFixer\Finder;

$finder = (new Finder())
->in(__DIR__)
->exclude([
'vendor',
])
;
]);

return PhpCsFixer\Config::create()
->setFinder($finder)
return (new Config())
->setRules([
'@PSR2' => true,
// Concatenation should be used with at least one whitespace around.
'concat_space' => ['spacing' => 'one'],
// Unused use statements must be removed.
'ordered_imports' => true,
// Removes extra empty lines.
'no_extra_consecutive_blank_lines' => true,
'no_extra_blank_lines' => true,
// An empty line feed should precede a return statement.
'blank_line_before_return' => true,
'blank_line_before_statement' => true,
// Unused use statements must be removed.
'no_unused_imports' => true,
// Remove trailing whitespace at the end of blank lines.
Expand All @@ -34,12 +35,14 @@
// Remove duplicated semicolons.
'no_empty_statement' => true,
// PHP multi-line arrays should have a trailing comma.
'trailing_comma_in_multiline_array' => true,
'trailing_comma_in_multiline' => true,
// There should be no empty lines after class opening brace.
'no_blank_lines_after_class_opening' => true,
// There should not be blank lines between docblock and the documented element.
'no_blank_lines_after_phpdoc' => true,
// Phpdocs should start and end with content, excluding the very first and last line of the docblocks.
'phpdoc_trim' => true,
'normalize_index_brace' => true,
'whitespace_after_comma_in_array' => true,
])
;
->setFinder($finder);
8 changes: 8 additions & 0 deletions .scrutinizer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,11 @@ coding_style:
tools:
external_code_coverage: true
php_code_coverage: true
build:
nodes:
analysis:
environment:
php: 8.1.0
tests:
override:
- php-scrutinizer-run
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ All Notable changes to `laravel-menus` will be documented in this file.

## Next

## 7.0.0 - 2024-03-30

### Added
- Laravel 10 support

## 6.0.0 - 2020-11-11

### Added
Expand Down
36 changes: 15 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,20 @@
# Laravel Menus

[![Latest Version on Packagist](https://img.shields.io/packagist/v/nwidart/laravel-menus.svg?style=flat-square)](https://packagist.org/packages/nwidart/laravel-menus)
[![Latest Version on Packagist](https://img.shields.io/packagist/v/kylemassacre/laravel-menus.svg?style=flat-square)](https://packagist.org/packages/kylemassacre/laravel-menus)
[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE.md)
[![Build Status](https://img.shields.io/travis/nWidart/laravel-menus/master.svg?style=flat-square)](https://travis-ci.org/nWidart/laravel-menus)
[![Scrutinizer Coverage](https://img.shields.io/scrutinizer/coverage/g/nWidart/laravel-menus.svg?style=flat-square)](https://scrutinizer-ci.com/g/nWidart/laravel-menus/?branch=master)
[![SensioLabsInsight](https://img.shields.io/sensiolabs/i/6b187410-e586-465f-a137-2d1fbf7ac724.svg?style=flat-square)](https://insight.sensiolabs.com/projects/6b187410-e586-465f-a137-2d1fbf7ac724)
[![Quality Score](https://img.shields.io/scrutinizer/g/nWidart/laravel-menus.svg?style=flat-square)](https://scrutinizer-ci.com/g/nWidart/laravel-menus)
[![Total Downloads](https://img.shields.io/packagist/dt/nwidart/laravel-menus.svg?style=flat-square)](https://packagist.org/packages/nwidart/laravel-menus)

| **Laravel** | **laravel-menus** |
|---|---|
| 5.4 | ^0.5 |
| 5.5 | ^1.0 |
| 5.6 | ^2.0 |
| 5.7 | ^3.0 |
| 5.8 | ^4.0 |
| 6.0 | ^5.0 |
| 8.0 | ^7.0 |

`nwidart/laravel-menus` is a laravel package which created to manage menus. It has a feature called presenters which enables easy styling and custom structure of menu rendering.

This package is a re-published, re-organised and maintained version of [pingpong/menus](https://github.com/pingpong-labs/menus), which isn't maintained anymore. This package is used in [AsgardCMS](https://asgardcms.com/).
![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/kylemassacre/laravel-menus/laravel.yml)
[![Scrutinizer Coverage](https://img.shields.io/scrutinizer/coverage/g/kylemassacre/laravel-menus.svg?style=flat-square)](https://scrutinizer-ci.com/g/kylemassacre/laravel-menus/?branch=master)
![Scrutinizer quality (GitHub/Bitbucket) with branch](https://img.shields.io/scrutinizer/quality/g/kylemassacre/laravel-menus/master?style=flat-square)
[![Total Downloads](https://img.shields.io/packagist/dt/kylemassacre/laravel-menus.svg?style=flat-square)](https://packagist.org/packages/kylemassacre/laravel-menus)


| **Laravel** | **laravel-menus** |
|-------------|-------------------|
| 10.0 | ^8.0 |

`kylemassacre/laravel-menus` is a laravel package which created to manage menus. It has a feature called presenters which enables easy styling and custom structure of menu rendering.

This package is a re-published, re-organised and maintained version of [nwidart/laravel-menus](https://github.com/nWidart/laravel-menus), which isn't maintained anymore. This package is used in [AsgardCMS](https://asgardcms.com/).

With one big added bonus that the original package didn't have: **tests**.

Expand All @@ -29,7 +23,7 @@ With one big added bonus that the original package didn't have: **tests**.
You'll find installation instructions and full documentation on https://nwidart.com/laravel-menus/.

## Credits

- [Kyle Ellis](https://github.com/kylemassacre)
- [Nicolas Widart](https://github.com/nwidart)
- [gravitano](https://github.com/gravitano)
- [All Contributors](../../contributors)
Expand Down
16 changes: 8 additions & 8 deletions Tests/BaseTestCase.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php

namespace Nwidart\Menus\Tests;
namespace KyleMassacre\Menus\Tests;

use Collective\Html\HtmlServiceProvider;
use Nwidart\Menus\MenusServiceProvider;
use KyleMassacre\Menus\MenusServiceProvider;
use Orchestra\Testbench\TestCase as OrchestraTestCase;

abstract class BaseTestCase extends OrchestraTestCase
Expand Down Expand Up @@ -32,12 +32,12 @@ protected function getEnvironmentSetUp($app)
{
$app['config']->set('menus', [
'styles' => [
'navbar' => \Nwidart\Menus\Presenters\Bootstrap\NavbarPresenter::class,
'navbar-right' => \Nwidart\Menus\Presenters\Bootstrap\NavbarRightPresenter::class,
'nav-pills' => \Nwidart\Menus\Presenters\Bootstrap\NavPillsPresenter::class,
'nav-tab' => \Nwidart\Menus\Presenters\Bootstrap\NavTabPresenter::class,
'sidebar' => \Nwidart\Menus\Presenters\Bootstrap\SidebarMenuPresenter::class,
'navmenu' => \Nwidart\Menus\Presenters\Bootstrap\NavMenuPresenter::class,
'navbar' => \KyleMassacre\Menus\Presenters\Bootstrap\NavbarPresenter::class,
'navbar-right' => \KyleMassacre\Menus\Presenters\Bootstrap\NavbarRightPresenter::class,
'nav-pills' => \KyleMassacre\Menus\Presenters\Bootstrap\NavPillsPresenter::class,
'nav-tab' => \KyleMassacre\Menus\Presenters\Bootstrap\NavTabPresenter::class,
'sidebar' => \KyleMassacre\Menus\Presenters\Bootstrap\SidebarMenuPresenter::class,
'navmenu' => \KyleMassacre\Menus\Presenters\Bootstrap\NavMenuPresenter::class,
],

'ordering' => false,
Expand Down
6 changes: 3 additions & 3 deletions Tests/MenuBuilderTest.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php

namespace Nwidart\Menus\Tests;
namespace KyleMassacre\Menus\Tests;

use Illuminate\Config\Repository;
use Nwidart\Menus\MenuBuilder;
use Nwidart\Menus\MenuItem;
use KyleMassacre\Menus\MenuBuilder;
use KyleMassacre\Menus\MenuItem;

class MenuBuilderTest extends BaseTestCase
{
Expand Down
Loading