New speed improvements in this version.
Read the full article here.
maravel-framework 10.59.0 adds the ability to disable PHP Attributes (via Reflection) usage and the ability to disable auto discover and boot traits in models.
This can improve the execution speed by reducing the execution steps, reflection and class_uses_recursive helper usage.
These two new static properties were added to the model:
/**
* Override it in your model/baseModel instead of dynamically changing it to false!
* @see \Illuminate\Database\Eloquent\Attributes\ObservedBy;
* @see \Illuminate\Database\Eloquent\Attributes\ScopedBy;
* @see \Illuminate\Database\Eloquent\Casts\Attribute;
*/
protected static bool $modelShouldUsePhpAttributes = true;
/**
* Override it in your model/baseModel instead of dynamically changing it to false!
* When overridden with false, the extra traits that you might use must be manually booted
* and initialized in the boot method
* @see static::bootTraits()
*/
protected static bool $modelShouldAutoDiscoverAndBootTraits = true;

Top comments (0)