uuid README

The project's README from github.com/ramsey/uuid. As one markdown file: README.md.

ramsey/uuid

A PHP library for generating and working with UUIDs.

Source Code Download Package PHP Programming Language Read License Build Status Codecov Code Coverage

ramsey/uuid is a PHP library for generating and working with universally unique identifiers (UUIDs).

This project adheres to a code of conduct. By participating in this project and its community, you are expected to uphold this code.

Much inspiration for this library came from the Java and Python UUID libraries.

Installation

The preferred method of installation is via Composer. Run the following command to install the package and add it as a requirement to your project's composer.json:

composer require ramsey/uuid

Upgrading to Version 4

See the documentation for a thorough upgrade guide:

Documentation

Please see https://uuid.ramsey.dev for documentation, tips, examples, and frequently asked questions.

Contributing

Contributions are welcome! To contribute, please familiarize yourself with CONTRIBUTING.md.

Coordinated Disclosure

Keeping user information safe and secure is a top priority, and we welcome the contribution of external security researchers. If you believe you've found a security issue in software that is maintained in this repository, please read SECURITY.md for instructions on submitting a vulnerability report.

ramsey/uuid for Enterprise

Available as part of the Tidelift Subscription.

The maintainers of ramsey/uuid and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source packages you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact packages you use. Learn more.

The ramsey/uuid library is copyright © Ben Ramsey and licensed for use under the MIT License (MIT). Please see LICENSE for more information.

uuid (ramsey/uuid)

Searching Database…

12.6K ·GitHub
这是干什么的?这是一个用来生成和处理通用唯一标识符(UUID)的 PHP 库。UUID 是 128 位的 ID,你可以用它给记录和对象打标记,不需要任何中心化的协调机制。
这是一个独立的应用,还是要引入到我自己的 PHP 代码里用?它是一个库,不是可以直接运行的应用:你需要把它作为依赖加到项目的 composer.json 里,然后在自己的代码中调用它。
我需要哪个 PHP 版本?它面向现代 PHP——仓库打了 php 和 php8 的标签——具体支持的版本约束写在 composer.json 里,由 Composer 在安装时解析。
我还在用版本 3,升级到版本 4 麻烦吗?大版本之间会有不兼容的改动:官方文档专门提供了一份非常详细的升级指南,帮助从版本 3 迁移到版本 4。
可以免费使用吗?有没有付费选项?这个库基于 MIT 许可证免费开源;需要商业支持和维护的企业可以通过 Tidelift Subscription 付费订阅。
这个库的设计思路是从哪来的?它的很多灵感来自 Java 和 Python 的 UUID 库,所以熟悉这两种语言中 UUID 用法的人在这里也会觉得眼熟。
GUID 和 UUID 不一样吗?实际上它们是同一种 128 位标识符格式——GUID 只是微软的叫法。这个仓库同时打了 uuid、guid 和 uid 这些标签。
它只能生成新的 ID,还是也能处理已有的 ID?都可以:README 把它描述为一个用于生成和处理 UUID 的库,所以你不仅可以在代码里创建新的 UUID,也可以表示和操作已有的 UUID 值。
这个项目经受过实战考验吗?是的——它从 2012 年就开始了,在 GitHub 上有超过 12,600 颗星,持续运行集成测试,还通过 Tidelift 提供商业维护。
Creator
ramsey
Size
3.2 MB
Stars
12.6K
Age
14y
Commits · 90 Days