Issue Bug Closed

#92181TYPO3\CMS\Core\Configuration\ExtensionConfiguration->set paremter; anotation for third parameter wrong

Timo Poppinga 09/02/20, 17:28 updated 09/08/20, 11:43

Description

Is

    /**
     * @param string $extension Extension name
     * @param string $path Configuration path to set - eg. "featureCategory/coolThingIsEnabled"
     * @param null $value The value. If null, unset the path
     * @internal
     */
    public function set(string $extension, string $path = '', $value = null): void
    {

should be

    /**
     * @param string $extension Extension name
     * @param string $path Configuration path to set - eg. "featureCategory/coolThingIsEnabled"
     * @param string|null $value The value. If null, unset the path
     * @internal
     */
    public function set(string $extension, string $path = '', ?string $value = null): void
    {

Triggers PHP Stan violation:

Parameter #3 $value of method TYPO3\CMS\Core\Configuration\ExtensionConfiguration::set() expects null, string given.

Reviews 2