Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecation warning after updating to 3.1.31 #4416

Closed
elfacht opened this issue Jun 19, 2019 · 9 comments
Closed

Deprecation warning after updating to 3.1.31 #4416

elfacht opened this issue Jun 19, 2019 · 9 comments

Comments

@elfacht
Copy link

elfacht commented Jun 19, 2019

Description

After updating to 3.1.31 this deprecaation warning pops up:

ThedefineComponentsevent on CraftVariable has been deprecated. Use theinitevent to register custom components instead.
Called from /xxx/vendor/craftcms/cms/src/web/twig/variables/CraftVariable.php:139

This warning comes up on all my Craft projects., even with all plugins disabled.

Steps to reproduce

  1. Update from 3.1.30 to 3.1.31

Additional info

  • Craft version: 3.1.31
  • PHP version: 7.2
@brandonkelly
Copy link
Member

Yii 2.0.20 included a fix for wildcard event handlers, which could have something to do with this.

I know you said you disabled all your plugins, but do you have a module that may be registering a wildcard event perhaps?

@brandonkelly
Copy link
Member

Turns out this happens when the Debug Toolbar is enabled, which registers a wildcard event.

I’ve removed the check for that event for the next Craft 3.2 Beta release, so those deprecation errors will go away after that.

@lukeyouell
Copy link

@brandonkelly will this be fixed also be applied to 3.1? We're not in a position to update to 3.2 yet but the deprecation error is slightly annoying!

@elfacht
Copy link
Author

elfacht commented Jul 15, 2019

@lukeyouell This is already fixed in 3.2 and I guess this will not be fixed in 3.1.

@lukeyouell
Copy link

@elfacht I can appreciate that, but bug fixes such as this shouldn't just be applied to 3.2 as they affect projects using 3.1 too.

@brandonkelly
Copy link
Member

@lukeyouell 3.1 is not an LTS release or anything.

@lukeyouell
Copy link

@brandonkelly Thanks. Is there a reason why it isn't?

The reason we aren't in a position to update is due to the bugs associated with the new features that ship with 3.2, it just doesn't look to be stable enough yet, which is understandable considering it was only released a week ago.

I do think there's a case for 3.x releases to receive short-term support in the form of minor bug/security fixes, at least until the latest release is tried-and-tested.

@brandonkelly
Copy link
Member

There’s definitely a case for us establishing a LTS program, but 3.1 isn’t one.

Plus in this case, this deprecation error can safely be ignored. The fix was a slight breaking change, which is why I made it for 3.2.0 rather than a 3.1.x release.

@lukeyouell
Copy link

@brandonkelly Yeah the deprecation issue is minor. I think my initial point developed into a wider question! Thanks for explaining!

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

No branches or pull requests

3 participants