hiqdev / asset-packagist

Asset Packagist
https://asset-packagist.org
BSD 3-Clause "New" or "Revised" License
247 stars 24 forks source link

Compatibility with Composer 2.0 #103

Closed freezy-sk closed 4 years ago

freezy-sk commented 4 years ago

Composer 2.0 will not allow package names with more than one consecutive dash/dot/underscore What to do with packages named like this npm-asset/fullcalendar--core?

Current deprecation warning from composer Deprecation warning: require.npm-asset/fullcalendar--core is invalid, it should have a vendor name, a forward slash, and a package name. The vendor and package name can be words separated by -, . or _. The complete name should match "[a-z0-9]([_.-]?[a-z0-9]+)*/[a-z0-9]([_.-]?[a-z0-9]+)*". Make sure you fix this as Composer 2.0 will error.

hiqsol commented 4 years ago

We just follow fxp composer-asset-plugin agreement for npm vendor separator. So let's see first what fxp maintainers will do :)

schmunk42 commented 4 years ago

@hiqsol Is there an issue in the fxp repo or composer/composer?

@samdark @cebe This could cause big issues with Yii 2.x

liborm85 commented 4 years ago

Created issue https://github.com/fxpio/composer-asset-plugin/issues/333

github-actions[bot] commented 4 years ago

Stale issue message

rodrigoaguilera commented 4 years ago

Can we keep this open for tracking?

I don't stale bots because they make me write this kind of comment 😉

schmunk42 commented 4 years ago

Stalebot should be configured in a way that they only mark issues as stale, when there was a manual tag "awaiting feedback" or similar. This is such a pain.

hiqsol commented 4 years ago

Ok, I've removed that workflow.

filsh commented 4 years ago

Is there any progress to solve the problem?

schmunk42 commented 4 years ago

I don't think it can be solved, you'd have to convince the composer devs to allow two dashes in the name--, which is highly unlikely IMHO.

You can stick with composer <2.0, but you still will get errors from packagist.

liborm85 commented 4 years ago

@schmunk42 In issue https://github.com/fxpio/composer-asset-plugin/issues/333 proposes @francoispluchino change from -- to -slash-. If both variants were supported we will avoid backward compatibility issues.

schmunk42 commented 4 years ago

I think the problem is, that all existing packages use -- and composer might not allow that at all.

cebe commented 4 years ago

I made an issue on composer repo to discuss this: https://github.com/composer/composer/issues/8749

cebe commented 4 years ago

you'd have to convince the composer devs to allow two dashes in the name--, which is highly unlikely IMHO.

seems you just have to ask ;) solved: https://github.com/composer/composer/pull/8767

schmunk42 commented 4 years ago

you'd have to convince the composer devs to allow two dashes in the name--, which is highly unlikely IMHO.

seems you just have to ask ;) solved: composer/composer#8767

Honestly, I did not believe that this would happen. But very nice :+1:

cebe commented 4 years ago

Honestly, I did not believe that this would happen. But very nice +1

me neither, but that is no reason not to try :smiley:

hiqsol commented 4 years ago

Wow! Just wow :) Congrats everybody!

freezy-sk commented 4 years ago

@cebe thank you. I will close this issue when the fix will be released in composer 1.10.6