Proposal: Adopt Symfony CSS Selector component
Is your feature request related to a problem? Please describe.
There are some advanced CSS selectors that I'd like to be able to use with the CssSelector bridges that Simple HTML DOM (SHD) does not seem to support. Examples:
Describe the solution you'd like
If this project were to incorporate the CSS Selector component, these selectors and more could be made available to the aforementioned bridges by replacing SHD with the built-in DOM extension (as is currently used by XPathAbstract). It supports all of the documented selectors of SHD with the exception of non-standard selectors like text and comment.
Describe alternatives you've considered
- Leaving things as is.
- I can try to make do with the available selectors 🤷
- Replacing Simple HTML DOM with another DOM implementation that supports these selectors.
- Previously rejected in #2539.
If there's any interest in pursuing this, I'd love to help out!
im open to it but i'd prefer not
this project doesnt really use composer for third party deps and would be nice to keep it that way
but the simple_html_dom is indeed kinda hacky, old and buggy
Thanks for the response! I'm thinking it would be possible to vendor the Symfony component since it has no dependencies. All it needs is a PSR-4 autoloader which seems relatively trivial to implement based on a few examples I've found (1, 2).