---
title: "lint/laravel-8"
pagination: false
---

{/* Generated by scripts/gen-rule-docs.py. Edit mapping.toml, not this file. */}

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

**[add-parent-register-call](/docs/rules/lint/laravel-8/add-parent-register-call)**

Add parent::register(); call to register() class method in child of Illuminate\Foundation\Support\Providers\EventServiceProvider

Not in any preset. In Rector's `rector-laravel/laravel-80`, `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`, `rector-laravel/up-to-laravel-80`, `rector-laravel/up-to-laravel-90` sets. Needs the `laravel` extension. Unsafe fix: it can change behavior.

**[prefer-factory-classes](/docs/rules/lint/laravel-8/prefer-factory-classes)**

Upgrade legacy factories to support classes.

Not in any preset. In Rector's `rector-laravel/laravel-legacy-factories-to-classes` set. Needs the `laravel` extension. Unsafe fix: it can change behavior.

**[prefer-factory-state-methods](/docs/rules/lint/laravel-8/prefer-factory-state-methods)**

Call the state methods directly instead of specify the name of state.

Not in any preset. In Rector's `rector-laravel/laravel-legacy-factories-to-classes` set. Needs the `laravel` extension. Unsafe fix: it can change behavior.

**[prefer-model-factory-method](/docs/rules/lint/laravel-8/prefer-model-factory-method)**

Use the static factory method instead of global factory function.

Not in any preset. In Rector's `rector-laravel/laravel-legacy-factories-to-classes` set. Needs the `laravel` extension. Unsafe fix: it can change behavior.
