Closed FelixJacobi closed 3 years ago
Hi,
Consider the following psr-4 autoload definition in a composer.json:
psr-4
"autoload": { "psr-4": { "": ["../src/", "modules/"], "MyApp\\": "src/" } },
The first definition contains an array of the paths to search in. For Composer this is a valid configuration. phpab throws an array to string conversion warning when parsing such a file:
phpab
PHP Warning: Array to string conversion in phar:///home/VERTRIEB/felix.jacobi/.phive/phars/phpab-1.26.0.phar/phpab/ComposerIterator.php on line 50 PHP Stack trace: PHP 1. {main}() /home/VERTRIEB/felix.jacobi/.phive/phars/phpab-1.26.0.phar:0 PHP 2. TheSeer\Autoload\CLI->run() /home/VERTRIEB/felix.jacobi/.phive/phars/phpab-1.26.0.phar:155 PHP 3. TheSeer\Autoload\Application->run() phar:///home/VERTRIEB/felix.jacobi/.phive/phars/phpab-1.26.0.phar/phpab/CLI.php:101 PHP 4. TheSeer\Autoload\Application->runCollector() phar:///home/VERTRIEB/felix.jacobi/.phive/phars/phpab-1.26.0.phar/phpab/Application.php:53 PHP 5. TheSeer\Autoload\Config->getDirectories() phar:///home/VERTRIEB/felix.jacobi/.phive/phars/phpab-1.26.0.phar/phpab/Application.php:86 PHP 6. TheSeer\Autoload\ComposerIterator->__construct($composerFile = class SplFileInfo { private $pathName = 'root/git/projects/vendor/web/composer.json'; private $fileName = 'composer.json' }) phar:///home/VERTRIEB/felix.jacobi/.phive/phars/phpab-1.26.0.phar/phpab/Config.php:394 PHP 7. TheSeer\Autoload\ComposerIterator->processAutoload($baseDir = '/home/VERTRIEB/unencrypted/felix.jacobi/,y-project/root/git/projects/vendor/web', $map = ['psr-4' => ['' => [...], 'MyApp\' => 'src/']]) phar:///home/VERTRIEB/felix.jacobi/.phive/phars/phpab-1.26.0.phar/phpab/ComposerIterator.php:33
Nice catch.
Fixed with Release 1.26.1.
Works fine for me. Thanks!
Hi,
Consider the following
psr-4
autoload definition in a composer.json:The first definition contains an array of the paths to search in. For Composer this is a valid configuration.
phpab
throws an array to string conversion warning when parsing such a file: