FAQ

FAQ

choose category

Code Completion in an IDE

As the PHP code of all trial versions is encrypted by Ioncube an IDE cannot access it to offer support for auto-completion or it cannot display information from doc-blocks.

To overcome this issue all our SetaPDF trial versions come with a stubs.php file which is a copy of all classes, properties and methods with empty bodies including all doc-blocks (if you wonder how we generate them: you can find the code of our php-stub-generator project on GitHub).

In the best way this file is recognized by your IDE and everything works automatically (this is the case if you e.g. use PhpStorm).

If your IDE marks the SetaPDF classes as "unknown" or "undefined" you may check if the IDE has some kind of limits in view to the file size. The stubs.php file is round about 1,5MB which is an uncommon size for PHP files.

We noticed this behavior for example in Visual Studio Code. In VS Code you need to increase the "Max Size" for files in the Intelephense extension:

Open "File" > "Preferences" > "Settings" choose the "Workspace"-tab and then search for "@id:intelephense.files.maxSize" and increase the value to e.g. 2000000:

Screenshot of settings in Visual Studio Code: Intelephense » Files: Max Size