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

collector does not detect "static" modifier #230

Closed
renanbr opened this issue Jun 7, 2015 · 1 comment
Closed

collector does not detect "static" modifier #230

renanbr opened this issue Jun 7, 2015 · 1 comment
Labels

Comments

@renanbr
Copy link

renanbr commented Jun 7, 2015

In a project which contains a static member in a standard class, the attribute static="true" doesn't appear in result XML file after phpdox collector is run.

I've tried with dev-master and 0.8.0.

I don't know if this issue should be address to phpDox, php-parser or another dependency because I didn't have time to get in deeper.

Once someone can confirm this issue I try to find out what it's happening.


Steps for reproducing it...

./phpdox.xml config file

<?xml version="1.0" encoding="utf-8" ?>
<phpdox xmlns="http://xml.phpdox.net/config">
    <project name="Example" source="${basedir}/src" workdir="${basedir}/build">
        <collector backend="parser" />
    </project>
</phpdox>

./src/MyClass.php source file

<?php

class MyClass
{
    public static $member;
}

After running phpdox --collector, here is ./build/classes/MyClass.xml

<?xml version="1.0" encoding="UTF-8"?>
<class xmlns="http://xml.phpdox.net/src" full="MyClass" namespace="" name="MyClass" abstract="false" final="false" start="3" end="6">
  <file path="/tmp/static-failure/src" file="MyClass.php" realpath="/tmp/static-failure/src/MyClass.php" size="54" time="2015-06-07T08:55:59+00:00" unixtime="1433667359" sha1="2165651653bb6ab5dae1507232570b30b74ca25c" relative="MyClass.php"/>
  <member name="member" visibility="public" line="5"/>
</class>

Just sharing my console output

phpDox 0.8.0-15-g99afa38 - Copyright (C) 2010 - 2015 by Arne Blankerts

[07.06.2015 - 08:56:02] Using config file './phpdox.xml'
[07.06.2015 - 08:56:02] Registered collector backend 'parser'
[07.06.2015 - 08:56:02] Registered enricher 'build'
[07.06.2015 - 08:56:02] Registered enricher 'git'
[07.06.2015 - 08:56:02] Registered enricher 'checkstyle'
[07.06.2015 - 08:56:02] Registered enricher 'phpcs'
[07.06.2015 - 08:56:02] Registered enricher 'pmd'
[07.06.2015 - 08:56:02] Registered enricher 'phpunit'
[07.06.2015 - 08:56:02] Registered enricher 'phploc'
[07.06.2015 - 08:56:02] Registered output engine 'xml'
[07.06.2015 - 08:56:02] Registered output engine 'html'
[07.06.2015 - 08:56:02] Starting to process project 'Example'
[07.06.2015 - 08:56:02] Starting collector
[07.06.2015 - 08:56:02] Scanning directory '/tmp/static-failure/src' for files to process

.                                                   [1]

[07.06.2015 - 08:56:02] Saving results to directory '/tmp/static-failure/build'
[07.06.2015 - 08:56:02] Resolving inheritance

.                                                   [1]

[07.06.2015 - 08:56:02] Collector process completed

[07.06.2015 - 08:56:02] Processing project 'Example' completed.


Time: 192 ms, Memory: 4.50Mb
@theseer theseer added the Bug label Jun 8, 2015
theseer added a commit that referenced this issue Jun 8, 2015
@theseer
Copy link
Owner

theseer commented Jun 8, 2015

Thank you for pointing that out. Amazing nobody noticed that earlier.

@theseer theseer closed this as completed Jun 8, 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