Skip to content

Conversation

@shyim
Copy link
Member

@shyim shyim commented Dec 9, 2025

No description provided.

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 refactors the Dockerfile to copy Node.js binaries from the official Node Alpine image instead of installing them via apk. This approach provides better consistency with official Node.js releases.

Key Changes:

  • Introduces multi-stage build with Node Alpine base image for copying Node.js binaries
  • Replaces apk add nodejs npm with direct file copying and symlink creation
  • Simplifies PHP extension installation by removing version-specific conditional logic

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

Comment on lines +36 to +39
mv docker-php-ext-xdebug.ini docker-php-ext-xdebug.disabled
mv docker-php-ext-tideways.ini docker-php-ext-tideways.disabled
mv docker-php-ext-blackfire.ini docker-php-ext-blackfire.disabled

Copy link

Copilot AI Dec 9, 2025

Choose a reason for hiding this comment

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

The extension disabling logic now unconditionally disables all extensions. The old code only disabled xdebug, tideways, and blackfire extensions for PHP versions below 8.5.0. Now these extensions are always disabled even after being installed. Consider wrapping these moves in a version check:

PHP_VERSION_ID=$(php -r 'echo PHP_VERSION_ID;')
if [[ "$PHP_VERSION_ID" -lt 80500 ]]; then
    mv docker-php-ext-xdebug.ini docker-php-ext-xdebug.disabled
    mv docker-php-ext-tideways.ini docker-php-ext-tideways.disabled
    mv docker-php-ext-blackfire.ini docker-php-ext-blackfire.disabled
fi
Suggested change
mv docker-php-ext-xdebug.ini docker-php-ext-xdebug.disabled
mv docker-php-ext-tideways.ini docker-php-ext-tideways.disabled
mv docker-php-ext-blackfire.ini docker-php-ext-blackfire.disabled
PHP_VERSION_ID=$(php -r 'echo PHP_VERSION_ID;')
if [[ "$PHP_VERSION_ID" -lt 80500 ]]; then
mv docker-php-ext-xdebug.ini docker-php-ext-xdebug.disabled
mv docker-php-ext-tideways.ini docker-php-ext-tideways.disabled
mv docker-php-ext-blackfire.ini docker-php-ext-blackfire.disabled
fi

Copilot uses AI. Check for mistakes.

apk add --no-cache bash git shadow patch coreutils

install-php-extensions tideways blackfire xdebug/[email protected]
Copy link

Copilot AI Dec 9, 2025

Choose a reason for hiding this comment

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

The PHP extensions installation has been simplified but removes the version check. The old code only installed tideways blackfire xdebug for PHP versions below 8.5.0. Now all three extensions are always installed, which may cause issues if they're incompatible with PHP 8.5+. Consider keeping the version check:

PHP_VERSION_ID=$(php -r 'echo PHP_VERSION_ID;')
if [[ "$PHP_VERSION_ID" -lt 80500 ]]; then
    install-php-extensions tideways blackfire xdebug/[email protected]
fi
Suggested change
install-php-extensions tideways blackfire xdebug/[email protected]
PHP_VERSION_ID=$(php -r 'echo PHP_VERSION_ID;')
if [[ "$PHP_VERSION_ID" -lt 80500 ]]; then
install-php-extensions tideways blackfire xdebug/[email protected]
fi

Copilot uses AI. Check for mistakes.
Co-authored-by: Copilot <[email protected]>
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