Project

General

Profile

Actions

Feature #76723

closed

Composer installation without symlinks

Added by Benjamin Hirsch almost 8 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
composer
Target version:
-
Start date:
2016-06-22
Due date:
% Done:

0%

Estimated time:
PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

I’m trying to setup TYPO3 on the Microsoft Azure Platform as a so called App Service / Web App. This is a fully managed and highly scalable environment running a IIS on Windows. For security reasons there are no symlinks or junctions allowed.

Actual scenario:

  • The whole project is versioned with GIT
  • TYPO3, Templates and even project related extension are in the same repository

Because of the security related problem with the symlinks, I need to configure the composer.json like this:

{
  "repositories": [
    {
      "type": "composer",
      "url": "https://composer.typo3.org" 
    }
  ],
  "require": {
    "typo3/cms-composer-installers": "1.3.0-rc1",
    "typo3/cms": "^7.0" 
  },
  "extra": {
    "typo3/cms": {
      "prepare-web-dir": false,
      "cms-package-dir": "{$vendor-dir}/typo3/cms",
      "web-dir": "public" 
    }
  }
}

This is working as intended, everything goes into the web-dir and no symlink is required. But the downside with this solution is, that every pre-existing folder / file like templates or extensions (web-dir/typo3conf/ext) are getting deleted.

When I’m trying it with the following settings:

{
  "repositories": [
    {
      "type": "composer",
      "url": "https://composer.typo3.org" 
    }
  ],
  "require": {
    "typo3/cms-composer-installers": "1.3.0-rc1",
    "typo3/cms": "^7.0" 
  },
  "extra": {
    "typo3/cms": {
      "cms-package-dir": "{$vendor-dir}/typo3/cms",
      "web-dir": "public" 
    }
  }
}

Composer stops with an exception because he can’t create symlinks. This is because of: https://github.com/TYPO3/CmsComposerInstallers/commit/7d5aea6148354169165642078e792cc76b359438
This was a patch which prevents composer from copying all related files/folders rather then trying to symlink. The problem is, that this patch is obviously necessary because a simple copy of the files / folders seems not to be enough to get TYPO3 up and running.

Does anyone have good solution for this type of problem? I’m currently a bit stuck with this. Maybe for the future it would be nice when the handling of the frontend and the backend request is done by simple rewrites, so it wouldn’t be necessary anymore to have a typo3 folder / symlink in the web-dir?

Actions

Also available in: Atom PDF