phpstorm 8 confusion

233 views
Skip to first unread message

Troy

unread,
Mar 30, 2015, 1:56:42 AM3/30/15
to joomla-...@googlegroups.com
I'm trying to wrap my head around using phpstorm instead of netbeans and the 1st thing it told me was there was no "root namespace psr-0"  I went to c:\\wamp\www\joomla-cms and set that as both source and root.  Then when I open index.php on protostar it shows a lot of errors all seemingly centered on jdoc. ( see image ).  Can someone please explain whats going on and more importantly how to fix it?  I wanted to try phpstorm because its supposed to be better then NetBeans as far as fake errors go.

--
Bear

Rob Clayburn

unread,
Mar 30, 2015, 9:29:10 AM3/30/15
to joomla-...@googlegroups.com
I'd not worry about it, I would imagine its because the Joomla index file isn't including an xml namespace which defines what <jdoc> etc should be/do.
As that tag is parsed out before the page is built I doubt you would even want to include an xml namespace defining such tags.

So for me I just treat those errors as false positives. PHPStorm generates quiet a few warnings/errors - some of which I just live with and don't fret too much about. This has always been one of them

Troy

unread,
Mar 30, 2015, 9:56:20 AM3/30/15
to joomla-...@googlegroups.com
disappointing.. ok ty.
Bear
--
You received this message because you are subscribed to the Google Groups "Joomla! CMS Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to joomla-dev-cm...@googlegroups.com.
To post to this group, send email to joomla-...@googlegroups.com.
Visit this group at http://groups.google.com/group/joomla-dev-cms.
For more options, visit https://groups.google.com/d/optout.


No virus found in this message.
Checked by AVG - www.avg.com
Version: 2015.0.5856 / Virus Database: 4315/9415 - Release Date: 03/30/15


dgt41

unread,
Mar 30, 2015, 1:16:30 PM3/30/15
to joomla-...@googlegroups.com
The problem with jdoc is that is not valid html tag.
I use this code:
<?php echo $this->getBuffer('modules', 'orbit', array('name'=>'orbit', 'style'=>'raw')); ?>

Which is the same as:
<jdoc:include type="modules" name="orbit" style="raw" />

So no more errors for phpstorm and also this code, when used for all modules is faster as it is a direct call!

Dimitris

Walt Sorensen

unread,
Apr 28, 2015, 12:20:08 PM4/28/15
to joomla-...@googlegroups.com
you need some type hints, check out what Akeeba did

https://github.com/akeeba/akeebasubs/tree/development/typeHints

"Joomla! 3.4 has replaced a lot of non-namespaced Joomla! Platform classes with namespaced Joomla! Framework classes. However, this mapping is not visible to IDEs like phpStorm which can no longer find the original class, e.g. JRegistry, which now both complain about a missing class and don't provide type hinting."
Reply all
Reply to author
Forward
0 new messages