When a schema fails because of the name, the error should display
the name & file name that it attempted to load. This gives people
a slightly better chance of figuring things out.
The option to sort has been removed and the list of shells is now
sorted and grouped by plugin and then by command.
Core and app shells are always listed last.
If a test is baked for a plugin - it should by default look for fixtures in the
same plugin, otherwise it creates potentially complex inter-plugin/app
dependencies.
Changed the text when the plugin already exists to indicate that the task stops
intentionally.
If there are folder errors - report them in the cli.
Choose the last plugin path by default
Modify the app's bootstrap file if it's not being (obviously) loaded already.
This means it is now possible to do:
Console/cake bake plugin MyPlugin
Console/cake bake model MyPlugin.MyModel
Previously the above would result in an error (which only if you know), you'd
fix by editing your Config/bootstrap.php file by hand before retrying to bake
your model.
if a controller has
public $uses => array('MyPlugin.MyModel')
in their controller - the bake controller task will fail because `$controller->MyPlugin.MyModel`
doesn't exist
Make the prompt display the paths that will be scanned. Hopefully
this makes the shell a bit easier to use and understand. Also
make the shell not accept 0 paths as a correct answer.
Fixes#2877
the $type is used to lookup in the $classTypes property what kind of
entity is being baked. if it's underscored, getRealClassName will bail
on it's first condition of "is it in the $classTypes property" producing
mostly useless test stubs for everything except models
When extracting model validation messages, Reflection::getFileName is used
to obtain the the model filename. The returned value is actual physical
path and may differ to what APP is. Adding the realpath(APP) to $paths
variable allows str_replace() to correctly generate the correct value for
$occurences.