История коммитов

simba77
refactor(mail): give the emails their own Twig environment
The six email templates move to @theme/emails/*.twig and are rendered by an
environment of their own: a message has no request behind it, so nothing of the
visitor, the csrf token or the build assets is offered there, and every address
it prints is absolute.

- MailRenderer takes the locale as an argument and puts the translator of the
process back afterwards, so a batch of messages in different languages leaves
nothing behind; EmailSender no longer mutates a shared engine
- a row queued before this change still names its Plates template and is mapped
to the Twig one of the same name
- twig:lint, twig:compile and i18n:scan pick the environment a template belongs
to, otherwise the mail functions read as unknown to them
simba77
refactor(comments): move the comment pages to Twig
The legacy Comments printed four Plates templates; they become
@theme/pages/comments-{list,reply,delete}.twig plus
@theme/components/comments-form.twig, and the class renders through
RendererInterface.

- the author name, the address and the browser were printed unescaped and now
go through autoescape; the comment text and the answer keep their markup as
Twig\Markup
- the URLs of the actions carried & inside the data, which the template
escaped a second time; they are built raw now and the redirect no longer has
to undo the escaping
- the templates_namespace argument is gone: all three callers passed 'system',
and after the themes merged there is nothing left to choose
- whether the address of an author may be shown is decided by the class, not by
the Plates $user global
simba77
refactor(view): render access errors through Twig
The access middlewares and the error renderers took Johncms\System\View\Render
and named Plates templates; they now take RendererInterface and name Twig ones.

- the admin gates render @admin/pages/errors/403.twig, which is what the plan
reserved for a middleware that knows it guards the panel
- the public gates and both error renderers render @theme/pages/result.twig
- ForumErrorRenderer::render() and DownloadsErrorRenderer::render() become
response(), since they no longer wrap the legacy engine
- the error branches of FileCommentsController move too; the page itself stays
on Plates, because the legacy Comments prints its own layout
simba77
refactor(contacts): move the admin pages to Twig
The four admin templates of the module become @contacts/admin/*.twig and the
four controllers return ViewResponse.

- the status filters of the list and the multilingual fields of the settings
were built in the templates and now come from the controllers
- the message text goes through the nl2br filter, which escapes before it
inserts the breaks
simba77
refactor(consent): move the admin pages to Twig
The six admin templates of the module become @consent/admin/*.twig and the five
controllers return ViewResponse.

- the module's ckeditor wrapper is gone: the consent form includes the theme
component
- the per-field validation messages go through @theme/components/field-errors
simba77
refactor(news): move the admin pages to Twig
The seven admin templates of the module become @news/admin/*.twig and the three
controllers return ViewResponse; the delete confirmation stays a fragment,
since it is shown in a modal.

- the SpecialChars cast is gone from NewsArticle and NewsSection: it escaped on
read, and with autoescape a name carrying markup reached the page escaped
twice. Every consumer of these fields is Twig now
- the module's ckeditor wrapper is gone: the article form includes the theme
component
- the flash messages are no longer escaped in the controller
simba77
refactor(collections): move the admin pages to Twig
The nine admin templates of the module become @collections/admin/*.twig and the
four controllers return ViewResponse; system::pages/result becomes
@admin/pages/result.twig.

- the module's own ckeditor wrapper is gone: the item form includes the theme
component
- the delete confirmation is one template for collections, sections, fields and
items, as it was
simba77
refactor(view): merge the five ckeditor wrappers into one theme component
Every module that edits formatted text carried its own copy of the same
wrapper, differing only in the field name and whether uploading is on. They
become @theme/components/editor.twig, taking those as parameters.

The plan called for this once a fourth copy appeared; there were five.
simba77
refactor(admin): move the maintenance and system check pages to Twig
The last two pages of the panel become @admin/maintenance.twig and
@admin/system-check.twig; both controllers return ViewResponse and drop the
Render dependency.

- the status labels and their badge classes were built in the template and now
come from the controller with the rest of the row
- a check description explains how to fix the check and one of them carries a
link to the manual, so the controller hands it over as Twig\Markup
- the three tables of the system check were copies and became a loop

Only sidebar-admin-menu.phtml is left in modules/admin/templates: the admin
parts of the other modules still render it through system::pages/result.
simba77
refactor(admin): move the login pages to Twig
The login screen and the verification code become @admin/login.twig and
@admin/login-captcha.twig, extending the guest layout of the panel; the
controller returns ViewResponse and drops the Render dependency.

- the form reads $request->hasBody('login') instead of $_POST
- the captcha field "remember" was rendered from an undefined variable and now
arrives from the request

KernelSmokeTest told the two areas apart by /themes/admin/assets/, which the
login page was the last to use; it now compares the built bundles instead.
The baseline loses the entry for the ?? that went away with $_POST.