cycle / database

Database Abstraction Layer, Schema Introspection, Schema Generation, Query Builders
MIT License
54 stars 23 forks source link

[Bug]: AbstractLoader::JOIN (or LEFT_JOIN) for public use #202

Open gam6itko opened 4 months ago

gam6itko commented 4 months ago

No duplicates 🥲.

Describe the bug

I often use constructions like

$select = $this->getOrm()->getRepository(Country::class)
    ->select()
    ->with('translation', [
        'as' => 'trans',
        'method' => JoinableLoader::LEFT_JOIN, //internal
        'where' => [
            'locale_id' => 1,
        ],
]);

but the psalm generates errors

 InternalClass - App\MyClass.php:164:34 - Cycle\ORM\Select\JoinableLoader is internal to Cycle but called from App\MyClass (see https://psalm.dev/174)

Pleas make not internal constant which I use without psalm errors.

Is this a regression?

No

To Reproduce

see above

Expected behaviour

see above

Media prove

No response

Database

MySQL

Your environment

No response

Additional context

No response