Storing modifications 

There are various ways to store modifications to $GLOBALS['TCA'] . They depend on what you are trying to achieve and the version of TYPO3 CMS you are targeting. The TCA can only be modified from inside an extension.

Changed in version 14.0

There are two changes to \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(). The second argument $type and the third argument $extensionKey have been dropped.

Storing in extensions 

The advantage of putting modifications inside extensions is that the modifications are packaged in a self-contained entity that can be easily deployed.

The drawback is that extension loading order must be finely controlled. If you are modifying Core TCA, you usually don't have to worry about loading order. Custom extensions are always loaded after the Core TCA, so modifications from custom extensions should always take effect.

If your extension modifies another extension, make sure your extension is loaded after the extension you are modifying. You can do this by registering the other extension as a dependency (or suggestion) of yours. See the description of constraints in Core APIs.

Loading order also matters if you have multiple extensions overriding the same field or contradicting each other.

Files in Configuration/TCA/ are loaded inside a dedicated scope. This means that variables defined in those files cannot leak into other files.

For more information about extension structure, please refer to the extension architecture chapter.

Storing in the Overrides/ folder 

Modifications to $GLOBALS['TCA'] must be stored in Configuration/TCA/Overrides/. For clarity, files should be named <tablename>.php.

For example, if you want to modify the TCA of tx_foo_domain_model_bar, create file Configuration/TCA/Overrides/tx_foo_domain_model_bar.php.

The advantage of this method is that changes will be incorporated into $GLOBALS['TCA'] before it is cached (which is very efficient).

Changing the TCA "on the fly" 

It is possible to manipulate $GLOBALS['TCA'] just before it is stored in the cache. Use the PSR-14 event AfterTcaCompilationEvent.