Set up new PHP projects

In general working with PHP projects work like a charm in Idea X EAP when I import an already existing PHP project from Eclipse.
Unfortunately I didn't find a possibility to neither set up a blank PHP project from scratch nor from existing sources.

The options provided just don't fit and trying these options though don't lead to the expected results - a feasible PHP project.

Is this still not available within EAP or am I just missing something?

Thanks for response.
Karsten

10 comments

There is no way to set up a blank php project in Idea X, this is because there just is no real PHP module, all the functionality you need can be found in the other projects types.

Just create a new project(doesn't really matter which one you choose, I use blank java projects but had success using grails and maven imports from existing sources to open folders as projects) and a blank module and store your PHP application in it, you can set up PHP debugging from the Settings window, you also need to create a run and debug configuration for PHP files.

0

Am 10.11.2010 01:04, schrieb Dan Stefan Oprean:

There is no way to set up a blank php project in Idea X, this is because there just is no real PHP module, all the functionality you need can be found in the other projects types.

>

Just create a new project(doesn't really matter which one you choose, I use blank java projects but had success using grails and maven imports from existing sources to open folders as projects) and a blank module and store your PHP application in it, you can set up PHP debugging from the Settings window, you also need to create a run and debug configuration for PHP files.

>

---
Original message URL: http://devnet.jetbrains.net/message/5277234#5277234


Dear Dan,

this is unfortunately rather confusing for a newcomer.
Perhaps you can, for purely psychological reasons, consider to provide a
corresponding module called PHP even though this may represent only a
copy of an existing module. Stupid but maybe effective.
Sometimes clients just do not work as desired and need a little guidance :)

I also read something about the support of Zend Framework in IDEA X. How
does it work?

0

I admit it is quite confusing, took me a bit to get used to the Intellij project structure, there is always the option of PHP Storm of course, but it's not really as powerful as the full blown IDEA and I have to work in more than one language as each client of mine has it's own requirements. Now providing a copy of the Java module and it being renamed to PHP is purely aestetics, it would help new users but probably also confuse them (see all the Java stuff in the menus). I've grown quite accustomed in time to the way intellij treats projects and modules and ended up building some "compile" scripts for PHP/Web projects that help me automate tasks regarding to web development (minfication, deployment, testing even, removal of unused css code) as well as having different modules for each project that contain different versions of the site, like the coming soon page, old versions, proposed versions, current version each easily accessible from the project window. In time perhaps we will get a separate PHP module too, as the feature seems to be requested quite often ie: http://youtrack.jetbrains.net/issue/IDEA-61080?projectKey=IDEA&query=phpstorm+project

As for the zend stuff, i'm not really sure what it is, never really used the zend framework, tough i have read about the features on the webide blog(http://blogs.jetbrains.com/webide/).

0

Hey guys,

good to see that there's a discussion on this issue. I don't agree on Dan's argument that a simple copy of java project would be purely aestetics. As so many issues in Software Engineering it's rather about conciseness or if you will intuition but not aestetics.

Anyone who considers to switch over to IDEA as his preferred PHP IDE will first of all try to either create a new project or check out an existing one. He would never even think of creating a Java project to get this done. Neither he would stumble upon this discussion here. Most probably he will wonder and get back the IDE he's comfortable with.

Besides that, just creating a Java project with PHP sources won't do the job at all. If I check out the large legacy PHP application as a Java project in IDEA, only the top level php files are shown up. The whole application package structure is hidden and I didn't figure out yet how to make it shown fully. What I do to make it work is (no kidding) create a PHP project with eclipse, check out my sources and import the Eclipse project as third party model with IDEA.

You know what? It feels ridiculous because it is ridiculous. I do that because I'm more productive though. Anybody who isn't used to IDEA would break down laughing...

My 2 cents,

Karsten

0

The reason only your top level files are shown is because you are not using modules properly, if you just create a project without a module it will show the top level files. Say you have a folder called /fooproject/ and you want to add it in intellij, you should first create a subfolder /fooproject/current/ and create the project in the /fooproject/ and add a module called current that includes the /fooproject/current/ subfolder, this way you have all your sources not just the top level files inside the module. Otherwise you have to create a top level module but it's not quite as useful as having more than one modules. Even if you use the import module from external sources you still have to add the module in order for all the contents to show. Now a better way to just import a folder into a new project in Idea is to just use the import grails/griffon from existing sources, this way a module is automatically created. As i said above the project structure of intellij idea is quite useful, however it's quite hard to get used to for newcomers as they expect to just be able to open something up, while this is totally doable it's not quite what most people are used to or expect, reading the help file works tough :)

Now for the copy java module and rename, even with this it will be just aestetics, I would love to have a PHP module that actually does something for PHP projects, it's a wildly requested feature so it may just happen. Of course using PHPStorm is another option, just not as flexible for me IMO IDEA's project structure is way better and has way too many uses.

Anyone switching to idea will probably have some digging to do, perhaps in time more tutorials will pop out or a plugin is added (don't know how yet but i'm mostly trying to learn this), of course it's well worth the effort, i swear i wouldn't be using anything else for any type of programming, while i have other IDEs here they are rarely even started.

0

Am 29.11.2010 10:38, schrieb Dan Stefan Oprean:

The reason only your top level files are shown is because you are not using modules properly, if you just create a project without a module it will show the top level files. Say you have a folder called /fooproject/ and you want to add it in intellij, you should first create a subfolder /fooproject/current/ and create the project in the /fooproject/ and add a module called current that includes the /fooproject/current/ subfolder, this way you have all your sources not just the top level files. Even if you use the import module from external sources you still have to add the module in order for all the contents to show. Now a better way to just import a folder into a new project in Idea is to just use the import grails/griffon from existing sources, this way a module is automatically created. As i said above the project structure of intellij idea is quite useful, however it's quite hard to get used to for newcomers as they expect to just be able to open something up, while

this is totally doable it's not quite what most people are used to or expect, reading the help file works tough :)
>

Now for the copy java module and rename, even with this it will be just aestetics, I would love to have a PHP module that actually does something for PHP projects, it's a wildly requested feature so it may just happen. Of course using PHPStorm is another option, just not as flexible for me IMO IDEA's project structure is way better and has way too many uses.

>

Anyone switching to idea will probably have some digging to do, perhaps in time more tutorials will pop out or a plugin is added (don't know how yet but i'm mostly trying to learn this), of course it's well worth the effort, i swear i wouldn't be using anything else for any type of programming, while i have other IDEs here they are rarely even started.

>

---
Original message URL: http://devnet.jetbrains.net/message/5279145#5279145


Good evening everybody.

Some interesting points.

If I - as a developer or sales of IDEA - would read that users initially
create PHP projects in Eclipse, so they can be imported into IDEA, I
would worry.

Some notes about creating a PHP project mention that one should create a
blank/empty module. What is a blank/empty module?

I would appreciate if someone could explain the mysteries of the IDEA
project structure from a practical point of view. A brief summary would
indeed be enough. It would also  be interesting how others create their
PHP project structure.

And yes, I have read the help.

Thx and best regards
Jörg

0

Well it goes like this, one Intellij project is made out of several modules, each module encapsulating a different version or part of the project. So in order to create a project and get to editing you also have to make at least one module that points to your sources roots, of course as each project can have more than one module and this also means you can have different sites in each module that relates to the specific project. I usually keep under construction, current version, past version and modules for each proposed version all going into one git repository.

Creating a blank/empty module means(at least in my book) you just pick a module for example the Java module and don't do any settings in it except the paths to the folder you want to contain it AND perhaps source folders too if you keep compiled versions of your site/project too (I have it set up this way and using a custom "build" script for PHP projects that creates a release version of the site in the root of the module).

Hope this helps,

Dan.

0

Dear Dan,

yes, it does help. Thank you very much.

regards
Jörg

0

I second that. Thanks Dan for making it  clearer.

0

Glad I was able to help, have fun with the best IDE around

:)
0

Please sign in to leave a comment.