Download the PHP package componenta/filter without Composer

On this page you can find all versions of the php package componenta/filter. 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 filter

Componenta Filter

Composable predicates and iterable collection filters for PHP 8.4+.

Installation

Requirements

Contracts

Version 2 separates single-value predicates from collection operations.

Predicate-backed Filters

String-oriented predicates accept only string and Stringable values. Scalars such as integers and booleans are not silently cast to strings.

Pure Predicates and Composition

Custom predicates do not need iterable behavior:

Filterable, ChainableFilter, OneOfFilter, NotFilter, and RecursiveFilter depend on PredicateInterface. Filterable/ChainableFilter use AND semantics; OneOfFilter uses OR semantics and an empty OneOfFilter rejects every value.

Collection-only Operators

The following operators intentionally do not implement PredicateInterface:

MergingFilter::withIterable() uses ReplayableIterator to fan out one-shot sources lazily. Binding a generator does not consume it immediately, and each inner filter gets an independent replay cursor.

Exact Numeric Predicates

NumericFilter, BetweenFilter, RangeFilter, GreaterThan*, LessThan*, MultipleOfFilter, and the parity filters do not collapse numeric strings to float unnecessarily.

Large integers, long decimal strings, and scientific notation can therefore be compared without the 2^53 precision loss of IEEE-754 conversion. NAN and infinite values are rejected by value-oriented numeric predicates. Actual PHP float inputs keep their native floating-point precision; MultipleOfFilter uses a bounded tolerance only when the tested value itself is a float.

Date Ranges

DateRangeFilter accepts DateTimeInterface or absolute ISO-like date strings. It captures a timezone at construction for local strings, preserves microsecond precision, and does not accept relative expressions such as tomorrow or silently normalized impossible dates.

Recursive Filtering

RecursiveFilter detects iterable-object cycles and also enforces maxDepth (default 64) so recursive arrays cannot recurse indefinitely.

Random Filtering

RandomFilter uses an isolated Random\Randomizer instead of the process-global mt_rand() state. Inject a Randomizer when deterministic seeded behavior is needed.

Validation

Invalid configuration is rejected early with InvalidArgumentException where safe execution would otherwise be impossible. This includes invalid numeric/date ranges, regular expressions, filter_var() IDs/options, probabilities, percentages, and typed class/string/key lists.

Breaking Changes from 1.x

Development

CI validates Composer metadata, lints all PHP sources and tests, and runs Pest on PHP 8.4 and 8.5. A manual mutation-audit workflow is available for checking test sensitivity.


All versions of filter with dependencies

PHP Build Version
Package Version
Requires php Version ^8.4
ext-ctype Version *
ext-filter Version *
componenta/arrayable Version ^1.0
componenta/iterator Version ^1.1.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 componenta/filter contains the following files

Loading the files please wait ...