[ad_1]
[ad_2]
If I make a plugin how often do I need to expect to update it to breaking changes in WordPress? I would make something that creates a block or content type, adds fields to those, and/or associates some categories with users. My question is about expected maintenance, not if some other plugins can do this for me.
I’m a plugin developer. I have found that if I’m careful to …
* use the current version of php, and
* follow the WordPress APIs diligently
that I rarely have to change anything when a new WordPress version rolls. More often I get support topics asking me to support an *older* version of WordPress or php, because a user with obsolete stuff in their instance wants to use my stuff. I sometimes comply, and sometimes don’t, with those requests.
As of early October 2024, I test with php 8.2, 8.1, and 7.4. I expect I’ll have to add 8.3 to that list soon.
The thing that broke a lot of plugins in the past year was upgrades from older versions of php (like 5.6) to newer versions. The php developers have been gradually tightening up the language. Stuff that used to work, like passing nulls in place of text strings to certain functions, now throws deprecation warnings.
You can and should use the [WordPress Beta Tester](https://wordpress.org/plugins/wordpress-beta-tester/) plugin on your test instances so you get the new stuff and can test before it hits autoupdate.
If you follow the WordPress coding standards and use WordPress native functions instead of custom PHP, it will provably last very long. Also avoid using deprecated PHP functionality. Re blocks: i never had issues. I have some blocks written in 2019 and they still work but i keep it simple and not use external libraries.
If I reply with only “yes” is that being rude?