Skip to content

ObjectMetadataResolver::loadObjectManager not supporting Doctrine\ORM\EntityManager #130

Closed
@hwmatthewa

Description

@hwmatthewa
In ObjectMetadataResolver.php line 69:

  [TypeError]
  Return value of PHPStan\Type\Doctrine\ObjectMetadataResolver::loadObjectMan
  ager() must be an instance of Doctrine\Common\Persistence\ObjectManager or
  null, instance of Doctrine\ORM\EntityManager returned

object-manager.php:

<?php

use Windy\Utility\DB\DB;

require '../hwinit.php';

return DB::get('MainDB')->getEM();

getEM() method:

abstract public function getEM(): EntityManager;

Returning an EntityManager worked previously. Was something changed to make this incompatible?

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