PHPackages                             ahfeel/php-query - 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. ahfeel/php-query

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

ahfeel/php-query
================

A composer wrapper for the phpQuery package

2.0(8y ago)045.2kMITPHP

Since Jun 3Pushed 6y agoCompare

[ Source](https://github.com/ahfeel/phpQuery)[ Packagist](https://packagist.org/packages/ahfeel/php-query)[ RSS](/packages/ahfeel-php-query/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (5)Used By (0)

Installation via composer
=========================

[](#installation-via-composer)

```

composer require 'somesh/php-query'

```

or add 'somesh/php-query' as a dependency in composer.json

I added a composer.json and autoloaded the php file so that it can be setup using composer directly. This doesn't use psr-0 autoloading

Using phpQuery

```
 $doc = phpQuery::newDocumentHTML($markup);
 $doc = phpQuery::newDocumentXML();
 $doc = phpQuery::newDocumentFileXHTML('test.html');
 $doc = phpQuery::newDocumentFilePHP('test.php');
 $doc = phpQuery::newDocument('test.xml', 'application/rss+xml');
 $doc = phpQuery::newDocument('');
//Manipulating
$doc['ul > li'] ->addClass('my-new-class')
//For more information about usage, visit the code.google.com/p/phpquery pahe
```

Description from

This is phpQuery, a PHP port of jQuery selectors, super useful for DOM traversal and functional testing.

It is originally by **Tobiasz Cudnik:**

And was released under the MIT license.

We've cloned it into github because no issues have been fixed upstream in the last two years and we needed to fix a bug relating to the serialize() method to get our functional tests to work. You can find our github repository here:

"What did you fix?"

Our initial commit includes a fix for the serialize() method, crucial to do form submissions (a big deal for functional testing). See the commit history in github for any later changes.

- P'unk Avenue

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 84.6% 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.

###  Release Activity

Cadence

Every ~106 days

Total

4

Last Release

2951d ago

Major Versions

1.3 → 2.02018-04-19

### Community

Maintainers

![](https://www.gravatar.com/avatar/1a3c5f7f00a29050181b41d6e27d7a18151cbd99a8996fe6db599fdaddaa44ba?d=identicon)[ahfeel](/maintainers/ahfeel)

---

Top Contributors

[![slaith](https://avatars.githubusercontent.com/u/1351947?v=4)](https://github.com/slaith "slaith (11 commits)")[![ahfeel](https://avatars.githubusercontent.com/u/43286?v=4)](https://github.com/ahfeel "ahfeel (1 commits)")[![AstDerek](https://avatars.githubusercontent.com/u/354950?v=4)](https://github.com/AstDerek "AstDerek (1 commits)")

### Embed Badge

![Health badge](/badges/ahfeel-php-query/health.svg)

```
[![Health](https://phpackages.com/badges/ahfeel-php-query/health.svg)](https://phpackages.com/packages/ahfeel-php-query)
```

###  Alternatives

[symfony/polyfill-intl-icu

Symfony polyfill for intl's ICU-related data and classes

2.6k251.4M96](/packages/symfony-polyfill-intl-icu)[vivait/string-generator-bundle

Generate random strings for IDs or keys using property annotations

1759.4k](/packages/vivait-string-generator-bundle)[withinboredom/time

Converting time to units

152.7k1](/packages/withinboredom-time)

PHPackages © 2026

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