Skip to content

Forward compatible release / Deprecation warnings

Compare
Choose a tag to compare
@pretzlaw pretzlaw released this 03 Jan 01:15

We are about to release a new major which has some breaking changes in the API interface.
Some of them have workarounds to support forward compatibility while other changes raise a E_USER_DEPRECATED warning to help you figure out what will change and how to migrate.

What is forward compatible? Slight changes in the signature of a method (e.g. injecting a string instead of an integer) is an easy to do task, which can be solved in the "old" version already.

What is forward incompatible? Heavy changes in the interface (e.g. removal of a method or class) is a bigger change for which you need the new version and refactor things.

You can use the following environment variables to suppress or raise those warnings:

  • Use WPDI_ERROR_FORWARD_INCOMPATIBLE to raise/suppress errors for incompatible changes.
  • Use WPDI_ERROR_DEPRECATED to raise/suppress errors for forward compatible changes.