The following were the changes implemented in considering the transition to NexusPHP CS Config:
- Public methods
forProjects
andforLibrary
were added toFactory
class. forProjects
accepts no arguments and acts as the oldFactory::create
.forLibrary
accepts two required and two optional arguments and behaves as the oldFactory::createForLibrary
.- The
Nexus73
ruleset is added and meant for use in PHP 7.3+. declare(strict_types=1)
was added to all PHP files for additional type safety.
- Root namespace of
Liaison\CS\Config
was renamed toNexus\CsConfig
. Factory::create
now returns an instance ofFactory
instead ofPhpCsFixer\Config
. This allows it to be chained with eitherforProjects
orforLibrary
public methods.
Factory::createForLibrary
was removed. Use the public methodforLibrary
to get similar effect.- The
Liaison
andCodeIgniter4
rulesets were removed. - The deprecated
BaseRuleset
class was removed. - Custom fixers were removed and moved to a new repository, NexusPHP CS Fixers.
Please have a look at this library's .php_cs.dist
to have a glance of the new changes
in action. You can also refer to the README for additional details.