doctrine / migrations

Doctrine Database Migrations Library
https://www.doctrine-project.org/projects/migrations.html
MIT License
4.69k stars 389 forks source link

escaped namespaces don't work in single quotes #1467

Open delboy1978uk opened 1 day ago

delboy1978uk commented 1 day ago

Bug Report

Q A
BC Break no
Version 3.8.2

Summary

The single quotes should be replaced by double quotes in the text output upon generating a migration diff, so that the pasted command does not fail due to the migration class not being found

Current behavior

The instructions for executing the migration uses single quotes:

image

When I copy paste as is, I get class not found.

image

If I change to using quotation marks ", it works:

image

How to reproduce

copy paste the execute down command and see if t runs

Expected behavior

It should run without failing

If you like, I can make the changes and send a PR.

greg0ire commented 1 day ago

If you like, I can make the changes and send a PR.

Please do :pray:

Another way to make it work might be to remove the double backslash and keep the single quotes.

stof commented 1 day ago

Given that single quotes don't work on Windows, I would suggest using double quotes in the command, to display a portable command.