Skip to content

Commit

Permalink
merged main
Browse files Browse the repository at this point in the history
  • Loading branch information
bezhanSalleh committed Nov 6, 2024
2 parents a6ed8f2 + 7c712a6 commit 5cb534a
Show file tree
Hide file tree
Showing 7 changed files with 130 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/dependabot-auto-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:

- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@v1.6.0
uses: dependabot/fetch-metadata@v2.2.0
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/fix-php-code-style-issues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
ref: ${{ github.head_ref }}

- name: Fix PHP code style issues
uses: aglipanci/laravel-pint-action@2.3.1
uses: aglipanci/laravel-pint-action@2.4

- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v5
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ jobs:
matrix:
os: [ubuntu-latest, windows-latest]
php: [8.1]
laravel: [9.*]
laravel: [10.*]
stability: [prefer-lowest, prefer-stable]
include:
- laravel: 9.*
testbench: 7.*
- laravel: 10.*
testbench: 8.*

name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}

Expand All @@ -44,4 +44,4 @@ jobs:
composer update --${{ matrix.stability }} --prefer-dist --no-interaction
- name: Execute tests
run: vendor/bin/pest
run: vendor/bin/pest
32 changes: 32 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,38 @@

All notable changes to `filament-exceptions` will be documented in this file.

## 2.1.2 - 2024-11-06

### What's Changed

* Adding isScopedToTenant at ExceptionResource by @LingMyat in https://github.com/bezhanSalleh/filament-exceptions/pull/47
* Add Custom Model Support & Fix Iterator Errors by @Fludem in https://github.com/bezhanSalleh/filament-exceptions/pull/46
* Bump aglipanci/laravel-pint-action from 2.3.1 to 2.4 by @dependabot in https://github.com/bezhanSalleh/filament-exceptions/pull/53
* Slovak translation by @hamrak in https://github.com/bezhanSalleh/filament-exceptions/pull/55
* Bump dependabot/fetch-metadata from 1.6.0 to 2.2.0 by @dependabot in https://github.com/bezhanSalleh/filament-exceptions/pull/59

### New Contributors

* @LingMyat made their first contribution in https://github.com/bezhanSalleh/filament-exceptions/pull/47
* @Fludem made their first contribution in https://github.com/bezhanSalleh/filament-exceptions/pull/46
* @hamrak made their first contribution in https://github.com/bezhanSalleh/filament-exceptions/pull/55

**Full Changelog**: https://github.com/bezhanSalleh/filament-exceptions/compare/2.0.2...2.1.2

## 2.1.0 - 2024-01-24

### What's Changed

* Adding isScopedToTenant at ExceptionResource by @LingMyat in https://github.com/bezhanSalleh/filament-exceptions/pull/47
* Add Custom Model Support & Fix Iterator Errors by @Fludem in https://github.com/bezhanSalleh/filament-exceptions/pull/46

### New Contributors

* @LingMyat made their first contribution in https://github.com/bezhanSalleh/filament-exceptions/pull/47
* @Fludem made their first contribution in https://github.com/bezhanSalleh/filament-exceptions/pull/46

**Full Changelog**: https://github.com/bezhanSalleh/filament-exceptions/compare/2.0.2...2.1.0

## 2.0.2 - 2024-01-09

### What's Changed
Expand Down
51 changes: 41 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
<a href="https://github.com/bezhanSalleh/filament-exceptions">
<a href="https://github.com/bezhanSalleh/filament-exceptions" class="filament-hidden">
<img style="width: 100%; max-width: 100%;" alt="filament-exceptions-art" src="https://user-images.githubusercontent.com/10007504/188786069-e93f01a1-d910-4888-a29a-28eea4ee0458.jpg" >
</a>

<p align="center">
<p align="center" class="flex justify-center items-center">
<a href="https://filamentadmin.com/docs/2.x/admin/installation">
<img alt="FILAMENT 8.x" src="https://img.shields.io/badge/FILAMENT-2.x-EBB304?style=for-the-badge">
<img alt="FILAMENT 8.x" src="https://img.shields.io/badge/FILAMENT-3.x-EBB304?style=for-the-badge">
</a>
<a href="https://packagist.org/packages/bezhansalleh/filament-exceptions">
<img alt="Packagist" src="https://img.shields.io/packagist/v/bezhansalleh/filament-exceptions.svg?style=for-the-badge&logo=packagist">
</a>
<a href="https://github.com/bezhansalleh/filament-exceptions/actions?query=workflow%3Arun-tests+branch%3Amain">
<a href="https://github.com/bezhansalleh/filament-exceptions/actions?query=workflow%3Arun-tests+branch%3Amain" class="filament-hidden">
<img alt="Tests Passing" src="https://img.shields.io/github/actions/workflow/status/bezhansalleh/filament-exceptions/run-tests.yml?style=for-the-badge&logo=github&label=tests">
</a>
<a href="https://github.com/bezhansalleh/filament-exceptions/actions?query=workflow%3A"Check+%26+fix+styling"+branch%3Amain">
<a href="https://github.com/bezhansalleh/filament-exceptions/actions?query=workflow%3A"Check+%26+fix+styling"+branch%3Amain" class="filament-hidden">
<img alt="Code Style Passing" src="https://img.shields.io/github/actions/workflow/status/bezhansalleh/filament-exceptions/fix-php-code-style-issues.yml?style=for-the-badge&logo=github&label=code%20style">
</a>

