Menu

#10 Error ReflectionException

open
nobody
None
5
2014-06-28
2013-04-23
Anonymous
No

Hi everyone !

I tried to use phpcallgraph but when i analyzed i got an error with the following command :

phpcallgraph -f txt -r -p -v -g -o testPhpCallGraph.txt c:/wamp/www/graphs c:/wamp/www/myproject

The error :

string(73) "c:/wamp/www/icloco-master/web-app/jtable/themes/metro/pink/jtable.min.css"
[119] =>
string(70) "c:/wamp/www/icloco-master/web-app/jtable/themes/metro/pink/loading.gif"
[120] =>
string(71) "c:/wamp/www/icloco-master/web-app/jtable/themes/metro/purple/jtable.css"
[121] =>
string(72) "c:/wamp/www/icloco-master/web-app/jtable/themes/metro/purple/jtable.less"
[122] =>
string(75) "c:/wamp/www/icloco-master/web-app/jtable/themes/metro/purple/jtable.min.css"
[123] =>
string(72) "c:/wamp/www/icloco-master/web-app/jtable/themes/metro/purple/loading.gif"
[124] =>
string(68) "c:/wamp/www/icloco-master/web-app/jtable/themes/metro/red/jtable.css"
[125] =>
string(69) "c:/wamp/www/icloco-master/web-app/jtable/themes/metro/red/jtable.less"
[126] =>
string(72) "c:/wamp/www/icloco-master/web-app/jtable/themes/metro/red/jtable.min.css"
[127] =>
string(69) "c:/wamp/www/icloco-master/web-app/jtable/themes/metro/red/loading.gif"

(more elements)...
}
CodeAnalyzer: inspecting c:/wamp/www/icloco-master/web-app/Result-Tests-Jenkins.php
PHP Fatal error: Uncaught exception 'ReflectionException' with message 'Cannot set read-only property ezcReflectionClass::$class' in C:\Users\lrossignol\Desktop\phpcallgraph-0.8.0\p
hpcallgraph-0.8.0\lib\ezcomponents\Reflection\src\class.php:47
Stack trace:
#0 C:\Users\lrossignol\Desktop\phpcallgraph-0.8.0\phpcallgraph-0.8.0\lib\ezcomponents\Reflection\src\class.php(47): ezcReflectionClass::__construct()
#1 C:\Users\lrossignol\Desktop\phpcallgraph-0.8.0\phpcallgraph-0.8.0\lib\instantsvc\components\CodeAnalyzer\src\code_analyzer.php(407): ezcReflectionClass->__construct('ezcReflection
Cl...')
#2 C:\Users\lrossignol\Desktop\phpcallgraph-0.8.0\phpcallgraph-0.8.0\lib\instantsvc\components\CodeAnalyzer\src\code_analyzer.php(222): iscCodeAnalyzer::summarizeInSandbox('c:/wamp/w
ww/icl...', '', true)
#3 C:\Users\lrossignol\Desktop\phpcallgraph-0.8.0\phpcallgraph-0.8.0\src\PHPCallGraph.php(226): iscCodeAnalyzer->inspectFiles(Array)
#4 C:\Users\lrossignol\Desktop\phpcallgraph-0.8.0\phpcallgraph-0.8.0\src\PHPCallGraphCli.php(226): PHPCallG in C:\Users\lrossignol\Desktop\phpcallgraph-0.8.0\phpcallgraph-0.8.0\lib\e
zcomponents\Reflection\src\class.php on line 47

Fatal error: Uncaught exception 'ReflectionException' with message 'Cannot set read-only property ezcReflectionClass::$class' in C:\Users\lrossignol\Desktop\phpcallgraph-0.8.0\phpcal
lgraph-0.8.0\lib\ezcomponents\Reflection\src\class.php on line 47

ReflectionException: Cannot set read-only property ezcReflectionClass::$class in C:\Users\lrossignol\Desktop\phpcallgraph-0.8.0\phpcallgraph-0.8.0\lib\ezcomponents\Reflection\src\cla
ss.php on line 47

Call Stack:
0.0010 128504 1. {main}() C:\Users\lrossignol\Desktop\phpcallgraph-0.8.0\phpcallgraph-0.8.0\bin\phpcallgraph:0
0.0092 327000 2. PHPCallGraphCli->run() C:\Users\lrossignol\Desktop\phpcallgraph-0.8.0\phpcallgraph-0.8.0\bin\phpcallgraph:51
0.0211 953792 3. PHPCallGraph->parse() C:\Users\lrossignol\Desktop\phpcallgraph-0.8.0\phpcallgraph-0.8.0\src\PHPCallGraphCli.php:226
0.1497 1153104 4. iscCodeAnalyzer->inspectFiles() C:\Users\lrossignol\Desktop\phpcallgraph-0.8.0\phpcallgraph-0.8.0\src\PHPCallGraph.php:226
0.1497 1161840 5. iscCodeAnalyzer::summarizeInSandbox() C:\Users\lrossignol\Desktop\phpcallgraph-0.8.0\phpcallgraph-0.8.0\lib\instantsvc\components\CodeAnalyzer\src\code_ana
lyzer.php:222
0.1747 1524688 6. ezcReflectionClass->__construct() C:\Users\lrossignol\Desktop\phpcallgraph-0.8.0\phpcallgraph-0.8.0\lib\instantsvc\components\CodeAnalyzer\src\code_analyze
r.php:407

The complete description of this error is in the file attachement.

Thank you to those who help me !

Discussion

  • Falko

    Falko - 2013-04-23

    Which PHP version are you using?

     
  • Falko

    Falko - 2013-04-24

    Hm... I haven't tested it with newer PHP versions for quite a while. Can you try if the examples in the readme file work for you?

     
  • Anonymous

    Anonymous - 2013-04-25

    It's doesn't working, there is a strange thing in the file "class.php", because the is a variable with the name "class" and it is a reserved name, when i renamed it, the problem disappeared but a lot of problems appeared ...

     
  • Mark Safronov

    Mark Safronov - 2013-08-08

    I confirm this bug, too. I tried to hack the solution by changing ezcReflectionClass::$class to "public" but it did not work. I don't know why PHP treats this property as read-only.

     
  • webtiger

    webtiger - 2014-06-28

    php reverted back to 5.2.6, solved the problem for me.

     

Log in to post a comment.