Skip to content

Conversation

@smirgol
Copy link

@smirgol smirgol commented Oct 27, 2025

When using makeInstance() to get the UserRepository in getCurrentUser(), the inject methods (like injectPersistenceManager) might not get called under certain circumstances in TYPO3 v13.

This can cause "Typed property Repository::$persistenceManager must not be accessed before initialization" errors when the repository is used.

Changed to use container->get() instead of makeInstance() which ensures proper dependency injection.

Tested with TYPO3 v13.4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant