Skip to content

ERROR: Referenced sniff "XXXX" does not exist. After upgrading to 5.3.0 #422

@kolorafa

Description

@kolorafa

After removing dereuromark/cakephp-ide-helper from app project, we got those upgrades:

  • Upgrading cakephp/cakephp-codesniffer (5.2.2 => 5.3.0)
  • Upgrading slevomat/coding-standard (8.22.1 => 8.23.0)
  • Upgrading squizlabs/php_codesniffer (3.13.4 => 4.0.0)

It results in:

 ./vendor/bin/phpcs
ERROR: Referenced sniff "SlevomatCodingStandard.Arrays.TrailingArrayComma" does not exist.
ERROR: Referenced sniff "SlevomatCodingStandard.Functions.RequireTrailingCommaInDeclaration" does not exist.
ERROR: Referenced sniff "SlevomatCodingStandard.Functions.RequireTrailingCommaInClosureUse" does not exist.
ERROR: Referenced sniff "SlevomatCodingStandard.Functions.RequireTrailingCommaInCall" does not exist.
ERROR: Referenced sniff "SlevomatCodingStandard.Functions.DisallowTrailingCommaInDeclaration" does not exist.
ERROR: Referenced sniff "SlevomatCodingStandard.Functions.DisallowTrailingCommaInClosureUse" does not exist.
ERROR: Referenced sniff "SlevomatCodingStandard.Functions.DisallowTrailingCommaInCall" does not exist.
ERROR: Referenced sniff "SlevomatCodingStandard.Classes.ClassConstantVisibility" does not exist.
ERROR: Referenced sniff "SlevomatCodingStandard.Classes.EmptyLinesAroundClassBraces" does not exist.
ERROR: Referenced sniff "SlevomatCodingStandard.Classes.ModernClassNameReference" does not exist.
ERROR: Referenced sniff "SlevomatCodingStandard.Commenting.DisallowOneLinePropertyDocComment" does not exist.
ERROR: Referenced sniff "SlevomatCodingStandard.Commenting.DocCommentSpacing" does not exist.
ERROR: Referenced sniff "SlevomatCodingStandard.Commenting.EmptyComment" does not exist.
ERROR: Referenced sniff "SlevomatCodingStandard.Commenting.InlineDocCommentDeclaration" does not exist.
ERROR: Referenced sniff "SlevomatCodingStandard.ControlStructures.AssignmentInCondition" does not exist.
ERROR: Referenced sniff "SlevomatCodingStandard.ControlStructures.DisallowContinueWithoutIntegerOperandInSwitch" does not exist.
ERROR: Referenced sniff "SlevomatCodingStandard.ControlStructures.DisallowYodaComparison" does not exist.
ERROR: Referenced sniff "SlevomatCodingStandard.ControlStructures.LanguageConstructWithParentheses" does not exist.
ERROR: Referenced sniff "SlevomatCodingStandard.ControlStructures.NewWithParentheses" does not exist.
ERROR: Referenced sniff "SlevomatCodingStandard.ControlStructures.RequireNullCoalesceOperator" does not exist.
ERROR: Referenced sniff "SlevomatCodingStandard.Exceptions.DeadCatch" does not exist.
ERROR: Referenced sniff "SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses" does not exist.
ERROR: Referenced sniff "SlevomatCodingStandard.Namespaces.FullyQualifiedClassNameInAnnotation" does not exist.
ERROR: Referenced sniff "SlevomatCodingStandard.Namespaces.NamespaceDeclaration" does not exist.
ERROR: Referenced sniff "SlevomatCodingStandard.Namespaces.ReferenceUsedNamesOnly" does not exist.
ERROR: Referenced sniff "SlevomatCodingStandard.Namespaces.DisallowGroupUse" does not exist.
ERROR: Referenced sniff "SlevomatCodingStandard.Namespaces.UnusedUses" does not exist.
ERROR: Referenced sniff "SlevomatCodingStandard.Namespaces.UseDoesNotStartWithBackslash" does not exist.
ERROR: Referenced sniff "SlevomatCodingStandard.Namespaces.UseFromSameNamespace" does not exist.
ERROR: Referenced sniff "SlevomatCodingStandard.Namespaces.UseSpacing" does not exist.
ERROR: Referenced sniff "SlevomatCodingStandard.PHP.ShortList" does not exist.
ERROR: Referenced sniff "SlevomatCodingStandard.PHP.TypeCast" does not exist.
ERROR: Referenced sniff "SlevomatCodingStandard.PHP.UselessParentheses" does not exist.
ERROR: Referenced sniff "SlevomatCodingStandard.PHP.UselessSemicolon" does not exist.
ERROR: Referenced sniff "SlevomatCodingStandard.TypeHints.DeclareStrictTypes" does not exist.
ERROR: Referenced sniff "SlevomatCodingStandard.TypeHints.LongTypeHints" does not exist.
ERROR: Referenced sniff "SlevomatCodingStandard.TypeHints.NullableTypeForNullDefaultValue" does not exist.
ERROR: Referenced sniff "SlevomatCodingStandard.TypeHints.ParameterTypeHint" does not exist.
ERROR: Referenced sniff "SlevomatCodingStandard.TypeHints.ParameterTypeHintSpacing" does not exist.
ERROR: Referenced sniff "SlevomatCodingStandard.TypeHints.ReturnTypeHint" does not exist.
ERROR: Referenced sniff "SlevomatCodingStandard.TypeHints.PropertyTypeHint" does not exist.
ERROR: Referenced sniff "SlevomatCodingStandard.TypeHints.DNFTypeHintFormat" does not exist.
ERROR: Referenced sniff "SlevomatCodingStandard.Classes.PropertyDeclaration" does not exist.
ERROR: Referenced sniff "SlevomatCodingStandard.TypeHints.ReturnTypeHintSpacing" does not exist.
ERROR: Referenced sniff "SlevomatCodingStandard.Variables.DuplicateAssignmentToVariable" does not exist.
ERROR: Referenced sniff "SlevomatCodingStandard.Variables.UnusedVariable" does not exist.
ERROR: Referenced sniff "SlevomatCodingStandard.Functions.NamedArgumentSpacing" does not exist.
ERROR: Referenced sniff "SlevomatCodingStandard.Functions.ArrowFunctionDeclaration" does not exist.
ERROR: Referenced sniff "SlevomatCodingStandard.Attributes.AttributeAndTargetSpacing" does not exist.
ERROR: Referenced sniff "SlevomatCodingStandard.Attributes.RequireAttributeAfterDocComment" does not exist.
ERROR: Referenced sniff "SlevomatCodingStandard.Classes.BackedEnumTypeSpacing" does not exist.
ERROR: Referenced sniff "SlevomatCodingStandard.ControlStructures.RequireShortTernaryOperator" does not exist.
ERROR: Referenced sniff "SlevomatCodingStandard.TypeHints.ReturnTypeHint.MissingNativeTypeHint" does not exist.

