After a composer update the https://github.com/owen-it/laravel-auditing/releases/tag/v13.6.6 version is retrieved. Running laravel gives: DEPRECATED Accessing static trait property OwenIt\Auditing\Audit::$auditingDisabled is deprecated, it should only be accessed on a class using the trait in vendor/owen-it/laravel-auditing/src/Auditable.php on line 262.
PHP Version
8.3
Laravel Version
10.48
Package Version
13.6.6
Description
After a
composer update
the https://github.com/owen-it/laravel-auditing/releases/tag/v13.6.6 version is retrieved. Running laravel gives:DEPRECATED Accessing static trait property OwenIt\Auditing\Audit::$auditingDisabled is deprecated, it should only be accessed on a class using the trait in vendor/owen-it/laravel-auditing/src/Auditable.php on line 262.
See https://github.com/owen-it/laravel-auditing/compare/v13.6.5...v13.6.6
The new codechange:
is valid php code - for now. But it's already deprecated. I suppose new code should not utilise deprecated code?
Steps To Reproduce
Mutate an entity with the
Auditable
trait to the databasePossible Solutions
Instead of placing the static property on a trait, it could be applied to an
AuditState
class containing the static property?That way
withoutAuditing
can use that class to check if Audit is globally active