magento / magento/magento2-phpstorm-plugin
False Positives When Using Path Repositories - Observers & Plugins
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 463
- Forks
- 98
- Avg merge
- 1h 6m
- Merged PRs (30d)
- 3
Description
**Describe the bug** (*)
When using a path repository for development, you'll often have two directories containing the same code. One in your path (and project), and one in the vendor directory. When this happens, the plugin will flag false positives.
**To Reproduce** (*)
Steps to reproduce the behavior:
1. Include a Magento module with a Composer local path repository.
2. Add a plugin to any class.
3. Add an observer to any class.
**Expected behavior** (*)
No issues are reported for the plugin and for the observer.
**Screenshots**
Shamelessly taken from https://github.com/magento/magento2-phpstorm-plugin/issues/372:

**Please complete the following information:** (*)
- OS: Ubuntu Linux 22.04
- PhpStorm/Intellij version: 2023.1.2
- Plugin Version: 5.1.1
**Additional context**
The issue has already been reported in https://github.com/magento/magento2-phpstorm-plugin/issues/372 and closed, but it is not solved yet / was introduced again.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the false positives with a Magento module loaded through a Composer local path repository, then trace how the plugin handles observers and plugins when the same code exists in the project and vendor directories. Done means the reproduced observer and plugin report no issues in the stated PhpStorm and plugin versions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, php
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100