hoaproject / Compiler

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

Fix error handling for non-UTF-8 string in Lexer #93

Closed unkind closed 4 years ago

unkind commented 5 years ago

So far Lexer fails into infinite recursion with enabled unicode.mode if input data is not properly encoded.

unkind commented 5 years ago

It looks like duplicate of #88, but this fix is more accurate.

coveralls commented 5 years ago

Coverage Status

Coverage remained the same at ?% when pulling b0c8e3f36f5a6635a440118f91b6765d776a494f on unkind:bugfix-utf8-lexer into c620f44deff0b4c2d0c27560a3b0f5e7e376e001 on hoaproject:master.

Hywan commented 5 years ago

Thanks for the PR! It shows the error and the patch is well-written. I've noted few things to update here and there, but they are all minors. Once they are fixed, it's ready to be merged.

Majkl578 commented 5 years ago

Sorry, I didn't read the condition properly - it will need to be !==, not ===.

flip111 commented 5 years ago

What's preventing this PR from getting merged now?

unkind commented 4 years ago

I don't know what's going on with this one, sorry.

I still can't make git install:

Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Installation request for hoa/file dev-master -> satisfiable by hoa/file[dev-master].
    - hoa/file dev-master requires hoa/iterator dev-master -> satisfiable by hoa/iterator[dev-master] but these conflict with your requirements or minimum-stability.
  Problem 2
    - Installation request for hoa/test dev-master -> satisfiable by hoa/test[dev-master].
    - hoa/test dev-master requires hoa/cli dev-master -> satisfiable by hoa/cli[dev-master] but these conflict with your requirements or minimum-stability.

And I still don't understand this mess with Consistency::flexEntity(Autocompleter::class);. If you need to keep BC, you can use class_alias, IDE understands it well. Probably, I missed something in this logic.

Closing this one.