Todo: Run a deprecated code report for the Components module.

CommentFileSizeAuthor
#5 components-twig-3112929-5.patch951 bytesberdir

Comments

DamienMcKenna created an issue. See original summary.

damienmckenna’s picture

Issue tags: +Drupal 9 compatibility
lisa.rae’s picture

5/5 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%

------ --------------------------------------------------------------------------
Line src/Template/Loader/ComponentLibraryLoader.php
------ --------------------------------------------------------------------------
65 Call to deprecated function system_get_info():
in drupal:8.8.0 and is removed from drupal:9.0.0. Use
\Drupal::service('extension.list.$type')->getExtensionInfo() or
\Drupal::service('extension.list.$type')->getAllInstalledInfo() instead.
------ --------------------------------------------------------------------------

------ --------------------------------------------------------------
Line src/Template/TwigNodeTheme.php
------ --------------------------------------------------------------
29 Call to deprecated method getLine() of class Twig\Node\Node:
since 1.27 (to be removed in 2.0)
33 Call to deprecated method getLine() of class Twig\Node\Node:
since 1.27 (to be removed in 2.0)
------ --------------------------------------------------------------

------ ---------------------------------------------------------------------------------------------
Line src/Template/TwigThemeTokenParser.php
------ ---------------------------------------------------------------------------------------------
21 Return type of method Drupal\components\Template\TwigThemeTokenParser::parse() has typehint
with deprecated interface Twig_NodeInterface:
since 1.12 (to be removed in 3.0)
------ ---------------------------------------------------------------------------------------------

[ERROR] Found 4 errors

berdir’s picture

Also, actually trying this on D9 will give you this error:

Warning: Declaration of Drupal\components\Template\Loader\ComponentsLoader::findTemplate($name) should be compatible with Twig\Loader\FilesystemLoader::findTemplate($name, $throw = true) in include() (line 444 of vendor/composer/ClassLoader.php). 
berdir’s picture

Status: Active » Needs review
StatusFileSize
new951 bytes

I'm not sure if #3 was on the 1.x branch, I'm not seeing any of that in 8.x-2.x.

The only thing I see is the twig method. I think the extra optional argument should be backward compatible and should work in D8 too.

Wasn't sure what to do about the docblock, copying it from the parent introduces a lot of drupal coding standard violations, so just went with the standard {@inheritdoc}

jayasree.e’s picture

Status: Needs review » Reviewed & tested by the community

Thanks, looks good to me.

oknate’s picture

Also, RTBC by me.

elgandoz’s picture

Patch #5 works beautifully on D9 + 2.x-dev.

I'm having issues with D8 + 2.x-dev, I get a weird bug where I cannot use the administration theme (default remains active despite what's selected in the "Appearance" form). Note: I couldn't find the reason and it may not be related to this issue.

  • JohnAlbin committed 65b9bdb on 8.x-2.x authored by Berdir
    Issue #3112929 by Berdir, DamienMcKenna, oknate, lhridley, elgandoz,...
johnalbin’s picture

Status: Reviewed & tested by the community » Fixed

Committed!

heddn’s picture

@JohnAlbin, can we get a new beta or RC tagged so we have something to upgrade too? Maybe even update the Drupal 9 Compatibility Field for the project?

Status: Fixed » Closed (fixed)

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