{"id":21277949,"url":"https://github.com/b13/typo3-config","last_synced_at":"2025-07-11T08:32:18.222Z","repository":{"id":44920656,"uuid":"421748172","full_name":"b13/typo3-config","owner":"b13","description":"Helper Package for maintaining TYPO3 Configuration in projects","archived":false,"fork":false,"pushed_at":"2024-05-21T10:25:55.000Z","size":57,"stargazers_count":11,"open_issues_count":4,"forks_count":3,"subscribers_count":8,"default_branch":"main","last_synced_at":"2024-10-29T23:41:59.530Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/b13.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2021-10-27T09:05:11.000Z","updated_at":"2024-07-11T20:13:00.000Z","dependencies_parsed_at":"2024-04-19T06:27:49.232Z","dependency_job_id":"b503df4f-00d7-4bf8-80b9-ae4a618eabed","html_url":"https://github.com/b13/typo3-config","commit_stats":{"total_commits":13,"total_committers":7,"mean_commits":"1.8571428571428572","dds":0.6923076923076923,"last_synced_commit":"f5addfd528f8a4ba408e2ca8d7ba55a188cd28b9"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/b13%2Ftypo3-config","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/b13%2Ftypo3-config/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/b13%2Ftypo3-config/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/b13%2Ftypo3-config/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/b13","download_url":"https://codeload.github.com/b13/typo3-config/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225708281,"owners_count":17511635,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-21T10:08:23.451Z","updated_at":"2025-07-11T08:32:18.210Z","avatar_url":"https://github.com/b13.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Manage TYPO3 System-Wide Configuration\n\n\u003e TLDR: Don't repeat yourself.\n\nAt b13 we run similar code and site-specific functionality based on the\nactual environment (development / production context). For this, we\nusually have a list of default \"best practice\" settings which\nwe usually copy from one project to the next.\n\nThis small library ships with a single PHP class which\nmakes our life a bit easier when setting global `$TYPO3_CONF_VARS` settings,\nwhich usually takes place in LocalConfiguration, AdditionalConfiguration\nand the extensions' `ext_localconf.php` files.\n\n### Note using TYPO3 v12\n\nThe configuration files LocalConfiguration and AdditionalConfiguration\nhave been moved and renamed, see\n[Configuration files](https://docs.typo3.org/m/typo3/reference-coreapi/main/en-us/Configuration/ConfigurationFiles.html)\n\n### Reason 1: We want context-dependent config files\n\nWith our configuration class, TYPO3's \"AdditionalConfiguration\"\n(located in :file:`typo3conf/AdditionalConfiguration.php`) just looks like this:\n\n    \u003c?php\n\n        \\B13\\Config::initialize()\n            -\u003eappendContextToSiteName()\n            -\u003eincludeContextDependentConfigurationFiles();\n\nThis sets some sensible defaults (see below), and also checks\nfor the existence of the following files:\n\n```\nconfig/system/development.php\nconfig/system/production.php\n```\n\nIf you have a TYPO3_CONTEXT with Subcontexts such as \"Production/QA\"\nthen the file `config/system/production/qa.php` is also included,\nin addition to `config/system/production.php`.\n\n### Reason 2: We don't want to repeat the same \"best b13 practice\"\n\nThe `initialize()` method sets sensible defaults for a specific environment,\nactivates debugging for Development environments, and deactivates deprecation\nlogging in production by default.\n\nb13 uses DDEV-Local for local environments, however, it is somehow\ntedious to maintain the same configuration over and over again. If DDEV-Local\nis in use, `initialize` automatically sets the respective settings for\nDDEV-Local environments.\n\nIf you want to avoid any kind of magic, you can just use this in your AdditionalConfiguration file.\n\n    \u003c?php\n        \\B13\\Config::initialize(false)\n            -\u003eappendContextToSiteName()\n            -\u003eincludeContextDependentConfigurationFiles();\n\nOn top, the API ships with useful helper methods which we accustomed\nto set specific values. You can use this API in combination with\nsetting other environment- or project-specific settings of course.\n\n    \\B13\\Config::get()\n        -\u003euseMailhog()\n        -\u003eallowInvalidCacheHashQueryParameter()\n        -\u003einitializeRedisCaching();\n\n    # Also set other TYPO3 configuration values as you need\n    $GLOBALS['TYPO3_CONF_VARS']['FE']['versionNumberInFilename'] = 'embed';\n\n\n## Installation\n\nInstall this package in `composer req b13/typo3-config` in your existing\nTYPO3 project – you are ready to go. This package only supports TYPO3 v9 LTS\nand higher, as we consider having multiple branches for multiple versions at\nsome point where this package provides a stable API while not modifying.\n\n## Why we created this package\n\nWe use this approach for a few years now and publishing this package\nhelps us to maintain this logic in a standardized way. We invite\nother web agencies to do the same, to see what everybody can improve\nand we can collaborate.\n\nTYPO3 does not have a good API to set such options\nfor developers, and this is our list of best practices, which\nwe love to share with the world until TYPO3 Core will provide\na standardized and better solution.\n\nWith TYPO3 it is possible to configure your system in many ways,\nand some do this via extensions, and we do it like this, hence: a common\nground for us to use.\n\n## Drawbacks\n\n1. If you have a slow file system (NFS) or older PHP version, where\n   your files are located, this package might slow down your file system\n   due to a few more file look ups. Ideally we'd love to cache such\n   information, but TYPO3 Core does not work with cached configuration\n   for `TYPO3_CONF_VARS`.\n\n2. Using the \"Install Tool\" to set global configuration values might\n   not work as expected, as our configuration logic currently works\n   AFTER `LocalConfiguration.php` has been loaded. This is one\n   of the major issues with TYPO3 Core's configuration system.\n\n## Naming TYPO3_CONTEXT\n\nThis package works best in TYPO3 projects if you use Git, Composer\nand various environments. We usually use Contexts also in TYPO3's\nsite configuration and think it is very powerful to use if done\nright. Internally we committed ourselves across projects to the following\nnames.\n\n### Regular projects\n\n* Development\n* Development/DDEV\n* Testing (CI)\n* Testing/Unit (CI)\n* Production/Live\n* Production/Staging\n* Production/Staging/Feature-TicketNo\n* Production/Staging/Feature-TicketNo2\n\nIf you have one code base that powers multiple sites, we use sub-sub-schema\nas well.\n\n* Production/Staging/SiteA\n* Production/Staging/SiteB\n* Production/Staging/SiteC\n* Production/Live/SiteA\n* Production/Live/SiteB\n* Production/Live/SiteC\n\n## Thanks\n\nPrior functionality was heavily inspired by [Neos Flow](https://flowframework.readthedocs.io/en/stable/TheDefinitiveGuide/PartII/Configuration.html),\nand our initial TYPO3 solution was developed by [Achim Fritz](https://github.com/achimfritz).\n\n## License\n\nThe package is licensed under GPL v2+, same as the TYPO3 Core. For details see the LICENSE file in this repository.\n\n## Credits\n\nThis package was created by [Achim Fritz](https://github.com/achimfritz) and [Benni Mack](https://github.com/bmack) in 2021 for [b13 GmbH](https://b13.com).\n\n[Find more TYPO3 packages we have developed](https://b13.com/useful-typo3-extensions-from-b13-to-you) that help us deliver value in client projects. As part of the way we work, we focus on testing and best practices to ensure long-term performance, reliability, and results in all our code.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fb13%2Ftypo3-config","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fb13%2Ftypo3-config","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fb13%2Ftypo3-config/lists"}