[TYPO3-core] Composer name schema for TYPO3 CMS extensions

Ernesto Baschny [cron IT] ernst at cron-it.de
Fri Jan 24 17:56:42 CET 2014


Hi Fabien,

great news that the server team is looking into that. I expect some
input from Tom on that matter too. I must confess that I am not a
Composer/Packagist specialist.

For the Core names, this change is still pending:

	https://review.typo3.org/#/c/25503/

which would rename the TYPO3 Core extension composer names from:

	"name":"typo3/cms/<extname>"

to

	"name":"typo3/cms-<extname>"

which would address the error you mention below. I would say "let's do
it", if nothing speaks against it.

On the other topic: I thought the "typo3/" in the name was reserved for
official packages which would also use the "TYPO3" Vendor name. If you
are doing your own packages, you would use your own vendor name as a PHP
namespace and also in the vendor part of the composer "name". Maybe Tom
can clarify (and this needs to be properly documented yet!!!).

Thanks for bringing that up!

Cheers,
Ernesto



Fabien Udriot schrieb am 24.01.2014 07:57:
> Hi folks.
> 
> For people interested in Composer / Packagist.
> 
> There is a Server Team effort to bring all TYPO3 CMS extensions hosted
> on git.typo3.org to Packagist. This would be an additional service
> provided by our infrastructure. Assuming there is composer.json file in
> the extension and the package is registered at Packagist, Gerrit, in a
> hook, will inform Packagist a new commit was made. This works already
> like that for Flow packages.
> 
> I played a little bit with one extension and it looks this is easy...
> except for the name in the Composer file which is problematic. I have
> been told, the name pattern would look like "name": "typo3/cms-foo"
> which gives with my test:
> 
> |{
>     "name": "typo3/cms-rss_display",
>     "type": "typo3-cms-extension"
> }
> |
> 
> It is correctly display at
> https://packagist.org/packages/typo3/cms-rss_display

AFAIK this is not intended. The "typo3" vendor is only for official
packages. Extensions from "other vendors" should go with their own
vendor names, i.e. "name": "typo3/rss_display"

> 
> However, when consuming the package the path will be
> |typo3conf/ext/cms-rss_display| (and not |ext/rss_display|, I don't want
> the "cms" segment)
> 
> To see in practice, you can try:
> 
> |$> nano composer.json (paste content below)
> $> composer install 
> {
>     "require": {
>         "composer/installers": "*",
>         "typo3/cms-rss_display": "dev-master"
>     }
> }
> |
> 
> I am wondering whether there is some additional configuration to tell
> the final name but I don't think so
> https://getcomposer.org/doc/04-schema.md. Or in the
> "composer/installers" Package a patch to be submitted? Or having our own
> installer like
> https://packagist.org/packages/typo3/flow-composer-installers?
> 
> Otherwise I suggest to move to another name pattern which works - tested
> with success!
> 
> |{
>     "name": "typo3cms/rss_display",
>     "type": "typo3-cms-extension"
> }
> |
> 
> BTW the name picked for the Core extensions is not valid for Packagist.
> This is not decided whether they go to Packagist one day (could make
> sense if we change the distribution strategy) but I suggest to rename
> the naming to be Packagist compliant.
> 
> |{
>     "name": "typo3/cms/filemetadata",
>     "type": "typo3-cms-framework",
> }
> |
> 
> Packagist will complain: the complete name should match
> |"[a-z0-9]([_.-]?[a-z0-9]+)*/[a-z0-9]([_.-]?[a-z0-9]+)*"|. What about
> |typo3cms| as well?
> 
> |{
>     "name": "typo3cms/filemetadata",
>     "type": "typo3-cms-framework",
> }
> |
> 
> Let me know what you think.
> 
> Fb.
> 
> Ps. To be reminded the work of Lightwerk which provides Composer support
> for TER extensions
> http://composer.lightwerk.com/
> 
> -- 
> Ecodev Sàrl - Rue de la Serre 11 - 2000 Neuchâtel - Switzerland
> 
> Tel / VoIP + 41 32 511 08 18
> Web http://www.ecodev.ch
> 



More information about the TYPO3-team-core mailing list