[TYPO3-core] Composer name schema for TYPO3 CMS extensions
Fabien Udriot
fabien.udriot at ecodev.ch
Fri Jan 24 07:57:28 CET 2014
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
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.typo3.org/pipermail/typo3-team-core/attachments/20140124/8708ca78/attachment.htm>
More information about the TYPO3-team-core
mailing list