Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.x Move StarterSite class to src folder #143

Merged
merged 6 commits into from
Nov 29, 2023
Merged

Conversation

gchtr
Copy link
Member

@gchtr gchtr commented Jul 31, 2023

For a better code structure, we can add StarterSite to its own class in a src folder. This is also the approach you would use to autoload classes using Composer.

I didn’t add the autoload entry to composer.json itself, because (as @szepeviktor noted in #143 (review)) developers would best use a namespaced approach. But if we defined a default namespace, we could end up with a lot of themes not updating from the default namespace, which is not better.

This pull request also moves the Timber::$autoescape = false to that class, calling it the way we advise in Timber 2.0.

@gchtr gchtr added the 2.x label Jul 31, 2023
composer.json Outdated Show resolved Hide resolved
@gchtr gchtr changed the title 2.x Autoload StarterSite class through Composer 2.x Move StarterSite class to src folder Jul 31, 2023
Base automatically changed from 2.x-fix-tests to 2.x July 31, 2023 12:26
@gchtr gchtr requested a review from jarednova November 9, 2023 09:05
@gchtr gchtr merged commit f0d6acf into 2.x Nov 29, 2023
9 checks passed
@gchtr gchtr deleted the 2.x-autoload-site-class branch November 29, 2023 19:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants