Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP 7: Return type declarations #74

Open
findli opened this issue Apr 16, 2016 · 5 comments
Open

PHP 7: Return type declarations #74

findli opened this issue Apr 16, 2016 · 5 comments

Comments

@findli
Copy link

findli commented Apr 16, 2016

When use PHP 7: Return type declarations it's cause [TokenReflection\Exception\ParseException] Unexpected token found.

Description for the new feature in PHP 7: http://php.net/manual/en/functions.returning-values.php

I'm using "codeception/aspect-mock": "*".

@jmauerhan
Copy link

I'm also having this error, and trying to use AspectMock.

@findli
Copy link
Author

findli commented Apr 24, 2016

@jmauerhan Hi. For me temporary solution is not to use new features from 7 version only in those files that will be mocked:

$kernel = \AspectMock\Kernel::getInstance();

$kernel->init([

    'includePaths' => [

        __DIR__ . '/../../../src/Lib/Event/Manager/EventManager.php',

        __DIR__ . '/../../../src/App/Helper/InputParamHelper.php',

    ],

]);

@jmauerhan
Copy link

Not really an option for me :) I switched to PHP-Mock because I was only using AspectMock for functions. https://github.com/php-mock/php-mock

@natechicago
Copy link

For others who come across this thread, it looks like AspectMock's core dependency GoAOP will be abandoning its reliance on the outdated Andrewsville/PHP-Token-Reflection library when GoAOP 2.0 is released. See Codeception/AspectMock#92.

@jankal
Copy link

jankal commented Mar 12, 2017

As far as I know, this repo is abandoned. There won't be any PHP 7 compatibility in the future.

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

No branches or pull requests

4 participants