|Joomla! framework classes migrated out of global namespace: unable to infer information about alias [message #1815722 is a reply to message #1815684]
||Wed, 09 October 2019 04:12
| DI V
Registered: October 2019
There are problems running the file "stubGenerator.php" (version 3.9.2 RC, 2019-01-11) in Eclipse 2019-09 with PHP 7.3.5. |
From the command line (outside Eclipse, using the PHP installed with my WAMP) calling "php stubGenerator.php" I get:
Fatal error: Class StubGenerator contains 2 abstract methods and must therefore be declared abstract or implement the remaining methods (Joomla\CMS\Application\CMSApplicationInterface::getName, Joomla\CMS\Application\CMSApplicationInterface::getMenu) in C:\wamp64\www\Joomla_4-0-0-a11\Build\stubGenerator.php on line 52
From Eclipse I got the same Error. I tried the two automated 'fixes' offered by Eclipse, but still couldn't get the file to run correctly.
The "stubGenerator.php" file is supposed to generate a file "stubs.php" in the root of the Joomla! installation (for example, "C:\wamp64\www\myJoom"). Tuan Pham Ngoc uploaded the appropriate "stubs.php" that was generated from an amended version of "stubGenerator.php" in September 2017. (This fixed a problem with the original "stubGenerator.php" creating class names with the wrong capitalisation.)
A further problem noted within the comments of the current "stubGenerator.php" file itself is:
Note that this file will raise some IDE errors as it will generate stub classes extending a final class (something not allowed in PHP). Therefore it is suggested that inspections on this file are disabled.
Errors shown for the 2017 "stubs.php" file in Eclipse include:
- "The type ****** must implement the inherited abstract method ******::***()"
- "****** cannot be resolved to a type"
It is not clear to me how to disable "inspections" on an individual file (especially given that "stubs.php" is supposed to be placed in the Joomla! root directory, not its own subdirectory).
[Updated on: Wed, 09 October 2019 04:28]
Report message to a moderator
Powered by FUDForum
. Page generated in 0.03689 seconds