The TYPO3 Core currently allows any file extension as ending for loading (basically simple text files) TypoScript configuration files, or TSconfig files (although this is similar syntax, but not the same configuration language).
We want to have best practices, so I’d go for defining / deciding on a default / best practice file ending, simply using “.t3s” for TypoScript configuration files (no difference between constants and setup) and using “.tsconfig” for TSconfig.
Both Benji and me are rooting for “.t3s” for TypoScript and “tsconfig” for TSconfig (user/page does not matter).
Impact
People will have to adapt their personal workflows, certain definitions are already based on “.ts” or “.txt”, and we’d have some migrations in place for them.
Possible Migrations
Deprecations for other file endings (but then do that in v9)
Pro
Showing newcomers what’s a best practice, and how to “do it right”.
Con
Personal hard feelings (as I noticed on twitter already ;)).
Organizational
Topic Initiator: Benni Mack
Topic Mentor: Benjamin Kott
The only thing I see as confusing with .t3s would be the 3 - because where does that come from? But yes, in general, I’m all for changing away from ts as fast as possible (and not to txt).
While we use .ts currently, I would really opt to migrate that away, since this heavily collides with TypeScript, which is a no-go nowadays. .txt is completely out of discussion!
I don’t mind about a separation of template and tsconfig. Those are dedicated folders anyway and syntactically there is NO difference between them. Most of the endings in use currently reflect the syntax that is used inside a file and not what there are meant to be used for. (.html for HTML, .js for JavaScript, .json for JSON and so on)
My vote would therefore be for this kind of guideline:
TypoScript:
Folder: ext:myext/Configuration/TypoScript/...
Ending: 10.somefile.constants.t3s and 10.somefile.setup.t3s
@liayn you are of course right about the syntax.
The syntax looks similar for TypoScript and TSConfig, but is it?
I don’t know where TypoScript is able to work with the := syntax, neither am I sure if mod_list < rte would work in TSConfig.
Please don’t take this cynical or alike, I honestly don’t know
ok.
So basically we only need to decide whether we want to live with people confusing TypoScript capabilities with TSConfig syntax.
This is the only reason to keep both file-suffixes separated.
For a consistent approach in using the file extension to tell, how the contents are interpreted and used, we would end up with the following:
.settings.typoscript for front-end TypoScript
.constants.typoscript for constants used in front-end TypoScript
.settings.user.tsconfig for User TSconfig
.constants.user.tsconfig for contants in User TSconfig
.settings.page.tsconfig for Page TSconfig
.constants.page.tsconfig for contants in Page TSconfig
The general scope (TypoScript, User TSconfig, Page TSconfig) is currently reflected via folder names already.
That’s why I’d opt for just one file extension for all - .typoscript, just my two cents.
We have IDEs and completion, and most important modern filesystems with more than 8.3 character support, therefore I would go with .typoscript.
In order to distinguish FE TS Setup, FE TS Constants, Page TS and User TS, I suggest to move to the following best practices that allows allow bulk inclusion: *.setup.typoscript *.constants.typoscript *.user.typoscript *.page.typoscript
The middle part can be omitted if dedicated folders are used (e.g page and user), however for setup and constants it makes a lot of sense to keep both files in the same folder.
The proposal is a bit lengthy, but we have many lengthy file conventions already it there we not many complains so far, because the better readability makes up for length.
I know it’s the same parser, still I’d like to keep the separation between the two, just for “don’t confuse things” reasons.
I won’t anything, of course
To summarize, we now have the following proposals:
.t3s (only)
.t3s + .tsconfig
.typoscript (only)
.typoscript + .tsconfig
Can we move this part to a vote?
There seems to be an agreement to separate the different types by folders, the names are not so clear yet.
I would actually like to move away from calling the frontend render configuration just TypoScript, because it is confusing for newcommers. I would prefer something like
Rendering
Page
User
all in Configuration/TypoScript/. The problem is that the frontend TS also includes lots of stuff that is not directly related to rendering (e.g. extbase class mapping, backend stuff, etc).
On the other hand, we are defining a default, not a strict configuration. People can just deviate from the suggested setup if they wish.
Keep in mind that pageTSconfig (and therefore also userTSconfig) influences FE TypoScript!
(you can define constant for TS via TSconfig)
So TSconfig is also a hybrid for BE and FE configuration.
I agree that we should move away from TypoScript for rendering to something “TSrendering” or so, because TypoScript is name of the syntax!