Skip to content

Arrays in param configs officially not supported

Compare
Choose a tag to compare
@spaze spaze released this 20 Mar 22:35
· 132 commits to main since this release
  • Arrays in param configs (allowParam*, allowExceptParam* etc.) not supported at the moment (#177, #165 thanks @mad-briller)

They never were and now it's official. It means that you can't for example allow a method call when a parameter ($message in the case below) would be an array:

parameters:
    disallowedMethodCalls:
        -
            method: 'Logger::log()'
            allowParamsAnywhere:
                -
                    position: 1
                    name: 'message'
                    value: ['foo', 'bar']

This would mean that Logger::log() would be allowed only when it would be called like Logger::log(['foo', 'bar']). And allowing that is not supported at the moment, only scalar values may be used in value:. It may change in the future though.

Also some internal changes too tiny to even list here:

  • Use fully-qualified function name in tests (6bb5575)
  • Function and method can also be a list, a docblock change only (240e6e7)
  • Formatting multiple calls to look like {Foo,Bar,Baz}::call() is done in one place only (d598c89)