Skip to content

Fix compilation in multi-version php environment#518

Merged
owenvoke merged 1 commit into
laravel-zero:masterfrom
rforced:master
Mar 24, 2026
Merged

Fix compilation in multi-version php environment#518
owenvoke merged 1 commit into
laravel-zero:masterfrom
rforced:master

Conversation

@rforced

@rforced rforced commented Mar 13, 2026

Copy link
Copy Markdown
Contributor

We have an environment where multiple versions of PHP is installed.

The default /usr/bin/php is PHP 8.5. In there is also /usr/bin/php84, 83, etc.

When you compile an app when the environment default is 8.5 (box is still broken on PHP 8.5),

php84 ./application app:build -vvv --build-version=0.1

Will still fail, because we don't pass the wanted php to box.

In RequirementsBuilder.php line 29:
                                                                            
  [ErrorException]                                                          
  Using null as an array offset is deprecated, use an empty string instead  
                                                                            

Exception trace:

This now passes the wanted php version to execute box with.
With this change, it will respect what version was "passed" in the command line. This also still works on Windows.

Please let me know if you have any questions.

@rforced

rforced commented Mar 13, 2026

Copy link
Copy Markdown
Contributor Author

@owenvoke test failure is unrelated to my PR

@rforced

rforced commented Mar 18, 2026

Copy link
Copy Markdown
Contributor Author

@owenvoke any chance you can look at this?

@owenvoke owenvoke left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This makes sense to me. 👍🏻 I've actually considered doing this previously, and not too sure why I didn't. 🤔

@owenvoke
owenvoke merged commit 5c96a70 into laravel-zero:master Mar 24, 2026
9 of 10 checks passed
@owenvoke

Copy link
Copy Markdown
Member

Released as part of v12.1.0, thanks @rforced!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants