Problem/Motivation

#1942490: Make Twig engine available during install makes CoreBundle::registerTwig() public and static so that it can be reused in the installer. However, this is different from other methods on the CoreBundle and there's no indication of why, so someone might unwittingly try to revert this in the future.

Proposed resolution

Add a paragraph to the method docblock explaining why it is public and static.

Comments

xjm’s picture

Issue tags: +Novice
foopang’s picture

Status: Active » Needs review
StatusFileSize
new571 bytes
xjm’s picture

Status: Needs review » Needs work
+++ b/core/lib/Drupal/Core/CoreBundle.phpundefined
@@ -384,6 +384,8 @@ protected function registerRouting(ContainerBuilder $container) {
    * Registers Twig services.
+   * ¶
+   * This method is public and static so that it can be reused in the installer.

Bit of trailing whitespace here.

Other than that, this is probably all we need! Thanks @foopang.

foopang’s picture

Status: Needs work » Needs review
StatusFileSize
new570 bytes

Removed trailing whitespace and rerolled the patch. Thanks xjm for review.

fabianx’s picture

Status: Needs review » Reviewed & tested by the community

Looks good to me.

star-szr’s picture

Yup, looks good. Thanks @foopang!

jhodgdon’s picture

There's another patch that hits the CoreBundle.php file and is marked "avoid commit conflicts"... and it might have some bearing on this issue? In any case I'd wait to commit this patch until
#1939660: Use YAML as the primary means for service registration
is taken care of.

chx’s picture

Yes, and in fact it adds a similar line although not the same, Once that's in we can freely wordsmith more. That patch bears the avoid commit conflicts tag because it's ahem, a bear to reroll :)

chx’s picture

Status: Reviewed & tested by the community » Needs work

Definitely needs a reroll and perhaps the other installer comments in CoreBundle need wordsmithing too?

kevin morse’s picture

Status: Needs work » Needs review
StatusFileSize
new651 bytes

Here's a start with just that one comment changed.

This other line (below) doesn't really make sense to me either but then again I don't really know what's happening here.

As this is different during install, it needs to stay in PHP.
fabianx’s picture

Status: Needs review » Reviewed & tested by the community

Looks good to me.

jhodgdon’s picture

Status: Reviewed & tested by the community » Fixed

Thanks all! Committed to 8.x.

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Issue summary: View changes

Updated issue summary.