PHPackages                             haringsrob/behat-parser - 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. [Testing &amp; Quality](/categories/testing)
4. /
5. haringsrob/behat-parser

ActiveLibrary[Testing &amp; Quality](/categories/testing)

haringsrob/behat-parser
=======================

01PHP

Since May 29Pushed 8y agoCompare

[ Source](https://github.com/haringsrob/BehatParser)[ Packagist](https://packagist.org/packages/haringsrob/behat-parser)[ RSS](/packages/haringsrob-behat-parser/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (1)Used By (0)

BehatParser
===========

[](#behatparser)

A simple library for parsing and searching in Behat contexts.

The intention of this library is to create autocomplete functions within the php language server using the language server protocol developer by Microsoft.

However, this could be usefull in other scenario's as well.

Example
-------

[](#example)

To fetch the step defenitions for a given class:

```
$behat_parser_library = new Parser();
$class = \tests\FeatureContext::class;
$behat_parser_library->readClassForStepDefinitions($class);
$available_steps = $behat_parser_library->getAllStepDefinitions();
```

You can also use an array of classes:

```
$behat_parser_library = new Parser();
$classes = [
  \tests\FeatureContext::class,
  \tests\CustomContext::class,
];
$behat_parser_library->readClassesForStepDefinitions($class);
$available_steps = $behat_parser_library->getAllStepDefinitions();
```

Then you can invoke the matcher to search for specific steps:

```
$behat_parser_matcher = new Matcher($behat_parser_library);
$matching_result = $behat_parser_matcher->findStepContaining('I am using');
```

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity1

Limited adoption so far

Community6

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/0620f4b2365909cf6bdc86788a35689579dbd59e1ba51a86c839c2da321ab90e?d=identicon)[harings\_rob](/maintainers/harings_rob)

---

Top Contributors

[![haringsrob](https://avatars.githubusercontent.com/u/866743?v=4)](https://github.com/haringsrob "haringsrob (7 commits)")

### Embed Badge

![Health badge](/badges/haringsrob-behat-parser/health.svg)

```
[![Health](https://phpackages.com/badges/haringsrob-behat-parser/health.svg)](https://phpackages.com/packages/haringsrob-behat-parser)
```

###  Alternatives

[phpspec/prophecy

Highly opinionated mocking framework for PHP 5.3+

8.5k551.7M682](/packages/phpspec-prophecy)[vimeo/psalm

A static analysis tool for finding errors in PHP applications

5.8k77.5M6.7k](/packages/vimeo-psalm)[brianium/paratest

Parallel testing for PHP

2.5k118.8M754](/packages/brianium-paratest)[beberlei/assert

Thin assertion library for input validation in business models.

2.4k96.9M570](/packages/beberlei-assert)[mikey179/vfsstream

Virtual file system to mock the real file system in unit tests.

1.4k108.0M2.7k](/packages/mikey179-vfsstream)[orchestra/testbench

Laravel Testing Helper for Packages Development

2.2k39.1M32.1k](/packages/orchestra-testbench)

PHPackages © 2026

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