Skip to content

8.x upgrade to 9.x upgrade breaks migration creation when migration stubs use the class placeholder #42030

@shortontech

Description

@shortontech
  • Laravel Version: 9.8.1
  • PHP Version: 8.1.1
  • Database Driver & Version: MySQL Community Server - GPL 8.0.27

Description:

I recently upgraded from 8.x to the most recent version of laravel/framework, and I was attempting to create database migrations using the make:migration command, however after it succeeded, I was getting a syntax error surrounding my migration, which attempts declares a class named "{{ class }}".

MigrationCreator is no longer replacing the class placeholder, which means for those of us with stubs published before 8.37.0, this change is breaking, but isn't mentioned as a possible breaking change in the upgrade guide.

I've updated both of my migration stubs, so I don't need support to resolve any issue, I'm just reporting so that either the documentation can be fixed, or the changes made to MigrationCreator can be reversed.

Steps To Reproduce:

  1. Have an existing instance of Laravel v8.x
  2. Run artisan stub:publish or have the stubs already published.
  3. Upgrade to the Laravel v9
  4. Use the make:migration command to create a database migration

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions