承接 oliva/tree 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

oliva/tree

最新稳定版本:1.4.1

Composer 安装命令:

composer require oliva/tree

包简介

Utility for handling tree data structures and building trees from flat data stored in database tables and alike.

README 文档

README

????

It's been a long time since the dawn of this library. It still runs on modern PHP, but it's far from optimal.

See a modern reimplementation of this library here: ???? dakujem/oliva

Oliva Tree

PHP from Packagist Tests Coverage Status

Utility for handling tree data structures.

???? composer require oliva/tree

???? documentation

Oliva Tree is a powerful yet simple to use utility for handling tree data structures in PHP.

Useful for handling tree data stored in database or for performing search and filter operations on arbitrary tree structures.

Why use Oliva Tree?

  • data manipulation
  • write components like menus, tree views, grids, data lists, etc. with ease.
  • it's documented
  • battle and unit tested

What can you do with Oliva Tree?

  • build tree structures from arbitrary flat data with support for
    • materialized path data model
    • recursive trees (parent - id) (adjacency list data model, self-joined tables)
    • build trees from JSON strings
  • build trees using a fluent interface
  • seamlessly wrap objects with Node class and keep using them as before
  • enhance functionality of data already in tree structures
  • find nodes, breadth-first or depth-first
  • filter nodes by any condition
  • compare trees, nodes, sub-trees
  • provide means for easy tree structure manipulation
  • transform tree structures (back) to flat data, in breadth-first or depth-first manner

Documentation

For more in-depth information, use cases and other examples, see the documentation section.

Installation

composer require oliva/tree

Older versions of Oliva Tree run on PHP 5.4 and up and also PHP 7.0 and up. Versions since 1.3 support PHP 7.4+ and PHP 8+ (including PHP 8.2 and PHP 8.3).

Changelog

Notable changes only.

1.4

  • PHP 8.1+ supported
  • some return type-hints added

1.3

  • PHP 8.0 support added
  • PHP >= 7.4 required
  • updated to a simple permissive license (Unlicense)

1.2.3

  • updated licensing to enable multi-licensing, i.e. one can now use any of GPL, MIT or BSD license, see license.md for more information

Missing features

I never added these...

  • prunning (condition- and depth-based)
  • node moving mechanism / helpers
  • tree writers - alter the node's data to reflect current tree structure (prepare for storage) - a counterpart to tree builders
  • unite and document exception codes
  • support for nested sets data model

On the second thought, most of these things are outside the scope of this library anyway.

Notes

Great thank's to folks in Via Aurea for providing valuable support, motivation and real-world testing.

????

I finally found a reason to reimplement the idea of this tool for building and managing trees.

See the modern reimplementation here: ???? dakujem/oliva

oliva/tree 适用场景与选型建议

oliva/tree 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 28.97k 次下载、GitHub Stars 达 3, 最近一次更新时间为 2026 年 01 月 04 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「tree」 「utility」 「utilities」 「data structures」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 oliva/tree 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 oliva/tree 我们能提供哪些服务?
定制开发 / 二次开发

基于 oliva/tree 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 28.97k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 20
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 3
  • Watchers: 1
  • Forks: 3
  • 开发语言: PHP

其他信息

  • 授权协议: Unlicense
  • 更新时间: 2026-01-04