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

Fabien Udriot fabien.udriot at ecodev.ch
Mon Jan 27 10:46:42 CET 2014


Hi Ernesto,

Thanks for your reply.

> I must confess that I am not a Composer/Packagist specialist.

I am diving into the topic myself.

> I expect some input from Tom on that matter too.

I was in contact with him beginning of January about the topic.
I looked to me many things were un-decided or un-clear at that time.
So this thread is a good opportunity to help in clarifying the 
situation.

I started a Note where to collect some info about Composer.
https://notes.typo3.org/p/composer

Some part could be added to the Blue Print or to the Wiki at one point.
http://wiki.typo3.org/Blueprints/Packagemanager

> 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!!!).

Ah! This is quite important. I overlooked [the conventions related to 
namespaces](http://wiki.typo3.org/Namespaces#Does_and_don.27ts_for_developers). 
Indeed, "TYPO3\CMS" is reserved for Core extensions and a different 
vendor name **must** be defined for a third-party extensions.

This vendor name must be reflected in the Composer file (and must not be 
"typo3/cms-" for third party extensions).

	{
		"name":"vendor/package_name"
	}

Thanks for your input.

Fb
-- 
Ecodev Sàrl - Rue de la Serre 11 - 2000 Neuchâtel - Switzerland

Tel / VoIP   + 41 32 511 08 18
Web          http://www.ecodev.ch
On 24 Jan 2014, at 20:56, Ernesto Baschny [cron IT] wrote:

> 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
>>
>
> _______________________________________________
> Before posting to this list, please have a look to the posting rules
> on the following websites:
>
> http://typo3.org/teams/core/core-mailinglist-rules/
> http://typo3.org/development/bug-fixing/diff-and-patch/
> _______________________________________________
> TYPO3-team-core mailing list
> TYPO3-team-core at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-team-core
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.typo3.org/pipermail/typo3-team-core/attachments/20140127/41556541/attachment.htm>


More information about the TYPO3-team-core mailing list