Skip to content

Conversation

@lacatoire
Copy link
Contributor

This PR replaces the use of the backtick operator (`cmd`), which is officially deprecated as of PHP 8.5.

Reference:

The affected calls fetch Git metadata during the build process. Using shell_exec() is semantically identical and avoids E_DEPRECATED notices on PHP 8.5.

Behavior and output remain unchanged. Tested with PHP 8.3, 8.4 and 8.5.

@lacatoire lacatoire changed the title Replace deprecated backtick operator with shell_exec() for PHP 8.5 co… Deprecated backtick operator with shell_exec() for PHP 8.5 Nov 25, 2025
@alfsb
Copy link
Member

alfsb commented Nov 25, 2025

Missed one backtick on line 590.

But as you are at it, the code between 578-600 is about to be deleted. It was written to debug a strange situation where GitHub CI is giving different results before and after merging. In the end, GitHub CI never guarantees the same result before/after merging, because CI ignores changes on master by default.

I wrote it, you can delete it.

@sy-records sy-records requested a review from Copilot November 26, 2025 02:20
Copilot finished reviewing on behalf of sy-records November 26, 2025 02:21
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the configure.php file to replace deprecated backtick operators with shell_exec() calls in preparation for PHP 8.5, where the backtick operator is officially deprecated. The changes affect git command executions that fetch repository metadata during the build process.

Key Changes:

  • Replaced three backtick operator usages with shell_exec() calls on lines 593-595
  • Updated quote escaping for git format string to use escaped double quotes

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

lacatoire and others added 2 commits November 26, 2025 10:28
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@alfsb
Copy link
Member

alfsb commented Nov 26, 2025

Tested on Linux and Windows. Appears to be ok. Let's give a few weeks for possible other reviews.

@lacatoire
Copy link
Contributor Author

Thanks @alfsb!
Since this PR only targets the PHP 8.5 fix, I’ll leave the code as-is.
The cleanup of that block can be handled separately.

@alfsb
Copy link
Member

alfsb commented Nov 27, 2025

I'm retracting what I said about deleting this code. It was useful literally yesterday for solving another problem. So, even though it didn't fulfill its original purpose, it still has uses.

After the merge, I'll just tidy it up and simplify it, but it will basically be kept.

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.

2 participants