0
votes

I recently created a fresh Laravel Spark project following the official documentation.

This set the version constraint for laravel/spark to *@dev.

Now, PhpStorm warns:

The version constraint has no upper bound – this is not a good idea. See https://getcomposer.org/doc/faqs/why-are-unbound-version-constraints-a-bad-idea.md for more information.Composer warning screenshot

I'm planning to change the version constraint to ^4.0 in order to not get any breaking changes when running composer update.

However, before doing so, I'd like to know why Spark has an unbound version constraint by default.

1

1 Answers

0
votes

You should ask that question of the Laravel/spark team. I would suggest however that it was probably documented that way erroneously. It's not uncommon for developers working at the head of a project line to simply take the latest of everything they depend on, barring any known reasons not to, while planning to fix or roll-back any issues as they are discovered.

When following examples in technical documentation, one should probably be on look-out for cut-and-paste content that a developer might have forgotten to clean-up for external consumption.