From 8178fe5ae610ae9c0592200bfc3bbe821f0be69f Mon Sep 17 00:00:00 2001 From: pratik bhujel Date: Sun, 13 Sep 2026 09:56:27 +0545 Subject: [PATCH] Fix Pint code style, add CI Pint check, and remove unused welcome view Fix code style violations identified by Pint across providers and native components, enforce Pint checks in the GitHub Actions workflow, and delete the unused 72KB welcome.blade.php leftover from framework scaffolding. --- .github/workflows/tests.yml | 3 + app/Mcp/Tools/AppInfoTool.php | 10 +- app/NativeComponents/Home.php | 12 +- app/Providers/NativeServiceProvider.php | 9 +- resources/views/welcome.blade.php | 223 ------------------------ 5 files changed, 21 insertions(+), 236 deletions(-) delete mode 100644 resources/views/welcome.blade.php diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 60815fc..51dd617 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -39,5 +39,8 @@ jobs: touch database/database.sqlite php artisan migrate --force --no-interaction + - name: Check code style + run: vendor/bin/pint --test + - name: Run tests run: php artisan test diff --git a/app/Mcp/Tools/AppInfoTool.php b/app/Mcp/Tools/AppInfoTool.php index 491143a..cee41fd 100644 --- a/app/Mcp/Tools/AppInfoTool.php +++ b/app/Mcp/Tools/AppInfoTool.php @@ -2,7 +2,9 @@ namespace App\Mcp\Tools; +use Composer\InstalledVersions; use Illuminate\Contracts\JsonSchema\JsonSchema; +use Illuminate\Foundation\Application; use Illuminate\JsonSchema\Types\Type; use Laravel\Mcp\Request; use Laravel\Mcp\Response; @@ -20,10 +22,10 @@ class AppInfoTool extends Tool public function handle(Request $request): Response { $packages = [ - 'laravel/framework' => \Illuminate\Foundation\Application::VERSION, - 'filament/filament' => \Composer\InstalledVersions::getPrettyVersion('filament/filament'), - 'nativephp/mobile' => \Composer\InstalledVersions::getPrettyVersion('nativephp/mobile'), - 'laravel/mcp' => \Composer\InstalledVersions::getPrettyVersion('laravel/mcp'), + 'laravel/framework' => Application::VERSION, + 'filament/filament' => InstalledVersions::getPrettyVersion('filament/filament'), + 'nativephp/mobile' => InstalledVersions::getPrettyVersion('nativephp/mobile'), + 'laravel/mcp' => InstalledVersions::getPrettyVersion('laravel/mcp'), ]; $lines = [ diff --git a/app/NativeComponents/Home.php b/app/NativeComponents/Home.php index 4fa964b..31ca5e8 100644 --- a/app/NativeComponents/Home.php +++ b/app/NativeComponents/Home.php @@ -2,6 +2,8 @@ namespace App\NativeComponents; +use Composer\InstalledVersions; +use Illuminate\Foundation\Application; use Illuminate\View\View; use Native\Mobile\Edge\NativeComponent; @@ -17,11 +19,11 @@ public function render(): View return view('native.home', [ 'app' => config('app.name'), 'packages' => [ - 'Laravel' => \Illuminate\Foundation\Application::VERSION, - 'Filament' => \Composer\InstalledVersions::getPrettyVersion('filament/filament'), - 'NativePHP Mobile' => \Composer\InstalledVersions::getPrettyVersion('nativephp/mobile'), - 'Web UI' => \Composer\InstalledVersions::getPrettyVersion('nativephp/web-ui'), - 'Laravel MCP' => \Composer\InstalledVersions::getPrettyVersion('laravel/mcp'), + 'Laravel' => Application::VERSION, + 'Filament' => InstalledVersions::getPrettyVersion('filament/filament'), + 'NativePHP Mobile' => InstalledVersions::getPrettyVersion('nativephp/mobile'), + 'Web UI' => InstalledVersions::getPrettyVersion('nativephp/web-ui'), + 'Laravel MCP' => InstalledVersions::getPrettyVersion('laravel/mcp'), ], ]); } diff --git a/app/Providers/NativeServiceProvider.php b/app/Providers/NativeServiceProvider.php index df0cf85..17a8bbc 100644 --- a/app/Providers/NativeServiceProvider.php +++ b/app/Providers/NativeServiceProvider.php @@ -3,6 +3,7 @@ namespace App\Providers; use Illuminate\Support\ServiceProvider; +use Native\Mobile\UI\NativeUIServiceProvider; class NativeServiceProvider extends ServiceProvider { @@ -29,13 +30,13 @@ public function boot(): void * This is a security measure to prevent transitive dependencies from * automatically registering plugins without your explicit consent. * - * @return array> + * @return array> */ public function plugins(): array { return [ - \Native\Mobile\UI\NativeUIServiceProvider::class, - + NativeUIServiceProvider::class, + ]; } -} \ No newline at end of file +} diff --git a/resources/views/welcome.blade.php b/resources/views/welcome.blade.php deleted file mode 100644 index 26e294a..0000000 --- a/resources/views/welcome.blade.php +++ /dev/null @@ -1,223 +0,0 @@ - - - - - - - {{ config('app.name', 'Laravel') }} - - @fonts - - - @if (file_exists(public_path('build/manifest.json')) || file_exists(public_path('hot'))) - @vite(['resources/css/app.css', 'resources/js/app.js']) - @else - - @endif - - -
- @if (Route::has('login')) - - @endif -
-
-
-
-

Let's get started

-

With so many options available to you,
we suggest you start with the following:

- - - -

- v{{ app()->version() }} - - View changelog - - - - -

-
-
- {{-- Laravel Logo --}} - - - - - - - - - - - {{-- 13 --}} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- - @if (Route::has('login')) - - @endif - -