You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Checking composer.json: OK
Checking platform settings: OK
Checking git settings: OK git version 2.39.3
Checking http connectivity to packagist: OK
Checking https connectivity to packagist: OK
Checking github.com rate limit: OK
Checking disk free space: OK
Checking pubkeys:
Tags Public Key Fingerprint: 57815BA2 7E54DC31 7ECC7CC5 573090D0 87719BA6 8F3BB723 4E5D42D0 84A14642
Dev Public Key Fingerprint: 4AC45767 E5EC2265 2F0C1167 CBBB8A2B 0C708369 153E328C AD90147D AFE50952
OK
Checking Composer version: OK
Checking Composer and its dependencies for vulnerabilities: OK
Composer version: 2.7.4
PHP version: 8.3.3
PHP binary path: /opt/homebrew/Cellar/php/8.3.3_1/bin/php
OpenSSL version: OpenSSL 3.2.1 30 Jan 2024
cURL version: 8.6.0 libz 1.2.12 ssl (SecureTransport) OpenSSL/3.2.1
zip: extension present, unzip present, 7-Zip not available
Generating optimized autoload files
+ Class Bar located in ./src/Bar.php does not comply with psr-4 autoloading standard. Skipping.+ Class Boop\Boop located in ./src/Boop.php does not comply with psr-4 autoloading standard. Skipping.
Generated optimized autoload files containing 1 classes
Only classes that are outside the configured for a folder get ignored. So if src/ is configured with namespace Foo\\, if the class misses a namespace or is in a totally different namespace like Bar\\, it doesn't trigger any errors when running with --strict-psr.
The text was updated successfully, but these errors were encountered:
PrinsFrank
changed the title
--strict-psr Doesn't warn about about classes where namespace does not exist or doesn't start with configured namespace
--strict-psr Doesn't warn about about classes where namespace is not set or does not start with configured namespace
Apr 30, 2024
My
composer.json
:Output of
composer diagnose
:Checking platform settings: OK
Checking git settings: OK git version 2.39.3
Checking http connectivity to packagist: OK
Checking https connectivity to packagist: OK
Checking github.com rate limit: OK
Checking disk free space: OK
Checking pubkeys:
Tags Public Key Fingerprint: 57815BA2 7E54DC31 7ECC7CC5 573090D0 87719BA6 8F3BB723 4E5D42D0 84A14642
Dev Public Key Fingerprint: 4AC45767 E5EC2265 2F0C1167 CBBB8A2B 0C708369 153E328C AD90147D AFE50952
OK
Checking Composer version: OK
Checking Composer and its dependencies for vulnerabilities: OK
Composer version: 2.7.4
PHP version: 8.3.3
PHP binary path: /opt/homebrew/Cellar/php/8.3.3_1/bin/php
OpenSSL version: OpenSSL 3.2.1 30 Jan 2024
cURL version: 8.6.0 libz 1.2.12 ssl (SecureTransport) OpenSSL/3.2.1
zip: extension present, unzip present, 7-Zip not available
When I run this command:
With the two following classes:
src/Bar.php
src/Boop.php
I get the following output:
And I expected this to happen:
Only classes that are outside the configured for a folder get ignored. So if
src/
is configured with namespaceFoo\\
, if the class misses a namespace or is in a totally different namespace likeBar\\
, it doesn't trigger any errors when running with --strict-psr.The text was updated successfully, but these errors were encountered: