Commit Graph

58 Commits

Author SHA1 Message Date
Nicolas Grekas
85558248e6 [Uid] improve logic in BinaryUtil::timeToFloat() 2021-01-27 21:50:00 +01:00
Thomas Calvet
9680a27246 [Uid] Fix time to float conversion 2021-01-27 18:11:54 +01:00
Nicolas Grekas
c11a6da08c Merge branch '5.1' into 5.2
* 5.1:
  [Uid] fix checking for valid UUIDs
  [HttpKernel] Configure the ErrorHandler even when it is overriden
  Allow relative path to composer cache
2021-01-25 14:54:05 +01:00
Nicolas Grekas
7daef4ff6d [Uid] fix checking for valid UUIDs 2021-01-25 12:59:00 +01:00
Jérémy Derussé
c1769d1b48
Merge branch '5.1' into 5.2
* 5.1:
  Remove wrong test
  [Uid] Unable to extend Uuid/Ulid and use fromString()
  Fix typo in property name
2021-01-21 17:54:56 +01:00
Oskar Stark
824777938d [Uid] Unable to extend Uuid/Ulid and use fromString() 2021-01-20 18:19:46 +01:00
Alexander M. Turek
31dcefe779 Merge branch '5.1' into 5.2
* 5.1:
  [HttpFoundation] Drop int return type from parseFilesize()
  Added $translator->addLoader()
  bug symfony/symfony#39878 [doctrine-bridge] Add username to UserNameNotFoundException
  [Uid] Clarify the format returned by getTime()
  fix spelling
  Add check for constant in Curl client
  Revert #38614, add assert to avoid regression
  Fix container injection with TypedReference
  Fix problem when SYMFONY_PHPUNIT_VERSION is empty string value
  Update PHP CS Fixer config to v2.18
2021-01-19 22:00:40 +01:00
Thomas Calvet
c14c7376bd [Uid] Clarify the format returned by getTime() 2021-01-19 13:23:40 +01:00
Fabien Potencier
b57cbb41b3 Merge branch '5.1' into 5.2
* 5.1:
  Improve composer.json descriptions
2021-01-10 17:40:11 +01:00
Fabien Potencier
28ca51611e Improve composer.json descriptions 2021-01-10 17:40:03 +01:00
Christian Flothmann
bc20e633f3 Merge branch '5.1' into 5.2
* 5.1:
  [Uid] Hardcode UuidV3 & UuidV5 TYPE conditional constants
  [Uid] Use the Uuid constructor when reconstructing an Ulid from its RFC-4122 version
  stop using void in test files
2021-01-05 20:21:40 +01:00
Nicolas Grekas
dcd3bad72a minor #39729 [Uid] Use the Uuid constructor when reconstructing an Ulid from its RFC-4122 version (fancyweb)
This PR was merged into the 5.1 branch.

Discussion
----------

[Uid] Use the Uuid constructor when reconstructing an Ulid from its RFC-4122 version

| Q             | A
| ------------- | ---
| Branch?       | 5.1
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | -

Ref https://github.com/symfony/polyfill/issues/323

In my scenario, I'm doing `Ulid::fromString('0164129e-c96f-eb1a-f011-57cf56e0c559')`. When we reach the modified line, we already know the provided `$ulid` string is an rfc-4122 valid uuid so we don't need to call `fromString` (I guess) + we don't care of the version, we just want the binary content. That fixes the referenced issue in my case because the missing constant is consequently not loaded.

Commits
-------

44392cbc30 [Uid] Use the Uuid constructor when reconstructing an Ulid from its RFC-4122 version
2021-01-05 19:30:56 +01:00
Thomas Calvet
f0fafec019 [Uid] Hardcode UuidV3 & UuidV5 TYPE conditional constants 2021-01-05 18:34:45 +01:00
Thomas Calvet
44392cbc30 [Uid] Use the Uuid constructor when reconstructing an Ulid from its RFC-4122 version 2021-01-05 18:11:49 +01:00
Fabien Potencier
2a1a4e7067 Merge branch '5.1' into 5.2
* 5.1:
  Bump license year
  Bump license year
  [Form] fix passing null $pattern to IntlDateFormatter
  Add reference link
  Update README.md
2021-01-01 10:26:45 +01:00
Fabien Potencier
46ea62297b Bump license year 2021-01-01 10:26:30 +01:00
Nicolas Grekas
68c6027a21 Merge branch '5.1' into 5.2
* 5.1:
  Handle ValueErrors triggered by ext-uuid on PHP 8
  Add test case to ensure all security events are propagated
2020-12-28 10:48:24 +01:00
Alexander M. Turek
5305170e54 Handle ValueErrors triggered by ext-uuid on PHP 8 2020-12-27 21:49:37 +01:00
Robin Chalas
302b80768a Merge branch '5.1' into 5.2
* 5.1:
  [Uid] Fix tests namespace
2020-12-15 10:12:47 +01:00
Thomas Calvet
cd11ef67dc [Uid] Fix tests namespace 2020-12-15 00:03:24 +01:00
Fabien Potencier
ac9858b0c8 minor #39318 Fix @experimental annotations (fabpot)
This PR was merged into the 5.2 branch.

Discussion
----------

Fix @experimental annotations

| Q             | A
| ------------- | ---
| Branch?       | 5.2 <!-- see below -->
| Bug fix?      | no
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | n/a <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead -->
| License       | MIT
| Doc PR        | n/a

Commits
-------

07781474bc Fix @experimental annotations
2020-12-05 08:34:04 +01:00
Fabien Potencier
71591dfd38 Merge branch '5.1' into 5.2
* 5.1:
  Add missing entries in .gitattributes
  Update README.md
2020-12-05 08:33:16 +01:00
Fabien Potencier
a0e7fc36a3 Add missing entries in .gitattributes 2020-12-05 08:09:10 +01:00
Fabien Potencier
07781474bc Fix @experimental annotations 2020-12-05 07:51:44 +01:00
Nicolas Grekas
605a5674a8 Merge branch '5.1' into 5.x
* 5.1:
  fix merge
  fix merge
  Remove branch-version (keep them for contracts only)
  [HttpClient] relax auth bearer format requirements
  [PHPUnitBridge] Silence errors from mkdir()
  [DependencyInjection] Preload classes with union types correctly.
  [Serializer] fix decoding float XML attributes starting with 0
  add missing dutch translations
  [TwigBridge] Remove "transchoice" from the code base
  Support PHPUnit 8 and PHPUnit 9 in constraint compatibility trait
  Add expectDeprecation, expectNotice, expectWarning, and expectError to TestCase polyfill
  [String] fix before/after[Last]() returning the empty string instead of the original one on non-match
  Add missing exporter function for PHPUnit 7
  [Validator] Add missing romanian translations
  [String] fix slicing in UnicodeString
  [Cache] Use correct expiry in ChainAdapter
  do not translate null placeholders or titles
2020-10-24 14:08:07 +02:00
Nicolas Grekas
65f2620bc4 Merge branch '4.4' into 5.1
* 4.4:
  fix merge
  Remove branch-version (keep them for contracts only)
  [HttpClient] relax auth bearer format requirements
  [PHPUnitBridge] Silence errors from mkdir()
  [DependencyInjection] Preload classes with union types correctly.
  [Serializer] fix decoding float XML attributes starting with 0
  add missing dutch translations
  Support PHPUnit 8 and PHPUnit 9 in constraint compatibility trait
  Add expectDeprecation, expectNotice, expectWarning, and expectError to TestCase polyfill
  Add missing exporter function for PHPUnit 7
  [Validator] Add missing romanian translations
  [Cache] Use correct expiry in ChainAdapter
  do not translate null placeholders or titles
2020-10-24 14:01:57 +02:00
Nicolas Grekas
01b064d97a Merge branch '5.1' into 5.x
* 5.1:
  Fix branch-version
2020-10-13 15:22:54 +02:00
Nicolas Grekas
1a0ea4d2f7 Merge branch '4.4' into 5.1
* 4.4:
  Fix branch-version
2020-10-13 15:21:37 +02:00
Nicolas Grekas
7f0015ee35 Merge branch '5.1' into 5.x
* 5.1:
  Remove "version" from composer.json files, use "branch-version" instead
  [String] fix "is too large" ValueError on PHP 8
2020-10-13 14:43:06 +02:00
Nicolas Grekas
23ab908213 Merge branch '4.4' into 5.1
* 4.4:
  Remove "version" from composer.json files, use "branch-version" instead
2020-10-13 14:35:38 +02:00
Nicolas Grekas
6066462be2 Merge branch '5.1' into 5.x
* 5.1:
  Update versions in composer.json
  [Mime] Fix serialization of RawMessage
2020-10-06 17:53:16 +02:00
Nicolas Grekas
3e492d6e5d Merge branch '4.4' into 5.1
* 4.4:
  Update versions in composer.json
  [Mime] Fix serialization of RawMessage
