Skip to content
This repository has been archived by the owner on Jan 31, 2020. It is now read-only.

syntax error, unexpected '?' in PHP7.0 #46

Closed
elvispdosreis opened this issue Oct 23, 2017 · 5 comments
Closed

syntax error, unexpected '?' in PHP7.0 #46

elvispdosreis opened this issue Oct 23, 2017 · 5 comments
Labels

Comments

@elvispdosreis
Copy link

…\vendor\zendframework\zend-code\src\Reflection\DocBlock\Tag\VarTag.php69

public function getVariableName() : ?string
{
return $this->variableName;
}

zend

@michalbundyra
Copy link
Member

@elvispdosreis What version of zendframework/zend-code are you using (composer show)? As I can see VarTag support has been added in 3.2.0 - PR #41 and it requires PHP 7.1.

@elvispdosreis
Copy link
Author

"zendframework/zend-soap": "^2.6",

@michalbundyra
Copy link
Member

@elvispdosreis sorry, I've asked for zend-code, not zend-soap. as you said, the issue seems to be in file:

 \vendor\zendframework\zend-code\src\Reflection\DocBlock\Tag\VarTag.php69
                       ^^^^^^^^^^

@elvispdosreis
Copy link
Author

elvispdosreis commented Oct 23, 2017

it seems that the zend-code version is incompatible with php7.0

{
    "name": "zendframework/zend-code",
    "description": "provides facilities to generate arbitrary code using an object oriented interface",
    "license": "BSD-3-Clause",
    "keywords": [
        "zf2",
        "code"
    ],
    "homepage": "https://github.com/zendframework/zend-code",
    "autoload": {
        "psr-4": {
            "Zend\\Code\\": "src/"
        }
    },
    "require": {
        **"php": "^7.1",**
        "zendframework/zend-eventmanager": "^2.6 || ^3.0"
    },
    "require-dev": {
        "ext-phar": "*",
        "doctrine/annotations": "~1.0",
        "zendframework/zend-stdlib": "^2.7 || ^3.0",
        "phpunit/phpunit": "^6.2.3",
        "zendframework/zend-coding-standard": "^1.0.0"
    },
    "suggest": {
        "doctrine/annotations": "Doctrine\\Common\\Annotations >=1.0 for annotation features",
        "zendframework/zend-stdlib": "Zend\\Stdlib component"
    },
    "minimum-stability": "dev",
    "prefer-stable": true,
    "extra": {
        "branch-alias": {
            "dev-master": "3.2-dev",
            "dev-develop": "3.3-dev"
        }
    },
    "autoload-dev": {
        "psr-4": {
            "ZendTest\\Code\\": "test/"
        }
    },
    "scripts": {
        "check": [
            "@cs-check",
            "@test"
        ],
        "upload-coverage": "coveralls -v",
        "cs-check": "phpcs",
        "cs-fix": "phpcbf",
        "test": "phpunit --colors=always",
        "test-coverage": "phpunit --colors=always --coverage-clover clover.xml"
    }
}

@michalbundyra
Copy link
Member

@elvispdosreis as I said, since zend-code 3.2.0 supports only PHP7.1. I have no idea how then you've install it. Please check your dependencies (you can share composer show results here) and run update (composer update) to update your dependencies. Have you install with --ignore-platform-reqs? I can't see any issue with libraries, this is just problem with your installation.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants