-
-
Notifications
You must be signed in to change notification settings - Fork 579
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
Project php_version ignored, different default php version on web container #6047
Comments
Hi @pierzakp - You get to set your PHP version to whatever you want. Set it in .ddev/config.yaml, or In your Dockerfile, use |
As I mentioned, I already have set PHP version in ddev config to 8.1, But... I started debugging why newrelic extension is being installed for PHP 8.2, not for PHP 8.1, and it seems that at moment of extension installation PHP 8.2 is default PHP version:
|
Could you please show your Dockerfile? Also, you must have your homebrew set up to get "edge" versions. If that's intentional, we appreciate you testing. But if it's unintentional, you should probably revert back to using the normal brew tap.
|
Sure, below my Dockerfile:
Regarding version of brew, my intention was to use stable releases, |
Yes, you want to untap the edge homebrew. But you wouldn't be getting this version from drud/ddev (but untap that). You have installed the HEAD version at some point, so please Your problem with newrelic appears to be the newrelic version you're using, and I don't have a way to help with that. It looks to me like you should be doing |
@rfay yeah, I am not sure how it happened, proceeding with fresh installation. For New Relic Infrastructure agent I have separated container,
|
Yes, the default PHP version changes to 8.2 in DDEV v1.23. No, you don't want to use the default PHP version in your dockerfile, you want to carefully install using $DDEV_PHP_VERSION instead, then it will build correctly regardless. You'll need to set that up however it needs to be set up with newrelic. |
As you can see in my Dockerfile it's no up to me to decide which PHP version to use during installation, scripts simply relies on default PHP version. My goal was simple - I want to have PHP 8.1 for my project and want to install New Relic PHP agent for PHP 8.1 strictly. |
I recommend that you use the recommended install from newrelic, which I assume would be less fragile. (Of course I have no experience with newrelic, so don't know much here). And I also assume you'll be wanting to move on from 8.1 at some point. You should be able to add this into your Dockerfile to accomplish what you want for now:
Normally that is done at startup, but you need it done before you install your stuff in the Dockerfile. |
Is there an existing issue for this?
Output of
ddev debug test
Expand `ddev debug test` diagnostic information
Expected Behavior
My Magento 2 based project has set php_version to 8.1 in
.ddev/config.yaml
.Recently I have updated ddev (brew), and my project failed on start, as docker image for web container has changed, previously was using tag
v1.22.7
, now it's usingddev/ddev-webserver:20240324_corepack_config
.It failed, as my extended Dockerfile (
.ddev/web-build/Dockerfile
) was installing and reconfiguring new relic agent strictly for PHP 8.1, but default version was 8.2.I was expecting that project php_version configuration will be used, and default PHP version would be 8.1.
Actual Behavior
Default php version is 8.2.
I tried also to put
ENV PHP_DEFAULT_VERSION=8.1
at the beginning of my extended Dockerfile, then indeed in container default version was PHP 8.1, but new relic extension was installed for PHP 8.2 anyway.Steps To Reproduce
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: