1

Is it possible to use Bake to generate basic CRUD views formatted in the Twig standard? I'm converting my templates generated by Bake manually and it's a lot of work. I'm using CakePHP 4.0.3 in my project and the "TwigView plugin" from cakephp/twig-view.

Note: In cakephp/legacy-twig-view this can be done with the following command:

bin/cake bake twig_template Tasks all -t WyriHaximus/TwigView
godzill4
  • 25
  • 5

1 Answers1

2

At the moment, this only works with Bake 1.x and CakePHP 3.x.

wyrihaximus/twig-view (legacy-twig-view) would extend the Bake template shell task which generated twig templates for the CRUD view. However, this was broken when Bake converted all legacy shell tasks to new commands for 2.0.

The new cakephp/twig-view does not fallback to non-twig .php templates. This meant fixing and updating this would be more work. Unfortunately, without knowing if any users relied on this (currently) broken feature it was cut.

Extending another plugin's shell tasks or commands can be risky due because there is no support for that api.

Corey Taylor
  • 635
  • 5
  • 12