This PR was merged into the 5.3-dev branch.
Discussion
----------
Fix broken link to documentation in Lock and Semaphore components
| Q | A
| ------------- | ---
| Branch? | 5.x
| Bug fix? | yes
| New feature? | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| License | MIT
Commits
-------
d907d3ba83 Fix broken link to documentation in Lock and Semaphore components
This PR was merged into the 5.2 branch.
Discussion
----------
Add missing entries in gitattributes
| Q | A
| ------------- | ---
| Branch? | 5.2
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets |
| License | MIT
| Doc PR |
Adds `/.gitattributes export-ignore` in some bridges
Commits
-------
36f5ff1550 Add missing entries in gitattributes
This PR was squashed before being merged into the 5.3-dev branch.
Discussion
----------
[FrameworkBundle] Added option to specify the event dispatcher in debug:event-dispatcher
| Q | A
| ------------- | ---
| Branch? | 5.x
| Bug fix? | no
| New feature? | yes
| Deprecations? | no
| Tickets | N/A
| License | MIT
| Doc PR | symfony/symfony-docs#14650
| Tags | #SymfonyHackday
### Description:
In the recent security improvements, new event dispatchers were added (one for each firewall). These were not visible in the `debug:event-dispatcher` command. This PR adds an option to define a event dispatcher to show the events (and listeners) for that specific event dispatcher. Without any options, the default dispatcher is shown (identical to previous working)
In order to be able to fetch specific event dispatchers, I tagged all event dispatchers with a new `kernel.event-dispatcher` tag.
### Usage:
`bin/console debug:event-dispatcher --dispatcher=[servicename] [other options] [event]`
### Subtasks:
- [x] Add `dispatcher` option
- [x] Add `kernel.event_dispatcher` tag to all event dispatchers
- [x] Add autoconfigure tag for services implementing `EventDispatcherInterface`
- [x] Update Descriptor classes to specify the chosen dispatcher
- [x] Update changelog
- [x] Add documentation
Commits
-------
62398b525e [FrameworkBundle] Added option to specify the event dispatcher in debug:event-dispatcher
* 5.2:
[Notifier] Fix tests with PHPUnit 9.5.
Fix merge.
Fix CS
[Messenger] Test generated SQL
[Config] YamlReferenceDumper: No default value required for VariableNode with array example
Remove PHPUnit configuration files from components without tests.
[DependencyInjection] Fix container linter for union types.
* 5.1:
Fix merge.
Fix CS
[Messenger] Test generated SQL
[Config] YamlReferenceDumper: No default value required for VariableNode with array example
Remove PHPUnit configuration files from components without tests.
[DependencyInjection] Fix container linter for union types.
This PR was merged into the 4.4 branch.
Discussion
----------
[Messenger] Test generated SQL
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | N/A
| License | MIT
| Doc PR | N/A
Follow-up to #39166.
This is an attempt to the SQL generated by the `Symfony\Component\Messenger\Transport\Doctrine\Connection::get()` method. The challange was to create a locking SELECT statement, taking into account the different ways to create a lock in different SQL dialects.
This test verifies if the correct lock statements are generated for MySQL and SQL Server.
Commits
-------
1f1b62afb6 [Messenger] Test generated SQL
This PR was merged into the 4.4 branch.
Discussion
----------
[Config] YamlReferenceDumper: No default value required for VariableNode with array example
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? |
| Tickets |
| License | MIT
| Doc PR |
This will fix#39328 in a better way.
A `VariableNode` may have an array as value and also a default value as "null". (Like the workflow component).
When we dump the config, we generate invalid yaml:
```
workflows:
enabled: false
workflows:
# Prototype
name:
# Select which Transition events should be dispatched for this Workflow
events_to_dispatch: null
# Examples:
- workflow.enter
- workflow.transition
```
With this PR, we will remove the `null` default value from the dumped config.
#SymfonyHackday
Commits
-------
9104fd4539 [Config] YamlReferenceDumper: No default value required for VariableNode with array example
This PR was merged into the 5.1 branch.
Discussion
----------
[Notifier] Remove PHPUnit configuration files from components without tests
| Q | A
| ------------- | ---
| Branch? | 5.1
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | N/A
| License | MIT
| Doc PR | N/A
Follows #39331 by @wouterj.
PHPUnit 9.5 fails if we look for tests in directories that do not exist. This is very reasonable behavior, imho.
However, we do have some bridges in the Notifier component that don't provide any tests. Running PHPUnit on those bridges is pointless, which is why I'd like to remove the PHPUnit configuration from them. We can re-add the files as soon as we add tests.
#SymfonyHackday
Commits
-------
710340dfb2 Remove PHPUnit configuration files from components without tests.
This PR was merged into the 5.3-dev branch.
Discussion
----------
[Console] Extracting ProgressBar's format's magic strings into const
| Q | A
| ------------- | ---
| Branch? | 5.x
| Bug fix? | no
| New feature? | yes
| Deprecations? | no
| Tickets |
| License | MIT
| Doc PR |
The existence of these magic string is propagating outside the project on the user land while constructing a command:
```php
$bar->setFormat('very_verbose');
```
Objective is to provide reusability and resilience to miss naming:
```php
$bar->setFormat(ProgressBar::VERBOSE);
```
Commits
-------
a4b26061a9 Extracting ProgressBar's format's magic strings into const
* 5.2:
[Messenger] StopWorkersCommand improve doc helper
Added compatibility with PHPunit 9.5
do not apply the Valid constraint on scalar form data
[Test] Reproduce issue with cascading validation
[SecurityBundle] Don't use the container as resource type in fixtures.
Fix bug with whitespace in Kernel::stripComments()
* 5.1:
[Messenger] StopWorkersCommand improve doc helper
Added compatibility with PHPunit 9.5
do not apply the Valid constraint on scalar form data
[Test] Reproduce issue with cascading validation
[SecurityBundle] Don't use the container as resource type in fixtures.
Fix bug with whitespace in Kernel::stripComments()
* 4.4:
[Messenger] StopWorkersCommand improve doc helper
Added compatibility with PHPunit 9.5
do not apply the Valid constraint on scalar form data
[Test] Reproduce issue with cascading validation
[SecurityBundle] Don't use the container as resource type in fixtures.
Fix bug with whitespace in Kernel::stripComments()
This PR was merged into the 4.4 branch.
Discussion
----------
[Form] do not apply the Valid constraint on scalar form data
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix#38039
| License | MIT
| Doc PR |
#SymfonyHackday
Commits
-------
453bb3ebde do not apply the Valid constraint on scalar form data
41b9457887 [Test] Reproduce issue with cascading validation
This PR was merged into the 4.4 branch.
Discussion
----------
[PhpUnitBridge] Fixed PHPunit 9.5 compatibility
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix#39329
| License | MIT
| Doc PR | -
Let's see if this works 🍀
#SymfonyHackday
Commits
-------
5134de52f1 Added compatibility with PHPunit 9.5
This PR was squashed before being merged into the 4.4 branch.
Discussion
----------
[Messenger] StopWorkersCommand improve doc helper
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | Fix
| License | MIT
Small improvement :)
Commits
-------
e136068743 [Messenger] StopWorkersCommand improve doc helper
This PR was merged into the 5.3-dev branch.
Discussion
----------
[DependencyInjection] Add missing parameter type declarations to loader classes
| Q | A
| ------------- | ---
| Branch? | 5.x
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | N/A
| License | MIT
| Doc PR | N/A
This PR adds missing parameter type declarations to the loader classes of the DI component. We initially omitted them in order to stay compatible to the Config component of 4.4. But that compatibility was dropped afterwards and we somehow forgot to add the types here.
Commits
-------
de0dbd88d2 [DependencyInjection] Add missing parameter type declarations to loader classes.
This PR was squashed before being merged into the 5.3-dev branch.
Discussion
----------
Search for pattern on debug:event-dispatcher
| Q | A
| ------------- | ---
| Branch? | 5.x
| Bug fix? | no
| New feature? | yes
| Deprecations? | no
| Tickets |
| License | MIT
| Doc PR |
When running `bin/console event-dispatcher` you may pass it an argument to show what event you are interested to see the listeners for. Example:
```
bin/console event-dispatcher kernel.request
bin/console debug:event-dispatcher "Symfony\Component\Security\Http\Event\CheckPassportEvent"
```
Since more and more events are using FQCN now, this is a handful to write. Other questions that I face is, should I use single backslash `\` or double `\\`?
This PR propose that you can use a pattern as second argument. If there is no exact match, it will search for similar event names. Say:
```
bin/console debug:event-dispatcher CheckPassportEvent
bin/console debug:event-dispatcher checkpassport
bin/console debug:event-dispatcher Security
bin/console debug:event-dispatcher Security
bin/console debug:event-dispatcher App
```
#SymfonyHackday
Commits
-------
ab31ee9966 Search for pattern on debug:event-dispatcher
This PR was squashed before being merged into the 5.3-dev branch.
Discussion
----------
[Form] Changed DataMapperInterface $forms parameter type to \Traversable
| Q | A
| ------------- | ---
| Branch? | 5.x
| Bug fix? | no
| New feature? | no
| Deprecations? | yes
| Tickets | Fix#39311
| License | MIT
| Doc PR | no
Didn't touch `PropertyPathMapper` because it's deprecated anyway.
Commits
-------
ce77be2507 [Form] Changed DataMapperInterface $forms parameter type to \Traversable
This PR was merged into the 4.4 branch.
Discussion
----------
[SecurityBundle] Don't use the container as resource type in fixtures
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | N/A
| License | MIT
| Doc PR | N/A
Discovered while working on #39292: Some fixtures of SecurityBundle call config loaders and pass the whole container as resource type. This does not really make sense.
Commits
-------
e7e38b7213 [SecurityBundle] Don't use the container as resource type in fixtures.
This PR was merged into the 4.4 branch.
Discussion
----------
[HttpKernel] Fix bug with whitespace in Kernel::stripComments()
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets |
| License | MIT
| Doc PR |
`Kernel::stripComments()` removes significant whitespace in some cases.
I noticed this in one of the generated classes, the code `<?php include_once \dirname(__DIR__).'/file.php';` got replaced with `<?php include_once\dirname(__DIR__).'/file.php';` which is a syntax error.
Commits
-------
8d368e1fe3 Fix bug with whitespace in Kernel::stripComments()
* 5.2:
[HttpFoundation] Make test pass without Xdebug.
[Mime] Leverage PHP 8's detection of CSV files.
[HttpFoundation] Make sure we reuse the current PHP binary for the webserver process in functional tests.
[FrameworkBundle] TextDescriptor::formatControllerLink checked method…
Fix CS
[HttpClient] throw clearer error when no scheme is provided
Fix github pr template and include 5.2 for bugfixes
[HttpFoundation] Ignore stack trace printed by Xdebug 3.
fix lexing backslashes in single quoted strings