Changes for the next stable release of Context for Drupal 7.

Comments

DamienMcKenna created an issue. See original summary.

damienmckenna’s picture

Title: Plan for Context 7.x-3.11 » Plan for Context 7.x-3.12
damienmckenna’s picture

I think it'd be beneficial to do a new release to get the few fixes out for folks to use, especially the PHP 8 fix.

solideogloria’s picture

Agreed. PHP 7.4 will not be supported in a couple months, so pushing a release for PHP 8 compatibility is important.

morganlyndel’s picture

Status: Active » Needs review
StatusFileSize
new418 bytes

On Drupal 7.92 on 7.x-3.11 I was getting the following deprecation notice:

Deprecated: Required parameter $key follows optional parameter $type in /code/sites/all/modules/contrib/context/context.module on line 530

According to the PHP Watch documentation, removing the default value should remove the deprecation and shouldn't break any code, so I created a patch that removes the default value.

morganlyndel’s picture

Status: Needs review » Active

Moving this back to active... I was oversimplifying the interpretation of this article, and the patch introduced the following error (which makes sense when the optional parameter is essentially removed): ArgumentCountError: Too few arguments to function context_get_plugin(), 2 passed in /var/www/sites/all/modules/contrib/context/context.module on line 168 and exactly 3 expected in context_get_plugin() (line 530 of /var/www/sites/all/modules/contrib/context/context.module).

I wonder if the original deprecation notice might be a false flag, as it's flagging for $key and $type, not $reset (which is the "optional" parameter in line 530)?

solideogloria’s picture

Did you already apply this patch? https://www.drupal.org/files/issues/2021-04-09/context-n3208025-3.patch

That looks like the error you'd receive if you didn't apply it yet. Make sure you rebuild the site's cache.

See #3208025: PHP 8.0 compatibility for Context 7.x-3.x

solideogloria’s picture

damienmckenna’s picture

@morganlyndel: That bug was fixed in #3208025, which is available in the current dev snapshot.

poker10’s picture

+1 for the new release (with the PHP 8 compatibility fix included). Thanks!

yookoala’s picture

Is there any concern needed to be addressed before releasing 7.x-3.12?

PHP 7.4 will reach it's EOL on 1st Jan, 2023 and PHP 8.2 is already out. PHP 8 support is kind of an important reason to release it ASAP. If there is no more standing issue with the current code, I would hope to urge the maintainer to publish this sooner rather than latert.

solideogloria’s picture

Status: Active » Reviewed & tested by the community
klausi’s picture

Priority: Normal » Major

Agreed that getting a new release out would be good, then everybody upgrading to PHP 8 can avoid patching the context module. Raising the priority to major.

hargobind’s picture

Came here to say that it would be great to see this release soon as I'm transitioning a handful of sites to PHP 8.1, and it would be nice to get a full release into our deploy process.

poker10’s picture

@DamienMcKenna Do you plan to release 7.x-3.12 anytime soon please? PHP 7.4 is EOL in 2023, so it would be great to have PHP 8 compatibility fixed. Thanks!

damienmckenna’s picture

I'd love to but I'm not a (co-)maintainer, I just hop around the issue queues in my styling rabbit ears trying to help out =:->

poker10’s picture

Oh, sorry. I totally missed this and assumed, that you are a maintainer, as you have created this plan :) I have pinged @paulocs about the release. And thanks for helping!

paulocs’s picture

Status: Reviewed & tested by the community » Fixed

Sorry team, I haven't been very active in the last months in the context module and I don't have permission to give you access as co-maintainer. I'll try to reach out any maintainer with 'administer maintainers' permission so they can give me access.

Anyway here is the release: https://www.drupal.org/project/context/releases/7.x-3.12

hargobind’s picture

Much appreciated @paulocs!

Status: Fixed » Closed (fixed)

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