I like to develop a fresh Joomla Component for Joomla 3.x in Eclipse and created therefore a simple PHP project.
The problem I have is now how to setup the correct "include path", so that the basic Joomla PHP classes get found like "JFactory" , "JAccess", "JObject" ...
If I just include a Joomla installation in my include path, this will not work. I assume the paths to the classes are more sophisticated than that.
Any Idea or suggestion how the "include path" for my project should look like?
regards
Mark
It depends a little on what you mean by "found".
If you mean "as I start typing a basic class name every matching basic class gets offered as an option", yes, there is a way to do that.
See the conversation, and solution, on this gitHub page.
I have the stub file referred to and it works in the way I've said above, tho' I'm using NetBeans not Eclipse (but the reference to phpStorm makes me think it should/could work for you too), although I haven't been able to run the build script. I just haven't got the time to single step through it to find out where it stops.
Related
Currently I try to get PHP and Zend working on Eclipse. I'm not sure if there is a plugin for Zend or something that makes it comfortable to use in Eclipse, like automatically initializing default MVC-pattern like directory structure, and so on...
I was googling for it and found some tools... First I tried to download and install the PDT from Zend (http://www.zend.com/en/company/community/pdt/), which I did, but if I create a new PHP Project, there is no option to make a "new Zend project" or something like this, so I kept on searching, and found this:
https://code.google.com/p/zend-sdk/wiki/GettingStartedTutorialInEclipse
which absolutely had no visible effect on the GUI of Eclipse. I don't know if it even worked, but it doesn't look like on the screenshots at all. On the screenshots of this projects you can see that there is a option while creating a new PHP project called "Zend Framework default project structure". Below I attached a screenshot of my "new PHP project" dialog.
So, my question is... Did I do something wrong? Or is there currently no proper Zend integration in Eclipse?
Also I want you to know that I need Eclipse for many other programming languages, so I don't really want to have a IDE for each language and it would be nice to get it to work on Eclipse somehow...
I am using Eclipse Juno... If I forgot to provide further information please let me know so I can hand them in later.
I appreciate every kind of help... Thanks in advance
I have just installed CakePHP 2.1. And just see that the naming convention of its is just change lot from the older version which making me crazy.
Like it was app/controllers while now it is app/Controller same way
app/models - app/Model
app/views - app/View
I know there must be some advantage on doing this. But my problem is when I use the cake bake it is creating directory in the same old fashion i.e. controllers/models/views. Which is no more accessible from the URL & obviously will throw an error.
Is anyone there who has face the same issue ? Is there any solution that cake bake also use the same conventions ?
Any help will be appreciate. Thanks.
you can always use explicit paths:
/path/to/app_dir>..\lib\Cake\Console\cake bake
from your APP dir of the current cake project.
this is foolprove and always works with the right cake version.
I do it this way and use a shortcut on my keyboard to print this (up to "cake") on a single key stroke.
The reason for the change is to be able to better autoload files based on their kind (using App::uses('User', 'Model'); and later , when namespaces are introduced (3.0?) they can be loaded a lot more easy because you will call a class then like for example: "new \Cake\Model\User();"
About your bake problem: Make sure your environment is pointing to the correct "cake" shell file. I'm pretty sure yours is still pointing to the old 1.3 "cake" shell.
I'm evaluating PHPStorm right now, and I've really grown fond of it. It's fast, has more or less everything perfectly implemented and the flow flows like a breeze...
The only thing bugging me (and that's a big one) is, that it doesn't seem to get the namespaces for my symfony2 project right.
See, in Netbeans, when I type use Symf[CTRL+SPACE] it show me all the Symfony namespaces, right out of the /vendors folder.
If I do the same in PHPStorm, no namesapces are shown. That means that the whole code copletion doesn't work for the vendor libraries, which is really very, very bad in terms of easy and fast programming.
Now, I'm quite sure that I'm just missing a setting somewhere, but I just can't find it.
The Question is a bit old, but if anyone stumbles across it (like me) and still nothing works, it might be because your vendor folder gets excluded from code inspection.
You have to go to "File -> Settings -> Directories" and set the vendor folder to be a resource root and not be excluded.
More info here: Jetbrains Namespaces
This is not an issue anymore, there is a Symfony plugin that works most of the time now.
Looks like a known issue in PhpStorm.
I'm using the Zend OpenID library found here. I see there is a demo up, which works beautifully, but I don't see any source included for login.php. When I bring the files into my local apache and try to replicate what I see by viewing the source in the demo, I see an interface. When trying to use one of the login options, I see it makes posts like
http://localhost/zfopenid/public/user/login?action=verify&openid_username=&openid_identifier=http%3A%2F%2Fopenid.aol.com%2F
so there is certainly some php involved in that login file that I'm not able to see. I tried including application/controllers/UserController.php, but I get
Fatal error: Class 'Zend_Controller_Action' not found in /var/www/zfopenid/application/controllers/UserController.php on line 3
I don't know this Zend OpenID library but it sounds interesting. The problem is, at first look, it is tightly integrated into the Zend Framework and not a stand alone library. You'll have to run it as ZF application or find the components and then try if you can use them.
UPDATE If you want to test the downloaded application you have to make the /public directory your web root directory and the index.php your default root file. Then you can open the demo yourself. Again if you like to integrate it into your project it will be difficult because for what I see so far there is code all over the place which makes it increasingly difficult if you want it as a stand alone application.
I am attempting to setup codeigniter with eclipse but am getting project errors. From what I understand this should be as simple as creating a new project in eclipse and pointing to the root directory of codeigniter. This properly loads up the codeigniter files but eclipse reports several errors. Looking into the files, it seems like the errors are coming from html files and/or files that print html. For instance, footer.php is showing up as having an error because there is a closing tag but no opening tag. Any suggestions on how to overcome this? At this point would code completion / debugging be too much to ask for as well?
UPDATE: so from what I am gathering from the response below (and searching around on the web) is that when using codeigniter with eclipse one can only take advantage of the code completion / editing features? I also noticed that I am getting NoClassDefFoundError when attempting to open some of the .php files in the eclipse project tree for editing. Surely I must be missing something and there is a way to achieve tighter integration with codeigniter and eclipse? (i would strongly prefer to stick with eclipse as opposed to switching ides) Or maybe this is an issue with my eclipse/pdt setup?
UPDATE 2: I just downloaded the latest eclipse version (galileo) and it seemed to fix all of these issues! except for debugging of course ...
you can achieve tighter integration by initializing the Ci core classes in CI_Base constructor which will also allow you to get auto complete for core classes check out these links:
http://www.gostomski.co.uk/codeigniter/getting-full-auto-complete-with-codeigniter-in-eclipse
http://hetal.wordpress.com/2009/09/04/working-with-eclipse-and-code-igniter/
you will get lots of html errors because the html has been broken into chunks
and is not a complete document
just ignore them thats what i do (there are settings somewhere that control what errors are validated against in eclipse)
i still use the php/html/js code completion and it works fine even with the errors
if you are using svn version control, add subclipse plugin, so you can do that from within eclipse too
Try Aptana.
The last time I checked I was able to do a step by step debug on it and did not see any errors in my project. It is also built on eclipse, so there is nothing new to learn.
For what it's worth, I have been able to get debugging to work using XDebug and the Netbeans IDE. If you cannot get debugging to work in Eclipse you might give Netbeans a try - if for no other reason, to have the ability to debug should you ever need to step through your application's code...