Check your spelling mistake and save your life time.
Hi, I’m back the blog
Sometimes I see messages about “WTF, Could not load behavior by spelling mistake as Model::actAs. waste much time…” on the Twitter. Model::actsAs is correct.
I also did such spelling mistake, and wanted to die…
I want save time and make awesome plugin “cakephp-MissingDetect-Plugin“.
This plugin detects spelling mistake of property name as follow.
- Controller::helper ( helpers is correct)
- Controller::component (components is correct)
- Controller::use (uses is correct)
- Model::actAs (actsAs is correct)
If you write wrong property name as Controller::component, you can see alert messages on the top of screen as follow.

This plugin works only on the debug mode.
It’s easy to setup, please read the Readme.
https://github.com/ichikaway/cakephp-MissingDetect-Plugin




December 6th, 2011 at 6:20 pm
Good knowledge. I will promote this immediately.