Comments (5)
@dugwood Your issue is fixed in c2fd4d3 and now released as 2.7.6. The original issue here is unrelated though I believe as your problem was purely a composer runtime thing, and the OP seems to be having problem in their application autoloading, not while composer runs.
from composer.
You need to provide some information like at least your composer.json's autoload config..
from composer.
Right I'll fix that ASAP, thanks for figuring it out.
from composer.
Having an issue with 2.7.5 too, 2.7.4 (and previous) were working fine. Seems to be the same issue, here's my error:
Fatal error: Uncaught TypeError: Composer\EventDispatcher\EventDispatcher::getCallbackIdentifier(): Argument #1 ($cb) must be of type callable, array given, called in phar:///home/test/composer/composer.phar/src/Composer/EventDispatcher/EventDispatcher.php on line 419 and defined in phar:///home/test/composer/composer.phar/src/Composer/EventDispatcher/EventDispatcher.php:664
Stack trace:
#0 phar:///home/test/composer/composer.phar/src/Composer/EventDispatcher/EventDispatcher.php(419): Composer\EventDispatcher\EventDispatcher->getCallbackIdentifier()
#1 phar:///home/test/composer/composer.phar/src/Composer/EventDispatcher/EventDispatcher.php(115): Composer\EventDispatcher\EventDispatcher->doDispatch()
#2 phar:///home/test/composer/composer.phar/src/Composer/Factory.php(448): Composer\EventDispatcher\EventDispatcher->dispatch()
#3 phar:///home/test/composer/composer.phar/src/Composer/Factory.php(629): Composer\Factory->createComposer()
#4 phar:///home/test/composer/composer.phar/src/Composer/Console/Application.php(549): Composer\Factory::create()
#5 phar:///home/test/composer/composer.phar/src/Composer/Console/Application.php(483): Composer\Console\Application->getComposer()
#6 phar:///home/test/composer/composer.phar/src/Composer/Console/Application.php(430): Composer\Console\Application->hintCommonErrors()
#7 phar:///home/test/composer/composer.phar/vendor/symfony/console/Application.php(171): Composer\Console\Application->doRun()
#8 phar:///home/test/composer/composer.phar/src/Composer/Console/Application.php(148): Symfony\Component\Console\Application->run()
#9 phar:///home/test/composer/composer.phar/bin/composer(93): Composer\Console\Application->run()
#10 /home/test/composer/composer.phar(29): require('...')
#11 {main}
thrown in phar:///home/test/composer/composer.phar/src/Composer/EventDispatcher/EventDispatcher.php on line 664
It happens for every call of composer.phar, whatever the arguments. And only with an autoprepend file with homemade autoloader. Disabling my autoloader solves the issue.
So clearly an issue in autoloading.
from composer.
To build upon previous notes:
- @piercesteven12 issue must come from the reordering of autoloaders (which breaks the order his code expect the autoloaders)
- for example, say there's a list of autoloaders:
AL1, AL2, composer, AL3, AL4
- the way composer rewrites the list is:
composer, AL3, AL4, AL1, AL2
- for example, say there's a list of autoloaders:
- my issue is that my Autoloader isn't
callable
, but it works as expected... so maybe I'm missing a PHP declaration or something like that.- [EDIT] I was passing a
private
method tospl_autoload_register()
, which works butis_callable()
returns false (as it's not directly callable by an external code) - I think other people may face the same issue, perhaps removing the
callable
could be an option. Or add a warning that it's bad practice to have a private register function (which works)
- [EDIT] I was passing a
from composer.
Related Issues (20)
- Archive exclude does not work on GitHub nor Packagist HOT 2
- Error gcloud crashed (InvalidDataFromServerError) received while set up connection HOT 1
- Symfony Runtime Exception (The "-e" option does not exist) HOT 2
- Have a non-zero exit code when curl fails HOT 9
- --strict-psr Doesn't warn about about classes where namespace is not set or does not start with configured namespace HOT 1
- Access denied when running composer install HOT 1
- Composer fails to do anything HOT 3
- Composer trying to install older version HOT 2
- package installation issue HOT 1
- About Composer plugin HOT 2
- Politics or pure code? HOT 7
- autoload_static missing most files HOT 1
- Environmental variable
- Failed to load dll while installing composer
- Consistently use (or don't use) FQCN functions HOT 3
- running "composer require" from composer-script mangles the `^` version constraint HOT 4
- Archive -> Exclude behavior: Expectation doesn't meet! HOT 2
- [SUPPORT]: Could not fetch X, please review your configured GitHub OAuth token or enter a new one to access private repos HOT 1
- Cloning failed using an ssh key for authentication, enter your GitHub credentials to access private repos HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from composer.