Skip to content

New --types flag behavior breaks Laravel convention #879

@jstoks

Description

@jstoks

Ziggy version

v2.6.1

Laravel version

v12.53.0

Description

The new behavior of the --types flag breaks previously working code and the convention described in the Laravel documentation from executing an artisan command programmatically with a boolean flag.

This is the example code:

$exitCode = Artisan::call('migrate:refresh', [
    '--force' => true,
]);

When the command is executed like this true ends up being coerced into a 1 and that becomes the name of the types file.

Ziggy call and context

// Called from within another artisan command
$this->call('ziggy:generate', ['--types' => true]);

// This works but is not intuitive
$this->call('ziggy:generate', ['--types' => null]);

Ziggy configuration

n/a

Route definition

n/a

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