sempia/display-warnings

Composer plugin to display post-install warnings defined in package extra.warnings

Installs: 1

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Forks: 0

Type:composer-plugin

pkg:composer/sempia/display-warnings

1.0.0 2026-02-09 00:00 UTC

This package is auto-updated.

Last update: 2026-02-10 11:43:22 UTC


README

Display Warnings is a composer plugin that displays post-install warnings defined in package extra.warnings.

Php packages sometimes need to inform users about requirements that composer cannot check: system libraries, php extensions with specific ini settings, external tools, security implications, etc. Standard suggest entries are easy to miss and only shown once. This plugin displays warnings prominently at the end of every composer install and composer update, making them hard to overlook.

Installation

Add to your package composer.json:

{
    "require": {
        "sempia/display-warnings": "^1.0"
    }
}

When users install your package via composer, warnings are displayed automatically.

Usage

Define warnings in extra.warnings in your package composer.json:

{
    "extra": {
        "warnings": [
            "This package requires the cli tool foo. See README for installation."
        ]
    }
}

Warnings are displayed at the end of every composer install and composer update.

Package warnings:
  your-vendor/your-package:
    This package requires the cli tool foo. See README for installation.

There may be multiple warnings and warnings may be multi-lines, like in this full example :

{
    "name": "your-vendor/your-package",
    "type": "library",
    "require": {
        "sempia/display-warnings": "^1.0"
    },
    "extra": {
        "warnings": [
            "This module requires either:\n- library jcupitt/vips v1 with php extension php-vips,\n- library jcupitt/vips v2 with php extension php-ffi,\n- or the cli tool vips (libvips-tools).",
            "The availability of vips is not checked by composer."
        ]
    },
    "config": {
        "allow-plugins": {
            "sempia/display-warnings": true
        }
    }
}

Development

Running tests

composer install
vendor/bin/phpunit

Warning

Use it at your own risk.

It's always recommended to backup your files and your databases and to check your archives regularly so you can roll back if needed.

Troubleshooting

See online issues on the plugin issues page on GitLab.

License

This plugin is published under the CeCILL v2.1 license, compatible with GNU/GPL and approved by FSF and OSI.

This software is governed by the CeCILL license under French law and abiding by the rules of distribution of free software. You can use, modify and/ or redistribute the software under the terms of the CeCILL license as circulated by CEA, CNRS and INRIA at the following URL "http://www.cecill.info".

As a counterpart to the access to the source code and rights to copy, modify and / or redistribute granted by the license, users are provided only with a limited warranty and the software's author, the holder of the economic rights, and the successive licensors have only limited liability.

In this respect, the user's attention is drawn to the risks associated with loading, using, modifying and/or developing or reproducing the software by the user in light of its specific status of free software, that may mean that it is complicated to manipulate, and that it is reserved for developers and experienced professionals having in-depth computer knowledge. Users are therefore encouraged to load and test the software's suitability as regards their requirements in conditions enabling the security of their systems and/or data to be ensured and /or generally to use and operate it under the same conditions as regards security.

The fact that you are presently reading this means that you have had knowledge of the CeCILL license and that you accept its terms.

Copyright

  • Copyright Daniel Berthereau, 2025-2026 (see Daniel-KM on GitLab)

This plugin was originally designed for Omeka S modules for the digital library Manioc of the Université des Antilles (subvention Agence bibliographique de l’enseignement supérieur Abes).