-
-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Description
Issue
- PhpStorm runs
composer updatewhen you opencomposer.jsonfile and when it's done withddev xdebug on, it triggers a breakpoint on Composer itself.
See Xdebug stopping on random incoming connections from stdin and composer when using command line input #414 (comment) - PhpStorm runs
composer updateon inactive project when you opencomposer.jsonif you already have another DDEV project running, which results in brokenddev describe -j, because onlywebcontainer is started.
See Since using the plugin, I am getting a lot of orphaned networks and failedddev starts #263 (comment) - PhpStorm cannot run
npm installproperly, which results in a broken DDEV project.
See fix: don't wait for one-off containers from PhpStorm, fixes #7146 ddev#7148 (comment)
Idea
This is an extended implementation of the idea proposed by @AkibaAT in #414 (comment)
- Using wrappers ensures DDEV isn't broken by PhpStorm actions
- Adding
ddev exec trueprevents PhpStorm from starting inactive projects
- Create these scripts:
(Note that I don't know if this can work on Traditional Windows, where you can't runchmod +x)mkdir -p .ddev/phpstorm-helpers printf '#!/usr/bin/env bash\n#ddev-generated\nddev exec true && ddev composer "$@"\n' >.ddev/phpstorm-helpers/composer printf '#!/usr/bin/env bash\n#ddev-generated\nddev exec true && ddev exec node "$@"\n' >.ddev/phpstorm-helpers/node printf '#!/usr/bin/env bash\n#ddev-generated\nddev exec true && ddev npm "$@"\n' >.ddev/phpstorm-helpers/npm chmod +x .ddev/phpstorm-helpers/{composer,node,npm} printf '*\n' >.ddev/phpstorm-helpers/.gitignore
- Configure Composer

- Configure Node.js
(Unfortunately, coding assistance doesn't work just like it doesn't work with remote setup.)

- Run
composer install/composer update


- Run
npm install/npm update


I suggest that DDEV Integration can automatically add these scripts and configure the IDE accordingly.
Metadata
Metadata
Assignees
Labels
No labels