-
Notifications
You must be signed in to change notification settings - Fork 7.9k
initial devcontainer support #15203
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
base: master
Are you sure you want to change the base?
initial devcontainer support #15203
Conversation
8108235
to
09b0fb5
Compare
I should test this a bit but the .vscode directory will be most likely in many cases additionally changed locally by the developer's VS code editor which will make it a bit difficult to use the Git repository. The .vscode directory probably shouldn't be committed to the php-src repo. |
Indeed. That could easily overwrite the developer's local settings (it would overwrite my settings.json, for instance). And I wonder why .devcontainer should be added to php-src. Isn't that something every developer may use and configure as appropriate for them? |
Indeed. I removed the .vscode directory and added it to gitignore. @cmb69 However, I understand there may be various opinions on whether to include the devcontainer definition in the repo. Personally, I would find it helpful even if it's just added to the .gitignore file. |
Rather add it to the local .gitignore file defined in your Git configuration (~/.gitconfig). See this explanation in Gitignore:
This was done intentionally, because the macOS has more files to be ignored, and other editors have other similar directories. This is very common practice in Git repositories. About Devcontainers I think idea is ok. I'll test this a bit... |
40454e3
to
b5b184d
Compare
OK.
Essentially, I prefer to include |
How about including an EditorConfig configuration file? While php-src basically adopts tab indentation with a width of 4, many recent editors default to space indentation, so this might be helpful. Since EditorConfig is editor-independent, it might be a good idea to include it. |
The .editorconfig file is in php-src already. |
@petk |
Currently, it appears that PHP tests on GitHub Actions are being conducted on Ubuntu 22.04. The environment included in this PR is based on Debian 12 Bookworm. Would it be more appropriate to use an Ubuntu-based environment? Personally, I prefer to choose Debian because Ubuntu's mirrors for architectures other than amd64 are poor. When setting up the environment from Japan on arm64 macOS, it takes an extremely long time with Ubuntu. |
It might actually be good to not confine to a certain distro, so using Debian here seems like a win. |
2f8beed
to
cd536f0
Compare
cd536f0
to
463c31f
Compare
This might be good to add default debugging options and tools as well I once played with VSCode and docker, I managed to prepere a config like this for attaching to php build-in web server e.g. that was started via Maybe should be adjusted to use Additionally it might be nice to include some tracer with timeline view features. Valgrind's view are too sampled, but uftrace seemed to work well for profiling and reverse engineering https://github.com/namhyung/uftrace just enough to drop trace file into chrome or any other compatible viewer. My VSCode config.
|
Add initial Development Containers support.
This is an enhancement to the development environment and does not affect the implementation of PHP itself in anyway.
It brings the following benefits:
Includes experimental PostgreSQL support using docker compose, Support for other built-in extensions is difficult for me to determine and therefore not included.
Usage
Local Visual Studio Code
Open Folder in Container
php-dev (for Local)
GitHub Codespaces
<> Code
buttonCodespaces
tab+
link(Default 2-core is quite slow, so
...
->New with options...
to customize the configuration)If necessary, I would like to solicit feedback on this PR on Internals ML.