Class analysis fails

I use PhpStorm 2018.1.

And install TCPDF by composer.

composer.json is

{

"require": {
"tecnickcom/tcpdf": "6.*"
}
}

I wrote a script like
<?php
include 'vendor/tecnickcom/tcpdf/tcpdf.php';
$pdf = new TCPDF();

The $pdf is a instance of TCPDF, and can create PDF.
But PhpStorm says, "Undefined Class TCPDF".
Debugging can not be done as it is.

What shall I do?


 


 

0
正式评论

@Shin'ichi Ohnishi Thank you for the report, there's a bug indeed. We'll fix it ASAP. Please follow WI-41378 to get notified of updates.

Hi there,

What's your IDE version/build exactly? (Help | About)

 

Apparently IDE is unable to parse that file properly (shows "report error" warning)

>Lexer has been advanced 100 times more than the amount of lexeme 71

As a result it treats that file as plain text...

 

Accordingly to https://youtrack.jetbrains.com/issue/WI-41048 it should be fixed for 2018.1 final...

P.S. At the same time: 2018.1 final is Build #PS-181.4203.565 while that ticket says "181.4249" .. which is newer than 2018.1

0

Thank you for your reply.

I am using this.

PhpStorm 2018.1
Build #PS-181.4203.565, built on March 28, 2018
Subscription is active until January 15, 2019
JRE: 1.8.0_152-release-1136-b20 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 10 10.0

And loged

> Lexer has been advanced 10000 times more than the amount of lexeme -214682

0

I left the comment in aforementioned ticket yesterday -- lets see what dev will say. Maybe it's another (newer) case .. or the fix was somehow not included in 2018.1 and will be available in 2018.1.1 only...

1
I tried using 2018.1.1 EAP(181.4445.32) and confirmed that the problem was solved.
Thank you for quick response.
1

Thank you for letting us know.

0

请先登录再写评论。