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

[Magento2] Add autocomplete for helper classes and helper methods #224

Closed
Koc opened this issue Jan 6, 2017 · 6 comments
Closed

[Magento2] Add autocomplete for helper classes and helper methods #224

Koc opened this issue Jan 6, 2017 · 6 comments

Comments

@Koc
Copy link

Koc commented Jan 6, 2017

<?php /* @var $block \Magento\Catalog\Block\Product\View\Description */ ?>

<?php $_helper = $this->helper('<add autocomplete here, please>'); ?>
<?php $_helper-> <add autocomplete here, please> ?>
@enriquepiatti
Copy link
Owner

I've added the type recognition (v1.2.0) for helpers and object managers, but not sure if we need or is even a good idea to add autocomplete for those strings, the idea is to avoid using the object manager directly in Magento2 (even when they are using in their code, but they are trying to move all those lines to DI too)

@Koc
Copy link
Author

Koc commented Jan 21, 2017

helper methods autocompletes ok, but helper classes not autocompletes (like in #218)

@enriquepiatti
Copy link
Owner

same comment in #218 :)

@Koc
Copy link
Author

Koc commented Jan 23, 2017

it used in some original magento phtml templates and useful for some simple changes in theme templates

@enriquepiatti
Copy link
Owner

yes, it is used by Magento original files (and the team from Magento are saying this is a bad practice, they will change this in the future probably). But that's why I think is ok to have the type recognition (because there is code already using Object Manager directly) but is not needed the autocomplete because we should not write new code in that way.

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