laravel / pennant

A simple, lightweight library for managing feature flags.
https://laravel.com/docs/pennant
MIT License
482 stars 49 forks source link

[1.x] Extract insert all #105

Closed timacdonald closed 6 months ago

timacdonald commented 6 months ago

This PR extracts an insertMany method to make extending the database driver easier.

Some of the community (https://github.com/laravel/pennant/pull/104#issuecomment-2135085391, https://github.com/laravel/pennant/issues/100) are extending the driver to add custom fields to the features table. With the recent changes unique constraint handling (https://github.com/laravel/pennant/pull/104) we introduced a new insert query that is not able to be intercepted in an extended class.

This PR extracts the query out to an insertMany method to make it easier to intercept and decorate.

Additionally it: