symfony/symfony — pull request #7314 by jfsimon (2013-03-09 10:33:57+00:00)
Title: [WIP] [RFC] [CssSelector] Full rewriting.

Abstract
--------

The `CssSelector` component is a port of the Python https://github.com/SimonSapin/cssselect library. Previous implementation was a port of the `v0.1` tag, this implementation is a port of the `v0.7.1` tag. As Python and PHP have different philosophies, this is not a simple language-to-language translation, I needed to re-architecture the lib.

This is a WIP
-------------

There iscurrently **no test**, and a huge probability for this code not to work at all. I'll write tests and fix bugs **when the architecture will be validated**. Please, keep CS comments for latter, I think things should be done in this order:
* architecture validation
* tests writing / bugs fix
* CS cleaning

This is an RFC
--------------

Thank you for pushing constructive comments about implementation, pointing bad patterns use and wrong original lib translations. There is a few `todo` tags in the code, some come from the original lib, some are due to architectures differences. The classes containing `todo` tags are:
* `XPath\Extension\FunctionExtension`
* `XPath\Extension\HtmlExtension`
* `XPath\Extension\NodeExtension`
* `CssSelector`

Q/A
---

| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | no

* There should be no BC break, if you find one, please report it.
* Tests dont pass as there is currently no test.