Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--realpath option on artisan migrate [L5.5] does not exist #213

Closed
andrewmclagan opened this issue Mar 5, 2018 · 8 comments
Closed

--realpath option on artisan migrate [L5.5] does not exist #213

andrewmclagan opened this issue Mar 5, 2018 · 8 comments

Comments

@andrewmclagan
Copy link
Contributor

andrewmclagan commented Mar 5, 2018

There are allot of issues stating this with a

"Read the docs"

comment.

After investigation and installing version 3.5.x of this package corresponding to laravel 5.5.x and looking at the internals of the Illuminate\Database\Console\Migrations\Migrate command. There really is no --realpath option for artisan migrate.

From Illuminate\Database\Console\Migrations\Migrate

    protected $signature = 'migrate {--database= : The database connection to use.}
                {--force : Force the operation to run when in production.}
                {--path= : The path of migrations files to be executed.}
                {--pretend : Dump the SQL queries that would be run.}
                {--seed : Indicates if the seed task should be re-run.}
                {--step : Force the migrations to be run so they can be rolled back individually.}';

and from Orchestra\Testbench\Concerns\WithLoadMigrationsFrom

        $options = is_array($realpath) ? $realpath : ['--realpath' => $realpath];

        $this->artisan('migrate', $options);

Unless of course you are overriding this command, which I doubt.

@andrewmclagan
Copy link
Contributor Author

andrewmclagan commented Mar 5, 2018

Whooops you have a typo in your docs namespace on 3.5.x

Orchestra\Database\ConsoleServiceProvider\ConsoleServiceProvider::class,

should be

Orchestra\Database\ConsoleServiceProvider::class,

Thus this issue would be from that being silently swallowed and never reported.

@andrewmclagan
Copy link
Contributor Author

Wrote up a PR

#214

@jshayes
Copy link

jshayes commented Apr 20, 2018

I just ran into this issue. Seems like the Orchestra\Testbench\Concerns\WithLoadMigrationsFrom trait in version 3.5.x does not work with Laravel 5.5. From what I can see, --realpath was introduced in Laravel 5.6

@andrewmclagan
Copy link
Contributor Author

@jshayes No it works. Read this issue and the related PR. All the info is there and in the documentation.

@jshayes
Copy link

jshayes commented May 1, 2018

@andrewmclagan Ah, you're right. My test case was missing the getPackageProviders method, adding it fixed the problem.

Thanks.

@andrewmclagan
Copy link
Contributor Author

andrewmclagan commented May 2, 2018

Yeah i think it needs better documenting. I had the same issue.

@crynobone
Copy link
Member

Yeah i think it needs better documenting. I had the same issue.

Not worth it, --realpath is available with Laravel 5.6 and therefore there no reason to have orchestra/database as you would need in earlier versions.

@spawnia
Copy link

spawnia commented Sep 25, 2018

This describes how to resolve the issue when using Laravel 5.5:

https://github.com/orchestral/testbench/tree/3.5#running-testing-migrations

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants