PhpStorm tells me: “Namespace name doesn’t match PSR 0/PSR 4 project structure”

If you use composer the more recent answer to synchronize with composer is a better option.


PSR-4 namespace roots can specify a prefix which can be configured.

Here is the process:

  1. Find the root of your namespace e.g src.
  2. right click Mark Directory as Sources Root.
  3. Menu -> File -> Settings -> Directories.
  4. Click the pencil icon or p^ next to your Sources Root.
  5. Enter the namespace prefix.

See PHPStorm configuring PHP namespaces

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)