Skip to content

Commit

Permalink
Merge pull request #433 from ARCANEDEV/develop
Browse files Browse the repository at this point in the history
Adding Laravel 10 Support
  • Loading branch information
arcanedev-maroc authored Mar 2, 2023
2 parents ba0c14e + 6f4ad07 commit e66b457
Show file tree
Hide file tree
Showing 9 changed files with 37 additions and 28 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,29 +9,28 @@ jobs:
strategy:
fail-fast: true
matrix:
php: [8.0, 8.1]
php: [8.1, 8.2]
dependency-version: [prefer-lowest, prefer-stable]

name: PHP ${{ matrix.php }} - ${{ matrix.dependency-version }}

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 2

- name: Cache dependencies
uses: actions/cache@v2
with:
path: ~/.composer/cache/files
key: dependencies-laravel-8-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
key: dependencies-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: curl, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, iconv
tools: composer:v2
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, iconv
coverage: pcov

- name: Install dependencies
Expand Down
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
/build/
/vendor/
/.phpunit.cache
/build
/vendor
/composer.phar
/composer.lock
/phpunit.xml
.DS_Store
Thumbs.db
.phpunit.result.cache
5 changes: 3 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` to `9.x` are supported.
- Laravel `5.x` to `10.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 All @@ -50,6 +50,7 @@ Feel free to check out the [releases](https://github.com/ARCANEDEV/LogViewer/rel
|---------|-----------------------|
| `ar` | Arabic |
| `bg` | Bulgarian |
| `bn` | Bengali |
| `de` | German |
| `en` | English |
| `es` | Spanish |
Expand Down Expand Up @@ -96,7 +97,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%20to%209.x-orange.svg?style=flat-square
[badge_laravel]: https://img.shields.io/badge/Laravel-5.x%20to%2010.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
12 changes: 6 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@
"type": "library",
"license": "MIT",
"require": {
"php": "^8.0",
"php": "^8.1",
"ext-json": "*",
"arcanedev/support": "^9.0",
"arcanedev/support": "^10.0",
"psr/log": "^1.0|^2.0|^3.0"
},
"require-dev": {
"laravel/framework": "^9.0",
"mockery/mockery": "^1.4.4",
"orchestra/testbench-core": "^7.0",
"phpunit/phpunit": "^9.5.10"
"laravel/framework": "^10.0",
"mockery/mockery": "^1.5.1",
"orchestra/testbench-core": "^8.0",
"phpunit/phpunit": "^10.0"
},
"autoload": {
"psr-4": {
Expand Down
4 changes: 2 additions & 2 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
>
<testsuites>
<testsuite name="Package Test Suite">
<directory suffix=".php">./tests</directory>
<directory suffix="Test.php">./tests</directory>
</testsuite>
</testsuites>
<coverage processUncoveredFiles="true">
<coverage>
<include>
<directory suffix=".php">./src</directory>
</include>
Expand Down
8 changes: 2 additions & 6 deletions tests/Commands/PublishCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public function it_can_publish_only_translations(string $tag): void
// TODO: Add views assertions
}

public function providePublishableTranslationsTags(): array
public static function providePublishableTranslationsTags(): array
{
return [
['translations'],
Expand Down Expand Up @@ -154,9 +154,7 @@ private function deleteConfig(): void
}

/**
* Check if LogViewer config file exists
*
* @return bool
* Check if LogViewer config file exists.
*/
private function isConfigExists(): bool
{
Expand All @@ -167,8 +165,6 @@ private function isConfigExists(): bool

/**
* Get LogViewer config file path.
*
* @return string
*/
private function getConfigFilePath(): string
{
Expand Down
4 changes: 1 addition & 3 deletions tests/Entities/LogTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -194,10 +194,8 @@ public function it_can_convert_to_json(): void

/**
* Provide valid dates.
*
* @return array
*/
public function provideDates(): array
public static function provideDates(): array
{
return [
['2015-01-01'],
Expand Down
4 changes: 2 additions & 2 deletions tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ abstract class TestCase extends BaseTestCase
protected static array $logLevels = [];

protected static array $locales = [
'ar', 'bg', 'de', 'en', 'es', 'et', 'fa', 'fr', 'hu', 'hy', 'id', 'it', 'ja', 'ko', 'ms', 'nl', 'pl',
'pt-BR', 'ro', 'ru', 'si', 'sv', 'th', 'tr', 'uk', 'zh-TW', 'zh'
'ar', 'bg', 'bn', 'de', 'en', 'es', 'et', 'fa', 'fr', 'hu', 'hy', 'id', 'it', 'ja', 'ko', 'ms', 'nl',
'pl', 'pt-BR', 'ro', 'ru', 'si', 'sv', 'th', 'tr', 'uk', 'zh-TW', 'zh'
];

/* -----------------------------------------------------------------
Expand Down
13 changes: 13 additions & 0 deletions translations/bn.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"Date": "তারিখ",
"The list of logs is empty!": "কোন লগ পাওয়া যায়নি!",
"All": "সবগুলি",
"Emergency": "জরুরী",
"Alert": "সতর্ক",
"Critical": "সংকটপূর্ণ",
"Error": "ত্রুটি",
"Warning": "সতর্কতা",
"Notice": "নোটিস",
"Info": "তথ্য",
"Debug": "রুটি অনুসন্ধান"
}

0 comments on commit e66b457

Please sign in to comment.