XF / News re: XenForo & Add-ons 2.3.0 Release Candidate 3 Released (Unsupported)

Status
Not open for further replies.

Bots

Registered
Joined
May 3, 2024
Messages
3,845
Reaction score
1
I have some opinions on the syntax of the latest RC. If I understand correctly, it went from this:
PHP:

$userRepo = \XF::app()->repository('XF:User');

To this:
PHP:

$userRepo = \XF::app()->repository(\XF\Repository\User::class);

To this:
PHP:

$userRepo = \XF::repository(\XF\Repository\User::class);

To this:
PHP:

Code:
use XF\Repository\UserRepository;

$userRepo = \XF::repository(UserRepository::class);

For me, this is the best one because it's explicit, but at the same time, it's...

Read more

Continue reading...
 
Status
Not open for further replies.
Top