Skip to content

Commit

Permalink
Starting the Laravel v8 support
Browse files Browse the repository at this point in the history
  • Loading branch information
arcanedev-maroc committed Sep 10, 2020
1 parent d4d2487 commit e141da7
Show file tree
Hide file tree
Showing 14 changed files with 133 additions and 113 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
strategy:
fail-fast: true
matrix:
php: [7.2, 7.3, 7.4]
php: [7.3, 7.4]
dependency-version: [prefer-lowest, prefer-stable]

name: PHP ${{ matrix.php }} - ${{ matrix.dependency-version }}
Expand All @@ -22,7 +22,7 @@ jobs:
uses: actions/cache@v2
with:
path: ~/.composer/cache/files
key: dependencies-laravel-7-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
key: dependencies-laravel-8-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand Down
2 changes: 1 addition & 1 deletion .scrutinizer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ checks:
tools:
external_code_coverage:
timeout: 600
runs: 6
runs: 4
php_code_sniffer:
enabled: true
config:
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Feel free to check out the [releases](https://github.com/ARCANEDEV/Breadcrumbs/r

* Well tested with maximum code quality.
* Easy setup & configuration.
* Laravel `5.x` to ` 7.x` are supported.
* Laravel `5.x` to ` 8.x` are supported.
* Twitter Bootstrap `v3 | v4` are supported.
* ZURB Foundation `v5 | v6` are supported.
* Well documented & IDE Friendly.
Expand All @@ -45,7 +45,7 @@ If you discover any security related issues, please email arcanedev.maroc@gmail.
- [ARCANEDEV][link-author]
- [All Contributors][link-contributors]

[badge_laravel]: https://img.shields.io/badge/Laravel%20supported-5.x%20to%207.x-orange.svg?style=flat-square
[badge_laravel]: https://img.shields.io/badge/Laravel%20supported-5.x%20to%208.x-orange.svg?style=flat-square
[badge_license]: https://img.shields.io/packagist/l/arcanedev/breadcrumbs.svg?style=flat-square
[badge_build]: https://img.shields.io/github/workflow/status/ARCANEDEV/Breadcrumbs/run-tests?style=flat-square
[badge_coverage]: https://img.shields.io/scrutinizer/coverage/g/ARCANEDEV/Breadcrumbs.svg?style=flat-square
Expand Down
4 changes: 2 additions & 2 deletions _docs/0-Home.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Breadcrumbs

A simple breadcrumbs generator helper.
A simple breadcrumbs' generator helper.

### Features

* Well tested with maximum code quality.
* Easy setup & configuration.
* Laravel `5.x` to ` 7.x` are supported.
* Laravel `5.x` to ` 8.x` are supported.
* Twitter Bootstrap `v3 | v4` are supported.
* ZURB Foundation `v5 | v6` are supported.
* Well documented & IDE Friendly.
Expand Down
52 changes: 29 additions & 23 deletions _docs/1-Installation-and-Setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,29 +8,35 @@

## Version Compatibility

| Breadcrumbs | Laravel |
|:-----------------------------------------|:--------------------------------------------------------------------------------------------------------------------|
| ![Breadcrumbs v5.x][breadcrumbs_5_x] | ![Laravel v7.x][laravel_7_x] |
| ![Breadcrumbs v4.x][breadcrumbs_4_x] | ![Laravel v6.x][laravel_6_x] |
| ![Breadcrumbs v3.4.x][breadcrumbs_3_4_x] | ![Laravel v5.8][laravel_5_8] |
| ![Breadcrumbs v3.3.x][breadcrumbs_3_3_x] | ![Laravel v5.7][laravel_5_7] |
| ![Breadcrumbs v3.2.x][breadcrumbs_3_2_x] | ![Laravel v5.6][laravel_5_6] |
| ![Breadcrumbs v3.1.x][breadcrumbs_3_1_x] | ![Laravel v5.5][laravel_5_5] |
| ![Breadcrumbs v3.0.x][breadcrumbs_3_0_x] | ![Laravel v5.4][laravel_5_4] |
| ![Breadcrumbs v2.x][breadcrumbs_2_x] | ![Laravel v5.0][laravel_5_0] ![Laravel v5.1][laravel_5_1] ![Laravel v5.2][laravel_5_2] ![Laravel v5.3][laravel_5_3] |

[laravel_7_x]: https://img.shields.io/badge/v7.x-supported-brightgreen.svg?style=flat-square "Laravel v7.x"
[laravel_6_x]: https://img.shields.io/badge/v6.x-supported-brightgreen.svg?style=flat-square "Laravel v6.x"
[laravel_5_8]: https://img.shields.io/badge/v5.8-supported-brightgreen.svg?style=flat-square "Laravel v5.8"
[laravel_5_7]: https://img.shields.io/badge/v5.7-supported-brightgreen.svg?style=flat-square "Laravel v5.7"
[laravel_5_6]: https://img.shields.io/badge/v5.6-supported-brightgreen.svg?style=flat-square "Laravel v5.6"
[laravel_5_5]: https://img.shields.io/badge/v5.5-supported-brightgreen.svg?style=flat-square "Laravel v5.5"
[laravel_5_4]: https://img.shields.io/badge/v5.4-supported-brightgreen.svg?style=flat-square "Laravel v5.4"
[laravel_5_3]: https://img.shields.io/badge/v5.3-supported-brightgreen.svg?style=flat-square "Laravel v5.3"
[laravel_5_2]: https://img.shields.io/badge/v5.2-supported-brightgreen.svg?style=flat-square "Laravel v5.2"
[laravel_5_1]: https://img.shields.io/badge/v5.1-supported-brightgreen.svg?style=flat-square "Laravel v5.1"
[laravel_5_0]: https://img.shields.io/badge/v5.0-supported-brightgreen.svg?style=flat-square "Laravel v5.0"

| Laravel | Breadcrumbs |
|:-----------------------------|:-----------------------------------------|
| ![Laravel v8.x][laravel_8_x] | ![Breadcrumbs v6.x][breadcrumbs_6_x] |
| ![Laravel v7.x][laravel_7_x] | ![Breadcrumbs v5.x][breadcrumbs_5_x] |
| ![Laravel v6.x][laravel_6_x] | ![Breadcrumbs v4.x][breadcrumbs_4_x] |
| ![Laravel v5.8][laravel_5_8] | ![Breadcrumbs v3.4.x][breadcrumbs_3_4_x] |
| ![Laravel v5.7][laravel_5_7] | ![Breadcrumbs v3.3.x][breadcrumbs_3_3_x] |
| ![Laravel v5.6][laravel_5_6] | ![Breadcrumbs v3.2.x][breadcrumbs_3_2_x] |
| ![Laravel v5.5][laravel_5_5] | ![Breadcrumbs v3.1.x][breadcrumbs_3_1_x] |
| ![Laravel v5.4][laravel_5_4] | ![Breadcrumbs v3.0.x][breadcrumbs_3_0_x] |
| ![Laravel v5.3][laravel_5_3] | ![Breadcrumbs v2.x][breadcrumbs_2_x] |
| ![Laravel v5.2][laravel_5_2] | ![Breadcrumbs v2.x][breadcrumbs_2_x] |
| ![Laravel v5.1][laravel_5_1] | ![Breadcrumbs v2.x][breadcrumbs_2_x] |
| ![Laravel v5.0][laravel_5_0] | ![Breadcrumbs v2.x][breadcrumbs_2_x] |

[laravel_8_x]: https://img.shields.io/badge/version-8.x-blue.svg?style=flat-square "Laravel v8.x"
[laravel_7_x]: https://img.shields.io/badge/version-7.x-blue.svg?style=flat-square "Laravel v7.x"
[laravel_6_x]: https://img.shields.io/badge/version-6.x-blue.svg?style=flat-square "Laravel v6.x"
[laravel_5_8]: https://img.shields.io/badge/version-5.8-blue.svg?style=flat-square "Laravel v5.8"
[laravel_5_7]: https://img.shields.io/badge/version-5.7-blue.svg?style=flat-square "Laravel v5.7"
[laravel_5_6]: https://img.shields.io/badge/version-5.6-blue.svg?style=flat-square "Laravel v5.6"
[laravel_5_5]: https://img.shields.io/badge/version-5.5-blue.svg?style=flat-square "Laravel v5.5"
[laravel_5_4]: https://img.shields.io/badge/version-5.4-blue.svg?style=flat-square "Laravel v5.4"
[laravel_5_3]: https://img.shields.io/badge/version-5.3-blue.svg?style=flat-square "Laravel v5.3"
[laravel_5_2]: https://img.shields.io/badge/version-5.2-blue.svg?style=flat-square "Laravel v5.2"
[laravel_5_1]: https://img.shields.io/badge/version-5.1-blue.svg?style=flat-square "Laravel v5.1"
[laravel_5_0]: https://img.shields.io/badge/version-5.0-blue.svg?style=flat-square "Laravel v5.0"

[breadcrumbs_6_x]: https://img.shields.io/badge/version-6.x-blue.svg?style=flat-square "Breadcrumbs v6.x"
[breadcrumbs_5_x]: https://img.shields.io/badge/version-5.x-blue.svg?style=flat-square "Breadcrumbs v5.x"
[breadcrumbs_4_x]: https://img.shields.io/badge/version-4.x-blue.svg?style=flat-square "Breadcrumbs v4.x"
[breadcrumbs_3_4_x]: https://img.shields.io/badge/version-3.4.x-blue.svg?style=flat-square "Breadcrumbs v3.4.x"
Expand Down
1 change: 1 addition & 0 deletions _docs/2-Configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ return [
// Twitter Bootstrap
'bootstrap-3' => 'breadcrumbs::bootstrap-3',
'bootstrap-4' => 'breadcrumbs::bootstrap-4',
'bootstrap-5' => 'breadcrumbs::bootstrap-5',

// Zurb Foundation
'foundation-5' => 'breadcrumbs::foundation-5',
Expand Down
18 changes: 14 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
"type": "library",
"license": "MIT",
"require": {
"php": "^7.2.5",
"arcanedev/support": "^7.0"
"php": "^7.3",
"arcanedev/support": "^8.0"
},
"require-dev": {
"orchestra/testbench": "^5.0",
"phpunit/phpunit": "^8.5|^9.0"
"orchestra/testbench": "^6.0",
"phpunit/phpunit": "^9.3"
},
"autoload": {
"psr-4": {
Expand All @@ -32,13 +32,23 @@
"Arcanedev\\Breadcrumbs\\Tests\\": "tests/"
}
},
"scripts": {
"test": "phpunit",
"coverage": "phpunit --coverage-html build/coverage/html"
},
"extra": {
"branch-alias": {
"dev-develop": "6.x-dev"
},
"laravel": {
"providers": [
"Arcanedev\\Breadcrumbs\\BreadcrumbsServiceProvider"
]
}
},
"config": {
"sort-packages": true
},
"minimum-stability": "dev",
"prefer-stable": true
}
1 change: 1 addition & 0 deletions config/breadcrumbs.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
// Twitter Bootstrap
'bootstrap-3' => 'breadcrumbs::bootstrap-3',
'bootstrap-4' => 'breadcrumbs::bootstrap-4',
'bootstrap-5' => 'breadcrumbs::bootstrap-5',

// Zurb Foundation
'foundation-5' => 'breadcrumbs::foundation-5',
Expand Down
33 changes: 14 additions & 19 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,27 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false"
backupStaticAttributes="false"
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="./vendor/phpunit/phpunit/phpunit.xsd"
bootstrap="vendor/autoload.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
>
>
<testsuites>
<testsuite name="Package Test Suite">
<directory suffix=".php">./tests/</directory>
<directory>./tests</directory>
</testsuite>
</testsuites>
<filter>
<whitelist>
<directory suffix=".php">./src/</directory>
</whitelist>
</filter>
<logging>
<log type="coverage-clover" target="build/logs/clover.xml"/>
<log type="coverage-text" target="build/logs/coverage.txt"/>
<log type="coverage-html" target="build/logs/coverage"/>
</logging>
<coverage processUncoveredFiles="true">
<include>
<directory suffix=".php">./src</directory>
</include>
<report>
<clover outputFile="build/coverage/clover.xml"/>
<html outputDirectory="build/coverage/html"/>
<text outputFile="build/coverage/coverage.txt" showOnlySummary="true"/>
</report>
</coverage>
</phpunit>
26 changes: 12 additions & 14 deletions views/bootstrap-3.blade.php
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
@if ($breadcrumbs)
<ul class="breadcrumb breadcrumb-top">
@foreach ($breadcrumbs as $crumb)
<?php
$icon = isset($crumb['icon']) ? '<i class="' . $crumb['icon'] . '"></i> ' : '';
?>
<ul class="breadcrumb breadcrumb-top">
@foreach ($breadcrumbs as $crumb)
@php($icon = isset($crumb['icon']) ? '<i class="' . $crumb['icon'] . '"></i> ' : '')

@if ($crumb['url'] && ! $crumb['last'])
<li>
<a href="{{ $crumb['url'] }}">{!! $icon !!}{{ $crumb['title'] }}</a>
</li>
@else
<li class="active">{!! $icon !!}{{ $crumb['title'] }}</li>
@endif
@endforeach
</ul>
@if ($crumb['url'] && ! $crumb['last'])
<li>
<a href="{{ $crumb['url'] }}">{!! $icon !!}{{ $crumb['title'] }}</a>
</li>
@else
<li class="active">{!! $icon !!}{{ $crumb['title'] }}</li>
@endif
@endforeach
</ul>
@endif
26 changes: 12 additions & 14 deletions views/bootstrap-4.blade.php
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
@if ($breadcrumbs)
<ol class="breadcrumb">
@foreach ($breadcrumbs as $crumb)
<?php
$icon = isset($crumb['icon']) ? '<i class="' . $crumb['icon'] . '"></i> ' : '';
?>
<ol class="breadcrumb">
@foreach ($breadcrumbs as $crumb)
@php($icon = isset($crumb['icon']) ? '<i class="' . $crumb['icon'] . '"></i> ' : '')

@if ($crumb['url'] && ! $crumb['last'])
<li class="breadcrumb-item">
<a href="{{ $crumb['url'] }}">{!! $icon !!}{{ $crumb['title'] }}</a>
</li>
@else
<li class="breadcrumb-item active" aria-current="page">{!! $icon !!}{{ $crumb['title'] }}</li>
@endif
@endforeach
</ol>
@if ($crumb['url'] && ! $crumb['last'])
<li class="breadcrumb-item">
<a href="{{ $crumb['url'] }}">{!! $icon !!}{{ $crumb['title'] }}</a>
</li>
@else
<li class="breadcrumb-item active" aria-current="page">{!! $icon !!}{{ $crumb['title'] }}</li>
@endif
@endforeach
</ol>
@endif
15 changes: 15 additions & 0 deletions views/bootstrap-5.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
@if ($breadcrumbs)
<ol class="breadcrumb">
@foreach ($breadcrumbs as $crumb)
@php($icon = isset($crumb['icon']) ? '<i class="'.$crumb['icon'].'"></i> ' : '')

@if ($crumb['url'] && ! $crumb['last'])
<li class="breadcrumb-item">
<a href="{{ $crumb['url'] }}">{!! $icon !!}{{ $crumb['title'] }}</a>
</li>
@else
<li class="breadcrumb-item active" aria-current="page">{!! $icon !!}{{ $crumb['title'] }}</li>
@endif
@endforeach
</ol>
@endif
26 changes: 12 additions & 14 deletions views/foundation-5.blade.php
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
@if ($breadcrumbs)
<ul class="breadcrumbs">
@foreach ($breadcrumbs as $crumb)
<?php
$icon = isset($crumb['icon']) ? '<i class="' . $crumb['icon'] . '"></i> ' : '';
?>
<ul class="breadcrumbs">
@foreach ($breadcrumbs as $crumb)
@php($icon = isset($crumb['icon']) ? '<i class="' . $crumb['icon'] . '"></i> ' : '')

@if ($crumb['url'] && ! $crumb['last'])
<li>
<a href="{{ $crumb['url'] }}">{!! $icon !!}{{ $crumb['title'] }}</a>
</li>
@else
<li class="current">{!! $icon !!}{{ $crumb['title'] }}</li>
@endif
@endforeach
</ul>
@if ($crumb['url'] && ! $crumb['last'])
<li>
<a href="{{ $crumb['url'] }}">{!! $icon !!}{{ $crumb['title'] }}</a>
</li>
@else
<li class="current">{!! $icon !!}{{ $crumb['title'] }}</li>
@endif
@endforeach
</ul>
@endif
34 changes: 16 additions & 18 deletions views/foundation-6.blade.php
Original file line number Diff line number Diff line change
@@ -1,21 +1,19 @@
@if ($breadcrumbs)
<nav role="navigation">
<ul class="breadcrumbs">
@foreach ($breadcrumbs as $crumb)
<?php
$icon = isset($crumb['icon']) ? '<i class="' . $crumb['icon'] . '"></i> ' : '';
?>
<nav role="navigation">
<ul class="breadcrumbs">
@foreach ($breadcrumbs as $crumb)
@php($icon = isset($crumb['icon']) ? '<i class="' . $crumb['icon'] . '"></i> ' : '')

@if ($crumb['url'] && ! $crumb['last'])
<li>
<a href="{{ $crumb['url'] }}">{!! $icon !!}{{ $crumb['title'] }}</a>
</li>
@else
<li>
<span class="show-for-sr">Current: </span> {!! $icon !!}{{ $crumb['title'] }}
</li>
@endif
@endforeach
</ul>
</nav>
@if ($crumb['url'] && ! $crumb['last'])
<li>
<a href="{{ $crumb['url'] }}">{!! $icon !!}{{ $crumb['title'] }}</a>
</li>
@else
<li>
<span class="show-for-sr">Current: </span> {!! $icon !!}{{ $crumb['title'] }}
</li>
@endif
@endforeach
</ul>
</nav>
@endif

0 comments on commit e141da7

Please sign in to comment.