Testbench factory issues #98
-
Firstly - thank you for a great video course and awesome skeleton to fast track package development! I know the soucre code is slightly ahead of the tutorial videos, so I am not sure if the issue I experience at the moment is an issue on the skeleton package or not, so I will just pose as a general question. I am trying to set up the workflow tests to include PHP7 and 8 and Laravel 7 and 8. However - even if I follow the instructions to include testbench 6 and 5 respectively, my test cases always fail for Laravel 7 with the following message:
If I remove laravel 7 from the run-test.yml then all tests execute fine. This seems to be related to some closed issue https://github.com/spatie/package-skeleton-laravel/issues/66 Since testing Laravel 7 and 8 would be such a common use case I just wanted to check if there are any known issues? If I can be pointed at an example minimum config of composer.json and run-tests.yml for laravel 8 and 7 (which I assume would be the most common configuration for new package development anyway?), I would be very grateful. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi, Thanks for the kind words on the course. The skeleton always tries to use the latest and greatest features of Laravel. In this case we wanted to make using Laravel 8's factories as easy as possible. This means that it our skeleton is not compatible with Laravel 7 out of the box. If you want L7 compatibility, you should strip out everything that uses L8's factories and use the L7 style factories. If you want an older version of the package, could through the commit history of the skeleton and pick a commit that was before L8's release. |
Beta Was this translation helpful? Give feedback.
Hi,
Thanks for the kind words on the course.
The skeleton always tries to use the latest and greatest features of Laravel. In this case we wanted to make using Laravel 8's factories as easy as possible. This means that it our skeleton is not compatible with Laravel 7 out of the box.
If you want L7 compatibility, you should strip out everything that uses L8's factories and use the L7 style factories.
If you want an older version of the package, could through the commit history of the skeleton and pick a commit that was before L8's release.