Project

General

Profile

Actions

Task #55770

closed

Add composer.json for typo3/cms

Added by Christian Opitz about 10 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Should have
Category:
Miscellaneous
Target version:
Start date:
2014-02-07
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
Tags:
Complexity:
medium
Sprint Focus:

Description

The core project should contain a composer.json in it's root so that it can be published on packagist.

Actions #1

Updated by Gerrit Code Review about 10 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/27423

Actions #2

Updated by Fabien Udriot about 10 years ago

Do you have some instruction / commands that show us how to play with? That could be taken over when documenting the usage of Composer with TYPO3.

Actions #3

Updated by Gerrit Code Review about 10 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/27423

Actions #4

Updated by Christian Opitz about 10 years ago

  1. Clone TYPO3 into some path and cherry-pick the latest patchset there:
    cd /home/foo/test
    git clone git://git.typo3.org/Packages/TYPO3.CMS.git typo3_src
    git fetch git://git.typo3.org/Packages/TYPO3.CMS refs/changes/23/27423/2 && git cherry-pick FETCH_HEAD
    
  2. Put this into a composer.json file in another empty directory and run composer install:
    {
        "name": "foo/bar",
        "description": "Test for http://forge.typo3.org/issues/55770",
        "type": "project",
        "repositories": [
            {
                "type": "git",
                "url": "/home/foo/test/typo3_src" 
            }
        ],
        "minimum-stability": "dev",
        "require": {
            "typo3/cms": "~6.2" 
        }
    }
    

After the command was executed you should have a fresh installation with the TYPO3 master.

Note the "minimum-stability": "master": If you leave this out, the minimum stability would be stable and you'd reveive an error as there is no stable 6.2-version available (yet) - there is only a 6.2.x-dev version available because the composer.json contains an corresponding branch-alias.

In the last patch set, I pushed, I changed the type to "typo3cms-core" because the installer requires that to handle the installation.

Actions #5

Updated by Fabien Udriot about 10 years ago

I tried with the exact composer.json given as example except of line 8 which I changed for my own path but run into problems. <- it works fine, patch must be applied on master and not in a branch.

Besides "name" wouldn't be necessary in this example, right?

Actions #6

Updated by Christian Opitz about 10 years ago

You have to cherry-pick the patch into the master - otherwise the branch-alias won't work (composer install -vvv will give you more information)

Actions #7

Updated by Fabien Udriot about 10 years ago

Ah! Thanks, it works fine when applying the patch against master and not on a branch.

Actions #8

Updated by Gerrit Code Review about 10 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/27423

Actions #9

Updated by Gerrit Code Review about 10 years ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/27423

Actions #10

Updated by Fabien Udriot about 10 years ago

Rather use this composer config, to verify the patch as the CMS Composer Installer is not yet on Packagist. More info http://forge.typo3.org/issues/55916#note-5

Update: CMS Composer Installers was put on Packagist. It is not required anymore.

{
    "name": "foo/bar",
    "description": "Test for http://forge.typo3.org/issues/55770",
    "type": "project",
    "repositories": [
        {
            "type": "git",
            "url": "git@github.com:TYPO3/CmsComposerInstaller.git" 
        },
        {
            "type": "git",
            "url": "/home/foo/test/typo3/typo3_src" 
        }
    ],
    "minimum-stability": "dev",
    "config": {
        "vendor-dir": "Packages/Libraries",
        "bin-dir": "bin" 
    },
    "require": {
        "typo3/cms": "~6.2" 
    }
}
Actions #11

Updated by Christian Opitz about 10 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #12

Updated by Riccardo De Contardi over 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF