Download the PHP package yl0711-coder/ruleflow-php without Composer

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

RuleFlow PHP

简体中文

Tests Packagist Version

A lightweight Decision List rule engine for PHP and Laravel.

RuleFlow helps backend teams move complex business rules out of hard-coded if/else logic and into testable, configurable, and traceable rule definitions.

It is designed for risk control, content moderation, marketing eligibility, access control, and business decision workflows.

Why This Project Exists

Many PHP systems start with a few inline checks:

That works until the rules become:

RuleFlow keeps the model intentionally small:

RuleFlow is not a RETE inference engine. It is for PHP business decisions where the problem is scattered rules, unsafe changes, and unclear explanations rather than working-memory inference or complex event processing.

What You Get

Good Fit

RuleFlow is a good fit when you need:

It is not trying to be:

Why Not A Heavy Rule Engine

Many teams do not need a full decision platform. They need a small library that can live inside an existing PHP service and solve one practical problem: replace scattered conditional business logic with something structured, testable, and explainable.

RuleFlow is intentionally optimized for that use case:

Compared with heavier rule engines, RuleFlow trades breadth for clarity:

If your problem is "we need a rules platform", RuleFlow is probably too small. If your problem is "our PHP business logic is turning into untestable if/else sprawl", RuleFlow is the right size.

Project Status

Current release line: v0.3.x

The project already includes:

Installation

Via Packagist

From GitHub VCS

The package requires PHP 8.1 or later.

Quick Start

JSON Rules

Rules can also be stored as JSON and loaded at runtime:

See examples/json-loader.php.

Documentation

Start here:

Operational usage:

Laravel:

Trace Output

RuleFlow returns a trace so engineers, support teams, and reviewers can understand why a rule matched.

Example output:

When a field does not exist, the trace explicitly marks it with exists: false and missing: true. Disabled rules are marked with skipped: true and skipped_reason: "disabled".

When a rule or condition fails, RuleFlow includes failure_reason when it can infer one. Examples include field_missing, type_mismatch, invalid_expected, value_mismatch, value_not_allowed, value_not_contained, and pattern_mismatch.

When a condition is marked with sensitive: true, RuleFlow redacts actual and expected values in trace and explain output as [redacted].

You can also use trace helpers for operational debugging:

Explain Output

Use explain() when you want a compact decision summary for logs, API responses, or support tooling:

Example output:

trace() keeps the full execution detail. explain() keeps the decision summary small and stable for operational use.

See docs/production.md, docs/security-privacy.md, and examples/explain.php.

Supported Operators

RuleFlow supports:

= and != use strict PHP comparison semantics (=== / !==).

See docs/semantics.md for the full evaluation contract.

Match Modes

Each rule supports a match mode:

Example:

Nested Condition Groups

RuleFlow also supports nested condition groups for cases like A AND (B OR C):

Nested groups are evaluated recursively and included in the execution trace.

Collect All Matches

Use evaluateAll() when you need every matched rule instead of only the first one:

This is useful for risk scoring, moderation signals, and rule-based tagging scenarios.

Custom Operators

Register a custom operator when built-in operators are not enough:

Rule Validation

Validate rule definitions before loading them:

See docs/validation.md.

Laravel Usage

Publish the config:

Define rules in config/ruleflow.php:

Optional cache settings:

Evaluate rules:

The context accepts nested arrays, public object properties, ArrayAccess offsets, and magic __isset/__get accessors — so Eloquent models can be passed directly, for example ['order' => $order].

Validate configured rules:

See docs/laravel.md, docs/laravel-installation.md, and docs/laravel-example.md.

Use Cases

Non-Goals

RuleFlow is intentionally small. The first versions do not aim to provide:

Development

Run examples:

Generate coverage locally when Xdebug or PCOV is available:

Run the local benchmark:

See docs/benchmark.md.

For production usage recommendations, see docs/production.md.

Roadmap

License

RuleFlow PHP is open-sourced software licensed under the MIT license.


All versions of ruleflow-php with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
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 yl0711-coder/ruleflow-php contains the following files

Loading the files please wait ...