Open
Description
Issue
- PhpStorm runs
composer update
when you opencomposer.json
file 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 update
on inactive project when you opencomposer.json
if you already have another DDEV project running, which results in brokenddev describe -j
, because onlyweb
container is started.
See Since using the plugin, I am getting a lot of orphaned networks and failedddev start
s #263 (comment) - PhpStorm cannot run
npm install
properly, 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 true
prevents 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