magento / magento/magento2-phpstorm-plugin

Add possibility to call core functions in custom code and automate the import process

Open
#547 2 comments 3 reactions 0 assignees View on GitHub
Award: test coverage Complex Expert feature request
Dominant language
Java
Stars
463
Forks
98
Avg merge
1h 6m
Merged PRs (30d)
3

Description

**Is your feature request related to a problem? Please describe.**
I often have the following workflow:

- I need a specific functionality from the core in my custom code
- So I browse through the core modules until I found what I need, and now I need to import the class into my custom class
- Currently, I'm now copying the fully qualified name of the class, include it manually in my constructor, initialize the property and then go to the spot where I actually need the functionality and call my found function.
- This is a lot of manual work...

**Describe the solution you'd like** (*)

It would be awesome to have some kind of automatic copy/paste functionality for this issue.
So I would love to have a custom copy shortcut, which I can use while I'm in the function which I want to import.
Then I go back to my custom class and paste it.
The class then gets automatically added to my constructor, the property is initialized and my function is directly called. This would save a lot of time.

Contributor guide

Open the contributing guide

Research direction

No files, tests, or entry points are named. Begin by locating how the plugin handles custom shortcuts and PHP code generation, then define done as a shortcut that adds the selected core class to the custom class constructor, initializes its property, and inserts the function call.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, php
Domain
developer-experience, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.