Solved \XF::repository does not understand class aliases, breaking the invariant that a repository is created once

This topic has been solved
X

Xon

Guest
If you call

PHP:

\XF::repository('XF:EmailBounce')
and then
PHP:

\XF::repository('XF\Repository\EmailBounceRepository')

This will result in two different repository objects, each with a different slot in the property $repositories in XF\Mvc\Entity\Manager.

The repository itself will have 'XF:EmailBounce' for both stored in the $identifier property on the repository.

PHP:

Code:
public function getRepository($identifier)
{
    $identifier =...

Read more

Continue reading...