Download the PHP package yii2-extensions/nested-sets-behavior without Composer

On this page you can find all versions of the php package yii2-extensions/nested-sets-behavior. 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 nested-sets-behavior

Yii Framework

Nested sets behavior


PHP Version Yii2 2.0.53 Yii2 22.0 PHPUnit Mutation Testing Static Analysis

A powerful behavior for managing hierarchical data structures using the nested sets pattern in Yii ActiveRecord models.

Efficiently store and query tree structures like categories, menus, organizational charts, and any hierarchical data with high-performance database operations.

Features

Database support

Microsoft SQL Server MySQL Oracle PostgreSQL SQLite

Quick start

Installation

How it works

The nested sets model is a technique for storing hierarchical data in a relational database. Unlike adjacency lists (parent_id approach), nested sets enable efficient tree operations with minimal database queries.

  1. Creates root nodes using the nested sets pattern with lft, rgt, and depth fields.
  2. Manages hierarchy automatically when inserting, moving, or deleting nodes.
  3. Optimizes queries using boundary values for efficient tree traversal.
  4. Supports transactions to ensure data integrity during complex operations.

Why nested sets?

Database setup

The package includes ready-to-use migrations for creating the necessary database structure.

Quick setup (Recommended)

  1. Configure console application:

  2. Run migrations:

Alternative: Direct migration execution

Table structures created

Single tree (m250707_103609_tree.php). Creates a tree table for single hierarchical structure.

Multiple trees (m250707_104009_multiple_tree.php). Creates a multiple_tree table for multiple independent trees.

Basic Configuration

Add the behavior to your ActiveRecord model.

Basic Usage

Creating and building trees

Querying the tree

Moving nodes

Deleting nodes

Query builder integration

Add query behavior for advanced tree queries.

Now you can use enhanced queries.

Documentation

For detailed configuration options and advanced usage.

Quality code

Latest Stable Version Total Downloads codecov phpstan-level style-ci

Our social networks

X

License

Fork

This package is a fork of https://github.com/creocoder/yii2-nested-sets with some corrections.


All versions of nested-sets-behavior with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
yiisoft/yii2 Version ^2.0.53|^22
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 yii2-extensions/nested-sets-behavior contains the following files

Loading the files please wait ....