DEV Community

tarohida
tarohida

Posted on

How to fix wrong mapping of namespace in PhpStorm

Problems

PhpStorm mapped directories to wrong namespace.

I updated composer.json, but it won't work.

I ran composer install|update|dump-autoload, but it also won't work.

How to solve

I could fix mapping of namespace and directories with this instruction.

Configure PHP namespaces in a project | PhpStorm

Environment

  • PhpStorm 2021.1.4

Discussion (0)