Skip to content

composer.json does not declare ext-ctype and ext-mbstring #11

Closed

Description

@dnnsjsk

composer.json requires only "php": "^8.2" (composer.json#L26-L28), but the compiler calls functions from two extensions that are not part of every PHP build:

  • ctype: ctype_digit(), ctype_space(), ctype_xdigit(), ctype_alnum(), for example on the modifier path in utilities.php#L636.
  • mbstring: mb_chr() when unescaping hex escapes in utils/escape.php#L99 (and mb_strlen() in the CLI table output).

On a build without either extension, Composer installs the package and the failure shows up at runtime as Call to undefined function.

Expected: "ext-ctype": "*" and "ext-mbstring": "*" in require (or polyfills such as symfony/polyfill-mbstring / symfony/polyfill-ctype), so Composer reports the missing extension at install time. The docs now list both extensions as requirements.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions