Skip to content
Esc
↑↓navigate↵open⌘Jpreview
On this page

lint/laravel-10

Upgrade to Laravel 10: code a newer Laravel removes, deprecates or does better.

no-expression-string-cast

Convert DB Expression string casts to getValue() method calls.

Not in any preset. In Rector’s rector-laravel/laravel-100, rector-laravel/up-to-laravel-100, rector-laravel/up-to-laravel-110, rector-laravel/up-to-laravel-120, rector-laravel/up-to-laravel-130, rector-laravel/up-to-laravel-130-without-attributes sets. Needs the laravel extension. Unsafe fix: it can change behavior.

no-expression-to-string

Convert DB Expression __toString() calls to getValue() method calls.

Not in any preset. In Rector’s rector-laravel/laravel-100, rector-laravel/up-to-laravel-100, rector-laravel/up-to-laravel-110, rector-laravel/up-to-laravel-120, rector-laravel/up-to-laravel-130, rector-laravel/up-to-laravel-130-without-attributes sets. Needs the laravel extension. Unsafe fix: it can change behavior.

prefer-assert-sent-times

Replace assertTimesSent with assertSentTimes

Not in any preset. In Rector’s rector-laravel/laravel-100, rector-laravel/up-to-laravel-100, rector-laravel/up-to-laravel-110, rector-laravel/up-to-laravel-120, rector-laravel/up-to-laravel-130, rector-laravel/up-to-laravel-130-without-attributes sets. Needs the laravel extension. Safe fix.

prefer-date-casts

Unify Model $dates property with $casts

Not in any preset. In Rector’s rector-laravel/laravel-100, rector-laravel/up-to-laravel-100, rector-laravel/up-to-laravel-110, rector-laravel/up-to-laravel-120, rector-laravel/up-to-laravel-130, rector-laravel/up-to-laravel-130-without-attributes sets. Needs the laravel extension. Unsafe fix: it can change behavior.

prefer-dispatch-sync

Dispatch non ShouldQueue jobs to dispatchSync

Not in any preset. In Rector’s rector-laravel/laravel-100, rector-laravel/up-to-laravel-100, rector-laravel/up-to-laravel-110, rector-laravel/up-to-laravel-120, rector-laravel/up-to-laravel-130, rector-laravel/up-to-laravel-130-without-attributes sets. Needs the laravel extension. Unsafe fix: it can change behavior.

prefer-facade-fake

Replace withoutJobs, withoutEvents and withoutNotifications with Facade fake

Not in any preset. In Rector’s rector-laravel/laravel-100, rector-laravel/up-to-laravel-100, rector-laravel/up-to-laravel-110, rector-laravel/up-to-laravel-120, rector-laravel/up-to-laravel-130, rector-laravel/up-to-laravel-130-without-attributes sets. Needs the laravel extension. Unsafe fix: it can change behavior.

prefer-fake-over-expects

Replace expectJobs and expectEvents methods in tests

Not in any preset. In Rector’s rector-laravel/laravel-100, rector-laravel/up-to-laravel-100, rector-laravel/up-to-laravel-110, rector-laravel/up-to-laravel-120, rector-laravel/up-to-laravel-130, rector-laravel/up-to-laravel-130-without-attributes sets. Needs the laravel extension. Unsafe fix: it can change behavior.

Last updated on

Was this page helpful?