Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Template Filament project doesn't work #12855

Closed
wq9578 opened this issue May 19, 2024 · 5 comments
Closed

Template Filament project doesn't work #12855

wq9578 opened this issue May 19, 2024 · 5 comments
Labels

Comments

@wq9578
Copy link

wq9578 commented May 19, 2024

Package

filament/filament

Package Version

v3.2.80

Laravel Version

v11.7.0

Livewire Version

v3.4.12

PHP Version

8.2.11

Problem description

The template Filament project available at https://filament-issue.unitedbycode.com doesn't work.

The command php artisan serve fails.
Also trying composer dump-autoload fails with the same error message.

(Originally, I wanted to create a reproduction repository since I faced bug #6576 (method afterStateUpdated() called twice) with the current version of Filament.)

Expected behavior

A working template Filament project.

Steps to reproduce

Download from https://filament-issue.unitedbycode.com and unpack.
Change into project directory and run php artisan serve.

If you clone the reproduction repository, run composer install before running php artisan serve .

Reproduction repository

https://github.com/wq9578/template-filament-project

Relevant log output

% php artisan serve     

In sanctum.php line 21:
                                             
  Class "Laravel\Sanctum\Sanctum" not found  
                                             

% composer dump-autoload
Generating optimized autoload files
Warning: Ambiguous class resolution, "Filament\Support\Commands\Aliases\MakeIssueCommand" was found in both "/Users/githubuser/Downloads/filament-issue/vendor/filament/support/src/Commands/Aliases/MakeIssueCommand.php" and "/Users/githubuser/Downloads/filament-issue/vendor/filament/filament/src/Support/Commands/Aliases/MakeIssueCommand.php", the first will be used.
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi

In sanctum.php line 21:
                                             
  Class "Laravel\Sanctum\Sanctum" not found  
                                             

Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1
Copy link

Hey @wq9578! We're sorry to hear that you've hit this issue. 💛

However, it looks like you forgot to fill in the reproduction repository URL. Can you edit your original post and then we'll look at your issue?

We need a public GitHub repository which contains a Laravel app with the minimal amount of Filament code to reproduce the problem. Please do not link to your actual project, what we need instead is a minimal reproduction in a fresh project without any unnecessary code. This means it doesn't matter if your real project is private / confidential, since we want a link to a separate, isolated reproduction. That would allow us to download it and review your bug much easier, so it can be fixed quicker. Please make sure to include a database seeder with everything we need to set the app up quickly.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale May 19, 2024
Copy link

Thank you for providing reproduction steps! Reopening the issue now.

@github-actions github-actions bot reopened this May 19, 2024
@dev-idkwhoami
Copy link
Contributor

dev-idkwhoami commented May 19, 2024

Your issue does not lie with filament.

Whoever made that zip file and included the vendor directory, somehow managed to remove the laravel/sanctum dependency from the composer.json.

To fix your issue in the root directory run

composer require laravel/sanctum

Then php artisan serve will function as expected.

@wq9578
Copy link
Author

wq9578 commented May 19, 2024

Thanks!
Running composer require laravel/sanctum solves the issue.
(There still appears the warning "Ambiguous class resolution" mentioned above.)

However, since the link to https://filament-issue.unitedbycode.com is announced here when opening an issue, I would consider the ZIP file somehow part of the Filament project.
So the ZIP file still should be fixed (by removing both the issue and the warning).
@ijpatricio seems to be the person in charge (hosting the website).

@danharrin
Copy link
Member

I've notified Patricio myself so closing this issue

@danharrin danharrin closed this as not planned Won't fix, can't repro, duplicate, stale May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

No branches or pull requests

3 participants