PHPackages                             stamina/phpquery-tools - 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. stamina/phpquery-tools

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

stamina/phpquery-tools
======================

phpQuery tools for extracting links and sanitizing HTML documents using phpQuery

11331PHP

Since Jan 30Pushed 13y ago1 watchersCompare

[ Source](https://github.com/panrafal/phpquery-tools)[ Packagist](https://packagist.org/packages/stamina/phpquery-tools)[ RSS](/packages/stamina-phpquery-tools/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

PhpQuery Tools
==============

[](#phpquery-tools)

Is a small set of helper tools to manipulate HTML documents.

It is using [phpQuery](http://code.google.com/p/phpquery/) library, which in turn is a PHP port of [jQuery](http://jquery.com/).

Currently there are two of them:

- [LinksExtractor](doc/LinksExtractor.md) - for extracting links
- [Sanitizer](doc/Sanitizer.md) - for sanitizing/linting HTML

Usage
-----

[](#usage)

Check the tool's docs for general info, and the source code annotations for the API.

Installing
----------

[](#installing)

The best way is to use composer. Add the `stamina/phpquery-tools` package to your composer.json:

You will also need a phpQuery library. You can use mine, but it's not hosted on packagist:

```
{
    "require": {
        "stamina/phpquery": "1.*",
        "stamina/phpquery-tools": "1.*"
    },
    "repositories": [
        {
            "type": "vcs",
            "url": "https://github.com/panrafal/phpquery.git"
        }
    ]
}
```

Testing
-------

[](#testing)

`phpunit --bootstrap Tests/bootstrap.php Tests`

[![githalytics.com alpha](https://camo.githubusercontent.com/11e9955c7c29c53068d00bd459ddbed076d9e28057c50319f55cd88653615fe1/68747470733a2f2f637275656c2d6361726c6f74612e7061676f6461626f782e636f6d2f6534353135313538306335383039363033633035623765353330333930363566 "githalytics.com")](http://githalytics.com/panrafal/phpquery-tools)

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/e7406b72b2e94fe9f55b3553719594c15d1c37b36d42c92a267b4419c31e76bf?d=identicon)[panrafal](/maintainers/panrafal)

---

Top Contributors

[![panrafal](https://avatars.githubusercontent.com/u/1268900?v=4)](https://github.com/panrafal "panrafal (9 commits)")

### Embed Badge

![Health badge](/badges/stamina-phpquery-tools/health.svg)

```
[![Health](https://phpackages.com/badges/stamina-phpquery-tools/health.svg)](https://phpackages.com/packages/stamina-phpquery-tools)
```

PHPackages © 2026

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