Skip to content

Declaration of Phalcon\Devtools\Version::_getVersion() must be compatible with Phalcon\Version::_getVersion(): array in /root/phalcon-devtools/scripts/Phalcon/Devtools/Version.php on line 44 #1302

Closed
@ZhangRuiMingZRM

Description

@ZhangRuiMingZRM

php version: PHP 7.2.17-0ubuntu0.18.04.1
phalcon-devtools version : 3.4.0

I have already installed phalcon-devtools;
When i typed phalcon

PHP Fatal error:  Declaration of Phalcon\Devtools\Version::_getVersion() must be compatible with Phalcon\Version::_getVersion(): array in /root/phalcon-devtools/scripts/Phalcon/Devtools/Version.php on line 44

It seems to be caused by inconsistent return types

You should add return type(array) for Phalcon\Devtools\Version::_getVersion() in phalcon-devtools/scripts/Phalcon/Devtools/Version.php on line 44

    protected static function _getVersion(): array
    {
        return [3, 4, 0, 4, 0];
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions