Skip to content

composer.json does not declare ext-ctype and ext-zlib #5

Closed

Description

@dnnsjsk

Summary

composer.json requires only php, ext-json and nikic/php-parser (

greph/composer.json

Lines 29 to 33 in a2fe0e8

"require": {
"php": "^8.2",
"ext-json": "*",
"nikic/php-parser": "^5.7"
},
), but the library calls functions from two more extensions:

(ext-tokenizer is also used directly, token_get_all() in src/Index/AstFactExtractor.php and src/Ast/AstPatternPrefilter.php, but it is declared by nikic/php-parser.)

Impact

On a PHP build without zlib (zlib is not enabled by default when PHP is compiled from source) or without ctype, composer require greph/greph succeeds and the failure only shows up at runtime as a call to an undefined function.

Expected

Add "ext-ctype": "*" and "ext-zlib": "*" (and optionally "ext-tokenizer": "*") to require, so Composer reports the missing extension at install time. The docs now list these extensions under 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