2020-10-06 17:50:31 +02:00
Nicolas Grekas
11c4f28137 Merge branch '5.1' into 5.x
* 5.1:
  fix merge
  [appveyor] fix checking for the .x branch
  Remove "branch-alias", populate "version"
2020-10-06 14:00:29 +02:00
Nicolas Grekas
097c8c6f27 Merge branch '4.4' into 5.1
* 4.4:
  [appveyor] fix checking for the .x branch
  Remove "branch-alias", populate "version"
2020-10-06 13:49:34 +02:00
Nicolas Grekas
b9c61ca86c [Uid] make UUIDv6 always return truly random nodes to prevent leaking the MAC of the host 2020-09-29 08:01:16 +02:00
Nicolas Grekas
4ee85e8e3b Merge branch '5.1'
* 5.1:
  Enable "native_constant_invocation" CS rule
  Make AbstractPhpFileCacheWarmer public
  Fix CS
  Add a warning comment on ldap empty password
  Bump Symfony version to 4.4.14
  Update VERSION for 4.4.13
  Update CHANGELOG for 4.4.13
  [PhpunitBridge] Fix deprecation type detection
2020-09-02 18:27:44 +02:00
Nicolas Grekas
034602699e Merge branch '4.4' into 5.1
* 4.4:
  Enable "native_constant_invocation" CS rule
  Make AbstractPhpFileCacheWarmer public
2020-09-02 18:23:27 +02:00
Nicolas Grekas
430b884570 Merge branch '5.1'
* 5.1:
  [PhpUnitBridge] fix leftover
  [PhpUnitBridge] fix installing under PHP >= 8
  Use ">=" for the "php" requirement
  bump icu 67.1
  [DI] Remove preload primitive types
  [Validator] Add missing translations of nn locale
  [HttpKernel] Fix that the `Store` would not save responses with the X-Content-Digest header present
  [Intl] bump icu 67.1
  [Validator] allow passing a validator to Validation::createCallable()
2020-05-20 19:44:07 +02:00
Nicolas Grekas
e65cdb685f Merge branch '5.0' into 5.1
* 5.0:
  [PhpUnitBridge] fix leftover
  [PhpUnitBridge] fix installing under PHP >= 8
  Use ">=" for the "php" requirement
  bump icu 67.1
2020-05-20 19:43:50 +02:00
Fabien Potencier
25c4889c8e updated version to 5.2 2020-05-16 14:09:30 +02:00
Nilmar Sanchez Muguercia
106c733bce [Uid] Improve the code 2020-03-31 20:10:27 +02:00
Nicolas Grekas
ebf601b1a6 [Uid] work around buggy libuuid 2020-03-23 15:03:28 +01:00
Nicolas Grekas
660326bed3 [Uid] minor improvements 2020-03-20 20:42:05 +01:00
Tobias Schultze
901e62a98f remove unused uuid property
leftover from https://github.com/symfony/symfony/pull/36074
2020-03-15 15:41:40 +01:00
Nicolas Grekas
d8479adc49 [Uid] add AbstractUid and interop with base-58/32/RFC4122 encodings 2020-03-15 10:01:22 +01:00
Roland Franssen
cbb6d233a1 [UID] Rename NullUuid to NilUuid 2020-03-15 09:07:00 +01:00
Fabien Potencier
68dec1a068 minor #36077 [Uid] Add support for UUIDv6 (nicolas-grekas)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[Uid] Add support for UUIDv6

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | -

See https://github.com/uuid6/uuid6-ietf-draft/blob/master/draft-peabody-dispatch-new-uuid-format-00.txt

A v6 UUID is a lexicographically-sortable-v1.
This makes it db-index friendly (same as ULIDs).

For reference:
- v1 has no benefits over v6 except being in the current official RFC
- v6 is order-friendly and leaks time data + stable entropy (potentially bound to a MAC address or equivalent)
- ULID is also order-friendly and leaks time data, with high entropy (crypto random source)
- v4 is pure crypto random source, aka no order and no leak of anything.

Commits
-------

b705ee1b4b [Uid] Add support for UUIDv6
2020-03-15 09:05:32 +01:00
Nicolas Grekas
a0e8d24144 [Uid] work around slow generation of v4 UUIDs 2020-03-15 01:46:42 +01:00
Nicolas Grekas
b705ee1b4b [Uid] Add support for UUIDv6 2020-03-15 01:13:53 +01:00
Nicolas Grekas
62f6ac4d36 [Uid] use one class per type of UUID 2020-03-14 14:51:56 +01:00