This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 248854 - Add project converter for composer.json
Summary: Add project converter for composer.json
Status: VERIFIED FIXED
Alias: None
Product: php
Classification: Unclassified
Component: Composer (show other bugs)
Version: 8.1
Hardware: All All
: P3 normal (vote)
Assignee: Tomas Mysik
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-11-24 11:08 UTC by Tomas Mysik
Modified: 2016-07-26 11:48 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tomas Mysik 2014-11-24 11:08:01 UTC
Similarly as for HTML5 project, we should be able to simply open PHP project which contains composer.json file.
Comment 1 Tomas Mysik 2015-01-29 13:30:44 UTC
Due to discovered problems of ProjectConvertors (mainly classpath), let's be careful with this issue...
Comment 2 Tomas Mysik 2015-02-06 07:58:44 UTC
Done. Láďo, please verify that CC works also in vendor directory (similarly to node_modules folder for HTML5 projects). Also please note that new PHP project with existing sources cannot be now created if composer.json exists in it - we depend on issue #250232 (for both PHP and HTML5 projects - maybe report issues for that?).

Tome, have a look at the patch, how similar it is to ProjectConvertor for HTML5 project.

Thanks!

http://hg.netbeans.org/web-main/rev/ea80a3f3dd57
Comment 3 Tomas Zezula 2015-02-06 09:22:41 UTC
The patch seems good to me.
Comment 4 Quality Engineering 2015-02-07 05:40:34 UTC
Integrated into 'main-silver', will be available in build *201502070001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/ea80a3f3dd57
User: Tomas Mysik <tmysik@netbeans.org>
Log: #248854 - Add project converter for composer.json
Comment 5 Tomas Mysik 2015-02-09 08:23:05 UTC
Minor imporvement of source folder detection.

http://hg.netbeans.org/web-main/rev/ae4c0227ac3f
Comment 6 Quality Engineering 2015-02-10 05:43:50 UTC
Integrated into 'main-silver', will be available in build *201502100301* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/ae4c0227ac3f
User: Tomas Mysik <tmysik@netbeans.org>
Log: #248854 cont'd - Add project converter for composer.json

Improve detection of source folder.
Comment 7 Vladimir Riha 2015-02-10 16:33:38 UTC
Seems fine to me, if project name is in composer.json, it is respected by IDE. Not sure what else to try.

The only issue I've found is issue #250347




Product Version: NetBeans IDE Dev (Build web-main-1915-on-20150210)
Updates: Updates available
Java: 1.7.0_67; Java HotSpot(TM) Client VM 24.65-b04
Runtime: Java(TM) SE Runtime Environment 1.7.0_67-b01
System: Linux version 3.13.0-35-generic running on i386; UTF-8; en_US (nb)
Comment 8 Vladimir Riha 2015-02-10 16:47:15 UTC
Sorry, I missed the code completion part... It works fine as well (both in vendor dirs from "project sources" and in "project sources" from vendor dirs)
Comment 9 vee 2016-07-26 08:09:39 UTC
Manage folder that contain composer.json as a project folder is really a messed.

http://stackoverflow.com/questions/38583857/how-to-stop-netbeans-open-folder-project-that-contain-composer-json

How to stop Netbeans open folder contain composer.json as a project folder?
Comment 10 Tomas Mysik 2016-07-26 09:41:56 UTC
(In reply to vee from comment #9)
> How to stop Netbeans open folder contain composer.json as a project folder?

There is no way to do that but please try the dev version of NetBeans [1], all the problems should be solved there we hope. If not, please submit a new report with exact steps to reproduce.

Thanks.
[1] http://bits.netbeans.org/download/trunk/nightly/latest/
Comment 11 vee 2016-07-26 10:15:31 UTC
The license header problem gone.
But I can still open folder that contain just composer.json as a project folder. It doesn't have nbproject folder so it should not becomes project folder until there is an option and enabled it or until user create new project at that sub folder.
Comment 12 Tomas Mysik 2016-07-26 11:48:51 UTC
(In reply to vee from comment #11)
> The license header problem gone.

Great to hear.

> But I can still open folder that contain just composer.json as a project
> folder.

And this is the point of this support ;)

Thanks.