Expand All @@ -21,7 +21,7 @@
</a>
</p>

# Filament Exception Viewer
# Exception Viewer

A Simple & Beautiful Exception Viewer for FilamentPHP's Admin Panel

Expand Down Expand Up @@ -79,11 +79,42 @@ class Handler extends ExceptionHandler

## Configuration
The configuration file filament-exceptions.php is automatically published into your config directory.
You can change icons and navigations settings as well as the active pill and slug there.

* **Mass Pruning**: By default exceptions older than a week are scheduled to be pruned daily. You can change the `period` by providing a date in the config or using carbon.
> **Note**
> in order for the schedule to work you need to make sure that you have configured your server if not follow this link on how to configure it. [Running The Scheduler](https://laravel.com/docs/9.x/scheduling#running-the-scheduler)
The config file provides you with multiple options to customize the plugin.

### Mass Pruning
By default Filament Exceptions is configured to prune exceptions older than 1 week.

To modify how long you'd like to store records for you can supply a Carbon object like so

```php
'period' => now()->subWeek(), // 1 week
'period' => now()->subDay(), // 1 day
'period' => now()->subDays(3), // 3 days
```
> **Note** This requires laravel scheduler to be setup and configured in order to work. You can see how to do that here [Running The Scheduler](https://laravel.com/docs/10.x/scheduling#running-the-scheduler)
### Custom Exception Model
For those who need to change the model this is possible using the configuration file.

```php
'exception_model' => Exception::class,
```

When creating your new exception model you should extend the default model

```php
<?php

namespace App\Models;

use BezhanSalleh\FilamentExceptions\Models\Exception as BaseException;

class Exception extends BaseException
{

}
```

## Theme
By default the plugin uses the default theme of Filamentphp, but if you are using a custom theme then include the plugins view path into the content array of your tailwind.config.js file:
Expand Down
31 changes: 31 additions & 0 deletions resources/lang/sk/filament-exceptions.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?php

return [

'labels' => [
'model' => 'Výnimka',
'model_plural' => 'Výnimky',
'navigation' => 'Výnimka',
'navigation_group' => 'Nastavenia',

'tabs' => [
'exception' => 'Výnimka',
'headers' => 'Hlavičky',
'cookies' => 'Cookies',
'body' => 'Telo',
'queries' => 'Dotazy',
],
],

'empty_list' => 'Hurá! len si sadnite a užívajte si 😎',

'columns' => [
'method' => 'Metóda',
'path' => 'Cesta',
'type' => 'Typ',
'code' => 'Kód',
'ip' => 'IP',
'occurred_at' => 'Nastalo o',
],

];
20 changes: 20 additions & 0 deletions src/Trace/Parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@ public function parse(): ?array
/**
* {@inheritDoc}
*/
<<<<<<< HEAD
#[ReturnTypeWillChange]
=======
#[\ReturnTypeWillChange]
>>>>>>> main
public function current()
{
// TODO: Implement current() method.
Expand All @@ -32,7 +36,11 @@ public function current()
/**
* {@inheritDoc}
*/
<<<<<<< HEAD
#[ReturnTypeWillChange]
=======
#[\ReturnTypeWillChange]
>>>>>>> main
public function next()
{
// TODO: Implement next() method.
Expand All @@ -41,7 +49,11 @@ public function next()
/**
* {@inheritDoc}
*/
<<<<<<< HEAD
#[ReturnTypeWillChange]
=======
#[\ReturnTypeWillChange]
>>>>>>> main
public function key()
{
// TODO: Implement key() method.
Expand All @@ -50,7 +62,11 @@ public function key()
/**
* {@inheritDoc}
*/
<<<<<<< HEAD
#[ReturnTypeWillChange]
=======
#[\ReturnTypeWillChange]
>>>>>>> main
public function valid()
{
// TODO: Implement valid() method.
Expand All @@ -59,7 +75,11 @@ public function valid()
/**
* {@inheritDoc}
*/
<<<<<<< HEAD
#[ReturnTypeWillChange]
=======
#[\ReturnTypeWillChange]
>>>>>>> main
public function rewind()
{
// TODO: Implement rewind() method.
Expand Down

0 comments on commit 5cb534a

Please sign in to comment.