Skip to content

Commit

Permalink
Merge pull request #364 from ARCANEDEV/develop
Browse files Browse the repository at this point in the history
Starting Laravel v8 support
  • Loading branch information
arcanedev-maroc authored Sep 9, 2020
2 parents 46643ff + 1361583 commit f8548b4
Show file tree
Hide file tree
Showing 63 changed files with 143 additions and 171 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,20 @@ 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 }}

steps:
- name: Checkout code
uses: actions/checkout@v1
uses: actions/checkout@v2

- name: Cache dependencies
uses: actions/cache@v1
uses: actions/cache@v2
with:
path: ~/.composer/cache/files
key: dependencies-laravel-7.x-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 @@ -21,7 +21,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 @@ -23,7 +23,7 @@ Feel free to check out the [releases](https://github.com/ARCANEDEV/LogViewer/rel
## Features

- A great Log viewer API.
- Laravel `5.x | 6.x | 7.x` are supported.
- Laravel `5.x` to `8.x` are supported.
- Ready to use (Views, Routes, controllers … Out of the box) [Note: No need to publish assets]
- View, paginate, filter, download and delete logs.
- Load a custom logs storage path.
Expand Down Expand Up @@ -95,7 +95,7 @@ If you discover any security related issues, please email arcanedev.maroc@gmail.
![Logs list](https://raw.githubusercontent.com/ARCANEDEV/LogViewer/master/_screenshots/2-logs-list.jpg)
![Single log](https://raw.githubusercontent.com/ARCANEDEV/LogViewer/master/_screenshots/3-single-log.jpg)

[badge_laravel]: https://img.shields.io/badge/Laravel-5.x|6.x|7.x-orange.svg?style=flat-square
[badge_laravel]: https://img.shields.io/badge/Laravel-5.x%20to%208.x-orange.svg?style=flat-square
[badge_license]: https://img.shields.io/packagist/l/arcanedev/log-viewer.svg?style=flat-square
[badge_build]: https://img.shields.io/github/workflow/status/ARCANEDEV/LogViewer/run-tests?style=flat-square
[badge_coverage]: https://img.shields.io/scrutinizer/coverage/g/ARCANEDEV/LogViewer.svg?style=flat-square
Expand Down
2 changes: 1 addition & 1 deletion _docs/0.Home.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ This package allows you to keep track of each one of your logs stored under `sto
## Features

- A great Log viewer API.
- Laravel `5.x | 6.x | 7.x` are supported.
- Laravel `5.x` to `8.x` are supported.
- Ready to use (Views, Routes, controllers … Out of the box) [Note: No need to publish assets]
- View, paginate, filter, download and delete logs.
- Load a custom logs storage path.
Expand Down
66 changes: 36 additions & 30 deletions _docs/1.Installation-and-Setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,37 +21,43 @@ Laravel uses the [Monolog PHP logging library](https://github.com/Seldaek/monolo

## Version Compatibility

| LogViewer | Laravel |
|:--------------------------------------|:--------------------------------------------------------------------------------------------------------------------|
| ![LogViewer v4.2.x][log_viewer_4_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] |
| ![LogViewer v4.3.x][log_viewer_4_3_x] | ![Laravel v5.4][laravel_5_4] |
| ![LogViewer v4.4.x][log_viewer_4_4_x] | ![Laravel v5.5][laravel_5_5] |
| ![LogViewer v4.5.x][log_viewer_4_5_x] | ![Laravel v5.6][laravel_5_6] |
| ![LogViewer v4.6.x][log_viewer_4_6_x] | ![Laravel v5.7][laravel_5_7] |
| ![LogViewer v4.7.x][log_viewer_4_7_x] | ![Laravel v5.8][laravel_5_8] |
| ![LogViewer v5.x][log_viewer_5_x] | ![Laravel v6.x][laravel_6_x] |
| ![LogViewer v7.x][log_viewer_7_x] | ![Laravel v7.x][laravel_7_x] |

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

[log_viewer_4_2_x]: https://img.shields.io/badge/version-4.2.x-blue.svg?style=flat-square "LogViewer v4.2.x"
[log_viewer_4_3_x]: https://img.shields.io/badge/version-4.3.x-blue.svg?style=flat-square "LogViewer v4.3.x"
[log_viewer_4_4_x]: https://img.shields.io/badge/version-4.4.x-blue.svg?style=flat-square "LogViewer v4.4.x"
[log_viewer_4_5_x]: https://img.shields.io/badge/version-4.5.x-blue.svg?style=flat-square "LogViewer v4.5.x"
[log_viewer_4_6_x]: https://img.shields.io/badge/version-4.6.x-blue.svg?style=flat-square "LogViewer v4.6.x"
[log_viewer_4_7_x]: https://img.shields.io/badge/version-4.7.x-blue.svg?style=flat-square "LogViewer v4.7.x"
[log_viewer_5_x]: https://img.shields.io/badge/version-5.x-blue.svg?style=flat-square "LogViewer v5.x"
| Laravel | LogViewer |
|:-----------------------------|:--------------------------------------|
| ![Laravel v8.x][laravel_8_x] | ![LogViewer v8.x][log_viewer_8_x] |
| ![Laravel v7.x][laravel_7_x] | ![LogViewer v7.x][log_viewer_7_x] |
| ![Laravel v6.x][laravel_6_x] | ![LogViewer v5.x][log_viewer_5_x] |
| ![Laravel v5.8][laravel_5_8] | ![LogViewer v4.7.x][log_viewer_4_7_x] |
| ![Laravel v5.7][laravel_5_7] | ![LogViewer v4.6.x][log_viewer_4_6_x] |
| ![Laravel v5.6][laravel_5_6] | ![LogViewer v4.5.x][log_viewer_4_5_x] |
| ![Laravel v5.5][laravel_5_5] | ![LogViewer v4.4.x][log_viewer_4_4_x] |
| ![Laravel v5.4][laravel_5_4] | ![LogViewer v4.3.x][log_viewer_4_3_x] |
| ![Laravel v5.3][laravel_5_3] | ![LogViewer v4.2.x][log_viewer_4_2_x] |
| ![Laravel v5.2][laravel_5_2] | ![LogViewer v4.2.x][log_viewer_4_2_x] |
| ![Laravel v5.1][laravel_5_1] | ![LogViewer v4.2.x][log_viewer_4_2_x] |
| ![Laravel v5.0][laravel_5_0] | ![LogViewer v4.2.x][log_viewer_4_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"

[log_viewer_8_x]: https://img.shields.io/badge/version-8.x-blue.svg?style=flat-square "LogViewer v8.x"
[log_viewer_7_x]: https://img.shields.io/badge/version-7.x-blue.svg?style=flat-square "LogViewer v7.x"
[log_viewer_5_x]: https://img.shields.io/badge/version-5.x-blue.svg?style=flat-square "LogViewer v5.x"
[log_viewer_4_7_x]: https://img.shields.io/badge/version-4.7.x-blue.svg?style=flat-square "LogViewer v4.7.x"
[log_viewer_4_6_x]: https://img.shields.io/badge/version-4.6.x-blue.svg?style=flat-square "LogViewer v4.6.x"
[log_viewer_4_5_x]: https://img.shields.io/badge/version-4.5.x-blue.svg?style=flat-square "LogViewer v4.5.x"
[log_viewer_4_4_x]: https://img.shields.io/badge/version-4.4.x-blue.svg?style=flat-square "LogViewer v4.4.x"
[log_viewer_4_3_x]: https://img.shields.io/badge/version-4.3.x-blue.svg?style=flat-square "LogViewer v4.3.x"
[log_viewer_4_2_x]: https://img.shields.io/badge/version-4.2.x-blue.svg?style=flat-square "LogViewer v4.2.x"

## Composer

Expand Down
22 changes: 16 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@
"type": "library",
"license": "MIT",
"require": {
"php": "^7.2.5",
"ext-json": "*",
"psr/log": "^1.0",
"arcanedev/support": "^7.0"
"php": "^7.3",
"ext-json": "*",
"arcanedev/support": "^8.0",
"psr/log": "^1.1"
},
"require-dev": {
"orchestra/testbench": "^5.0",
"phpunit/phpunit": "^8.5"
"orchestra/testbench": "^6.0",
"phpunit/phpunit": "^9.3"
},
"autoload": {
"psr-4": {
Expand All @@ -34,14 +34,24 @@
"Arcanedev\\LogViewer\\Tests\\": "tests/"
}
},
"scripts": {
"test": "phpunit",
"coverage": "phpunit --coverage-html build/coverage/html"
},
"extra": {
"branch-alias": {
"dev-develop": "8.x-dev"
},
"laravel": {
"providers": [
"Arcanedev\\LogViewer\\LogViewerServiceProvider",
"Arcanedev\\LogViewer\\Providers\\DeferredServicesProvider"
]
}
},
"config": {
"sort-packages": true
},
"minimum-stability": "dev",
"prefer-stable": true
}
34 changes: 14 additions & 20 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,31 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false"
backupStaticAttributes="false"
beStrictAboutTestsThatDoNotTestAnything="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"
verbose="true">
>
<testsuites>
<testsuite name="Package Test Suite">
<directory suffix=".php">./tests/</directory>
<directory suffix=".php">./tests</directory>
</testsuite>
</testsuites>
<filter>
<whitelist>
<directory suffix=".php">./src/</directory>
</whitelist>
</filter>
<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>
<php>
<env name="LOG_CHANNEL" value="daily"/>
</php>
<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>
</phpunit>
3 changes: 1 addition & 2 deletions src/Commands/CheckCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@
use Arcanedev\LogViewer\Contracts\Utilities\LogChecker as LogCheckerContract;

/**
* Class PublishCommand
* Class CheckCommand
*
* @package Arcanedev\LogViewer\Commands
* @author ARCANEDEV <[email protected]>
*/
class CheckCommand extends Command
Expand Down
1 change: 0 additions & 1 deletion src/Commands/ClearCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
/**
* Class ClearCommand
*
* @package Arcanedev\LogViewer\Commands
* @author ARCANEDEV <[email protected]>
*/
class ClearCommand extends Command
Expand Down
1 change: 0 additions & 1 deletion src/Commands/Command.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
/**
* Class Command
*
* @package Arcanedev\LogViewer\Bases
* @author ARCANEDEV <[email protected]>
*/
abstract class Command extends BaseCommand
Expand Down
1 change: 0 additions & 1 deletion src/Commands/PublishCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
/**
* Class PublishCommand
*
* @package Arcanedev\LogViewer\Commands
* @author ARCANEDEV <[email protected]>
*/
class PublishCommand extends Command
Expand Down
1 change: 0 additions & 1 deletion src/Commands/StatsCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
/**
* Class StatsCommand
*
* @package Arcanedev\LogViewer\Commands
* @author ARCANEDEV <[email protected]>
*/
class StatsCommand extends Command
Expand Down
1 change: 0 additions & 1 deletion src/Contracts/LogViewer.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
/**
* Interface LogViewer
*
* @package Arcanedev\LogViewer\Contracts
* @author ARCANEDEV <[email protected]>
*/
interface LogViewer extends Patternable
Expand Down
1 change: 0 additions & 1 deletion src/Contracts/Patternable.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
/**
* Interface Patternable
*
* @package Arcanedev\LogViewer\Contracts
* @author ARCANEDEV <[email protected]>
*/
interface Patternable
Expand Down
1 change: 0 additions & 1 deletion src/Contracts/Table.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
/**
* Interface Table
*
* @package Arcanedev\LogViewer\Contracts
* @author ARCANEDEV <[email protected]>
*/
interface Table
Expand Down
1 change: 0 additions & 1 deletion src/Contracts/Utilities/Factory.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
/**
* Interface Factory
*
* @package Arcanedev\LogViewer\Contracts\Utilities
* @author ARCANEDEV <[email protected]>
*/
interface Factory extends Patternable
Expand Down
11 changes: 5 additions & 6 deletions src/Contracts/Utilities/Filesystem.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
/**
* Interface Filesystem
*
* @package Arcanedev\LogViewer\Contracts\Utilities
* @author ARCANEDEV <[email protected]>
*/
interface Filesystem extends Patternable
Expand Down Expand Up @@ -40,7 +39,7 @@ public function getInstance();
*
* @param string $storagePath
*
* @return self
* @return $this
*/
public function setPath($storagePath);

Expand All @@ -49,7 +48,7 @@ public function setPath($storagePath);
*
* @param string $datePattern
*
* @return self
* @return $this
*/
public function setDatePattern($datePattern);

Expand All @@ -58,7 +57,7 @@ public function setDatePattern($datePattern);
*
* @param string $prefixPattern
*
* @return self
* @return $this
*/
public function setPrefixPattern($prefixPattern);

Expand All @@ -67,7 +66,7 @@ public function setPrefixPattern($prefixPattern);
*
* @param string $extension
*
* @return self
* @return $this
*/
public function setExtension($extension);

Expand Down Expand Up @@ -119,7 +118,7 @@ public function read($date);
*
* @throws \Arcanedev\LogViewer\Exceptions\FilesystemException
*/
public function delete($date);
public function delete(string $date);

/**
* Clear the log files.
Expand Down
1 change: 0 additions & 1 deletion src/Contracts/Utilities/LogChecker.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
/**
* Interface LogChecker
*
* @package Arcanedev\LogViewer\Contracts\Utilities
* @author ARCANEDEV <[email protected]>
*/
interface LogChecker
Expand Down
1 change: 0 additions & 1 deletion src/Contracts/Utilities/LogLevels.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
/**
* Interface LogLevels
*
* @package Arcanedev\LogViewer\Contracts\Utilities
* @author ARCANEDEV <[email protected]>
*/
interface LogLevels
Expand Down
1 change: 0 additions & 1 deletion src/Contracts/Utilities/LogMenu.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
/**
* Interface LogMenu
*
* @package Arcanedev\LogViewer\Contracts\Utilities
* @author ARCANEDEV <[email protected]>
*/
interface LogMenu
Expand Down
1 change: 0 additions & 1 deletion src/Contracts/Utilities/LogStyler.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
/**
* Interface LogStyler
*
* @package Arcanedev\LogViewer\Contracts\Utilities
* @author ARCANEDEV <[email protected]>
*/
interface LogStyler
Expand Down
1 change: 0 additions & 1 deletion src/Entities/Log.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
/**
* Class Log
*
* @package Arcanedev\LogViewer\Entities
* @author ARCANEDEV <[email protected]>
*/
class Log implements Arrayable, Jsonable, JsonSerializable
Expand Down
Loading

0 comments on commit f8548b4

Please sign in to comment.