DoubleClickDesignLtd wrote a reply+100 XP
4mos ago
Hi @silveira, I've read about a similar issue in another post when upgrading to Livewire 4 and Filament. They fixed it by deleting the node_modules directory and installed the nodes packages again. I suggest giving it a try.
DoubleClickDesignLtd liked a comment+100 XP
4mos ago
Latest update.
After trying different things I deleted the node_modules directory and installed the nodes packages again. It solved the problem - as far as I can see
DoubleClickDesignLtd wrote a reply+100 XP
4mos ago
@troccoli I'm not 100% sure why your doing the persistent cache from what your describing.
However to answer your test fail issue, I believe this happens because Laravel’s test environment fakes the cache store, so the value you put() in the test is not available when the Livewire request runs.
Livewire component actions (->call('completeProfile')) are executed through a separate HTTP request lifecycle.
In your test, when you do the below, that value is stored in the cache instance for the current test lifecycle.
Cache::store('persistent')->put(key: $cacheKey, value: new SignUpAttempt(...));
During the Livewire call, Laravel boots a new request and the cache store is resolved again. In tests, Laravel commonly swaps cache stores with an array / fake store (or otherwise non-persistent store), so your “persistent” store isn’t actually hitting your persistent_cache DB table during the Livewire request.
That why the test is failing from my understand. To fix try forcing Laravel to use the real cache store in tests, not the fake/array one.
Question: Have you ensure cache tables exist in test DB and you set up the phpunit.xml to use your cache driver?
Let me know how you get on.
All the best
Mark
DoubleClickDesignLtd wrote a reply+100 XP
4mos ago
If you need to get your head round the backend I would suggest your start by doing the Level 1 The Fundamentals.
It a good base line and will help you moving forward.
DoubleClickDesignLtd wrote a reply+100 XP
4mos ago
No problem I wish you the best with your learning
DoubleClickDesignLtd liked a comment+100 XP
4mos ago
Thank you very kindly.
DoubleClickDesignLtd liked a comment+100 XP
5mos ago
@yumna12-coder You might not be ready for this series. Can you describe precisely what you found difficult, and we can point you to a place to learn more?
DoubleClickDesignLtd wrote a reply+100 XP
5mos ago
First don't be too hard on yourself. Everything you stated as challenging are very large areas of programming in general. Everyone finds them challenging. The good news is their are various courses on Laracasts that can help you.
I had difficulty with Testing and I'm still not great a it. I found watch this course help me a lot.
https://laracasts.com/series/php-testing-jargon
Also I recommend reading the Laravel documentation. I know it sound scary but the documentation is very human friendly to read and understand.
If you just struggling with the PHP in general I would recommend "PHP For Beginners" and the "PHP Crash Course" on Laracasts.
Authorisation is a massive topic and even after all my 20+ years as a developer I'm still learning on this subject. The best way to pick it up is to create a simple app yourself.
Start with a Laravel start kit. Use something like Laravel Breeze starter kit and learn to use the existing Auth process. By doing this you will learn the basics and you can look at the start kit codebase and start reading it to understand what going on.
Here a very good Laracasts course on the subject
https://laracasts.com/series/laravel-authentication-options
If you still don't understand I suggest copying the script into chatGPT and asking it to explain in detail what each line does and why, it can be a helpful exercise if you don't understand something.
Gate and Policies sound more complex than they really are. They are just layers you can add to system security. You don't have to master everything all at once. Just learn to get comfortable with Authorisation then once your good start playing with Gate...then Policies. Before long you will start feeling comfortable with everything.
Just remember programming is creative exercise and you learn through play. So just have fun and play.
As far as Vite and UI I would recommend watching.
https://laracasts.com/series/laravel-and-vite
I hope the above helps you and if you have any particular questions just let me know and I've tried and explain it to you.
All the best :-)
DoubleClickDesignLtd wrote a comment+100 XP
5mos ago
@ojiminy really??? Has the AI been prompt to make sure it only uses PHP 8.4 syntax?
DoubleClickDesignLtd wrote a comment+100 XP
5mos ago
I kind of understand what @JeffreyWay is saying but I'm left wondering why the readonly approach was not mention on the refactor of this code example.
Let me explain.... using the same example we could achieve the same functionality with less code and be more readable (in my opinion).
// notice the use of the readonly on the $email
class User {
public function __construct(
public readonly string $email
) {
// Validate email before assigning
if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
throw new InvalidArgumentException('Email must be valid.');
}
}
}
$user = new User('[email protected]');
echo $user->email; // Outputs: [email protected]
The above code does the following :-
- public readonly string $email
- Can be read publicly ($user->email)
- Can only be assigned once, in the constructor
- Prevents accidental modification after creation
- Email validation
- Done in the constructor before assignment
- Guarantees object is always in a valid state
- No property hooks are needed for $email
- Since it’s immutable, you don’t need a setter
- Getter is automatic with public readonly
Where I'm sitting the above gives all the same functionality and safety that the original does. The only thing I'm wondering is why the readonly was not mention in the video.
I understand my example does not make use of the new way to do the property hooks but I'm not seeing a case where the property hooks be a better approach. Maybe I'm missing something if so please can someone enlighten me.
DoubleClickDesignLtd wrote a reply+100 XP
6mos ago
Thanks for sharing this information @martinbean
DoubleClickDesignLtd liked a comment+100 XP
6mos ago
A vulnerability has been discovered that affects Livewire 3 versions up to and including 3.6.3 (https://nvd.nist.gov/vuln/detail/CVE-2025-54068). If you’re running a vulnerable version, you’re advised to upgrade immediately. This includes if you’re using a package (such as Filament) that relies on affected versions.