Download the PHP package webcoast/typo3-context-config-loader without Composer

On this page you can find all versions of the php package webcoast/typo3-context-config-loader. 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 typo3-context-config-loader

TYPO3 configuration loader

A loader to make it easy to include context specific additional configuration files inside typo3conf/AdditionalConfiguration.php.

This loader can

Installation

Require via composer

Usage

Put this inside your typo3conf/AdditionalConfiguration.php

This will automatically include configuration with standard settings (see below).

To adjust the behavior call the according setter function on the loader instance, e.g.

This loader does not parse different configuration formats like PHP, XML or YAML. It just requires the PHP files for the different context. The only file that is actually parsed is the .my.cnf file, if enabled. This gives you the freedom to do whatever you want inside those PHP files.

Order of inclusion

  1. Default.php (if enabled)
  2. .my.cnf (if enabled; parent context is applied first, if inheritance is enabled)
  3. Context specific PHP files (parent context is applied first, if inheritance is enabled)
  4. Local context specific PHP files (if enabled; parent context is applied first, if inheritance is enabled)

Settings

Setter method Type Default Description
setInheritFromParentContext boolean true If enabled the configuration for the root context (e.g. Production) would be included before the configuration from the current sub context (e.g. Production/Staging). If there is no sub context, the root context configuration will be always included.
setIncludeDefaultConfiguration boolean false If enabled the file {configRootPath}/Default.php will be included before any other configuration. This could be helpful to have non-standard settngs, which should be included in each context. Non-standard settings will be removed from LocalConfiguration.php, meaning they need to live either in your typo3conf/AdditionalConfiguration.php or on this Default configuration file.
setIncludeLocalConfigurationFiles boolean false If enabled files with a Local suffix will be included. The should be used to include files that only exist on the target server and are not part of your repository, because they contain credentials (database, SMTP, external API). This allows for versioned and unversioned setting for each context.
setIncludeMyCnf boolean false If enabled a .my.cnf style file (INI) is parsed to get the database credentials. Some sys-admins prefer those .my.cnf files to store the database credentials. They are also used, when accessing the database through the command line MySQL client.
setSubContextSeparator string: ., -, _ or empty . Adjust this to match your naming of your configuration files, e.g. Production/Staging would become Production.Staging.php or Production_Staging.php depending on this setting.
setConfigFileSuffix string empty If you want your configuration files look like ProductionConfig.php, set this to Config. This is required, when you use folders per context.
setUseFolderPerContext bool false Instead of putting all configuration files in the configuration root folder, folder are used for the different contexts, e.g. Production would be {configRoot}/Production and Production/Staging woudl be {configRoot}/Production/Staging. The config file suffix is used as the file name, e.g. Production/Staging/Config.php. If usage of local configuration files is enabled, they would look like Production/Staging/LocalConfig.php.

License

See the license file.

Contribution

Open an issue or fork and provide a pull request.


All versions of typo3-context-config-loader with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
typo3/cms-core Version ^12.4
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 webcoast/typo3-context-config-loader contains the following files

Loading the files please wait ....