Bug #60984

composer.typo3.org always downloads full TYPO3

Added by Armin Vieweg over 7 years ago. Updated about 7 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Start date:
2014-08-14
Due date:
% Done:

100%

Estimated time:

Description

Because of the dependency to typo3/cms in each extension, composer also downloads the whole cms.
I would recommend to put the CMS dependency to "suggest". So each developer may choose if he want to get typo3/cms (by adding the line to his project composer.json) or not.

#1

Updated by Armin Vieweg over 7 years ago

Okay, I've found a workarround for that.

Just create an own composer repository add that to your project composer.json file. Then add a new package. I've named it "t3source-exclude". The rest is like always. The composer.json looks then like this:

{
    "repositories": [
        {
            "type": "composer",
            "url": "http://composer.typo3.org/" 
        },
        {
            "type": "composer",
            "url": "http://composer.domain.com/" 
        }
    ],

    "require": {
        "whatever/t3source-excluder": "1.0.0",

        "typo3-ter/dce": "0.10.*",
        "typo3-ter/nc-staticfilecache": "2.5.*",
        "typo3-ter/realurl": "1.*",
        "typo3-ter/t3adminer": "1.*",
        "typo3-ter/tinysource": "3.*",

        "whatever/whatever_viewhelpers": "1.2.*",
        "whatever/gridelements": "3.0.*",
        "whatever/t3ddy": "0.1.*" 
    }
}

In own composer repository we define this t3source-excluder like this:

"packages": {
    "whatever/t3source-excluder": {
        "1.0.0": {
            "name": "whatever/t3source-excluder",
            "version": "1.0.0",
            "type": "no-typo3-cms-core",
            "dist": {
                "type": "zip",
                "url": "http://composer.domain.com/t3source-excluder/1.0.0.zip" 
            },
            "replace": {
                "typo3/cms": "*" 
            },
            "require": {
                "typo3/cms-composer-installers": "*" 
            }
        }
    }
}
The 1.0.0.zip may just contain one empty file. However, composer requires a valid dist or source.
#2

Updated by Lars Malach about 7 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

its not necessary to add a own repository for that.

Simply add

            "replace": {
                "typo3/cms": "*" 
            },
            "require": {
                "typo3/cms-composer-installers": "*",
                ...
            }

to your htdocs/composer.json..

#3

Updated by Armin Vieweg about 7 years ago

Cool Thanks! That works perfectly :)

Also available in: Atom PDF