Skip to content

Migration generation fails when placing it outside the default app path #2275

Description

@sjorsvanleeuwen

Tempest version

3.0

PHP version

8.5

Operating system

macOS

Description

Not sure if it's an actual bug or just being a noob who just started with Tempest.

In my composer.json i have the following namespace configurations:

"autoload": {
        "psr-4": {
            "App\\": "app/",
            "Migrations\\": "migrations/"
        }
    },
    "autoload-dev": {
        "psr-4": {
            "Tests\\": "tests/"
        }
    },

I'm using the default make migration command and get the following output:

php tempest make:migration create_biomes_table                                                                                                                     16:52:22

  │ Choose the migration type
  │ ✓ class

  │ Enter the table name
  │ ✓ biomes

  │ Is this an alteration?
  │ × No

  │ Where do you want to save the file CreateBiomesTable?
  │ ✓ migrations/CreateBiomesTable.php
× // The file could not be written. The path `/Users/{myname}/Projects/{myprojectname}/migrations/CreateBiomesTable.php` could not be mapped to a namespace.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions