* 4.2:
[Twig] Remove spaces to fix whitespace in tags
[Twig] Replace for-loops with blocks for attributes
fixed CS
[Tests] Change to willThrowException
[Console] fix PHPDoc in Command
Update FileLoaderLoadException.php
Fix wrong calls to clearstatcache
Add Vietnamese translation for validators
Allow running PHPUnit with "xdebug.scream" ON
[VarDumper] Add descriptors tests
[Cache] fix bad optim
[Yaml] detect circular references
[DI] fix reporting bindings on overriden services as unused
[Routing] minor fix or previous PR
* 4.2:
[FrameworkBundle] decouple debug:autowiring from phpdocumentor/reflection-docblock
Fix env fallback to an unresolved variable
[DI] map snake-case ids of service subscribers to camel-case autowiring aliases
* 4.2:
[Routing] fix trailing slash redirections involving a trailing var
[EventDispatcher] Revers event tracing order
[Security] Prefer clone over unserialize(serialize()) for user refreshment
[Console] OutputFormatter: move strtolower to createStyleFromString
Adjust tests to work in the armhf architecture. Fixes#29281.
Vietnamese translations improvement
[Form] Fixed FormErrorIterator class phpdoc
Renamed test controller from Controller to TestController so it doesn't show up in the IDE autocomplete.
Don't use he in docs when its not needed
EventSubscriberInterface isn't a man
Fix undefined variable in cache ArrayTrait
fixed public directory of web server and assets install when configured in composer.json
* 4.1:
[Routing] fix trailing slash redirections involving a trailing var
[EventDispatcher] Revers event tracing order
[Security] Prefer clone over unserialize(serialize()) for user refreshment
[Console] OutputFormatter: move strtolower to createStyleFromString
Adjust tests to work in the armhf architecture. Fixes#29281.
Vietnamese translations improvement
[Form] Fixed FormErrorIterator class phpdoc
Renamed test controller from Controller to TestController so it doesn't show up in the IDE autocomplete.
Don't use he in docs when its not needed
EventSubscriberInterface isn't a man
fixed public directory of web server and assets install when configured in composer.json
* 3.4:
[EventDispatcher] Revers event tracing order
[Security] Prefer clone over unserialize(serialize()) for user refreshment
[Console] OutputFormatter: move strtolower to createStyleFromString
Adjust tests to work in the armhf architecture. Fixes#29281.
Vietnamese translations improvement
[Form] Fixed FormErrorIterator class phpdoc
Renamed test controller from Controller to TestController so it doesn't show up in the IDE autocomplete.
Don't use he in docs when its not needed
EventSubscriberInterface isn't a man
fixed public directory of web server and assets install when configured in composer.json
This PR was merged into the 3.4 branch.
Discussion
----------
Fixed public directory when configured in composer.json
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License | MIT
As documented you should be able to change the public-dir by composer.json so the server:run and assets:install should also use that configuration when available:
https://symfony.com/doc/3.4/configuration/override_dir_structure.html#override-the-web-directoryhttps://symfony.com/doc/current/configuration/override_dir_structure.html#override-the-public-directory
#SymfonyConHackDay2018
Commits
-------
c45062b71a fixed public directory of web server and assets install when configured in composer.json
* 4.2: (27 commits)
[VarExporter] dont call userland code with uninitialized objects
Fix typos in doc blocks
[Debug] ignore underscore vs backslash namespaces in DebugClassLoader
[TwigBridge][Form] Prevent multiple rendering of form collection prototypes
[FrameworkBundle] fix describing routes with no controllers
[DI] move RegisterServiceSubscribersPass before DecoratorServicePass
Update ValidationListener.php
[Yaml] ensures that the mb_internal_encoding is reset to its initial value
[Messenger] Restore message handlers laziness
[WebLink] Fixed documentation link
[Security] getTargetPath of TargetPathTrait must return string or null
[Hackday][Serializer] Deserialization ignores argument type hint from phpdoc for array in constructor argument
Optimize perf by replacing call_user_func with dynamic vars
[Cache] Fix dsn parsing
[Routing] fix dumping same-path routes with placeholders
[WebProfilerBundle][TwigBundle] CSS fixes
Add a docblock for FormFactoryInterface
[Security] defer log message in guard authenticator
[Validator] Added IBAN format for Vatican City State
merge conflicts
...
* 4.1:
Fix typos in doc blocks
[Debug] ignore underscore vs backslash namespaces in DebugClassLoader
[TwigBridge][Form] Prevent multiple rendering of form collection prototypes
[FrameworkBundle] fix describing routes with no controllers
[DI] move RegisterServiceSubscribersPass before DecoratorServicePass
Update ValidationListener.php
[Yaml] ensures that the mb_internal_encoding is reset to its initial value
[WebLink] Fixed documentation link
[Security] getTargetPath of TargetPathTrait must return string or null
[Hackday][Serializer] Deserialization ignores argument type hint from phpdoc for array in constructor argument
Optimize perf by replacing call_user_func with dynamic vars
[Routing] fix dumping same-path routes with placeholders
[Security] defer log message in guard authenticator
[Validator] Added IBAN format for Vatican City State
merge conflicts
filter out invalid Intl values
filter out invalid language values
[Validator] Fixed grouped composite constraints
[Form] Filter arrays out of scalar form types
Fix HeaderBag::get phpdoc
* 3.4:
[Debug] ignore underscore vs backslash namespaces in DebugClassLoader
[TwigBridge][Form] Prevent multiple rendering of form collection prototypes
[FrameworkBundle] fix describing routes with no controllers
[DI] move RegisterServiceSubscribersPass before DecoratorServicePass
Update ValidationListener.php
[Yaml] ensures that the mb_internal_encoding is reset to its initial value
[WebLink] Fixed documentation link
[Security] getTargetPath of TargetPathTrait must return string or null
[Hackday][Serializer] Deserialization ignores argument type hint from phpdoc for array in constructor argument
[Security] defer log message in guard authenticator
merge conflicts
Fix HeaderBag::get phpdoc
This PR was merged into the 4.3-dev branch.
Discussion
----------
[DI] compute autowiring error messages lazily
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #29019
| License | MIT
| Doc PR | -
As suggested in the linked issue:
> the error message may ultimately be "hidden" because the definition in question is removed... and so we're doing work unnecessarily.
Commits
-------
3b3a1bd3cc [DI] compute autowiring error messages lazily
This PR was merged into the 4.2 branch.
Discussion
----------
[FrameworkBundle][Controller] Use interface from Contracts to remove deprecation arnings
| Q | A
| ------------- | ---
| Branch? | 4.2?
| Bug fix? | no
| New feature? | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks? | I don't think so <!-- see https://symfony.com/bc -->
| Deprecations? | no - removing some :) <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | n/a <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | n/a
When we installed 4.2, we hit issues in our qa tools with [vimeo/psalm](https://github.com/vimeo/psalm) reporting that all of our controllers were implementing a deprecated interface (by extending the AbstractController).
This pr simply updates the AbstractController to use the interface provided in `symfony/contracts`
I'm not sure if there was any other reason for not including this in the 4.2 release (bc?), so apologies if I've overstepped this.
Commits
-------
f10227df3d [FrameworkBundle][Controller] Use interface from Contracts to remove deprecation warnings
* 4.2:
[TwigBridge] Deprecating legacy Twig paths in DebugCommand and simplifications
[Cache] Fixed Memcached adapter doClear()to call flush()
Fixes sprintf(): Too few arguments in Translator
fix TransChoiceTokenParser deprecation message
[DoctrineBridge] Conflict with Messenger <4.2
[Contracts] extract LocaleAwareInterface out of TranslatorInterface
* 4.2:
[VarExporter] fix dumping private properties from abstract classes
Fix empty output for debug:autowiring when reflection-docblock is not available
[Workflow] Fixed BC break for Workflow metadata
[Routing] ignore trailing slash for non-GET requests
* 4.2:
[Serializer] fixed DateTimeNormalizer to maintain microseconds when a different timezone required
[Routing] fix taking verb into account when redirecting
[TwigBundle] Sync tab navigation css
[WebProfilerBundle] Fix log filter in dark mode
[WebProfilerBundle][4.2] Deny messenger <4.2
[DI] Fix dumping expressions accessing single-use private services
[VarExporter] fix dumping protected property from abstract classes
[WebProfilerBundle] Split form field heading
Minor tweak for c3ad8a5
* 4.2:
fix cs
[FrameworkBundle] define doctrine as default_pdo_provider only if the package is installed
[Validator] Allow `ConstraintViolation::__toString()` to expose codes that are not null or emtpy strings
Added upgrade to HandlersLocator
fix type for $value in DocBlock
[WebProfilerBundle] Fix title case
[Config] fix path exclusion during glob discovery
[FrameworkBundle][Messenger] Restore check for messenger serializer default id
Fix wrapped loop of event listener
[DI] fix edge case in InlineServiceDefinitionsPass
undeprecate the single-colon notation for controllers
Update HttpKernel.php
* 4.1:
fix cs
[Validator] Allow `ConstraintViolation::__toString()` to expose codes that are not null or emtpy strings
fix type for $value in DocBlock
[WebProfilerBundle] Fix title case
Fix wrapped loop of event listener
[DI] fix edge case in InlineServiceDefinitionsPass
undeprecate the single-colon notation for controllers
Update HttpKernel.php
* 4.1:
fix cs
fix cs
fix cs
SCA: consolidate non empty array checks across codebase
[cs] correct invalid @param types
[Bridge/PhpUnit] Use composer to download phpunit
[DI] fix taking lazy services into account when dumping the container
[Form] Fixed empty data for compound date interval
[Cache] fix optimizing Psr6Cache for AdapterInterface pools
deal with explicitly enabled workflow nodes
* 3.4:
fix cs
SCA: consolidate non empty array checks across codebase
[cs] correct invalid @param types
[Bridge/PhpUnit] Use composer to download phpunit
[DI] fix taking lazy services into account when dumping the container
[Form] Fixed empty data for compound date interval
[Cache] fix optimizing Psr6Cache for AdapterInterface pools
deal with explicitly enabled workflow nodes
* 4.1:
Undeprecate the single-colon notation for controllers
Command::addOption should allow int in $default
Update symfony links to https
[Form] Fixed keeping hash of equal \DateTimeInterface on submit
[PhpUnitBridge] Fix typo
[Routing] generate(null) should throw an exception
[Form] Minor fixes in docs and cs
[Workflow] Made code simpler
[Config] Unset key during normalization
[Form] Fixed empty data for compound date types
invalidate forms on transformation failures
[FrameworkBundle] fixed guard event names for transitions
method buildTransitionBlockerList returns TransitionBlockerList of expected transition
[FrameworkBundle] fixed guard event names for transitions
[PropertyAccessor] Fix unable to write to singular property using setter while plural adder/remover exist
* 3.4:
Command::addOption should allow int in $default
[Form] Fixed keeping hash of equal \DateTimeInterface on submit
[PhpUnitBridge] Fix typo
[Form] Minor fixes in docs and cs
[Config] Unset key during normalization
[Form] Fixed empty data for compound date types
invalidate forms on transformation failures
[PropertyAccessor] Fix unable to write to singular property using setter while plural adder/remover exist
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Messenger] Add handled & sent stamps
| Q | A
| ------------- | ---
| Branch? | 4.2 <!-- see below -->
| Bug fix? | no
| New feature? | yes <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | N/A <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | symfony/symfony-docs/issues/10661
Based on #29159
This new feature marks sent and handled messages, so middleware can act upon these and use the handler(s) result(s).
This is also the base of a next PR (#29167), introducing a query bus built on top of the message bus.
I'm not sure yet about the best way to determine the handlers and senders names/descriptions to store in the stamps:
- Handlers are callable. I've just reused the [console text descriptor](1c1818b876/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php (L457-L491)) format for now.
- ~~Sender are `SenderInterface` instances. `\get_class` is used for now, but a single message can be sent by multiple senders, including of the same class.~~ => Updated. Yielding the sender name if provided, the FQCN otherwise.
~~Instead, what about allowing to yield names from locators, and fallback on the above strategies otherwise? So we'll use transport names from the config for senders, and pre-computed compile-time handlers descriptions?~~
=> Done. For handlers, computing it at compile time might not be straightforward. Let's compute it lazily from `HandledStamp::fromCallable()`
---
### From previous conversations:
> What about not adding HandledStamp on `null` returned from handler
IMHO, `null` still is a result. The stamps allows to identify a message as being handled regardless of the returned value, so makes sense on its own and keeping would require one less check for those wanting to consume it.
> What about adding SentStamp?
Makes sense to me and I think it was requested by @Nyholm before on Slack.
So, included in this PR.
> Should it target 4.2 or 4.3?
Targeting 4.2, because of the removal of the handler result forwarding by middleware. A userland middleware could have used this result, typically a cache middleware. Which would now require extra boring code in userland. This will simplify it and allow users to create their query bus instance until 4.3.
Commits
-------
2f5acf790a [Messenger] Add handled & sent stamps
This PR was merged into the 4.2-dev branch.
Discussion
----------
[FrameworkBundle][WebServerBundle] Revert deprecation of --env and --no-debug console options
This reverts commit 9f60ff8a4d.
This reverts commit 31b5615b51.
| Q | A
| ------------- | ---
| Branch? | 4.2
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #28984
| License | MIT
| Doc PR | -
Working on recipes with @weaverryan, we figured out that this deprecation is just making our life more difficult. Let's revert it.
Same as #29126, reverts #28745 and #28653
Commits
-------
443f8ad374 [FrameworkBundle][WebServerBundle] Revert deprecation of --env and --no-debug console options
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Messenger] Fix typos
| Q | A
| ------------- | ---
| Branch? | 4.2 <!-- see below -->
| Bug fix? | no
| New feature? | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | N/A <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | N/A
Just small typos extracted from #29166 in case it doesn't make it to 4.2.
Commits
-------
7e763f96c1 [Messenger] Fix typos