the same with phpcbf

$ ./vendor/bin/phpcbf 
ERROR: Referenced sniff "SlevomatCodingStandard.Arrays.TrailingArrayComma" does not exist.
ERROR: Referenced sniff "SlevomatCodingStandard.Functions.RequireTrailingCommaInDeclaration" does not exist.
ERROR: Referenced sniff "SlevomatCodingStandard.Functions.RequireTrailingCommaInClosureUse" does not exist.
ERROR: Referenced sniff "SlevomatCodingStandard.Functions.RequireTrailingCommaInCall" does not exist.
ERROR: Referenced sniff "SlevomatCodingStandard.Functions.DisallowTrailingCommaInDeclaration" does not exist.
ERROR: Referenced sniff "SlevomatCodingStandard.Functions.DisallowTrailingCommaInClosureUse" does not exist.
ERROR: Referenced sniff "SlevomatCodingStandard.Functions.DisallowTrailingCommaInCall" does not exist.
ERROR: Referenced sniff "SlevomatCodingStandard.Classes.ClassConstantVisibility" does not exist.

Changing composer.json for cakephp/cakephp-codesniffer from ^5.0 to 5.2.*

  • Downgrading cakephp/cakephp-codesniffer (5.3.0 => 5.2.2)
  • Downgrading slevomat/coding-standard (8.23.0 => 8.22.1)
  • Downgrading squizlabs/php_codesniffer (4.0.0 => 3.13.4)

And problem ofc disappears.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions