themosis / framework

The Themosis framework core.
https://framework.themosis.com/
GNU General Public License v2.0
670 stars 121 forks source link

Illuminate 10 Package Upgrade, Syntax Best Practices & Error Management Improvements #901

Closed ogorzalka closed 1 year ago

ogorzalka commented 1 year ago

Hi Julien !

I am reaching out to propose a pull request on your Themosis framework.

The key features in this proposal include:

  1. Package Upgrade: I have upgraded packages to Illuminate 10 to keep up with the recent changes and improvements Laravel has offered.

  2. Syntax Best Practices: Based on Laravel's recommended practices for version 10, I have adjusted the syntax accordingly to adhere to these recommendations.

  3. Error Management Improvements: I have implemented the new error management approach, which eliminates the need to overload the Handler. However, this requires an update in the Exceptions/Handler.php file as follows:

<?php

namespace App\Exceptions;

use Themosis\Core\Exceptions\Handler as ExceptionHandler;
use Throwable;

class Handler extends ExceptionHandler
{
    /**
     * The list of the inputs that are never flashed to the session on validation exceptions.
     *
     * @var array<int, string>
     */
    protected $dontFlash = [
        'current_password',
        'password',
        'password_confirmation',
    ];

    /**
     * Register the exception handling callbacks for the application.
     */
    public function register(): void
    {
        $this->reportable(function (Throwable $e) {
            //
        });
    }
}

In light of this, we have adapted the spatie/laravel-ignition package to be compatible with this version of Themosis. Here is the link to our work: https://github.com/AmphiBee/themosis-ignition

We are currently testing these updates on different projects. So far, no errors have been identified, but I believe it is still a work-in-progress (WIP).

I kindly ask for your feedback and suggestions on this proposed pull request. Your insights and expertise are greatly appreciated.

Have a good day :)

ogorzalka commented 1 year ago

Well some key commits :

jlambe commented 1 year ago

Thank you @ogorzalka for so much work on this. Unfortunately, I'm not going to merge this pull request. Long story short, the Themosis framework has been staled for quite a time... It's not dead, but the project will go in a different direction. I'm already in the rewriting of the framework. One thing to note with next version is that it will be closer to WordPress...

Thanks again for all your work.