定制 javanile/php-glossary 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

javanile/php-glossary

Composer 安装命令:

composer require javanile/php-glossary

包简介

Demonstrative Conceptual Implementation: Glossary Code Analysis Tool for PHP

README 文档

README

PHP Glossary is a conceptual and demonstrative software tool designed to analyze source code and identify domain-specific terms associated with business logic. This utility aims to distinguish domain terms from general programming language keywords, helping developers gain insights into the crucial terms that define the project's specific functionality.

Features

  • Term Analysis: The tool scans source code files and identifies terms that are closely related to the project's business domain. It filters out common programming language keywords to focus solely on the terms that encapsulate the project's core concepts.

  • Domain Term Highlighting: The software highlights the detected domain terms within the source code, making it easier for developers to visually identify key business-related elements.

  • Visualization: PHP Glossary offers a simple visualization of the distribution of domain terms throughout the codebase. This visual representation can help developers gauge the prevalence and importance of different terms.

  • Conceptual and Demonstrative: Please note that this project is intended to demonstrate the concept of domain term analysis. It is not production-ready and should not be used as a final solution for real-world applications.

Installation

Composer

To install this project as a dev dependency in your existing PHP project, you can use Composer's require command with the --dev flag:

composer require --dev javanile/php-glossary

This command will add the javanile/php-glossary package as a dev dependency to your project's composer.json file and install it along with its dev dependencies.

Standalone

Download the latest release of file bin/glossary and place it in the root directory of your project.

curl -o glossary https://raw.githubusercontent.com/javanile/php-glossary/main/bin/glossary

Usage

Create a file called .glossaryrc in the root directory of your project and add the following configuration:

[domain]
terms = Invoice, Customer, Product, Order, Payment, Shipment, Tax, Discount

Run the tool from the command line:

php vendor/bin/glossary

Key Considerations

  • The .glossaryrc file should serve as the central repository for domain-specific terms within the application. We envision tools that will keep this file updated by aggregating input from various sources, such as business logic analysis tools, etc.
  • Developers should be educated and encouraged to select terms during development that are present in the .glossaryrc file.
  • The official glossary and its representing file, the .glossaryrc, are integral parts of the project, much like tests and fixtures.
  • If a developer modifies the .glossaryrc file to pass CI/CD, they must justify it during the peer-review phase. This introduces the opportunity to have targeted checks solely on glossary files rather than throughout the entire codebase.

⚠️ Disclaimer ⚠️

This project is an educational demonstration and should not be used in a production environment. It showcases the idea of identifying domain-specific terms in source code and is not optimized for real-world scenarios. Use it as a starting point for understanding the potential of term analysis within software development.

Contributions

Contributions to enhance and extend the capabilities of PHP Glossary are welcome. If you find value in this concept and wish to contribute, please follow the guidelines provided in the repository.

License

This project is open-source and released under the MIT License. Feel free to use, modify, and distribute it in accordance with the license terms.

javanile/php-glossary 适用场景与选型建议

javanile/php-glossary 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 11 次下载、GitHub Stars 达 5, 最近一次更新时间为 2024 年 04 月 15 日, 在 PHP 生态内属于活跃度较高的组件。

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

围绕 javanile/php-glossary 我们能提供哪些服务?
定制开发 / 二次开发

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

  • 总下载量: 11
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 5
  • 点击次数: 21
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 5
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-04-15