PHPackages                             symfony/css-selector - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. symfony/css-selector

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

symfony/css-selector
====================

Converts CSS selectors to XPath expressions

v8.0.6(3mo ago)7.4k754.9M—4%4320MITPHPPHP &gt;=8.4

Since Sep 26Pushed 1w ago11 watchersCompare

[ Source](https://github.com/symfony/css-selector)[ Packagist](https://packagist.org/packages/symfony/css-selector)[ Docs](https://symfony.com)[ Fund](https://symfony.com/sponsor)[ GitHub Sponsors](https://github.com/fabpot)[ RSS](/packages/symfony-css-selector/feed)WikiDiscussions 8.1 Synced 1mo ago

READMEChangelog (10)DependenciesVersions (623)Used By (20)

CssSelector Component
=====================

[](#cssselector-component)

The CssSelector component converts CSS selectors to XPath expressions.

Resources
---------

[](#resources)

- [Documentation](https://symfony.com/doc/current/components/css_selector.html)
- [Contributing](https://symfony.com/doc/current/contributing/index.html)
- [Report issues](https://github.com/symfony/symfony/issues) and [send Pull Requests](https://github.com/symfony/symfony/pulls)in the [main Symfony repository](https://github.com/symfony/symfony)

Credits
-------

[](#credits)

This component is a port of the Python cssselect library [v0.7.1](https://github.com/SimonSapin/cssselect/releases/tag/v0.7.1), which is distributed under the BSD license.

###  Health Score

87

—

ExcellentBetter than 100% of packages

Maintenance91

Actively maintained with recent releases

Popularity84

Widely adopted with strong download metrics

Community57

Growing community involvement

Maturity100

Battle-tested with a long release history

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~8 days

Recently: every ~0 days

Total

623

Last Release

91d ago

Major Versions

v6.4.24 → v7.4.0-BETA12025-08-09

v7.4.0-BETA1 → v8.0.0-BETA12025-08-12

v7.4.0-RC1 → v8.0.0-RC12025-10-30

6.4.x-dev → v7.4.62026-02-17

7.4.x-dev → v8.0.62026-02-17

PHP version history (14 changes)2.0.4PHP &gt;=5.3.2

v2.1.0PHP &gt;=5.3.3

v2.7.0-BETA1PHP &gt;=5.3.9

v3.0.0PHP &gt;=5.5.9

v3.3.8PHP ^5.5.9|&gt;=7.0.8

v4.0.0-BETA1PHP ^7.1.3

v5.0.0-BETA2PHP ^7.2.9

v5.0.0PHP ^7.2.5

v5.0.11PHP &gt;=7.2.5

v4.4.14PHP &gt;=7.1.3

v6.0.0PHP &gt;=8.0.2

v6.1.0-RC1PHP &gt;=8.1

v7.0.0-BETA1PHP &gt;=8.2

v8.0.0-BETA1PHP &gt;=8.4

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/47313?v=4)[Fabien Potencier](/maintainers/fabpot)[@fabpot](https://github.com/fabpot)

---

Top Contributors

[![fabpot](https://avatars.githubusercontent.com/u/47313?v=4)](https://github.com/fabpot "fabpot (305 commits)")[![nicolas-grekas](https://avatars.githubusercontent.com/u/243674?v=4)](https://github.com/nicolas-grekas "nicolas-grekas (261 commits)")[![xabbuh](https://avatars.githubusercontent.com/u/1957048?v=4)](https://github.com/xabbuh "xabbuh (18 commits)")[![derrabus](https://avatars.githubusercontent.com/u/1506493?v=4)](https://github.com/derrabus "derrabus (12 commits)")[![stof](https://avatars.githubusercontent.com/u/439401?v=4)](https://github.com/stof "stof (11 commits)")[![Tobion](https://avatars.githubusercontent.com/u/610090?v=4)](https://github.com/Tobion "Tobion (8 commits)")[![OskarStark](https://avatars.githubusercontent.com/u/995707?v=4)](https://github.com/OskarStark "OskarStark (7 commits)")[![pborreli](https://avatars.githubusercontent.com/u/77759?v=4)](https://github.com/pborreli "pborreli (6 commits)")[![Seldaek](https://avatars.githubusercontent.com/u/183678?v=4)](https://github.com/Seldaek "Seldaek (6 commits)")[![keradus](https://avatars.githubusercontent.com/u/2716794?v=4)](https://github.com/keradus "keradus (6 commits)")[![jakzal](https://avatars.githubusercontent.com/u/190447?v=4)](https://github.com/jakzal "jakzal (5 commits)")[![jfsimon](https://avatars.githubusercontent.com/u/119407?v=4)](https://github.com/jfsimon "jfsimon (3 commits)")[![franckranaivo](https://avatars.githubusercontent.com/u/7473665?v=4)](https://github.com/franckranaivo "franckranaivo (3 commits)")[![GrahamCampbell](https://avatars.githubusercontent.com/u/2829600?v=4)](https://github.com/GrahamCampbell "GrahamCampbell (3 commits)")[![ostrolucky](https://avatars.githubusercontent.com/u/496233?v=4)](https://github.com/ostrolucky "ostrolucky (3 commits)")[![jderusse](https://avatars.githubusercontent.com/u/578547?v=4)](https://github.com/jderusse "jderusse (3 commits)")[![wouterj](https://avatars.githubusercontent.com/u/749025?v=4)](https://github.com/wouterj "wouterj (3 commits)")[![peterrehm](https://avatars.githubusercontent.com/u/2010989?v=4)](https://github.com/peterrehm "peterrehm (3 commits)")[![lazyhammer](https://avatars.githubusercontent.com/u/757929?v=4)](https://github.com/lazyhammer "lazyhammer (2 commits)")[![alexandre-daubois](https://avatars.githubusercontent.com/u/2144837?v=4)](https://github.com/alexandre-daubois "alexandre-daubois (2 commits)")

---

Tags

componentphpsymfonysymfony-component

### Embed Badge

![Health badge](/badges/symfony-css-selector/health.svg)

```
[![Health](https://phpackages.com/badges/symfony-css-selector/health.svg)](https://phpackages.com/packages/symfony-css-selector)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
