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

[Bug]: Is it Laravel 10 compatible? #71

Closed
ijpatricio opened this issue Sep 18, 2024 · 2 comments · Fixed by #72
Closed

[Bug]: Is it Laravel 10 compatible? #71

ijpatricio opened this issue Sep 18, 2024 · 2 comments · Fixed by #72
Labels
bug Something isn't working

Comments

@ijpatricio
Copy link

What happened?

Hey Ben! Thanks for this work!

I installed on a fresh new Laravel 11 app for the test drive, and all went smooth, enjoyed it a lot!

But then, I started it on a production app, and it's Laravel 10.

Errors I got after installing, in order:

  • Unrecognized Middleware class ValidateCsrfToken. L11 has that, L10 has VerifyCsrfToken
  • On Youtube component Method Illuminate\View\ComponentAttributeBag::all does not exist.. In L11, that object has all method, not in L10.
    • I removed the MD portion that makes render such component to proceeed.
  • Error Attempt to read property "createdAt" on string in resources / views / vendor / prezet / components / article.blade.php
    • $article is a Json string
    • could fix with this snippet - added that php sentence to convert string back
                  @foreach ($articles as $article)
                      @php
                          $article = new \BenBjurstrom\Prezet\Data\FrontmatterData(json_decode($article, associative: true));
                      @endphp
                      <li class="py-12">
                          <x-prezet::article :article="$article" />
                      </li>
                  @endforeach

How to reproduce the bug

Install in Laravel 10, I think!

Package Version

0.12.0

PHP Version

8.3.9

Laravel Version

10.48.22

Which operating systems does with happen with?

No response

Notes

No response

@ijpatricio ijpatricio added the bug Something isn't working label Sep 18, 2024
@benbjurstrom
Copy link
Owner

Thanks for the report. I would like to support Laravel 10 for now. Should have a fix for these issues up later today.

@benbjurstrom benbjurstrom linked a pull request Sep 19, 2024 that will close this issue
@ijpatricio
Copy link
Author

Glad I could help ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants