Project

General

Profile

Actions

Feature #89374

closed

Composer plugin install support replace with vendor/ext-name

Added by Tizian Schmidlin over 4 years ago. Updated over 4 years ago.

Status:
Rejected
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2019-10-08
Due date:
% Done:

0%

Estimated time:
PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

Currently the composer.json has to have a replace configuration which tells composer to remove the vendor.

Now this is deprecated in composer 2.0, which will be around sometime in the future (probably) and therefore there should be a solution for this issue.

Clearly this does not affect the installation when adding a package through composer require, but for example, when working in an isolated testing environment where you may have to `compsoer install` based on a single package to get the necessary dependencies, compsoer might break at some point.

The warning looks like this:
Deprecation warning: replace.ext_name 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.

In order to achieve this, I believe the typo3/cms-composer-installers has to be updated.

The current behaviour is that if you have an extension with replace, the extension will be copied to typo3conf/ext/ext_ext_name.

Actions #1

Updated by Helmut Hummel over 4 years ago

  • Status changed from New to Rejected

Thanks for bringing this up.

Since quite some time now (version 1.4.0 and younger of composer installers) it is possible (and recommended) to not use the replace section any more,
but use extra.typo3/cms.extension-key to specify the extension key: https://github.com/TYPO3/TYPO3.CMS/blob/3ec52ea781621941cfedbd164070f28eb0c1e194/typo3/sysext/core/composer.json#L99

It is also documented here: https://docs.typo3.org/m/typo3/reference-coreapi/master/en-us/ExtensionArchitecture/ComposerJson/Index.html#minimal-composer-json

So nothing needs to be done here and you can change your extension accordingly already.
If you have ideas what can be done to improve the visibility of this change (apart from documenting), feel free to voice them here.

Unrelated, to this topic: You could do me (and probably others) a favor in not adding others as watchers to a ticket. While it worked well here (as I happened to have time),
it more often than not is a burden to become triggered often.

Thanks and keep the reports coming.

Actions #2

Updated by Tizian Schmidlin over 4 years ago

Hi Helmut,

thanks for the doc!!!

I'll try to brainstorm an idea about how to get this some more visibility and larger acceptance!

I'm aware that adding people as watches actively is kind of a sin and bad karma but as I knew that you and THomas were involved (since you authored the composer plugin), I thought this was legitimate.

Best Regards
Tizian

Actions #3

Updated by Tizian Schmidlin over 4 years ago

I have an idea on how to get this more widely known.

Benni Mack officially promised at T3DD19 in Karlsruhe that he'd make a blog or something like this, telling the people on how to do stuff "the core way", maybe this could get some publicity there once Benni has more time on his hands and is able to publish it.

Actions

Also available in: Atom PDF