codezero-be / composer-preload-files Goto Github PK
View Code? Open in Web Editor NEW⭐️ Composer plugin to autoload files before vendor files.
License: MIT License
⭐️ Composer plugin to autoload files before vendor files.
License: MIT License
Hello,
I use codezero/laravel-localized-routes package which depends on this one
Composer install error :
In Filesystem.php line 554:
[TypeError]
Composer\Util\Filesystem::normalizePath(): Argument #1 ($path) must be of type string, null given, called in /app/srcs/vendor/codezero/composer-preload-files/src/AutoloadGenerator.php on line 154
Exception trace:
at phar:///usr/local/bin/composer/src/Composer/Util/Filesystem.php:554
Composer\Util\Filesystem->normalizePath() at /app/srcs/vendor/codezero/composer-preload-files/src/AutoloadGenerator.php:154
CodeZero\ComposerPreloadFiles\AutoloadGenerator->parsePreloadFiles() at /app/srcs/vendor/codezero/composer-preload-files/src/AutoloadGenerator.php:26
CodeZero\ComposerPreloadFiles\AutoloadGenerator->addPreloadFilesToAutoloadFiles() at /app/srcs/vendor/codezero/composer-preload-files/src/Plugin.php:64
CodeZero\ComposerPreloadFiles\Plugin->addPreloadFilesToAutoloadFiles() at phar:///usr/local/bin/composer/src/Composer/EventDispatcher/EventDispatcher.php:206
Composer\EventDispatcher\EventDispatcher->doDispatch() at phar:///usr/local/bin/composer/src/Composer/EventDispatcher/EventDispatcher.php:129
Composer\EventDispatcher\EventDispatcher->dispatchScript() at phar:///usr/local/bin/composer/src/Composer/Autoload/AutoloadGenerator.php:454
Composer\Autoload\AutoloadGenerator->dump() at phar:///usr/local/bin/composer/src/Composer/Installer.php:352
Composer\Installer->run() at phar:///usr/local/bin/composer/src/Composer/Command/InstallCommand.php:147
Composer\Command\InstallCommand->execute() at phar:///usr/local/bin/composer/vendor/symfony/console/Command/Command.php:298
Symfony\Component\Console\Command\Command->run() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:1040
Symfony\Component\Console\Application->doRunCommand() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:301
Symfony\Component\Console\Application->doRun() at phar:///usr/local/bin/composer/src/Composer/Console/Application.php:382
Composer\Console\Application->doRun() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:171
Symfony\Component\Console\Application->run() at phar:///usr/local/bin/composer/src/Composer/Console/Application.php:145
Composer\Console\Application->run() at phar:///usr/local/bin/composer/bin/composer:88
require() at /usr/local/bin/composer:29
Due to this line (154) in this file src/AutoloadGenerator.php :
$packageBaseDir = $filesystem->normalizePath($installationManager->getInstallPath($package));
This bug exist since 2.5.6 Composer version https://github.com/composer/composer/releases/tag/2.5.6 where getInstallPath return now null instead of empty string
Fix suggest for this line (154) in this file src/AutoloadGenerator.php :
$packageBaseDir = $filesystem->normalizePath($installationManager->getInstallPath($package) ?? "");
Hello!
The latest version of composer (2.5.6) make a breaking changes for the package.
BC Warning: Installers and InstallationManager::getInstallPath will now return null instead of an empty string for metapackages' paths. This may have adverse effects on plugin code using this expecting always a string but it is unlikely (#11455)
Refference:
https://getcomposer.org/changelog/2.5.6
If you run composer getting this error:
[TypeError]
Argument 1 passed to Composer\Util\Filesystem::normalizePath() must be of the type string, null given, called in /home/powerbizt/powerbizt.netpeople.hu/v
endor/codezero/composer-preload-files/src/AutoloadGenerator.php on line 154
Exception trace:
at phar:///usr/local/bin/composer/src/Composer/Util/Filesystem.php:553
Composer\Util\Filesystem->normalizePath() at /home/powerbizt/powerbizt.netpeople.hu/vendor/codezero/composer-preload-files/src/AutoloadGenerator.php:154
CodeZero\ComposerPreloadFiles\AutoloadGenerator->parsePreloadFiles() at /home/powerbizt/powerbizt.netpeople.hu/vendor/codezero/composer-preload-files/src/AutoloadGenerator.php:26
CodeZero\ComposerPreloadFiles\AutoloadGenerator->addPreloadFilesToAutoloadFiles() at /home/powerbizt/powerbizt.netpeople.hu/vendor/codezero/composer-preload-files/src/Plugin.php:64
CodeZero\ComposerPreloadFiles\Plugin->addPreloadFilesToAutoloadFiles() at phar:///usr/local/bin/composer/src/Composer/EventDispatcher/EventDispatcher.php:206
Composer\EventDispatcher\EventDispatcher->doDispatch() at phar:///usr/local/bin/composer/src/Composer/EventDispatcher/EventDispatcher.php:129
Composer\EventDispatcher\EventDispatcher->dispatchScript() at phar:///usr/local/bin/composer/src/Composer/Autoload/AutoloadGenerator.php:438
Composer\Autoload\AutoloadGenerator->dump() at phar:///usr/local/bin/composer/src/Composer/Installer.php:349
Composer\Installer->run() at phar:///usr/local/bin/composer/src/Composer/Command/InstallCommand.php:146
Composer\Command\InstallCommand->execute() at phar:///usr/local/bin/composer/vendor/symfony/console/Command/Command.php:298
Symfony\Component\Console\Command\Command->run() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:1040
Symfony\Component\Console\Application->doRunCommand() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:301
Symfony\Component\Console\Application->doRun() at phar:///usr/local/bin/composer/src/Composer/Console/Application.php:378
Composer\Console\Application->doRun() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:171
Symfony\Component\Console\Application->run() at phar:///usr/local/bin/composer/src/Composer/Console/Application.php:141
Composer\Console\Application->run() at phar:///usr/local/bin/composer/bin/composer:88
require() at /usr/local/bin/composer:29````
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.