New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ErrorException: Undefined index: extra (impossible to composer update) #8047
Comments
Removing the packagist.com repository fixes the issue but prevents us from using packagist.com :(
|
@tristanbes has a symfony fork in the Private Packagist repo causing this freakout in Flex, not a composer bug. |
Thanks @Seldaek. Will remove all forks to prevent this kind of issues again and try to fork the packages under personal space when sending patches. |
this should probably still be reported to Flex though |
We started to have same problem, but we don't use custom symfony fork, or this drupal plugin. What helped in our case was Index: composer.json
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- composer.json (revision c0719fbceabff1d1acc856412a73b8588a930fcc)
+++ composer.json (date 1601982579444)
@@ -157,8 +157,7 @@
"symfony-tests-dir": "tests",
"symfony-assets-install": "relative",
"symfony": {
- "allow-contrib": false,
- "require": "4.3.*"
+ "allow-contrib": false
}
}
} I would like to know what is the trigger of this problem though, since this worked fine till now. |
I am having the same problem today as well without custom forks For me it happens in plugin I use - exactly in this line https://github.com/rubenrua/symfony-clean-tags-composer-plugin/blob/master/src/Cache.php#L61 so i guess it is not composer related... but still strange it started today. I looks like some change done recently in |
@ostrolucky I think this commit in symfony released today broke it symfony/symfony@5f1c3a7#diff-b5d0ee8c97c7abd7e3fa29b9a27d1780 |
Same problem here, a couple of days ago everything works fine, now when i try to install a Drupal module with composer i get an error. [ErrorException]
|
there is discussion about it on drupal zaporylie/composer-drupal-optimizations#22 still it is not |
the issue is that composer-drupal-optimizations assumes that a master branch always has a branch-alias, while there is no such guarantee in composer. And when symfony removed the branch-alias, drupal projects using that plugin became affected by the wrong assumption. |
Yes, drupal and also |
Funny thing, this error just started to happen today to me, and it fails when using composer |
Error started to happen today for me too. Since i'm not using the drupal plugin neither Tried the @ostrolucky change but no success :/ |
@Skape252 please check at the stack trace of your exception to identify which place in your project is wrongly assuming that a |
@Skape252 from After that composer update should work. After package update, it should solve the problem and you don't need to change this line again. |
@shahidnafridi your patch still does not account for missing branch-alias, if there are other |
No other extra field for me so @shahidnafridi solution works fine, thanks |
If your problem is with Drupal, a quick solution is to edit
and
then run Or, you know, |
I understand that upgrading to Composer 2.0 RC1 might not be easy (or acceptable in some cases), and I always advise caution on such kind of actions, especially when a serious app or environment is involved. However, I can say that Composer 2 has given me successful results so far (for the vague test that I have done on small projects), and I don't see a reason not to use it if it solves the problem. Anyway, I still find concerning that yesterday everything was working and today started to fail after getting the latest version of Composer 1 (when booting up my Docker containers) but works with Composer 2. |
Issue is using old symfony/flex version. All that updating composer to 2.0 does is that you are forced to update symfony/flex version with it. Also, tricky part is updating symfony/flex while it crashes because you have old version. |
@DavidGarciaCat it is not composer issue. It is change in symfony/symfony and some other symfony libraries which was done yesterday and broke some other libraries/vendors like older versions of flex (but not only). For me it happened without any update of conposer itself. |
My
composer.json
, running composer1.8.4
:Output of
composer diagnose
:When I run this command:
I get the following output:
And I expected this to happen:
Well I except a dependency update :p
I'm inside a Debian VM (Vagrant+VirtualBox). My local machine is on OSX 10.14.3
The text was updated successfully, but these errors were encountered: