Download the PHP package waffle-commons/data without Composer

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

Discord PHP Version Require PHP CI codecov Latest Stable Version Latest Unstable Version Total Downloads Packagist License

Waffle Data Component

Release: 0.1.0-beta4  |  CHANGELOG.md

The data & persistence layer for the Waffle Framework (RFC-022). Built for FrankenPHP resident-worker mode: a warm connection pool, a backend-agnostic query AST, parameterized SQL / Firestore compilers, a property-hook hydrator, and a stateless SQL migration runner. No stateful ORM, no identity map, no change tracking โ€” a row becomes an immutable value object and nothing more.

๐Ÿ“ฆ Installation

Requires PHP 8.5+ and ext-pdo. Depends only on waffle-commons/contracts (plus PSR + PHP core).

๐Ÿงฑ Surface

Class Role
Waffle\Commons\Data\Connection\PDOConnectionPool final pool of reusable PDO connections (ConnectionPoolInterface + ResettableInterface). Ping-before-dispense (SELECT 1), transparent reconnect, per-connection statement cache, reset() rolls back dangling transactions between requests.
Waffle\Commons\Data\Query\Criteria Static factory for predicates: eq/neq/gt/gte/lt/lte/like/in/notIn.
Waffle\Commons\Data\Query\Query Immutable, copy-on-write query AST (select / from / where / orderBy / limit / offset). Pure representation โ€” knows nothing about any backend.
Waffle\Commons\Data\Query\Operator / Direction enum operators (=, <>, >, โ€ฆ, IN, LIKE) and sort directions (ASC / DESC).
Waffle\Commons\Data\Compiler\SQLCompiler / SQLWriteCompiler Compile a Query (reads) or a mapped entity row (INSERT/UPDATE/DELETE) into parameterized statements (? placeholders, injection-safe) for a chosen SQLDialect.
Waffle\Commons\Data\Compiler\SQLDialect enum MySQL / MariaDB / SQLite / MSSQL / PostgreSQL / Oracle โ€” identifier quoting + pagination grammar.
Waffle\Commons\Data\Compiler\FirestoreCompiler Compiles a Query into a CompiledFirestoreQuery with path isolation; only equality is pushed server-side, ranges/ordering flag requiresInMemoryFilter.
Waffle\Commons\Data\Compiler\FirestoreScope public(appId, collection) / private(appId, userId, collection) path scoping.
Waffle\Commons\Data\Compiler\{Mongo,KeyValue,Cassandra,GraphQL}Compiler Per-backend SQR compilers: MongoDB filter documents, key-value GET/MGET plans, parameterised CQL, GraphQL query/mutation documents.
Waffle\Commons\Data\Repository\โ€ฆ Seven stateless WritableRepositoryInterface repositories โ€” SQLRepository, FirestoreRepository (three auth guardrails), MongoRepository, CassandraRepository, KeyValueRepository, GraphQLRepository, JsonFileRepository โ€” full CRUD through pure DataMapperInterface mappers.
Waffle\Commons\Data\Driver\โ€ฆ Live drivers: FirestoreRestClient, MongoDriverSession, RedisKeyValueClient, GraphQLExecutor (+ the injectable CQL port). Every backend failure is rethrown as a sanitized DatabaseException.
Waffle\Commons\Data\Evaluation\InMemoryEvaluator Stateless fetch-then-filter evaluation (range/set/sort/offset) for backends with restricted server-side querying.
Waffle\Commons\Data\Storage\JsonFileStore Atomic flat-file JSON store (read-modify-write under LOCK_EX).
Waffle\Commons\Data\Hydrator\PropertyHookHydrator Maps a raw row onto an immutable DTO via its constructor; corrupt data is rejected by the DTO's PHP 8.5 set hooks as a ValidationExceptionInterface.
Waffle\Commons\Data\Migration\MigrationRunner MigrationRunnerInterface โ€” applies versioned *.sql files in order, tracked in waffle_migrations; each migration runs in its own transaction.
Waffle\Commons\Data\Warmup\QueryWarmer DataWarmerInterface โ€” pre-compiles named SQR trees into an atomic <?php return [โ€ฆ] artifact primed into OPcache (bin/waffle data:warmup, Beta-3).
Waffle\Commons\Data\Exception\DatabaseException DatabaseExceptionInterface โ€” wraps any backend failure, lifts the ANSI SQLSTATE from a PDOException.
Waffle\Commons\Data\Exception\ValidationException ValidationExceptionInterface โ€” a field-aware hydration/validation failure (surfaces as RFC 7807 422).

๐Ÿš€ Quick start

Connection pool

Build a query, compile it for a backend

The same Query compiles to a Firestore payload via FirestoreCompiler with a FirestoreScope (public vs per-user path isolation).

Hydrate an immutable DTO

Run migrations (from the CLI)

MigrationRunner is wired into the console as bin/waffle db:migrate (see the console component). Programmatically:

๐Ÿ˜ PHP 8.5 features used

๐Ÿงญ Architectural boundary (mago guard)

Production code under Waffle\Commons\Data may depend only on Waffle\Commons\Data\**, Waffle\Commons\Contracts\**, Psr\**, and @global + Psl\**. A forbidden use fails the build, not a reviewer โ€” enforced by vendor/bin/mago guard (bundled into composer mago, zero baselines). Interfaces must be named *Interface, Exception\** classes must end in *Exception, and any Enum\** namespace may hold only enum declarations.

Contract-first, component-agnostic by construction: the data layer composes with the rest of the framework through waffle-commons/contracts, never directly through another component.

๐Ÿงช Testing

The full gate (composer mago && composer tests) runs format, lint, analyze, guard, and PHPUnit (โ‰ฅ95% line coverage) with zero baselines.

๐Ÿ“„ License

MIT โ€” see LICENSE.md.


All versions of data with dependencies

PHP Build Version
Package Version
Requires php Version ^8.5
ext-pdo Version *
psr/http-client Version ^1.0
psr/http-factory Version ^1.0
psr/http-message Version ^1.1 || ^2.0
waffle-commons/contracts Version self.version
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 waffle-commons/data contains the following files

Loading the files please wait ...