Skip to content

composer.json requires seven unused extensions and is missing ext-mbstring #42

Description

@HafizMMoaz

composer.json requires ext-curl, ext-fileinfo, ext-gd, ext-intl, ext-mysqli, ext-openssl, ext-sodium and ext-zip. Grepping src/ for functions from those extensions returns nothing: the only extension functions this library calls are mb_strlen() (src/CLI.php:185, src/Commands/Index.php:116) and PCRE.

So the manifest is wrong in both directions:

  • ext-mbstring is used but not declared. On a build without mbstring, CLI::strlen() and the index listing fatal at runtime and Composer gives no warning at install time.
  • Seven extensions are declared but unused, which forces anyone installing this standalone CLI helper to have gd, mysqli, curl, sodium and zip present. That is a real barrier for a library whose selling point is being small.

If any of them is needed transitively, it belongs in the package that actually uses it (webisters/language for ext-intl, for instance), not here.

Expected require block:

"require": {
    "php": ">=8.2",
    "ext-mbstring": "*",
    "webisters/language": "*"
}

Worth checking pcntl too: onSignal() guards with function_exists(), so it is correctly optional, but it could be listed under suggest.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions