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

Non-empty classes are reported to require PHP 5.0.0 #129

Closed
cmb69 opened this issue Sep 24, 2014 · 3 comments
Closed

Non-empty classes are reported to require PHP 5.0.0 #129

cmb69 opened this issue Sep 24, 2014 · 3 comments
Assignees
Labels
Milestone

Comments

@cmb69
Copy link
Contributor

cmb69 commented Sep 24, 2014

Apparently, all non-empty classes are reported to require at least PHP 5.0.0. For instance, I have the following file:

<?php

class Foo
{
    function bar() {}
}

Using the minimalist phpcompatinfo.json:

c:\test>php phpcompatinfo-3.4.0.phar analyser:run .
Data Source Analysed

Directories                                          1
Files                                                1

Global Analysis

                    Count PHP min Elements highlight
 Extensions         0
 Namespaces         1     4.0.0   +global
 Interfaces         0
 Traits             0
 Classes            1     5.0.0   Foo
 User Functions     0
 Internal Functions 0
 Constants          0
 Total                    5.0.0

I get the same results with phpcompatinfo-3.3.0.phar, and also when I replace the bar() method with var $bar. When the class is empty, PHP 4.0.0 is correctly reported.

@llaville
Copy link
Owner

@cmb69 I've asked a question on nikic/PHP-Parser project because I can't do nothing in current state.

@llaville
Copy link
Owner

llaville commented Oct 3, 2014

@cmb69 I will close this issue when the php-reflect implementation of PHP-Parser solution (distinc public visibility) will be available

@llaville
Copy link
Owner

llaville commented Oct 6, 2014

If you want to use the fix, don't forget to update your composer.json file and replace "bartlett/php-reflect": "~2.4" by "bartlett/php-reflect": "dev-master"

@llaville llaville closed this as completed Oct 6, 2014
@llaville llaville added the bug label Oct 6, 2014
@llaville llaville self-assigned this Oct 6, 2014
@llaville llaville added this to the 3.5.0 milestone Oct 6, 2014
llaville added a commit that referenced this issue Jan 6, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants