Skip to content

Internal error on find() #51

@dereuromark

Description

@dereuromark

When running current code on a project, I get

 Error                                                                                                                                                                                                          
 -- --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 
Internal error: Method findByUuid() was not found in reflection of class Cake\ORM\Table. while 
analysing file /.../src/Controller/ResidentDetailsController.php  

⚠️  Result is incomplete because of severe errors. ⚠️
   Fix these errors first and then re-run PHPStan
   to get all reported errors.

Code is

        /** @var \App\Model\Entity\Resident|null $data */
        $data = $this->ResidentDetails->Residents->findByUuid($residentUuid)
            ->first();

magic find calls should work, though, right?

The code contains 100+ of those. So I wonder why only 2 files issue this error..

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions