Download the PHP package b13/environment without Composer

On this page you can find all versions of the php package b13/environment. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package environment

TYPO3 Extension Environment

Created by Benjamin Mack, b:dreizehn GmbH, in 2013. Published under the MIT license.

What does it do?

The TYPO3 extension "Environment", compatible with TYPO3 CMS 4.5 until TYPO3 CMS 7.99.99, allows for context-specific settings, so the TYPO3 installation has different options for each context. This means that all logging and debugging settings can be turned on for the development environment.

Of course, this extension makes most sense if you have multiple server scenarios and a local development environment.

Installation

1) Install the extension.

2) Add the following Rewrite statements to your .htaccess file after the RewriteBase statement or to your Apache webserver configuration.

# Make sure the context variable is set with every http request
RewriteCond %{HTTP_HOST} ^(.*)staging-system\.org$
RewriteRule .? - [E=TYPO3_CONTEXT:Production/Staging]

RewriteCond %{HTTP_HOST} ^(.*)development-system\.org$
RewriteRule .? - [E=TYPO3_CONTEXT:Development]

3) Add the following code to your typo3conf/AdditionalConfiguration.php for TYPO3 CMS >= 6.0

// load the environment / context configuration for this installation
if (\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('environment')) {
    include('ext/environment/Includes/Bootstrap/InitializeContext.php');
}

3a) For installations prior to 6.0, please include this at the bottom of the localconf.php

// load the environment / context configuration for this installation
if (t3lib_extMgm::isLoaded('environment')) {
    include('ext/environment/Includes/Bootstrap/InitializeContext.php');
}

3b) For installations using TYPO3 CMS 6.2+, just add this to your typo3conf/AdditionalConfiguration.php

// load the environment / context configuration for this installation
include('ext/environment/Includes/Bootstrap/InitializeContext.php');

After that, you have a PHP constant named "TYPO3_CONTEXT" that is set to the environment variable placed in your server settings.

4) You can now define context-specific configurations, and create files like

and add configuration options like different DB settings and debugging settings, that get included depending on what context you have set in your server settings. Examples are provided in Resources/Public/Examples.

Please make sure that the PHP files always start with the following lines

<?php

if (!defined('TYPO3_MODE')) {
    die('Access denied.');
}

Best practices

Development Environment "Development"

Integration Environment "Testing/Integration"

"Production/Staging" Environment

"Production" Environment

Setting the environment for scheduler tasks

Usually the TYPO3 scheduler is called like this:

/usr/bin/php5 /path/to/my/typo3/installation/typo3/cli_dispatch.phpsh scheduler

this should be modified at all times to set the environment variable

/usr/bin/php5 /path/to/my/typo3/installation/typo3/cli_dispatch.phpsh scheduler --context=Production

Environment-dependent TypoScript

You can check the environment with the following TypoScript condition.

# disable tracking for Production/Staging environment
[globalString = ENV:TYPO3_CONTEXT = Production/Staging]
    page.20 >
[GLOBAL]

With TYPO3 CMS 6.2, you can use the newly defined "applicationContext" TypoScript condition.

Environment-dependent email redirection

You can redirect any outgoing email to a specific email address by setting the following TYPO3_CONF_VARS option:

$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['environment']['redirectEmails'] = '[email protected]';

You can add multiple addresses separated via comma, or in a simple array.

It makes most sense if you put this in a environment-dependent installation like typo3conf/AdditionalConfiguration.Development.php and remove it in the Production environment settings.

Thanks

Big thanks goes to:


All versions of environment with dependencies

PHP Build Version
Package Version
No informations.
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package b13/environment contains the following files

Loading the files please wait ...