Skip to content
This repository has been archived by the owner on Dec 26, 2021. It is now read-only.

Distinct public visibility in class methods and class properties #7

Closed
llaville opened this issue Oct 3, 2014 · 4 comments
Closed
Assignees
Milestone

Comments

@llaville
Copy link
Owner

llaville commented Oct 3, 2014

As discussed in report llaville/php-compatinfo#129 and of course in PHP-Parser itself !

@llaville llaville self-assigned this Oct 3, 2014
@llaville llaville added this to the 2.5.0 milestone Oct 3, 2014
@llaville
Copy link
Owner Author

llaville commented Oct 3, 2014

Will implement Graham and Nikita 's solution suggested in nikic/PHP-Parser#136

@llaville
Copy link
Owner Author

llaville commented Oct 3, 2014

First attempt that run fine, but without the reflect cache plugin. Have a look on branch TokenOffsets, commit 4daccd5

@llaville
Copy link
Owner Author

llaville commented Oct 6, 2014

With commit the solution run both with and without the cachePlugin.

@llaville
Copy link
Owner Author

llaville commented Oct 6, 2014

Following your latest comment, we will discuss the situation here.

To understand why I've adopted the token_get_all, get the current php-reflect repository from master branch of event the TokenOffsets branch.

See summary of merge bae9de8

And remove the lines

    $tokens = @token_get_all(
        file_get_contents($file->getPathname())
    );

in Reflect.php file

Run the simple analysis test on a file like https://github.com/llaville/php-compat-info/blob/master/tests/_files/gh129.php, with a cachePlugin setted

php phpreflect.phar analyser:run .

You will get the summary report on first run

Do it again, and see what PHP error you will get. I'm sure you'll understand the situation.

Rather than follow Nikita suggestion (put the tokens in cache with ast) I read it in live, because if source code changed, the cache will be invalidate and phpreflect will run a new standard parse.

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

No branches or pull requests

1 participant