cakephp / phinx

PHP Database Migrations for Everyone
https://phinx.org
MIT License
4.45k stars 895 forks source link

Fix docs example for migrate create #2284

Closed MasterOdin closed 2 months ago

MasterOdin commented 2 months ago

This reverts commit 1187a5b179ca080d228a7efc53167f4be5643a1a.

From https://github.com/cakephp/phinx/pull/2263#issuecomment-1919585724:

When you provide a class name, then we hit this line to get the filename:

https://github.com/cakephp/phinx/blob/5c28445848a1daba6883dd94f77c0feef0db3d28/src/Phinx/Console/Command/Create.php#L183

which per the comment:

https://github.com/cakephp/phinx/blob/5c28445848a1daba6883dd94f77c0feef0db3d28/src/Phinx/Util/Util.php#L103-L105

The tests for this function also back up the behavior here:

https://github.com/cakephp/phinx/blob/5c28445848a1daba6883dd94f77c0feef0db3d28/tests/Phinx/Util/UtilTest.php#L71-L86

I think the capitalization that the docs was changed to might be a cakephp/migrations thing and not what phinx itself does?

dereuromark commented 2 months ago

Interesting. Might be then yeah While it makes sense to have the name closer to the class name I guess this is a breaking change. Feel free to merge

MasterOdin commented 2 months ago

We could certainly make this a feature flag if it's desired behavior, though at that point, might be better to just go for filenames that adhere to PSR-4.