This PR was squashed before being merged into the 3.4 branch.
Discussion
----------
[Validator] Remove commas in translations
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| License | MIT
These translations were originally modified in #21335.
Commits
-------
5688f97bad [Validator] Remove commas in translations
This PR was merged into the 5.1-dev branch.
Discussion
----------
Add missing dots at the end of exception messages
| Q | A
| ------------- | ---
| Branch? | master
| 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 #", if any -->
| License | MIT
| Doc PR | n/a
Commits
-------
c46d7027e5 Add missing dots at the end of exception messages
* 5.0:
Add missing dots at the end of exception messages
Add missing dots at the end of exception messages
[DI][Form] Fixed test suite (TimeType changes & unresolved merge conflict)
Fix bad merge
Add missing dots at the end of exception messages
This PR was merged into the 5.0 branch.
Discussion
----------
Add missing dots at the end of exception messages
| Q | A
| ------------- | ---
| Branch? | 5.0
| 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 #", if any -->
| License | MIT
| Doc PR | n/a
Commits
-------
81cf96749b Add missing dots at the end of exception messages
* 4.4:
Add missing dots at the end of exception messages
[DI][Form] Fixed test suite (TimeType changes & unresolved merge conflict)
Fix bad merge
Add missing dots at the end of exception messages
This PR was merged into the 4.4 branch.
Discussion
----------
Add missing dots at the end of exception messages
| Q | A
| ------------- | ---
| Branch? | 4.4 <!-- 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 #", if any -->
| License | MIT
| Doc PR | n/a
Commits
-------
6dad402e97 Add missing dots at the end of exception messages
This PR was squashed before being merged into the 4.4 branch.
Discussion
----------
[DI][Form] Fixed test suite (TimeType changes & unresolved merge conflict)
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | -
After the merge of #36020 , the `addViewTransformer()` was moved to the top of the statement. This is wrong, as the `$format` variable is changed when a `reference_date` is set (see line 77). This broke Symfony's testsuite :)
Commits
-------
18f5b17249 [DI][Form] Fixed test suite (TimeType changes & unresolved merge conflict)
This PR was merged into the 5.1-dev branch.
Discussion
----------
[Framework-Bundle] fixed kernel.secret not being overridden when loaded from extension using MicroKernelTrait
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets |
| License | MIT
| Doc PR |
Previously, when extending `Kernel::class` and using the `MicroKernelTrait::class` setting the `secret` like
```
protected function configureContainer(ContainerBuilder $container, LoaderInterface $loader)
{
$container->loadFromExtension('framework', [ 'secret' => 'foo',]);
```
would not replace the `kernel.secret` parameter set by `$container->setParameter('kernel.secret', '%env(APP_SECRET)%');` in the `MicroKernelTrait`.
Initiating a service with a secret argument without a `APP_ENV` value set in `.env` would throw:
`Symfony\Component\DependencyInjection\Exception\EnvNotFoundException : Environment variable not found: "APP_SECRET".`
This PR allows the `kernel.secret` set in the `MicroKernelTrait::registerContainerConfiguration()` to be overridden in a class extending `Kernel` while using the trait.
Thanks @nicolas-grekas for the help on this one.
Commits
-------
76d398851f fixed kernel.secret not being overridden when loaded from extension
This PR was merged into the 5.1-dev branch.
Discussion
----------
[SecurityBundle] Added XSD for the extension configuration
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| Deprecations? | no
| Tickets | Fix#28141
| License | MIT
| Doc PR | TODO
Commits
-------
66ac3f7f5d [SecurityBundle] Added XSD for the extension configuration
This PR was merged into the 3.4 branch.
Discussion
----------
Add missing dots at the end of exception messages
| Q | A
| ------------- | ---
| Branch? | 3.4
| 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 #", if any -->
| License | MIT
| Doc PR | n/a
Commits
-------
bb8a66e3fc Add missing dots at the end of exception messages
This PR was merged into the 5.1-dev branch.
Discussion
----------
[Uid] add AbstractUid and interop with base-58/32/RFC4122 encodings
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | -
This PR provides a base `AbstractUid` class that is shared by `Uuid` and `Ulid`.
It adds new methods that provide interoperability between all types of UIDs but also between different encodings of UIDs:
- `toBase58()` using the [bitcoin alphabet](https://en.wikipedia.org/wiki/Base58) - that's 22 chars aka "short-ids" - case sensitive
- `toBase32()` using [Crockford's alphabet](https://www.crockford.com/base32.html) - 26 chars ids - case insensitive
- `toRfc4122()` to represent as a UUID-formatted string - 36 chars
This adds to `toBinary()` and to `fromString()`, the latter being able to cope with any of the 4 representations to create any kind of UIDs.
Commits
-------
d8479adc49 [Uid] add AbstractUid and interop with base-58/32/RFC4122 encodings
This PR was merged into the 5.1-dev branch.
Discussion
----------
[UID] Rename NullUuid to NilUuid
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix #... <!-- prefix each issue number with "Fix #", if any -->
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
<!--
Replace this notice by a short README for your feature/bugfix. This will help people
understand your PR and can be used as a start for the documentation.
Additionally (see https://symfony.com/releases):
- Always add tests and ensure they pass.
- Never break backward compatibility (see https://symfony.com/bc).
- Bug fixes must be submitted against the lowest maintained branch where they apply
(lowest branches are regularly merged to upper ones so they get the fixes too.)
- Features and deprecations must be submitted against branch master.
-->
As per https://tools.ietf.org/html/rfc4122#section-4.1.7
Commits
-------
cbb6d233a1 [UID] Rename NullUuid to NilUuid
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
This PR was merged into the 5.1-dev branch.
Discussion
----------
[Uid] work around slow generation of v4 UUIDs
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | -
This is more than 4 times faster than `uuid_create()` for v4.
As described in https://jolicode.com/blog/uuid-generation-in-php
Commits
-------
a0e8d24144 [Uid] work around slow generation of v4 UUIDs
This PR was submitted for the master branch but it was merged into the 4.4 branch instead.
Discussion
----------
[HttpClient] Fix typo
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | no
| License | MIT
| Doc PR | no
A little typo in docblock.
Commits
-------
186ee831d7 [HttpClient] Fix typo
This PR was merged into the 5.1-dev branch.
Discussion
----------
[Uid] use one class per type of UUID
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | -
(embeds #36064 for now)
Would it make sense to have one class per type of UUID?
This aligns the type system and UUID types, so that one could type hint e.g. `UuidV4 $uuid`.
This PR does so. `UuidV1`/2/3/4 and `NullUuid` all extend the base `Uuid` class, which provides common methods and the factories needed to create each king of UUID.
This means we don't need the `getType()` nor the `isNull()` methods since they can be replaced by instanceof checks.
As expected, `getTime()` and `getMac()` then now exist only on the `UuidV1` class - no need for any version check nor any `LogicException` anymore.
Each type is guaranteed to contain a UUID that matches its class' type. The base `Uuid` class is used for the "no type" type.
Commits
-------
62f6ac4d36 [Uid] use one class per type of UUID
This PR was merged into the 5.1-dev branch.
Discussion
----------
[Uid] improve base convertion logic
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | -
The new logic is at least twice as fast as the current algo.
It's also way more common and generic.
Commits
-------
0e05c6de80 [Uid] improve base convertion logic
This PR was squashed before being merged into the 4.4 branch.
Discussion
----------
[Mime] Fix boundary header
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix#35443 (fixes the second problem described in this ticket)
| License | MIT
The boundary value of Content-Type header was enclosed in quotes, cause of the "=" symbol.
Commits
-------
453078ff37 [Mime] Fix boundary header
This PR was merged into the 5.1-dev branch.
Discussion
----------
[Uid] add support for Ulid
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | -
ULIDs are useful alternatives to UUIDs.
From https://github.com/ulid/spec:
UUID can be suboptimal for many use-cases because:
- It isn't the most character efficient way of encoding 128 bits of randomness
- UUID v1/v2 is impractical in many environments, as it requires access to a unique, stable MAC address
- UUID v3/v5 requires a unique seed and produces randomly distributed IDs, which can cause fragmentation in many data structures
- UUID v4 provides no other information than randomness which can cause fragmentation in many data structures
Instead, herein is proposed ULID:
- 128-bit compatibility with UUID
- 1.21e+24 unique ULIDs per millisecond
- Lexicographically sortable!
- Canonically encoded as a 26 character string, as opposed to the 36 character UUID
- Uses Crockford's base32 for better efficiency and readability (5 bits per character)
- Case insensitive
- No special characters (URL safe)
- Monotonic sort order (correctly detects and handles the same millisecond)
Commits
-------
59044f914b [Uid] add support for Ulid
This PR was merged into the 5.1-dev branch.
Discussion
----------
[Uid] remove Uuid::getVariant()
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | -
Let's simplify the API. One less concept to grasp.
I think there are no use cases for variants in modern tech, check:
https://en.wikipedia.org/wiki/Universally_unique_identifier#Variants
Commits
-------
49efe9a5a9 [Uid] remove Uuid::getVariant()
This PR was merged into the 5.1-dev branch.
Discussion
----------
[Uid] make `Uuid::equals` method accept any types of argument for more flexibility
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | ~
| License | MIT
| Doc PR | ~
I suggest to weaken the `Uuid:equals` method argument type to accept any types of value to compare against. This makes one able to compare the `Uuid` instance with any values.
Commits
-------
46721c19f9 [Uid] make `Uuid::equals()` accept any types of argument for more flexibility