Create project from existing source

Hi everyone,

I'm working with Magento.

I want to create a project from existing code (my extension). But the problem is my extension code is only a small part of the whole magento project. In Netbeans, it's OK when I use "Copy source code to other location".

But in PhpStorm, I can not create project from my extension code without downloading the whole magento code into the project folder (Using build-in function of PhpStorm).

Anyone know how to solve this?

Thank  you very much.

4 comments
Comment actions Permalink

Hi there,

If you are using "Create New Project from Existing Files" wizard .. then you can choose what files/folders not to download from your remote location.

Is you project local (already on your local disk)? If so -- just use "Open" and point to that folder -- everything else that the aforementioned wizard does can be configured manually latter.

Even if your project files are currently remote .. you still can create empty new local project .. and then do the rest later (configure Deployment manually and use it to download only files/folders that you need).


Tutorials - PhpStorm

P.S.
You still will have to reference your actual Magento core in order to have code analysis run correctly and have code completion for core classes/methods.

0
Comment actions Permalink

Thank you for your reply.

But the point is, I want anything changed in the project (only my extension, located outside htdocs folder) will be automatically synced with Magento code (located inside htdocs folder), so I don't have to copy to Magento code each time a file of my extension modified.

The reason for this is that I need to track my project code with Git version control, in order to know what file is modified, but I don't want to use Git on the whole Magento code, because Magento create a lot a temp or var files....that I don't want to track.

Is there anyway to do what I want?

Thank you very much

0
Comment actions Permalink
The reason for this is that I need to track my project code with Git version control, in order to know what file is modified, but I don't want to use Git on the whole Magento code, because Magento create a lot a temp or var files....that I don't want to track.

Unless I misunderstanding you ... but I do not actually see the problem here. Make git root in that folder with plugin code and anything outisde it will not get into that particular repo.

https://www.jetbrains.com/phpstorm/help/directory-based-versioning-model.html?search=version
https://www.jetbrains.com/phpstorm/help/associating-a-directory-with-a-specific-version-control-system.html?search=version

0
Comment actions Permalink

Hi Andriy,

But the point is Magento code is divided into php code and template, and even config....It's not only a whole folder. That why I need to keep my extension code separated from Magento code. And only sync when a file is modified and saved.

I can do that with Netbeans but with Phpstorm, I can't find out how yet.

0

Please sign in to leave a comment.