From ac8802e5fd2a6bfe7310505be35621fbf03984b9 Mon Sep 17 00:00:00 2001 From: Wilmer Arambula Date: Tue, 2 Sep 2025 07:28:09 -0400 Subject: [PATCH] fix: Update badge styles and links in `README.md`, reorganize sections for clarity. --- CHANGELOG.md | 1 + README.md | 59 ++++++++++++++++++++++++++-------------------------- 2 files changed, 30 insertions(+), 30 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bc6cc4a..4163ec8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ - Bug #87: Update `.gitattributes` to exclude additional files from the package, update `LICENSE.md` and add stable version worflows actions (@terabytesoftw) - Bug #88: Remove unused command coverage options from mutation workflow configuration (@terabytesoftw) - Bug #89: Update `php-forge/support` version `0.2` in `composer.json` and refactor assertions in test cases (@terabytesoftw) +- Bug #90: Update badge styles and links in `README.md`, reorganize sections for clarity (@terabytesoftw) ## 0.1.0 July 8, 2025 diff --git a/README.md b/README.md index 718dd33..1b6b450 100644 --- a/README.md +++ b/README.md @@ -8,23 +8,23 @@

- PHP Version + PHP version - Yii2 2.0.53 + Yii 2.0.x - Yii2 22.0 + Yii 22.0.x - PHPUnit + PHPUnit - Mutation Testing - - - Static Analysis - + Mutation Testing + + + PHPStan +

A powerful behavior for managing hierarchical data structures using the nested sets pattern in Yii ActiveRecord models. @@ -49,15 +49,7 @@ with high-performance database operations. [![PostgreSQL](https://img.shields.io/badge/postgresql-4169e1?style=for-the-badge&logo=postgresql&logoColor=white)](https://github.com/yii2-extensions/nested-sets-behavior/actions/workflows/build-pgsql.yml) [![SQLite](https://img.shields.io/badge/sqlite-003B57.svg?style=for-the-badge&logo=sqlite&logoColor=white)](https://github.com/yii2-extensions/nested-sets-behavior/actions/workflows/build.yml) -## Quick start - -### Installation - -```bash -composer require yii2-extensions/nested-sets-behavior -``` - -### How it works +## 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. @@ -67,7 +59,7 @@ The nested sets model is a technique for storing hierarchical data in a relation 3. **Optimizes queries** using boundary values for efficient tree traversal. 4. **Supports transactions** to ensure data integrity during complex operations. -#### Why nested sets? +**Why nested sets?** - **Fast queries**: Get all descendants with a single query (`lft BETWEEN parent.lft AND parent.rgt`). - **Efficient tree operations**: No recursive queries needed for tree traversal. @@ -86,6 +78,12 @@ Electronics (1,12,0) Numbers represent: (left, right, depth) ``` +### Installation + +```bash +composer require yii2-extensions/nested-sets-behavior +``` + ### Database setup The package includes ready-to-use migrations for creating the necessary database structure. @@ -168,7 +166,7 @@ CREATE INDEX idx_multiple_tree_depth ON multiple_tree (depth); CREATE INDEX idx_multiple_tree_tree_lft_rgt ON multiple_tree (tree, lft, rgt); ``` -### Basic Configuration +### Quick start Add the behavior to your ActiveRecord model. @@ -215,8 +213,6 @@ class Category extends ActiveRecord } ``` -### Basic Usage - #### Creating and building trees ```php @@ -304,7 +300,7 @@ $phones->delete(); $phones->deleteWithChildren(); ``` -### Query builder integration +#### Query builder integration Add query behavior for advanced tree queries. @@ -364,21 +360,24 @@ For detailed configuration options and advanced usage. - 💡 [Usage Examples](docs/examples.md) - 🧪 [Testing Guide](docs/testing.md) +## Package information + +[![Latest Stable Version](https://img.shields.io/packagist/v/yii2-extensions/nested-sets-behavior.svg?style=for-the-badge&logo=packagist&logoColor=white&label=Stable)](https://packagist.org/packages/yii2-extensions/nested-sets-behavior) +[![Total Downloads](https://img.shields.io/packagist/dt/yii2-extensions/nested-sets-behavior.svg?style=for-the-badge&logo=packagist&logoColor=white&label=Downloads)](https://packagist.org/packages/yii2-extensions/nested-sets-behavior) + ## Quality code -[![Latest Stable Version](https://poser.pugx.org/yii2-extensions/nested-sets-behavior/v)](https://github.com/yii2-extensions/nested-sets-behavior/releases) -[![Total Downloads](https://poser.pugx.org/yii2-extensions/nested-sets-behavior/downloads)](https://packagist.org/packages/yii2-extensions/nested-sets-behavior) -[![codecov](https://codecov.io/gh/yii2-extensions/nested-sets-behavior/graph/badge.svg?token=Upc4yA23YN)](https://codecov.io/gh/yii2-extensions/nested-sets-behavior) -[![phpstan-level](https://img.shields.io/badge/PHPStan%20level-max-blue)](https://github.com/yii2-extensions/nested-sets-behavior/actions/workflows/static.yml) -[![style-ci](https://github.styleci.io/repos/717718161/shield?branch=main)](https://github.styleci.io/repos/717718161?branch=main) +[![codecov](https://img.shields.io/codecov/c/github/yii2-extensions/nested-sets-behavior.svg?style=for-the-badge&logo=codecov&logoColor=white&label=Coverage)](https://codecov.io/gh/yii2-extensions/nested-sets-behavior) +[![phpstan-level](https://img.shields.io/badge/PHPStan%20level-max-blue?style=for-the-badge)](https://github.com/yii2-extensions/nested-sets-behavior/actions/workflows/static.yml) +[![style-ci](https://img.shields.io/badge/StyleCI-Passed-44CC11.svg?style=for-the-badge&logo=styleci&logoColor=white)](https://github.styleci.io/repos/717718161?branch=main) ## Our social networks -[![X](https://img.shields.io/badge/follow-@terabytesoftw-1DA1F2?logo=x&logoColor=1DA1F2&labelColor=555555&style=flat)](https://x.com/Terabytesoftw) +[![Follow on X](https://img.shields.io/badge/-Follow%20on%20X-1DA1F2.svg?style=for-the-badge&logo=x&logoColor=white&labelColor=000000)](https://x.com/Terabytesoftw) ## License -[![License](https://img.shields.io/github/license/yii2-extensions/nested-sets-behavior)](LICENSE.md) +[![License](https://img.shields.io/github/license/yii2-extensions/nested-sets-behavior?style=for-the-badge&logo=opensourceinitiative&logoColor=white&labelColor=333333)](LICENSE.md) ## Fork