Download the PHP package flytachi/winter-ppa without Composer

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

Winter PPA

Latest Version on Packagist PHP Version Require

๐Ÿ“– Documentation ยท Repositories ยท Entities ยท Connection pool

PHP Persistence API โ€” the data layer for PHP that stays resident.

Two problems, one package. Writing SQL by hand means the same query rebuilt in every place it is needed, parameters bound by hand, and a renamed column discovered at runtime. And a worker that lives for weeks cannot simply open a connection and keep it: the connection dies, the database restarts, the firewall drops idle sockets โ€” while under Swoole one socket cannot be shared by concurrent requests at all.

PPA answers both: repositories that assemble queries as method calls, entities that describe tables as attributes, migrations built from those attributes โ€” over a connection pool that keeps its connections working rather than merely reused.


Installation

Requires PHP 8.4+ and ext-pdo. ext-swoole is optional: with it every coroutine gets its own connection from a pool, without it one self-maintaining connection serves the process โ€” the calling code is identical.

Inside the Winter framework it is an optional package: the kernel wires it up when it is installed and works without it when it is not.


Quick start

Describe the table:

Bind a repository to it:

The @extends line is what makes findById() return ?UserEntity instead of object; the code works without it, the editor does not.

Ask it questions:

No connection to obtain, none to return. The connection is taken on the first query and goes back to the pool when the request ends.


What you get from it

A query built from methods, not strings. where(), join*(), with(), union*() accumulate parts; values travel as bound parameters, never as text. A sub-repository can be joined, used as a source or as a CTE โ€” and brings its own binds along, which a string could not.

A schema that comes from the code. Attributes on entity properties describe types, keys, indexes and constraints; call db migrate compares that description with the live database and shows what it would change before doing it.

Connections that heal. An idle connection is probed before it is handed over, an aged one is rotated ahead of time, and the number is capped per worker. A database restart stops poisoning a worker for the rest of its life.

Correctness under concurrency. A repository may be a container singleton while serving concurrent coroutines: its query state is isolated per coroutine, so two requests cannot build each other's conditions.

Failures that are classified, not guessed. A dead connection is retired; a constraint violation leaves the connection alone. Where the driver's verdict is uninformative โ€” as PostgreSQL's is when the socket is gone โ€” the pool probes instead of parsing the message.


A taste of the API


Outside a framework

The package fetches nothing from its host. Three things it takes, and what happens when they are not given:

Each default is the inert one deliberately: a library that logs somewhere by itself, or imposes a timezone on your session, is a library that surprises you. Fork safety and shutdown are yours to call as well โ€” PpaConnectionPool::reset() in a forked child (which forgets sockets without closing them, since the descriptors are shared with the parent), shutdown() when a worker exits.

Inside the Winter kernel all of this is installed at boot.


Documentation

The user-facing documentation lives at winterframe.net/docs/ppa (the link picks your language; RU and EN are both complete).

Start here

Page What it answers
PHP Persistence API What the layer is, what it gives over a plain connection, query examples
Database configuration Credentials, drivers, several databases at once
Repositories Assembling queries, reading, writing, transactions, debugging

Schema

Page What it answers
Entities Attributes, types, keys, indexes, constraints
Migrations Comparing the described schema with the live one

Operating it

Page What it answers
Connection pool Borrow rules, failures, sizing, watching it
Pagination Page and cursor pagination over repositories

Contributing

Internal technical notes โ€” the layering, how an attribute becomes a column, why query state is per coroutine, and the rules for adding to any of it โ€” live in docs/. Read those before changing the pool or the mapping.


License

MIT License. See LICENSE.


All versions of winter-ppa with dependencies

PHP Build Version
Package Version
Requires php Version >=8.4
flytachi/winter-cdo Version ^4.0
flytachi/winter-cpool Version ^1.2
flytachi/winter-base Version ^3.0
flytachi/winter-di Version ^2.0
flytachi/file-store Version ^2.0
psr/log 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 flytachi/winter-ppa contains the following files

Loading the files please wait ...