ezyang / ezyang/htmlpurifier

Ambiguous class HTML5 resolution

Open
#241 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
3.4k
Forks
361
Avg merge
3d 41m
Merged PRs (30d)
2

Description

I'm currently trying to incorporate rector into my projects, and it complains about:

Ambiguous class HTML5 resolution; defined in ./vendor/ezyang/htmlpurifier/maintenance/PH5P.php and in ./vendor/ezyang/htmlpurifier/library/HTMLPurifier/Lexer/PH5P.php.  

Here's the offending code:
https://github.com/ezyang/htmlpurifier/blob/fe0452d6887a0fa76e2eaf80166e1ea205e7bb81/library/HTMLPurifier/Lexer/PH5P.php#L70 https://github.com/ezyang/htmlpurifier/blob/fe0452d6887a0fa76e2eaf80166e1ea205e7bb81/maintenance/PH5P.php#L2

Would it be technically fine if I rename one of the class? I think the lexer one would be fine since it's a subclass.

Thanks.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by comparing the class definitions in maintenance/PH5P.php and library/HTMLPurifier/Lexer/PH5P.php, then search the repository for references to both names. Run the project tests after checking the affected lexer and maintenance paths. Done means the duplicate-class warning is eliminated without breaking existing references.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.