PHP message patterns

Here is a comprehensive list of exception message patterns the default grouping algorithm recognizes in php. For each pattern you will find:

  • Condition: circumstances under which we apply the pattern
  • Patterns: one or more regular expressions that we use to match against the exception message
  • Applied grouping: the fields we include when computing the fingerprint when the pattern matches

E_WARNING

  • Condition:

    • language is php
    • root exception class is E_WARNING
  • Patterns:

    ^<method_name>\(\): Parameter must be an array or an object that implements Countable$
    • method_name: (count|sizeof)
  • Applied grouping:

    • Do not include any variables

Error - No member function on primitive type

  • Condition:

    • language is php
    • root exception class is Error
  • Patterns:

    ^Call to a member function <function_name>\(\) on <primitive_type>$
    • function_name: (\w+)
    • primitive_type: (\w+)
  • Applied grouping:

    • Include function_name and primitive_type in the fingerprint

Error - Class not found

  • Condition:

    • language is php
    • root exception class is Error
  • Patterns:

    ^Class '<class_name>' not found$
    • class_name: (\S+)
  • Applied grouping:

    • Include class_name in the fingerprint

Error - Undefined function

  • Condition:

    • language is php
    • root exception class is Error
  • Patterns:

    ^Call to undefined function <function_name>\(\)$
    • function_name: (\S+)
  • Applied grouping:

    • Include function_name in the fingerprint

Error - Undefined method

  • Condition:

    • language is php
    • root exception class is Error
  • Patterns:

    ^Call to undefined method <method_name>\(\)$
    • method_name: (\S+)
  • Applied grouping:

    • Include method_name in the fingerprint

UnexpectedValueException

  • Condition:

    • language is php
    • root exception class is UnexpectedValueException
  • Patterns:

    ^The stream or file "<file_name>" could not be opened: failed to open stream: Permission denied$
    • file_name: (\S+)
  • Applied grouping:

    • Do not include any variables