Class reference errors in Eclipse with Joomla

274 views
Skip to first unread message

Mapor

unread,
Jan 9, 2018, 10:30:28 AM1/9/18
to Joomla! General Development
I am developing Joomla in Eclipse. But Eclipse gives more than 12000 problems because it cannot find class references such as JProfiler or JFactory. Probably I have to do something with Include Paths, but sofar I was unsuccesful.

Michael Babker

unread,
Jan 9, 2018, 10:36:56 AM1/9/18
to joomla-de...@googlegroups.com
If you have the CMS repo checked out locally, run the `build/stubGenerator.php` script and stub classes for everything that was renamed at 3.8 will be created.

IDEs cannot resolve classes that do not exist in the project space or language specification.  All of the classes that were moved to PHP namespaces in 3.8 do not exist anymore, but for B/C are aliased at runtime through PHP's autoloader.  No IDE is able to parse our libraries/classmap.php file to automatically handle this mapping, so you need to generate a file that has these classes so the IDE can "fix" itself.

On Tue, Jan 9, 2018 at 8:23 AM, Mapor <hans....@cgi.com> wrote:
I am developing Joomla in Eclipse. But Eclipse gives more than 12000 problems because it cannot find class references such as JProfiler or JFactory. Probably I have to do something with Include Paths, but sofar I was unsuccesful.

--
You received this message because you are subscribed to the Google Groups "Joomla! General Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to joomla-dev-general+unsub...@googlegroups.com.
To post to this group, send an email to joomla-dev-general@googlegroups.com.
Visit this group at https://groups.google.com/group/joomla-dev-general.
For more options, visit https://groups.google.com/d/optout.

Mapor

unread,
Jan 9, 2018, 10:50:51 AM1/9/18
to Joomla! General Development
Thanks for your reply. Where can I get that script, and how do I run it?

Thanks.

Op dinsdag 9 januari 2018 16:36:56 UTC+1 schreef Michael Babker:
If you have the CMS repo checked out locally, run the `build/stubGenerator.php` script and stub classes for everything that was renamed at 3.8 will be created.

IDEs cannot resolve classes that do not exist in the project space or language specification.  All of the classes that were moved to PHP namespaces in 3.8 do not exist anymore, but for B/C are aliased at runtime through PHP's autoloader.  No IDE is able to parse our libraries/classmap.php file to automatically handle this mapping, so you need to generate a file that has these classes so the IDE can "fix" itself.
On Tue, Jan 9, 2018 at 8:23 AM, Mapor <hans....@cgi.com> wrote:
I am developing Joomla in Eclipse. But Eclipse gives more than 12000 problems because it cannot find class references such as JProfiler or JFactory. Probably I have to do something with Include Paths, but sofar I was unsuccesful.

--
You received this message because you are subscribed to the Google Groups "Joomla! General Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to joomla-dev-general+unsub...@googlegroups.com.
To post to this group, send an email to joomla-de...@googlegroups.com.

Viper

unread,
Jan 9, 2018, 11:47:30 AM1/9/18
to Joomla! General Development
Reply all
Reply to author
Forward
0 new messages