Static classes like JLog are not known but still working

  • Joomla Version
    5.0.2
    PHP Version
    PHP 8.2.x
    Hoster
    Alfahosting

    Dear all,


    I'm about to rewrite a self written extension to get rid of Joomla 3 specifc things and make it compatible to Joomla 5.

    So I created a local Joomla installation and let my Eclipse PHP workspace point to it.

    Now I face following problem: some of the "old" static classes like JLog or JHtml are marked by Eclipse as non existing, but strangewise at runtime they stil do their job fine.

    I guess JHtml was replaced by HtmlHelper, but I did not really find a good hint on the internet how to replace JLog.


    Do you have any suggestions how to replace JLog?


    Thanks in advance.


    Regards, Ric

  • Oh Entschuldigung,
    da die meisten Foren mittlerweile auf Englisch sind, war mir das komplett entfallen :)

    Danke für eure Antworten!


    Hier habe ich folgendes gefunden:

    Code
    JFactory::getApplication()->enqueueMessage('Some debug string(s)');

    Allerdings wird auf der gleichen Seite auchimmer noch JLog empfohlen.
    Ich habe den Verdacht, dass mein Eclipse für die Verwendung mit Joomla noch nicht zu 100% richtig konfiguriert ist.
    Glücklicherweise findet sich auf der selben Seite auch der Link zu einer Anleitung, wie genau man das tun kann.

    Insofern nochmals danke für den Hinweis auf diese Seite!

    Einmal editiert, zuletzt von Indigo66 () aus folgendem Grund: Ein Beitrag von Ric-01 mit diesem Beitrag zusammengefügt.