TYPO3-Documentation / TYPO3CMS-Reference-CoreApi

"TYPO3 Explained": Main TYPO3 Core Document: Main classes, Security, TypoScript syntax, Extension API and much more
https://docs.typo3.org/m/typo3/reference-coreapi/master/en-us/
22 stars 393 forks source link

Ambiguity using the term "default storage" (for files) #3849

Open sypets opened 10 months ago

sypets commented 10 months ago

Current behavior

The term "default storage" is used for both "storage with uid=0" and "fileadmin as default storage".

"default storage": uid=0 in sys_file_storage:

The storage uid is optional. If it is not specified, the default storage "0" will be assumed initially. The default storage is virtual with $uid === 0 in its class \TYPO3\CMS\Core\Resource\ResourceStorage. In this case the local filesystem is checked for the given file.

"default storage": fileadmin

The default storage uses fileadmin/ unless this was configured differently, as explained in Storages and drivers.

https://docs.typo3.org/m/typo3/reference-coreapi/main/en-us/ApiOverview/Fal/UsingFal/ExamplesFileFolder.html

Expected behavior/output

Use unique terms for each.

Links

https://docs.typo3.org/m/typo3/reference-coreapi/main/en-us/ApiOverview/Fal/UsingFal/ExamplesFileFolder.html

TYPO3 versions

Possible Solution

Use "default storage" for fileadmin, find new term for "storage with uid=0", e.g.

etc. ..

Additional context

The reason I ran into this problem is, I was searching for "storage 0" trying to find information about the storage with uid="0". (I read somewhere about plans for this and can't find this information anymore). If there is a unique term for this storage, it is easier to find issues in forge, information in the documentation etc.

If "default storage" is used for both storage with uid=0 and fileadmin, this makes it more difficult.

brotkrueml commented 10 months ago

TYPO3 itself uses the term "built-in storage": https://github.com/TYPO3/typo3/blob/main/typo3/sysext/core/Classes/Resource/StorageRepository.php#L325

Or "fallback storage": https://github.com/TYPO3/typo3/blob/main/typo3/sysext/core/Classes/Resource/StorageRepository.php#L330 https://github.com/TYPO3/typo3/blob/main/typo3/sysext/core/Classes/Resource/StorageRepository.php#L360

I would opt for "fallback storage".