Download the PHP package rotexsoft/leanorm without Composer

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

Run PHP Tests and Code Quality Tools   GitHub release (latest SemVer)   GitHub   Coverage Status   GitHub code size in bytes  

GitHub top language   Packagist PHP Version Support   GitHub commits since latest release (by date)   GitHub last commit   GitHub Release Date  

Libraries.io dependency status for GitHub repo

LeanOrm

A light-weight, highly performant PHP data access library. Good alternative to Doctrine & Eloquent without all the bells & whistles that are not needed in most applications.

Installation Requirements

PHP 8.1+ for versions 4.x & 5.x.

PHP 7.4+ for versions 2.x & 3.x

Composer

Versions 2.x & 3.x of this package have been rigorously tested against sqlite 3.7.11+, MySQL 8.0.29+ & Postgresql 15.1+.

Version 4.x & 5.x have been rigorously tested against:

MS SQL Server, is theoretically supported but hasn't been tested. Will provide more updates on MS SQL Server support once testing on that DB engine has been done.

If you are using Sqlite, version sqlite 3.7.11 or higher is required.

Version 1.x of this package never got a stable release.

Version 2.x+ of this package is stable & uses aura/sqlquery 2.8.0+ .

Versions 3.x+, 4.x+ & 5.x+ of this package are also stable & use aura/sqlquery 3.0.0+.

Versions 2.x & 3.x mainly differ in the versions of aura/sqlquery their Model::getSelect(): \Aura\SqlQuery\Common\Select returns and 3.x has a few newer features like Model::fetchOneByPkey($id, array $relations_to_include = []): ?\GDAO\Model\RecordInterface.

Deprecated Utils::search2D(...) in 2.x has been removed in 3.x

Version 5.x is not backwards compatible with 4.x.

Version 4.x is not backwards compatible with 3.x.

Versions 2.x, 3.x & 4.x are feature complete as of July 2024, only bug fixes will be applied to those versions.

Installation

composer require rotexsoft/leanorm

There's an accompanying command-line tool that can be used to automatically generate Model, Record & Collection classes for the tables and views in a database. To install this tool, just run the command below. Read the documentation for the tool for more information.

composer require --dev rotexsoft/leanorm-cli

Running Tests

./vendor/bin/phpunit --coverage-text

You can set the environment variable LEANORM_PDO_DSN with a valid $dsn string for pdo e.g. LEANORM_PDO_DSN=sqlite::memory:

You can set the environment variable LEANORM_PDO_USERNAME with a valid $username string for pdo if needed e.g. LEANORM_PDO_USERNAME=jblow

You can set the environment variable LEANORM_PDO_PASSWORD with a valid $password string for pdo if needed e.g. LEANORM_PDO_PASSWORD=some_password

For example:

LEANORM_PDO_DSN=sqlite::memory: LEANORM_PDO_USERNAME=jblow LEANORM_PDO_PASSWORD=some_password ./vendor/bin/phpunit --coverage-text

LEANORM_PDO_DSN="mysql:host=hostname_or_ip_address" LEANORM_PDO_USERNAME="jblow" LEANORM_PDO_PASSWORD="some_password" ./vendor/bin/phpunit --coverage-text

GDAO Classes & Interfaces

Take a look at the code for the most up to date listing of methods

GDAO Classes & Interfaces

LeanORM Classes

Take a look at the code for the most up to date listing of methods

Documentation

Documentation for the non-stable 1.x version of this package is located at http://rotexsoft.github.io/leanorm/

Documentation for version 2.x version can be found here.

Documentation for version 3.x+ can be found here.

Documentation for version 4.0.x+ can be found here.

Documentation for version 4.1.x+ can be found here.

Documentation for version 5.x+ can be found here.

Please submit an issue (preferably with a pull request) to address mistakes or omissions in the documentation or to propose improvements to the documentation.

Contributing

PHPUnit Tests are set-up to run in a specific order in phpunit.xml.dist.

Yes, the best practice is for tests to run independently of each other, but because there are fair amount of static methods in the DBConnector class, its tests need to be run first before other Test Classes.

New Test files must be manually added to the phpunit.xml.dist file in order for those new tests to run.

Branching

These are the branches in this repository:


All versions of leanorm with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
rotexsoft/gdao Version ^3.0.1
aura/sqlquery Version ^3.0.0
rotexsoft/sqlschema Version ^3.1.1
psr/log Version ^2.0.0 || ^3.0.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 rotexsoft/leanorm contains the following files

Loading the files please wait ....