Bake Command Not Overwriting

Hi,

I am on Cakephp 4.4 and when running the bake model command, it does not overwrite the files. Upon double-checking, the old files were not updated.

Is my ‘-f’ (force) option usage correct ?

bin/cake bake model  Workers  -f   --no-test --no-fixture
One moment while associations are detected.

Baking table class for Workers...
Skipping update to `/var/www/html/giat/src/Model/Table/WorkersTable.php`. It already exists and would not change.

Baking entity class for Worker...
Skipping update to `/var/www/html/giat/src/Model/Entity/Worker.php`. It already exists and would not change.


That messages appears if the generated content for your model file is identical to what is already present.

So “forcing” doesn’t do anything here because nothing would change anyway.

1 Like