Download the PHP package coduo/php-matcher without Composer

On this page you can find all versions of the php package coduo/php-matcher. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package php-matcher

PHP Matcher

Type Coverage

Library created for testing all kinds of JSON/XML/TXT/Scalar values against patterns.

API:

It was built to simplify API's functional testing.

Latest Stable Version Total Downloads Latest Unstable Version License

We Stand Against Terror

Stand With Ukraine Stand With Us
Flag of Ukraine Flag of Israel

On Feb. 24, 2022, Russia declared an unprovoked war on Ukraine and launched a full-scale invasion. Russia is currently bombing peaceful Ukrainian cities, including schools and hospitals and attacking civilians who are fleeing conflict zones.

On Oct. 7, 2023, the national holiday of Simchat Torah, Hamas terrorists initiated an attack on Israel in the early hours, targeting civilians. They unleashed violence that resulted in at least 1,400 casualties and abducted at least 200 individuals, not limited to Israelis.

Sandbox

Feel free to play first with Sandbox

Installation

Require new dev dependency using composer:

Basic usage

Direct PHPMatcher usage

PHPUnit extending PHPMatcherTestCase

PHPUnit using PHPMatcherAssertions trait

Available patterns

Available pattern expanders

Example usage

Scalar matching

String matching

Time matching

Date matching

DateTime matching

TimeZone matching

Integer matching

Number matching

Double matching

Boolean matching

Wildcard matching

Expression matching

UUID matching

ULID matching

Array matching

Array Previous

@array_previous@ can also be used when matching JSON's and XML's

Array Previous Repeat

@array_previous_repeat@ can also be used when matching JSON's and XML's

Json matching

Json matching with unbounded arrays and objects

Xml matching

Optional - requires openlss/lib-array2xml: ^1.0 to be present.

Example scenario for api in behat using mongo.

PHPUnit integration

The assertMatchesPattern() is a handy assertion that matches values in PHPUnit tests. To use it either include the Coduo\PHPMatcher\PHPUnit\PHPMatcherAssertions trait, or extend the Coduo\PHPMatcher\PHPUnit\PHPMatcherTestCase:

The matchesPattern() method can be used in PHPUnit stubs or mocks:

License

This library is distributed under the MIT license. Please see the LICENSE file.

Credits

This lib was inspired by JSON Expressions gem && Behat RestExtension


All versions of php-matcher with dependencies

PHP Build Version
Package Version
Requires php Version ~8.1 || ~8.2 || ~8.3
ext-filter Version *
ext-json Version *
ext-simplexml Version *
aeon-php/calendar Version ^1.0.6
coduo/php-to-string Version ^3
doctrine/lexer Version ^3.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package coduo/php-matcher contains the following files

Loading the files please wait ....