Closed eigan closed 1 year ago
HI @eigan,
Do you guys have timeframe for supporting L10 and DBAL 3 ?
Please, add Laravel 10 support
Is there anything we can do to help this happening and speed things up?
You can use DBAL 3 with "laravel-doctrine/orm": "^2@dev",
and "laravel-doctrine/migrations": "^3@dev",
. We have done so for a while in production. Feel free to open a PR with support for Laravel 10 targeting the 2.0 branch
I've opened PRs to allow Laravel10 with laravel-doctrine/orm v2 in orm, migrations, extensions.
worked fined in my project :smile:
Hi Team, Any specific timeline to support laravel 10 and doctrine 3
@yemkareems See my comment https://github.com/laravel-doctrine/orm/issues/542#issuecomment-1638001636
@eigan When i use "laravel-doctrine/orm": "^2@dev" with "doctrine/dbal": "3.6.5" i get Doctrine\DBAL\DriverManager::getConnection(): Argument #1 ($params) must be of type array, Doctrine\DBAL\Connection given, called in vendor/laravel-doctrine/orm/src/EntityManagerFactory.php on line 129. Also if i try to use 3.4.0 doctrine/dbal i get setSchemaManagerFactory undefined. So not sure what is the right combination of the doctrine/dbal and laravel-doctrine/orm to use to get it to work without errors
@patrickbrouwers : So how do we continue? I see a checklist in the issue description, but apparently projects are already using Laravel 10 with 2@dev in production as per @eigan .
It seems to me that 2.0 could be released by now? Or how can I/we/someone help? Maybe it's just fine to postpone the last b/c break discussion to a later point?
I think 2.0 should be released by now
I've been using 2@dev without any issues so far. One exception is on phpstan / phpstan-doctrine.
Since upgrade to Laravel 10 and laravel-doctrine 2@dev I've started to receive phpstan messages about createQueryBuilder()
method.
phpstan: Call to an undefined method Doctrine\Persistence\ObjectRepository::createQueryBuilder().
Doing the same thing as above but with usage of app('em')
instead of EntityManager
facade seems to be ok:
app('em')->getRepository(Companies::class)->createQueryBuilder('c')
Problem seems to happen with these versions:
phpstan/phpstan - 1.8.11
phpstan/phpstan-doctrine - 1.3.28
laravel-doctrine/extensions - 1.6.0
laravel-doctrine/orm - 2.0.0
laravel/framework - v10.28.0
but not with these:
phpstan/phpstan - 1.8.11
phpstan/phpstan-doctrine - 1.3.28
laravel-doctrine/extensions - 1.5.4
laravel-doctrine/orm - 1.7.13
laravel/framework - v8.83.27
So far I wasn't able to isolate the cause. I've only found that changing line 19 in Facades/EntityManager.php helps:
// From
* @method static \Doctrine\Persistence\ObjectRepository getRepository(string $className)
// To
* @method static \Doctrine\ORM\EntityRepository getRepository(string $className)
Should I open new issue related to laravel-doctrine 2.0 ?
@soltmar Seems like using EntityRepository as return is the correct solution. Open PR?
Opened one here https://github.com/laravel-doctrine/orm/pull/566
Support 2.0 in all laravel-doctrine packages
Is there still any plans to add support of this version to laravel-doctrine/fluent?
Tracking issue for everything related to laravel-doctrine 2.0