Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extbase method injection replacer for @inject not working anymore #329

Open
sevenflip opened this issue Sep 8, 2020 · 1 comment
Open

Comments

@sevenflip
Copy link

sevenflip commented Sep 8, 2020

For PhpStorm 2020.2.1 (Build #PS-202.6948.87, built on August 27, 2020)

When using the "Refactor to method injection" function on a property like this will result in a weird result:

/**
 * @var \MyNamespace\MyExtension\Domain\Repository\PageRepository
 * @inject
 */
protected $pageRepository;

Result:

public function injectPageRepository(#M#C\TYPO3\CMS\Extbase\Object\ObjectManagerInterface.get|#M#M#C\TYPO3\CMS\Core\Utility\GeneralUtility.makeInstance.get|#M#ȅ#M#C\TYPO3\CMS\Core\Utility\GeneralUtility.makeInstance%#K#C\TYPO3\CMS\Extbase\Object\ObjectManager.class.get|#M#π#M#C\TYPO3\CMS\Core\Utility\GeneralUtility.makeInstance≥\TYPO3\CMS\Extbase\Object\ObjectManager.get|#M#π#P#C\MyNamespace\MyExtension\Controller\SeoController.objectManager≥ø.get|#ȕ#M#C\TYPO3\CMS\Extbase\Object\ObjectManagerInterface.get|#M#π#P#C\MyNamespace\MyExtension\Controller\SeoController.objectManager≥ø.get|#M#π#M#C\TYPO3\CMS\Core\Utility\GeneralUtility.makeInstance≥\TYPO3\CMS\Extbase\Object\ObjectManager.get|#M#M#C\TYPO3\CMS\Core\Utility\GeneralUtility.makeInstance.get|#M#ȅ#M#C\TYPO3\CMS\Core\Utility\GeneralUtility.makeInstance%#K#C\TYPO3\CMS\Extbase\Object\ObjectManager.class.get%#K#C\MyNamespace\MyExtension\Domain\Repository\PageRepository.class|#Ɩ#M#C\TYPO3\CMS\Extbase\Object\ObjectManagerInterface.get|#M#π#P#C\MyNamespace\MyExtension\Controller\SeoController.objectManager≥ø.get|#M#π#M#C\TYPO3\CMS\Core\Utility\GeneralUtility.makeInstance≥\TYPO3\CMS\Extbase\Object\ObjectManager.get|#M#M#C\TYPO3\CMS\Core\Utility\GeneralUtility.makeInstance.get|#M#ȅ#M#C\TYPO3\CMS\Core\Utility\GeneralUtility.makeInstance%#K#C\TYPO3\CMS\Extbase\Object\ObjectManager.class.getƕ0ƀ#K#C\MyNamespace\MyExtension\Domain\Repository\PageRepository.class|\MyNamespace\MyExtension\Domain\Repository\PageRepository|? $pageRepository) {
        $this
@vertexvaar
Copy link

Hint: You can use https://github.com/sabbelasichon/typo3-rector as an alternative to refactor your code until this is fixed 😉

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

No branches or pull requests

2 participants