hoaproject / Compiler

The Hoa\Compiler library.
https://hoa-project.net/
453 stars 47 forks source link

Remove dependency to `ext/ctype` #96

Open Hywan opened 5 years ago

Hywan commented 5 years ago

It has been noted in https://github.com/hoaproject/Compiler/pull/93#discussion_r232647557 that hoa/compiler depends ext/ctype just because of a single call to ctype_digit in a non-critical path. I think it's a good idea to remove this dependency :-).

unkind commented 5 years ago

Is it worth it? This extension is built-in by default, unless you disabled it on purpose: https://secure.php.net/manual/en/ctype.installation.php.

composer.json should require it, though.

Hywan commented 5 years ago

We only use it once, and for a minor feature. It should be easy to write a workaround.

Majkl578 commented 5 years ago

Doesn't make sense to me - ctype is implicit extension.

flip111 commented 5 years ago

Keep extension since it comes with default php installation.