magento / magento/magento-coding-standard

PHP imports

Open
#418 1 comment 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Progress: ready for grooming proposal
Dominant language
PHP
Stars
375
Forks
165
PR merge metrics
No merged PRs in 30d

Description

### Rule

All imports are effectively used.
All imports are sorted

### Reason

Usually after code refactoring, some imports are not necessary anymore and should be removed and re-sorted by the fixer.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files, tests, or entry points are named. Start by locating the existing import-related rules and fixer tests in the repository, then determine how unused imports and import ordering are currently handled. Done means imports are removed when unnecessary and consistently sorted after refactoring, with tests covering both behaviors.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.