Skip to content

feat(twig): register views as @NowoAuditKitBundle with app overrides first (REQ-TWIG-001, REQ-TWIG-002) - #25

Merged
HecFranco merged 1 commit into
mainfrom
req100
Oct 27, 2026
Merged

HecFranco merged 1 commit into
mainfrom
req100

Conversation

@HecFranco

Copy link
Copy Markdown
Contributor

Summary

Closes the remaining DETAILS gaps REQ-TWIG-001 and REQ-TWIG-002.

  • REQ-TWIG-002: new TwigPathsPass (TWIG_NAMESPACE = 'NowoAuditKitBundle') registers src/Resources/views under @NowoAuditKitBundle on the native Twig loader. The timeline partial, USAGE and spec 003 now use @NowoAuditKitBundle/action_log/_timeline.html.twig. Symfony's automatic @NowoAuditKit namespace still resolves the same files in 1.x (deprecated, documented in UPGRADING).
  • REQ-TWIG-001: prependPath() for templates/bundles/NowoAuditKitBundle/ when it exists, then addPath() for the bundle views, so application overrides always win. USAGE gains "Overriding templates": subpath table, override-vs-upgrade table, freeze rule, procedure, recovery.
  • Tests: TwigPathsPassTest (addPath/prependPath, no-op without loader, alias chain), NowoAuditKitBundleTest::testBuildRegistersTheTwigPathsPass, TwigNamespaceIntegrationTest (real TwigBundle kernel: namespace resolves to the bundle file; app override is the first path and wins).
  • PHPUnit config schema 11.5 + #[CoversClass] attribute (clears the 2 runner deprecations).

Checks (local)

cs-check, rector-dry, phpstan, igor, validate-translations, check-twig-extra, check-no-raw-html-form, composer-sync, test-coverage-100 (734/734), demo release-check; demo debug:twig lists @NowoAuditKitBundle.

🤖 Generated with Claude Code

…first (REQ-TWIG-001, REQ-TWIG-002)

- TwigPathsPass prepends templates/bundles/NowoAuditKitBundle/ when present and
  appends src/Resources/views under the NowoAuditKitBundle namespace.
- Timeline partial, docs and spec now use @NowoAuditKitBundle/...; the
  automatic @NowoAuditKit namespace keeps working in 1.x and is deprecated.
- USAGE: "Overriding templates" (subpath table, override vs upgrade, freeze
  rule, procedure, recovery). CHANGELOG/UPGRADING under Unreleased.
- Tests: TwigPathsPass unit test, bundle build() test, TwigBundle kernel test
  (namespace resolves, application override wins).
- PHPUnit: 11.5 config schema and #[CoversClass] (clears 2 runner deprecations).
@github-actions

Copy link
Copy Markdown

@coderabbitai review

@HecFranco
HecFranco merged commit c859655 into main Oct 27, 2026
16 checks passed
@HecFranco
HecFranco deleted the req100 branch October 27, 2026 08:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant