Problem
Two test files use the namespace CrazyGoat\WorkermanBundle\Tests\... (with trailing "s"), while all other test files use CrazyGoat\WorkermanBundle\Test\... (without "s"). The autoload-dev in composer.json maps to CrazyGoat\\WorkermanBundle\\Test\\, so the Tests namespace only works by accident for top-level files (PSR-4 allows it because the directory structure matches).
This inconsistency can cause:
- Confusion when creating new test files
- Potential autoloading issues for namespaced test helpers
- IDE navigation problems
Location
tests/ConfigLoaderTest.php, line 5: namespace CrazyGoat\WorkermanBundle\Tests;
tests/DependencyInjection/WorkermanCompilerPassTest.php, line 5: namespace CrazyGoat\WorkermanBundle\Tests\DependencyInjection;
Expected Namespace
All test files should use CrazyGoat\WorkermanBundle\Test\... (matching autoload-dev):
// ConfigLoaderTest.php
namespace CrazyGoat\WorkermanBundle\Test;
// WorkermanCompilerPassTest.php
namespace CrazyGoat\WorkermanBundle\Test\DependencyInjection;
Proposed Fix
Update the namespace declarations in both files to match the autoload-dev mapping.
Priority
🟢 MINOR — naming inconsistency; works by accident.
Problem
Two test files use the namespace
CrazyGoat\WorkermanBundle\Tests\...(with trailing "s"), while all other test files useCrazyGoat\WorkermanBundle\Test\...(without "s"). Theautoload-devincomposer.jsonmaps toCrazyGoat\\WorkermanBundle\\Test\\, so theTestsnamespace only works by accident for top-level files (PSR-4 allows it because the directory structure matches).This inconsistency can cause:
Location
tests/ConfigLoaderTest.php, line 5:namespace CrazyGoat\WorkermanBundle\Tests;tests/DependencyInjection/WorkermanCompilerPassTest.php, line 5:namespace CrazyGoat\WorkermanBundle\Tests\DependencyInjection;Expected Namespace
All test files should use
CrazyGoat\WorkermanBundle\Test\...(matchingautoload-dev):Proposed Fix
Update the namespace declarations in both files to match the
autoload-devmapping.Priority
🟢 MINOR — naming inconsistency; works by accident.