Skip to content

Suppress ini warning when using INSTALL_ROOT #692

Description

@spk

Summary

When using pie install with INSTALL_ROOT set, PIE always prints:

⚠️  Extension has NOT been automatically enabled.
You must now add "zend_extension=xdebug" to your php.ini

There is no way to suppress this warning. The --skip-enable-extension flag also triggers the same message.

Use case

In CI/CD and container build environments (e.g. Platform.sh, Upsun, Docker), the filesystem where PHP extensions are installed (/usr/lib/php/) is read-only. We use INSTALL_ROOT to redirect the compiled .so to a writable directory, then handle the php.ini configuration externally via a wrapper script.

In this context the warning is misleading — users see it and think something went wrong, when in fact everything is working as expected.

Example build hook:

hooks:
    build: |
        INSTALL_ROOT=/app/.global pie install xdebug/xdebug
        # php.ini is generated by our wrapper script

Proposal

A few options:

  1. Suppress the warning when INSTALL_ROOT is set — since automatic ini setup cannot work with a non-standard install root anyway
  2. Add a flag like --no-ini-warning to opt out of the message
  3. Respect Symfony Console -q selectively for this message while keeping other output visible

Option 1 seems the most natural — if the user explicitly sets INSTALL_ROOT, they're taking control of the install layout and don't need the ini reminder.

Context

  • PIE version: 1.4.9
  • The warning is emitted in src/Installing/SetupIniFile.php
  • Related: INSTALL_ROOT handling in src/Installing/UnixInstall.php

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions