Closed Sakvojage closed 3 years ago
@Sakvojage Thanks for reporting this. Can you provide more information as to where you are seeing this error? If this is PHPStorm reporting this in the editor, it is likely a bug in PHPStorm, see #354
I'll close this issue for now. Please re-open if the above isn't what you meant. :)
It doesn't seem to be a PHPStorm problem - if I try to use Cachable on any of my models I get this warning and GitLab CI/CD crashes during the test stage (with segmentation fault). It seems weird, that I am the only one with this problem as project is quite generic and has no custom Models or vendor packages.
Current composer.json
@Sakvojage Unfortunately I am unable to reproduce this issue, and all tests are successful. So far I have seen no evidence that this is a problem with this package. If you could provide a full stack trace that shows this issue occurring, that would help troubleshoot the issue.
Ok, I've just tried this with fresh and empty Laravel and Laradock install.
composer require genealabs/laravel-model-caching
php artisan modelCache:publish --config
php artisan make:model Product
Then add use Cachable
to Product model - still get this collision. However MS Visual Studio Code has no problem with it. Weird.
I go blame JetBrains then.
Issue
Trait method 'newBelongsToMany' will not be applied, because it collides with 'ExtendRelationsTrait'
Environment
Laravel Version: 7.25.0 Laravel Model Caching Package Version: 0.10.1 PHP Version: 7.4.9 Operating System & Version: 7.4.9