- Dropped support for Laravel 10 and PHP 8.1
- Added support for Laravel 12
Breaking Changes
The $allowedTypes
static property is now typed:
class People extends TypedCollection
{
- protected static $allowedTypes = [Person::class];
+ protected static array $allowedTypes = [Person::class];
}
If you're using PHPStan, you will need to add annotations accordingly
+ /**
+ * @extends TypedCollection<array-key, int|string|Person>
+ */
class MixedItemCollection extends TypedCollection
{
protected static array $allowedTypes = ['int', 'string', Person::class];
}