Skip to content

Add support for PHP#8

Closed
m1guelpf wants to merge 1 commit into
openai:mainfrom
m1guelpf:patch-1
Closed

Add support for PHP#8
m1guelpf wants to merge 1 commit into
openai:mainfrom
m1guelpf:patch-1

Conversation

@m1guelpf

Copy link
Copy Markdown
Contributor

Adds support for PHP

@m1guelpf m1guelpf changed the title Add PHP Add support for PHP May 16, 2025
@bradenkeith

Copy link
Copy Markdown

Bless you, Miguel.

lets send this one

@Luehrsen

Copy link
Copy Markdown

Good stuff, love this!

@brzuchal

Copy link
Copy Markdown

@joshma-openai can we get this reviewed/merged? We're wasting lots of time on setup scripts running in the background - package manager updates each time, downloads packages and installs them several times per Codex Task, which is a waste of resources, I guess.

@bradenkeith

bradenkeith commented May 29, 2025

Copy link
Copy Markdown

@joshma-openai can we get this reviewed/merged? We're wasting lots of time on setup scripts running in the background - package manager updates each time, downloads packages and installs them several times per Codex Task, which is a waste of resources, I guess.

@brzuchal Do you have a gist for your setup script you could share?

@brzuchal

Copy link
Copy Markdown

@bradenkeith here you go https://gist.github.com/brzuchal/f1285905319e43478e4461512f5586ae

@bradenkeith

Copy link
Copy Markdown

@brzuchal thank you!

@peterjthomson

Copy link
Copy Markdown

For better or worse, php is one of the most used web languages in the world. And Laravel makes it a dream to use with AI support. Let's go!!

@HazemKhaled HazemKhaled left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

working fine with me

This was referenced Jun 4, 2025

@larson-carter larson-carter left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works for me!

Fixes #36.

Currently over half the time coded takes is running my custom php installation. So this greatly improves it!

@archon810

Copy link
Copy Markdown

Woo! Waiting for custom image support, this will at least make the wait less excruciating.

@archon810

Copy link
Copy Markdown

@m1guelpf Please add more PHP versions in the selector. 8.2-8.4 is too new for a lot of users. For example, some could still be on v7, and we're on 8.1.

@archon810

Copy link
Copy Markdown

May I also suggest adding phpunit with

apt-get install -y --no-install-recommends phpunit

It's such an integral part of PHP that I feel it should be included into the base image.

@eduardocruz

Copy link
Copy Markdown

Came here just to say ... +1 👍🏽

@larson-carter

Copy link
Copy Markdown

May I also suggest adding phpunit with

apt-get install -y --no-install-recommends phpunit

It's such an integral part of PHP that I feel it should be included into the base image.

I also do agree with this. I think that this is a necessity that should be added. Especially with the future of test driven development.

@archon810

Copy link
Copy Markdown

Especially since by default, Codex attempts to run tests which in PHP's case use phpunit.

@larson-carter

larson-carter commented Jun 6, 2025

Copy link
Copy Markdown

@m1guelpf

After doing further review I have noticed a few things for efficiency reasons:

  1. Why do we not use PHP.NEW for installing the PHP related things here? Look at this implementation.
  2. There are now merge conflicts, can these be fixed that way there is a higher likelihood of OpenAI team member merging them?

Also this comment is slightly disheartening.

@dani-gouken

Copy link
Copy Markdown

it may be a good idea to add composer as well

@archon810

Copy link
Copy Markdown

it may be a good idea to add composer as well

This PR already installs composer https://github.com/openai/codex-universal/pull/8/files#diff-dd2c0eb6ea5cfc6c4bd4eac30934e2d5746747af48fef6da689e85b752f39557R235.

@indigoram89

Copy link
Copy Markdown

great!!

@brzuchal

brzuchal commented Jun 9, 2025

Copy link
Copy Markdown

May I also suggest adding phpunit with

apt-get install -y --no-install-recommends phpunit

It's such an integral part of PHP that I feel it should be included into the base image.

This is not a good idea, PHPUnit version used for testing should go with application requirements and be installed by Composer, you don't want to execute incompatible PHPUnit with your config+tests struggle with deprecation errors or missing features support

@peterjthomson

Copy link
Copy Markdown

Yep. This PR is just to get PHP in the absolute base, 'language' options for Codex and OpenAI. It's not a feature complete docker image for every situation. We can all run our own setup scripts. We just need a common starting point.

@joshma-openai

Copy link
Copy Markdown
Contributor

Hey folks, sorry for the delay and thank you @m1guelpf for kicking this off! Just a note, this image repo is actually a mirror / reference at the moment - the source of truth is in an internal repo, so while I can merge PRs here, it actually requires some work first to update the real image build.

We'll get to this in the upcoming week or so; I'll update back when it's fully merged.

@brzuchal

brzuchal commented Jul 6, 2025

Copy link
Copy Markdown

Hi @joshma-openai can you give an update on this?

@phpfour

phpfour commented Jul 13, 2025

Copy link
Copy Markdown

Hi @joshma-openai, may we request an update on this, please?

@larson-carter

Copy link
Copy Markdown

@joshma-openai

Two things, hate to keep tagging you and making this drag out forever.

1.) Is there any update on this PHP/Laravel PR/Ticket?
2.) Why is this a reference repo compared to what is actually being utilized at OpenAI? I understand if it is security related, but what if us (The community) could help out accelerating this.... for free?

@joshma-openai

Copy link
Copy Markdown
Contributor

Folks, happy to announce that PHP is now included in the base image! Version selection in the UI is coming soon - for now it's baked to php 8.4 and you can run mise use php@8.3 to switch versions.

@m1guelpf
m1guelpf deleted the patch-1 branch July 14, 2025 22:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.