-
-
Notifications
You must be signed in to change notification settings - Fork 192
Open
Description
the MR #987 which would fix exactly this problem was not merged. i have exactly the problem described in this MR, if you structrue you code in an additional src
dir the namespace calculation is broken
path: /projects/entity-loader-bundle
├── wiki
| └── ...
├── doc
├── entity-read-notes.md
├── src
| ├── codeception.yml
| ├── composer.json
| ├── composer.lock
| ├── composer.yaml
| ├── config
| ├── docs
| ├── LICENSE
| ├── phpstan.neon
| ├── README.md
| ├── RoboFile.php
| ├── src
| ├── tests
| └── vendor
├── tmp
| ├── Content
| └── services.yaml
where i use the additional level to have for e.g. an additional tmp dir or for cloning two branches of my bundle at the same time, or for cloning the gitlab wiki repo, the namespace detection is broken.
my path is
/projects/entity-loader-bundle/src/src/C33sEntityLoaderBundle.php
where the config files resides in
/projects/entity-loader-bundle/src/
having this config (exactly like in the composer autoload section)
<rule ref="SlevomatCodingStandard.Files.TypeNameMatchesFileName">
<properties>
<property name="rootNamespaces" type="array">
<element key="src" value="C33s\Bundle\EntityLoaderBundle"/>
</property>
</properties>
<exclude-pattern>/Robofile.php</exclude-pattern>
</rule>
i get (\SlevomatCodingStandard\Sniffs\Files\TypeNameMatchesFileNameSniff
):
$expectedTypeName "C33s\Bundle\EntityLoaderBundle\src\C33sEntityLoaderBundle"
$typeName "C33s\Bundle\EntityLoaderBundle\C33sEntityLoaderBundle"
Metadata
Metadata
Assignees
Labels
No labels