Written by James McDonald

June 1, 2022

If you try the bin/cake bake policy command and get “Could not find a task named policy.”

bin/cake bake policy
Could not find a task named `policy`.

Make sure CakePHP Authorization is installed and then add the following to src/Application.php

    public function bootstrap(): void
        // Call parent to load bootstrap from files.

        // other code here

        // Load more plugins here


Try again and you are good to go

bin/cake bake policy
# output
You must provide a name to bake a policy

bin/cake bake policy DebugKitAuthBypass      

Creating file C:\dev\cake-auth\src\Policy\DebugKitAuthBypassPolicy.php
Wrote `C:\dev\cake-auth\src\Policy\DebugKitAuthBypassPolicy.php`


Submit a Comment

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

The reCAPTCHA verification period has expired. Please reload the page.

You May Also Like…

Meraki Open Source Licenses

Until today I assumed that Meraki was built in-house with only closed source software. But having a look at the...


If you have Veeam backup failing with the Updating BCD failed with Cannot update SafeBoot flag and SentinelOne is...