janisbiz/doctrine-nested-set
Composer 安装命令:
composer require janisbiz/doctrine-nested-set
包简介
Doctrine extension to support nested set model
README 文档
README
Adds a functionality for Doctrine, so it can be used by nested set model defined here.
Installing
composer require janisbiz/doctrine-nested-set
Getting started
These instructions will help you set up this doctrine extension, so you can use it. As well, there are provided instructions to run integration tests for the extension.
Using extension
To use extension:
- your entity class should implement NestedSetEntityInterface
- your repository class should extend NestedSetEntityRepository
Afterwards you can use helper functions from NestedSetEntityRepository, which are sufficient for full operations on nested set tree model.
Running tests
There are two ways to run tests:
- By using docker containers:
- Copy
.env.distto.envand adjust defined values for your needs - Execute
docker-compose up -d --build - Execute
docker-compose exec php composer install - Execute
docker-compose exec php vendor/bin/behat
- Copy
- By using your local php and mysql database environment:
- Ensure, that your php version is
7.1.x - Install
pdo_mysqlextension for php - Adjust database connection in configuration file
- Execute
composer install - Execute
vendor/bin/behat
- Ensure, that your php version is
统计信息
- 总下载量: 332
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 5
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-08-31