-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature] Support docker-compose environments. #173
Comments
I was in similar situation trying to setup few different vscode extensions to work with specifying I ended up using Remote Containers in vscode, specifically Open an existing folder in a container to attach to already running docker container This way pretty much every extension works out of the box Default terminal is the one inside the container but you can select terminal with
Only "downside" is that I need to install extensions in the remote container and it won't use same extensions as my host. It will show them in the extension list and you need to install them. But if you can create list of default extensions that will be installed in every remote container by updating your global "remote.containers.defaultExtensions": [
// list of extensions that we want to install in every remote container
...
] |
@luigimannoni which extension did you end up using? |
@ultimike I used zobo.php-intellisense, still works for the latest phpcs/phpcbf |
@luigimannoni I don't understand. You've configured zobo.php-intellisense to point to phpcs and phpcbf inside of a Docker container? Stepping back a bit - with the valeryanm.vscode-phpsab extension, I have the following configuration (that doesn't work). Note how I'm pointing at a couple of .bash files for phpcs and phpcbf.
I was assuming that I'd have to set something similar in the zobo.php-intellisense settings to get it to work, but I don't see anything obvious. Can you assist? thanks, |
@ultimike no worries, took me few tries before getting it right. I did setup a repo for my co-workers few weeks ago, so you can follow the example as well: https://github.com/luigimannoni/vscode-phpcs-docker The only steps you need to make it work is to change php, phpcs and phpcbf script files to point the right docker-compose file and or docker container names. Works as well with a Oh, and don't forget to |
@luigimannoni Thanks so much - I feel like I'm just about there. Looking at the
Thoughts? thanks, |
@ultimike never had experience with it, but by the looks of it you probably need to target the As a last resort I think you can change the entire command with |
@luigimannoni Thanks so much - I now have things 99% working 👍 phpcs and phpcbf are working without a hitch (so far). The php bash script seems to always display the following issue in the problems tab, regardless of the file:
When I try running my php.bash file from the command line, I get a similar error:
Any idea what this is referring to? Here's my php.bash file:
thanks, |
@ultimike Not entirely sure what it is causing this as I don't recall anything similar but I had a strange error which wasn't related to any issue in my files, so I'd say it was along the same lines of your same problem. It was strictly related to the phpcs version I was using in the project and the extension no longer supporting the new phpcs as I mentioned in the first post above, changing extension solved the issue. |
Hello.
My computer it's complete clean and I have all my environments in docker machine, would be great if we can configure a path or task to run by project, so I can tell to the plugin to run:
docker-compose exec php vendor/bin/phpcs web/modules/custom/hostal_alter_list
instead of try to find the phpcs in my local machine.The text was updated successfully, but these errors were encountered: