Download the PHP package compositephp/db without Composer

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

What is Composite DB

Latest Stable Version Build Status Codecov

Composite DB is lightweight and fast PHP DataMapper and Table Gateway which allows you to represent your SQL tables scheme in OOP style using full power of PHP 8.1+ class syntax.

It also gives you CRUD, query builder and automatic caching out of the box, so you can start to work with your database from php code in a minutes!

Overview:

Features

It also has many popular features such as:

Requirements

Installation

  1. Install package via composer:

  2. Configure Composite\DB\ConnectionManager (example)
  3. (Optional) Configure symfony/console commands to use automatic class generators (example)
  4. (Optional) Install and configure any PSR-16 (simple cache) package to use automatic caching

Quick example

Imagine you have simple table Users

First, you need to do is to execute command to generate php entity:

New entity class User and enum Status will be automatically generated:

Second step, is to generate a table class (repository) for your entity:

And that's it, now you have CRUD for your SQL table and simple selects:

You can find full working example here which you can copy and run as is.

You can also serialize user entity to array or json:

Or deserialize (hydrate) entity from array:

And that's it, no special getters or setters, no "behaviours" or extra code, smart entity casts everything automatically. More about Entity and supported auto casting types you can find here.

License:

MIT License (MIT). Please see LICENSE for more information. Maintained by Composite PHP.


All versions of db with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
ext-pdo Version *
psr/simple-cache Version 1 - 3
compositephp/entity Version ^v0.1.11
doctrine/dbal Version ^3.5
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 compositephp/db contains the following files

Loading the files please wait ....