Skip to content

Version 3 Migration

Mat Lipe edited this page Feb 13, 2023 · 1 revision

The main changes to consider are:

  1. The updated Lipe ruleset.
  2. New sniffs are part of the Lipe namespace.

Version 2

  • In version 2, the ruleset.xml was mostly empty and served as a config to allow the Lipe sniffs to exist.
  • The only included sniffs were Lipe.JS.

Version 3

  • In version 3, the ruleset.xml is a fully formed configuration which is very opinionated.
  • The Lipe namespaces contains various sniffs.
  • A new LipePlugin namespace and ruleset.xml was introduced.

Migrating

If you are using <rule ref="Lipe" /> in your phpcs.xml you'll want to change to using <rule ref="Lipe.JS" />. This will prevent all the extra configuration and sniffs you are not prepared for.

You may then add additional namespaces like <rule ref="LipePlugin.CodeAnalysis.SelfInClassSniff" /> or <rule ref="Lipe.DB.CalcFoundRowsSniff" /> as needed.

Clone this wiki locally