janisbiz/doctrine-nested-set

Doctrine extension to support nested set model

v3.1.4 2018-12-07 10:15 UTC

README

Latest Stable Version Build Status Total Downloads Deps

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:

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:

  1. By using docker containers:
    • Copy .env.dist to .env and 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
  2. By using your local php and mysql database environment:
    • Ensure, that your php version is 7.1.x
    • Install pdo_mysql extension for php
    • Adjust database connection in configuration file
    • Execute composer install
    • Execute vendor/bin/behat