Download the PHP package cycle/active-record without Composer

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


CycleORM Logo

[![Build Status](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2Fcycle%2Factive-record%2Fbadge&style=flat-square&label=github%20actions)](https://github.com/cycle/active-record/actions) [![Total Downloads](https://img.shields.io/packagist/dt/cycle/active-record?&style=flat-square)](https://packagist.org/packages/cycle/active-record) [![Latest Stable Version](https://img.shields.io/packagist/v/cycle/active-record?&style=flat-square)](https://packagist.org/packages/cycle/active-record) [![Commits since latest release](https://img.shields.io/github/commits-since/cycle/active-record/latest?style=flat-square)](https://packagist.org/packages/cycle/active-record) [![PHP Version Require](https://poser.pugx.org/cycle/active-record/require/php?style=flat-square)](https://packagist.org/packages/cycle/active-record) [![Codecov Coverage](https://img.shields.io/codecov/c/github/cycle/active-record?style=flat-square&logo=codecov)](https://app.codecov.io/gh/cycle/active-record) [![Type Coverage](https://shepherd.dev/github/cycle/active-record/coverage.svg)](https://shepherd.dev/github/cycle/active-record) [![Mutation testing badge](https://img.shields.io/endpoint?style=flat-square&label=mutation%20score&url=https%3A%2F%2Fbadge-api.stryker-mutator.io%2Fgithub.com%2Fcycle%2Factive-record%2Fmaster)](https://dashboard.stryker-mutator.io/reports/github.com/cycle/active-record/master) ![PHP Stan Level 5 of 9](https://img.shields.io/badge/phpstan%20level-5%20of%209-yellowgreen?style=flat-square) [![Discord](https://img.shields.io/discord/538114875570913290?style=flat-square&logo=discord&labelColor=7289d9&logoColor=white&color=39456d)](https://discord.gg/spiralphp) [![Follow on Twitter (X)](https://img.shields.io/badge/-Follow-black?style=flat-square&logo=X)](https://x.com/intent/follow?screen_name=SpiralPHP)

Active Record Implementation for Cycle ORM

This library extends Cycle ORM by integrating the Active Record pattern, providing developers with an intuitive, object-centric way to interact with databases.

Unlike Cycle ORM's default Data Mapper pattern, which separates the in-memory object representations from database operations, Active Record combines data access and business logic in a single entity.

This allows for more straightforward and rapid development cycles, particularly for simpler CRUD operations, by enabling direct data manipulation through the object's properties and methods.


๐Ÿšฉ Prerequisites

Before you begin, ensure your development environment meets the following requirements:


๐Ÿ’ฟ Installation

The preferred way to install this package is through Composer.

After package install you need to, optionally, register bootloader / service-provider in your application.

โ†’ Spiral Framework

[!NOTE]
If you are installing the package on the Spiral Framework with the spiral-packages/discoverer package, then you don't need to register bootloader by yourself. It will be registered automatically.

Update Bootloader list in your application configuration:

For more information about bootloaders, refer to the Spiral Framework documentation.

โ†’ Laravel

[!NOTE] If you are using Laravel, then you don't need to register service-provider by yourself. It will be registered automatically.

โ†’ Yii 3

For configuration instructions refer to yii-cycle installation guide.

โ†’ Other Frameworks

This package uses PSR-11 compatible container to resolve dependencies. After container initialization you need to pass container instance to the static facade:

๐Ÿ“– Usage

[!NOTE] For detailed usage instructions, refer to the documentation.

โ†’ Basic Example

Define Entity with ActiveRecord

Create a new record


๐Ÿงช Running Tests

โ†’ PHPUnit tests

To run tests, run the following command:

โ†’ Mutation tests

To run mutation tests, using infection/infection:

โ†’ Static Analysis

Code quality using PHPStan:

and using Psalm:

โ†’ Coding Standards Fixing

Fix code using The PHP Coding Standards Fixer (PHP CS Fixer) to follow our standards:

โ†’ Lint Yaml files

Lint all yaml files in project:

โ†’ Lint Markdown files

Lint all yaml files in project:

โ†’ Lint GitHub Actions

Lint all yaml files in project:


๐Ÿ”’ Security Policy

This project has a security policy.


๐Ÿ™Œ Want to Contribute?

Thank you for considering contributing to the cycle community! We are open to all kinds of contributions. If you want to:

You are more than welcome. Before contributing, kindly check our contribution guidelines.

Conventional Commits


๐Ÿซก Contributors

Contributors Badge



๐ŸŒ Social Links


โš–๏ธ License



All versions of active-record with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
cycle/orm Version ^2.7
psr/container Version ^2.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 cycle/active-record contains the following files

Loading the files please wait ....