2017 © Pedro Peláez
 

composer-plugin static-docroot

Composer plugin that ensures DOCUMENT_ROOT is static and stable during one request, intended for symlink based deployments.

image

bnf/static-docroot

Composer plugin that ensures DOCUMENT_ROOT is static and stable during one request, intended for symlink based deployments.

  • Tuesday, April 4, 2017
  • by bnf
  • Repository
  • 1 Watchers
  • 1 Stars
  • 1,672 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 5 Versions
  • 21 % Grown

The README.md

Static DOCUMENT_ROOT for symlink based deployments

This package acts as composer plugin in order to automatically patch $_SERVER['DOCUMENT_ROOT'] and $_SERVER['SCRIPT_FILENAME']to their realpath so that they do not contain symlinks. That is to ensure that they are static and stable. That means we want their destination to not change during one request. That would happen when they contain symlinks which may change during one request due to a deployment., (*1)

  composer require bnf/static-docroot

The behavior of this plugin can be influenced by configuration in the extra section of the root composer.json, (*2)

  "extra": {
      "bnf/static-docroot": {
          "web-dir": "public"
      }
  }

web-dir

You can specify a relative path from the base directory, where the public document root should be located., (*3)

The default value is derived from extra|typo3/cms|web-dir or if that is unset, "web" as last resort. That means if you have already configured the typo3/cms web-dir, you do not need to add the bnf/static-docroot section., (*4)

  "extra": {
      "typo3/cms": {
          "web-dir": "web"
      }
  }

Note for TYPO3 8.7: This package is not needed as of TYPO3 8.7 LTS. https://review.typo3.org/#/c/52295/ fixed TYPO3 to base path calculations on __DIR__ and thus does effectively the same as this package. You might still need this package if you have a (bad) extension that uses $_SERVER['DOCUMENT_ROOT'] instead of GeneralUtility::getIndpEnv()., (*5)

The Versions

04/04 2017

dev-master

9999999-dev https://github.com/bnf/static-docroot

Composer plugin that ensures DOCUMENT_ROOT is static and stable during one request, intended for symlink based deployments.

  Sources   Download

MIT

The Requires

  • php >=5.5.0
  • composer-plugin-api ^1.1

 

The Development Requires

plugin composer symlink docroot

04/04 2017

1.1.3

1.1.3.0 https://github.com/bnf/static-docroot

Composer plugin that ensures DOCUMENT_ROOT is static and stable during one request, intended for symlink based deployments.

  Sources   Download

MIT

The Requires

  • php >=5.5.0
  • composer-plugin-api ^1.1

 

The Development Requires

plugin composer symlink docroot

30/03 2017

1.1.0

1.1.0.0 https://github.com/bnf/static-docroot

Composer plugin that ensures DOCUMENT_ROOT is static and stable during one request, intended for symlink based deployments.

  Sources   Download

MIT

The Requires

  • php >=5.5.0
  • composer-plugin-api ^1.1

 

The Development Requires

plugin composer symlink docroot

29/03 2017

1.0.1

1.0.1.0 https://github.com/bnf/static-docroot

Composer plugin that ensures DOCUMENT_ROOT is static and stable during one request, intended for symlink based deployments.

  Sources   Download

MIT

The Requires

  • php >=5.5.0
  • composer-plugin-api ^1.1

 

The Development Requires

plugin composer symlink docroot

29/03 2017

1.0.0

1.0.0.0 https://github.com/bnf/static-docroot

Composer plugin that ensures DOCUMENT_ROOT is static and stable during one request, intended for symlink based deployments.

  Sources   Download

MIT

The Requires

  • php >=5.5.0
  • composer-plugin-api ^1.1

 

The Development Requires

plugin composer symlink docroot