RSS Feed/News \XF::repository does not understand class aliases, breaking the invariant that a repository is created once

Status
Not open for further replies.

ENXF NET

Administrator
Staff member
Administrator
Moderator
+Lifetime VIP+
S.V.I.P.S Member
S.V.I.P Member
V.I.P Member
Collaborate
Registered
Joined
Nov 13, 2018
Messages
28,004
Points
823

Reputation:

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...
 
Status
Not open for further replies.
Top