Conversation
…e ConfigurationHelper
There was a problem hiding this comment.
Pull request overview
Adds support for Contao “modern” (twig slot) page layouts by introducing a new entrypoint evaluation/builder pipeline and hooking asset injection into layout rendering, while modernizing some internal wiring and tooling config.
Changes:
- Introduce
EntryPointsBuilder/EntryPoint*types and use them to resolve active entrypoints from frontend, layout, and page inheritance. - Add a new layout event listener for injecting Encore tags in modern layouts; refactor legacy dynamic tag replacement to use the new builder.
- Migrate DI config from
services.ymltoservices.phpand update CI/static analysis tooling configs.
Reviewed changes
Copilot reviewed 22 out of 23 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| src/Helper/ConfigurationHelper.php | Adds isEnabledOnPage() API, deprecates isEnabledOnCurrentPage(), and adjusts enablement evaluation for modern layouts. |
| src/EventListener/InjectPageEntriesListener.php | New listener to inject Encore link/script tags during layout rendering (modern layouts). |
| src/EventListener/Contao/ReplaceDynamicScriptTagsListener.php | Refactors dynamic-tag replacement to build tags via the new entrypoint builder. |
| src/Event/EncoreEnabledEvent.php | Extends event payload (layout), shifts to public properties, and deprecates getters. |
| src/EntryPoint/EntryPointsBuilder.php | New builder to collect entrypoints from frontend asset + layout + page tree. |
| src/EntryPoint/EntryPoints.php | New container for all/active entrypoints. |
| src/EntryPoint/EntryPointBuilderFactory.php | Factory for creating EntryPointsBuilder with dependencies. |
| src/EntryPoint/EntryPoint.php | New value object representing a resolved entrypoint. |
| src/Dca/EncoreEntriesSelectFieldOptions.php | Uses constant for default field name. |
| src/Dca/EncoreEntriesSelectField.php | Introduces NAME_DEFAULT constant for DCA field naming. |
| src/ContaoManager/Plugin.php | Switches container config loading to config/services.php. |
| src/Asset/TemplateAssetGenerator.php | Marks legacy generator as deprecated. |
| src/Asset/TemplateAsset.php | Marks legacy template asset as deprecated. |
| src/Asset/PageEntrypoints.php | Marks legacy page entrypoints as deprecated and tweaks parent merge logic. |
| rector.php | Updates Rector configuration (paths, php version, composer-based, skips). |
| phpstan.neon | Raises PHPStan level and adjusts analyzed paths. |
| phpstan-baseline.neon | Updates baseline to ignore new LayoutEvent-related unknown-class errors. |
| contao/dca/tl_layout.php | Uses NAME_DEFAULT constant when building the subpalette. |
| config/services.yml | Removes YAML DI configuration. |
| config/services.php | New PHP DI configuration (bindings, service loading, aliases). |
| composer.json | Adds deprecation contracts, broadens dev tool version constraints. |
| .gitignore | Adds .codex and normalizes an entry. |
| .github/workflows/ci.yml | Expands CI triggers and skips jobs for draft PRs. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR add support for the new contao twig slot page layouts.
It also modernize some internal mechanic like page entrypoint evaluation.