Help! Cannot be solved to a type [message #1776929] |
Wed, 22 November 2017 20:28 |
|
Hello,
I am a PHP noob here, and it's my first time using Eclipse PHP. I installed joomla and used xampp to host. Everthing works very well, I can create project base on the joomla folder and able to run the web application inside the Eclipse. However, the joomla I used is very fresh, I didn't touch anything. But eclipse shows a lot of errors....most of them like "Cannot be solved to a type". I am doing something wrong in building the project???
Thank you,
Fang
|
|
|
|
Re: Help! Cannot be REsolved to a type [message #1815682 is a reply to message #1780699] |
Tue, 08 October 2019 11:23 |
DI V Messages: 20 Registered: October 2019 |
Junior Member |
|
|
Check the Joomla! version. This appears to be a known problem from version 3.8 of Joomla! onwards.
Symptoms are many hundreds of Error messages in Eclipse of two forms:
- "The import ******\******\****** cannot be resolved"
- "****** cannot be resolved to a type"
For advice on how to address this problem see:
[Updated on: Wed, 09 October 2019 03:57] Report message to a moderator
|
|
|
|
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 Messages: 20 Registered: October 2019 |
Junior Member |
|
|
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:
Quote: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:
Quote: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.03981 seconds