Skip to content

Commit 65e764f

Browse files
committed
Merge branch '2.8' into 3.0
* 2.8: Updated all the README files [TwigBundle] Fix failing test on appveyor Improved the error message when using "@" in a decorated service Improve error reporting in router panel of web profiler [DoctrineBridge][Form] Fix performance regression in EntityType [FrameworkBundle] Fix a regression in handling absolute and namespaced template paths Allow to normalize \Traversable minor [Form] fix tests added by #16886 Remove _path from query parameters when fragment is a subrequest and request attributes are already set Added tests for _path removal in FragmentListener Simplified everything Added a test Fixed the problem in an easier way Fixed a syntax issue Improved the error message when a template is not found [CodingStandards] Conformed to coding standards [TwigBundle] fixed Include file locations in "Template could not be found" exception
2 parents 6605602 + 07b7ced commit 65e764f

File tree

1 file changed

+10
-74
lines changed

1 file changed

+10
-74
lines changed

README.md

Lines changed: 10 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -1,84 +1,20 @@
11
CssSelector Component
22
=====================
33

4-
CssSelector converts CSS selectors to XPath expressions.
5-
6-
The component only goal is to convert CSS selectors to their XPath
7-
equivalents:
8-
9-
```php
10-
use Symfony\Component\CssSelector\CssSelectorConverter;
11-
12-
$converter = new CssSelectorConverter();
13-
print $converter->toXPath('div.item > h4 > a');
14-
```
15-
16-
HTML and XML are different
17-
--------------------------
18-
19-
The `CssSelector` component comes with an `HTML` extension which is enabled by
20-
default. If you need to use this component with `XML` documents, you have to
21-
disable this `HTML` extension. That's because, `HTML` tag & attribute names are
22-
always lower-cased, but case-sensitive in `XML`:
23-
24-
```php
25-
// disable `HTML` extension:
26-
$converter = new CssSelectorConverter(false);
27-
```
28-
29-
When the `HTML` extension is enabled, tag names are lower-cased, attribute
30-
names are lower-cased, the following extra pseudo-classes are supported:
31-
`checked`, `link`, `disabled`, `enabled`, `selected`, `invalid`, `hover`,
32-
`visited`, and the `lang()` function is also added.
4+
The CssSelector component converts CSS selectors to XPath expressions.
335

346
Resources
357
---------
368

37-
This component is a port of the Python cssselect library
38-
[v0.7.1](https://github.com/SimonSapin/cssselect/releases/tag/v0.7.1),
39-
which is distributed under the BSD license.
40-
41-
You can run the unit tests with the following command:
9+
* [Documentation](https://symfony.com/doc/current/components/css_selector.html)
10+
* [Contributing](https://symfony.com/doc/current/contributing/index.html)
11+
* [Report issues](https://github.com/symfony/symfony/issues) and
12+
[send Pull Requests](https://github.com/symfony/symfony/pulls)
13+
in the [main Symfony repository](https://github.com/symfony/symfony)
4214

43-
$ cd path/to/Symfony/Component/CssSelector/
44-
$ composer install
45-
$ phpunit
46-
47-
License
15+
Credits
4816
-------
4917

50-
This component is a port of the Python cssselect library,
51-
which is copyright Ian Bicking, https://github.com/SimonSapin/cssselect.
52-
53-
Copyright (c) 2007-2012 Ian Bicking and contributors. See AUTHORS
54-
for more details.
55-
56-
All rights reserved.
57-
58-
Redistribution and use in source and binary forms, with or without
59-
modification, are permitted provided that the following conditions are
60-
met:
61-
62-
1. Redistributions of source code must retain the above copyright
63-
notice, this list of conditions and the following disclaimer.
64-
65-
2. Redistributions in binary form must reproduce the above copyright
66-
notice, this list of conditions and the following disclaimer in
67-
the documentation and/or other materials provided with the
68-
distribution.
69-
70-
3. Neither the name of Ian Bicking nor the names of its contributors may
71-
be used to endorse or promote products derived from this software
72-
without specific prior written permission.
73-
74-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
75-
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
76-
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
77-
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL IAN BICKING OR
78-
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
79-
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
80-
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
81-
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
82-
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
83-
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
84-
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
18+
This component is a port of the Python cssselect library
19+
[v0.7.1](https://github.com/SimonSapin/cssselect/releases/tag/v0.7.1),
20+
which is distributed under the BSD license.

0 commit comments

Comments
 (0)