Skip to content
This repository has been archived by the owner on Apr 2, 2024. It is now read-only.

Deprecate & fix security issue #3

Merged
merged 3 commits into from
Apr 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/buildTest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
strategy:
matrix:
operating-system: [ ubuntu-20.04 ]
php: [ '7.2', '7.3', '7.4', '8.0' ]
php: [ '7.4', '8.0' ]
name: Build and test on ${{ matrix.php }}
steps:
- name: Checkout repository
Expand Down
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
# DEPRECATED

With the advent of [UUID Version 8](https://datatracker.ietf.org/doc/html/draft-ietf-uuidrev-rfc4122bis-00#section-5.8) better use a regular UUID library and reimplement.

- With the first 16 bit of `custom_a` to specify a domain, model or table
- The `ID` taking up 64 bits from `custom_c` and the last 2 bits of `custom_b`
- While optional, the original idea was:
- 4 bit for type, directly following the domain block in `custom_a`
- coding types
- «neutral» implying no special semantics for the free bits between domain and id (0)
- «sortable» a monotonic increment, meant for legacy data without recoverable timestamps (1)
- «timestamp» timestamp with an offset to the epoch (32 bit, filled up with all free bits; 2)
- «sharding» all bits in the middle would make up an instance id for sharding
- The `ID`s were supposed to be obfuscatable using [Knuth's integer hash of jenssegers/optimus](https://github.com/jenssegers/optimus)
- This all was meant to be a gentle path for migrating autoincremented row IDs to UUIDs, while making it possible to programatically extract the original table (mapped as domain id) and the original row id from the UUID.


----
Namespaced IDs via UUID
=======================

Expand Down
5 changes: 4 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@
"vimeo/psalm": "^4.8"
},
"config": {
"sort-packages": true
"sort-packages": true,
"allow-plugins": {
"ergebnis/composer-normalize": true
}
},
"autoload": {
"psr-4": {
Expand Down
Loading
Loading