# PHP Namespace Resolver

> Imports, expands, sorts and cleans up PHP use statements in VS Code

Source: https://talira.ai/catalog/php-namespace-resolver-vcajk45q
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Plugin
- Categories: [developer tools / editors](https://talira.ai/categories/developer-tools/editors)
- Licence: MIT[^2]
- Pricing: Free and open source[^1]
- Pricing notes: Free and open source.
- Free tier: yes[^1]
- Backed by: [Mehedi Hasan](https://talira.ai/orgs/mehedidracula.md)
- Extends: [VS Code](https://talira.ai/ecosystems/vscode.md#ext-3rrpcr27)

A VS Code extension for [PHP](https://talira.ai/catalog/php-xgsnpvzp.md) that manages use statements: it imports a class or every unresolved class at once, expands a short class name to its fully qualified name, sorts imports by length, alphabetically or naturally, removes unused ones and generates a PSR-4 or PSR-0 namespace from the file's path and composer.json. Unimported classes show as warnings and unused imports as hints, with quick fixes. It understands PHP 8 syntax (union and intersection types, constructor promotion, attributes, enums) and keeps a cached index of the workspace's classes. MIT licensed.

## Links

- GitHub: https://github.com/MehediDracula/PHP-Namespace-Resolver

## Problems it solves

- add PHP use statements automatically in VS Code
- clean up unused imports in my PHP files
- fix the namespace at the top of a new PHP file from its folder

## Features

- imports one class or every unresolved class
- expands short class names to fully qualified names
- sorts and removes unused use statements
- generates PSR-4 or PSR-0 namespaces from composer.json
- warnings and quick fixes for unimported and unused classes

## Trust

Overall: 0.29 out of 1.
Signals: maintenance 0.27, adoption 0.43, momentum 0.11, community 0.52, backing 0.30, extensibility 0.00.

- latest release v2.1.3 9 months ago
- 143 GitHub stars
- 19 contributors
- backed by Mehedi Hasan

Warnings:

- last commit 9 months ago

## Alternatives

- [PHP Tools](https://talira.ai/catalog/php-tools-fhnnp5z6.md): A full PHP IDE inside VS Code and Visual Studio

## Sources

[^1]: https://github.com/MehediDracula/PHP-Namespace-Resolver (checked 24 Nov 2026)
[^2]: https://github.com/MehediDracula/PHP-Namespace-Resolver/blob/master/LICENSE (checked 24 Nov 2026)
