Skip to content

Commit 5adcbed

Browse files
fix: Update badge styles and links in README.md, reorganize sections for clarity. (#90)
1 parent 77ae986 commit 5adcbed

File tree

2 files changed

+30
-30
lines changed

2 files changed

+30
-30
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
- Bug #87: Update `.gitattributes` to exclude additional files from the package, update `LICENSE.md` and add stable version worflows actions (@terabytesoftw)
77
- Bug #88: Remove unused command coverage options from mutation workflow configuration (@terabytesoftw)
88
- Bug #89: Update `php-forge/support` version `0.2` in `composer.json` and refactor assertions in test cases (@terabytesoftw)
9+
- Bug #90: Update badge styles and links in `README.md`, reorganize sections for clarity (@terabytesoftw)
910

1011
## 0.1.0 July 8, 2025
1112

README.md

Lines changed: 29 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,23 @@
88

99
<p align="center">
1010
<a href="https://www.php.net/releases/8.1/en.php" target="_blank">
11-
<img src="https://img.shields.io/badge/PHP-%3E%3D8.1-787CB5" alt="PHP Version">
11+
<img src="https://img.shields.io/badge/%3E%3D8.1-777BB4.svg?style=for-the-badge&logo=php&logoColor=white" alt="PHP version">
1212
</a>
1313
<a href="https://github.com/yiisoft/yii2/tree/2.0.53" target="_blank">
14-
<img src="https://img.shields.io/badge/Yii2%20-2.0.53-blue" alt="Yii2 2.0.53">
14+
<img src="https://img.shields.io/badge/2.0.x-0073AA.svg?style=for-the-badge&logo=yii&logoColor=white" alt="Yii 2.0.x">
1515
</a>
1616
<a href="https://github.com/yiisoft/yii2/tree/22.0" target="_blank">
17-
<img src="https://img.shields.io/badge/Yii2%20-22-blue" alt="Yii2 22.0">
17+
<img src="https://img.shields.io/badge/22.0.x-0073AA.svg?style=for-the-badge&logo=yii&logoColor=white" alt="Yii 22.0.x">
1818
</a>
1919
<a href="https://github.com/yii2-extensions/nested-sets-behavior/actions/workflows/build.yml" target="_blank">
20-
<img src="https://github.com/yii2-extensions/nested-sets-behavior/actions/workflows/build.yml/badge.svg" alt="PHPUnit">
20+
<img src="https://img.shields.io/github/actions/workflow/status/yii2-extensions/nested-sets-behavior/build.yml?style=for-the-badge&label=PHPUnit" alt="PHPUnit">
2121
</a>
2222
<a href="https://dashboard.stryker-mutator.io/reports/github.com/yii2-extensions/nested-sets-behavior/main" target="_blank">
23-
<img src="https://img.shields.io/endpoint?style=flat&url=https%3A%2F%2Fbadge-api.stryker-mutator.io%2Fgithub.com%2Fyii2-extensions%2Fnested-sets-behavior%2Fmain" alt="Mutation Testing">
24-
</a>
25-
<a href="https://github.com/yii2-extensions/nested-sets-behavior/actions/workflows/static.yml" target="_blank">
26-
<img src="https://github.com/yii2-extensions/nested-sets-behavior/actions/workflows/static.yml/badge.svg" alt="Static Analysis">
27-
</a>
23+
<img src="https://img.shields.io/endpoint?style=for-the-badge&url=https%3A%2F%2Fbadge-api.stryker-mutator.io%2Fgithub.com%2Fyii2-extensions%2Fnested-sets-behavior%2Fmain" alt="Mutation Testing">
24+
</a>
25+
<a href="https://github.com/yii2-extensions/nested-sets-behavior/actions/workflows/static.yml" target="_blank">
26+
<img src="https://img.shields.io/github/actions/workflow/status/yii2-extensions/nested-sets-behavior/static.yml?style=for-the-badge&label=PHPStan" alt="PHPStan">
27+
</a>
2828
</p>
2929

3030
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.
4949
[![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)
5050
[![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)
5151

52-
## Quick start
53-
54-
### Installation
55-
56-
```bash
57-
composer require yii2-extensions/nested-sets-behavior
58-
```
59-
60-
### How it works
52+
## How it works
6153

6254
The nested sets model is a technique for storing hierarchical data in a relational database. Unlike adjacency lists
6355
(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
6759
3. **Optimizes queries** using boundary values for efficient tree traversal.
6860
4. **Supports transactions** to ensure data integrity during complex operations.
6961

70-
#### Why nested sets?
62+
**Why nested sets?**
7163

7264
- **Fast queries**: Get all descendants with a single query (`lft BETWEEN parent.lft AND parent.rgt`).
7365
- **Efficient tree operations**: No recursive queries needed for tree traversal.
@@ -86,6 +78,12 @@ Electronics (1,12,0)
8678
Numbers represent: (left, right, depth)
8779
```
8880

81+
### Installation
82+
83+
```bash
84+
composer require yii2-extensions/nested-sets-behavior
85+
```
86+
8987
### Database setup
9088

9189
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);
168166
CREATE INDEX idx_multiple_tree_tree_lft_rgt ON multiple_tree (tree, lft, rgt);
169167
```
170168

171-
### Basic Configuration
169+
### Quick start
172170

173171
Add the behavior to your ActiveRecord model.
174172

@@ -215,8 +213,6 @@ class Category extends ActiveRecord
215213
}
216214
```
217215

218-
### Basic Usage
219-
220216
#### Creating and building trees
221217

222218
```php
@@ -304,7 +300,7 @@ $phones->delete();
304300
$phones->deleteWithChildren();
305301
```
306302

307-
### Query builder integration
303+
#### Query builder integration
308304

309305
Add query behavior for advanced tree queries.
310306

@@ -364,21 +360,24 @@ For detailed configuration options and advanced usage.
364360
- 💡 [Usage Examples](docs/examples.md)
365361
- 🧪 [Testing Guide](docs/testing.md)
366362

363+
## Package information
364+
365+
[![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)
366+
[![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)
367+
367368
## Quality code
368369

369-
[![Latest Stable Version](https://poser.pugx.org/yii2-extensions/nested-sets-behavior/v)](https://github.com/yii2-extensions/nested-sets-behavior/releases)
370-
[![Total Downloads](https://poser.pugx.org/yii2-extensions/nested-sets-behavior/downloads)](https://packagist.org/packages/yii2-extensions/nested-sets-behavior)
371-
[![codecov](https://codecov.io/gh/yii2-extensions/nested-sets-behavior/graph/badge.svg?token=Upc4yA23YN)](https://codecov.io/gh/yii2-extensions/nested-sets-behavior)
372-
[![phpstan-level](https://img.shields.io/badge/PHPStan%20level-max-blue)](https://github.com/yii2-extensions/nested-sets-behavior/actions/workflows/static.yml)
373-
[![style-ci](https://github.styleci.io/repos/717718161/shield?branch=main)](https://github.styleci.io/repos/717718161?branch=main)
370+
[![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)
371+
[![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)
372+
[![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)
374373

375374
## Our social networks
376375

377-
[![X](https://img.shields.io/badge/follow-@terabytesoftw-1DA1F2?logo=x&logoColor=1DA1F2&labelColor=555555&style=flat)](https://x.com/Terabytesoftw)
376+
[![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)
378377

379378
## License
380379

381-
[![License](https://img.shields.io/github/license/yii2-extensions/nested-sets-behavior)](LICENSE.md)
380+
[![License](https://img.shields.io/github/license/yii2-extensions/nested-sets-behavior?style=for-the-badge&logo=opensourceinitiative&logoColor=white&labelColor=333333)](LICENSE.md)
382381

383382
## Fork
384383

0 commit comments

Comments
 (0)