-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
Hi.
Thanks for this brilliant extension first of all.
I'm working with project where all Models don't have Model suffix. Like described in the official documentation (https://book.cakephp.org/2/en/models.html#understanding-models)
So in case we have Component and Model with the same name it leads to Call to an undefined method BasicComponent::some_method.
Code sample:
<?php
class BasicComponent extends Component {}<?php
class Basic extends Model
{
public function some_method()
{
}
}<?php
class FakeController extends Controller
{
public $uses = [
'Basic',
];
public function add_smth()
{
$this->Basic->some_method();
}
}As I can see component service is setup first so probably it found BasicComponent and tries to look method inside of it only and doesn't take into account that models is also exists.
Metadata
Metadata
Assignees
Labels
No labels