Tags: illuminate/database
Tags
Move Scope interface @template from method-level to class-level to fi… …x LSP violation (#59675) The previous method-level @template on apply() meant every implementation had to accept any Model subtype (∀TModel), making it impossible for user-defined scopes to narrow the model type without violating the Liskov Substitution Principle. Moving the template to the interface level allows implementations to bind a specific model via @implements Scope<T>.
[12.x] Use PDO subclass polyfill (#59640) * DRAFT: Bump symfony/polyfill-php8.4 to latest version * Simplify code by leveraging PDO subclass Symfony polyfill See also symfony/polyfill#549 * Apply suggestion from @crynobone * Apply suggestion from @crynobone --------- Co-authored-by: Mior Muhammad Zaki <[email protected]>
[12.x] Use PDO subclass polyfill (#59640) * DRAFT: Bump symfony/polyfill-php8.4 to latest version * Simplify code by leveraging PDO subclass Symfony polyfill See also symfony/polyfill#549 * Apply suggestion from @crynobone * Apply suggestion from @crynobone --------- Co-authored-by: Mior Muhammad Zaki <[email protected]>
prefer `isset()` over `in_array()` for better performance (#59457) the `class_uses_recursive()` method returns an array where both the key and value are the same fully qualified class name. by switching to `isset()` we get O(1) performance, while `in_array()` gives O(n) performance. - also remove some single use temporary variables - passes multiple arguments to `isset()` rather than multiple separate calls
Use Carbon::now() and Date::now() instead of now() helper (#59252) Co-authored-by: Lucas Michot <[email protected]>
Use Carbon::now() and Date::now() instead of now() helper (#59252) Co-authored-by: Lucas Michot <[email protected]>
PreviousNext