* 8.0: (27 commits)
[JsonStreamer] Fix exponential resource class memory growth
[Cache] Fix DSN auth not passed to clusters in RedisTrait
do not parse "scalar" as an object
[Form] Fix OrderedHashMap auto-increment logic with mixed keys
[HttpClient] Skip HTTP/3 when using a proxy
don't skip custom view transformers while normalizing submitted newlines
[Serializer] Fix is/has/can accessor naming regression while preserving collision detection
fix exception "Symfony\Component\TypeInfo\Exception\InvalidArgumentException: "Symfony\Component\TypeInfo\Type\UnionType" expects at least 2 types." when property phpdoc is "value-of<Enum>|null"
[DoctrineBridge] Fix custom type based on Uid on entity loader
let tests fail on PHPUnit notices
[PropertyInfo] Throw when phpdocumentor/reflection-docblock v6 is in use (branch 6.4 only)
do not use PHPUnit mock objects without configured expectations
[Form] Fix ICU 72+ whitespace handling in `DateTimeToLocalizedStringTransformer`
[ErrorHandler] fix parsing of complexe type
do not use PHPUnit mock objects without configured expectations
[Process] Adjust Process mustRun method phpdoc
do not use PHPUnit mock objects without configured expectations
do not use PHPUnit mock objects without configured expectations
do not use PHPUnit mock objects without configured expectations
do not use PHPUnit mock objects without configured expectations
...
* 8.0:
Fix merge
[WebProfiler] fix the security profiler template
add tests for bypassed headers
[Scheduler] Array to string conversion when using AsCronTask with array options
the Serializer component does not work with PropertyInfo < 7.4
[Config] Fix merging node that canBeDisable()/canBeEnabled()
[ObjectMapper] error when multiple targets and no condition
* 7.4:
Fix merge
[WebProfiler] fix the security profiler template
add tests for bypassed headers
[Scheduler] Array to string conversion when using AsCronTask with array options
[Config] Fix merging node that canBeDisable()/canBeEnabled()
[ObjectMapper] error when multiple targets and no condition
* 8.0:
do not use PHPUnit mock objects without configured expectations
do not use PHPUnit mock objects without configured expectations
do not use PHPUnit mock objects without configured expectations
fix CS
do not use PHPUnit mock objects without configured expectations
[Scheduler] Fix array to string conversion in `#[AsCronTask]` arguments
do not use PHPUnit mock objects without configured expectations
do not use PHPUnit mock objects without configured expectations
do not use PHPUnit mock objects without configured expectations
do not use PHPUnit mock objects without configured expectations
fix merge
do not use PHPUnit mock objects without configured expectations
* 7.4:
do not use PHPUnit mock objects without configured expectations
do not use PHPUnit mock objects without configured expectations
do not use PHPUnit mock objects without configured expectations
fix CS
do not use PHPUnit mock objects without configured expectations
[Scheduler] Fix array to string conversion in `#[AsCronTask]` arguments
do not use PHPUnit mock objects without configured expectations
do not use PHPUnit mock objects without configured expectations
do not use PHPUnit mock objects without configured expectations
do not use PHPUnit mock objects without configured expectations
fix merge
do not use PHPUnit mock objects without configured expectations
* 7.3:
do not use PHPUnit mock objects without configured expectations
do not use PHPUnit mock objects without configured expectations
fix CS
[Scheduler] Fix array to string conversion in `#[AsCronTask]` arguments
* 7.4: (28 commits)
[Console] Rename `#[Input]` to `#[MapInput]`
[FrameworkBundle] Fix support of dumping workflow when workflow is decorated by TraceableWorkflow
[JsonStreamer] Fix documentation link in README
[Meta] Better exception when symfony link cannot read a JSON
[Form] Add new `active_at`, `not_active_at` and `legal_tender` options to `CurrencyType`
[Intl] Support time in generated data in currencies validity
[Validator] Improve and complete Japanese translations
[HtmlSanitizer] Remove redundant assignment to promoted property $config in constructor
[Validator] Fix Polish translation for word count validation message
[DependencyInjection][Routing] Deprecate XML configuration format
[Validator] Review and fix Czech translation
[DependencyInjection][Routing] Handle declaring services and routes using PHP arrays that follow the same shape as corresponding yaml files
[Mailer][MailJet] Fix forbidden headers case-sensitive comparison
[DependencyInjection][Config][Routing] Deprecate using `$this` or the internal scope of the loader from PHP config files
[Config] Add array-shapes to generated config builders
[DependencyInjection] Handle returning arrays and config-builders from config files
[WebProfilerBundle] Simplify toolbar CSS
do not use deprecated PHPUnit features
replace PHPUnit annotation with attribute
[Serializer] xml empty array encoding
...
* 7.3:
[Mailer][MailJet] Fix forbidden headers case-sensitive comparison
do not cast too big floats to int
[Scheduler] Don’t get next run date from `null`
[JsonPath] Add @alexandre-daubois as code owner
do not pass more than one byte to ord()
* 7.4:
Use phpunit attribute
Remove some implicit bool type juggling
[Scheduler] Fix `scheduler.task` tag arguments optionality
use false instead of null to hide the currency symbol
[FrameworkBundle] Fix block type from `OK` to `ERROR` when local vault is disabled in `SecretsRemoveCommand`
run tests with PHPUnit 12.1 on PHP >= 8.3
Fix wrong boolean values
minor #61328 [FrameworkBundle] Decouple ControllerResolverTest from HttpKernel (nicolas-grekas)
[Messenger] Fix NoAutoAckStamp handling in Worker::flush()
[DependencyInjection] Dump XML using plain PHP, no DOM needed
* 7.3:
[Scheduler] Fix `scheduler.task` tag arguments optionality
use false instead of null to hide the currency symbol
[FrameworkBundle] Fix block type from `OK` to `ERROR` when local vault is disabled in `SecretsRemoveCommand`
Fix wrong boolean values
minor #61328 [FrameworkBundle] Decouple ControllerResolverTest from HttpKernel (nicolas-grekas)
[Messenger] Fix NoAutoAckStamp handling in Worker::flush()
* 7.4:
run tests using PHPUnit 11.5
make data provider static
[Lock] Fix using fractional TTLs on all platforms
[Lock] Fixes an issue with PostgreSQL when using fractional TTLs
[Console][Table] Fix unnecessary wrapping
[DependencyInjection] Deprecate registering a service without a class when its id is a non-existing FQCN
disable detecting modified indexes with DBAL 4.3
[cache] RedisTrait::doFetch should use pipeline instead of mget for Relay\Cluster
relax assertions for forward compatibility with Symfony 7.4
[Console][Table] Fix invalid UTF-8 due to text wrapping
As the PostRunEvent class is already present in Symfony since 6.4 we cannot add
new mandatory constructor arguments without breaking backwards compatibility.
This PR was squashed before being merged into the 7.3 branch.
Discussion
----------
[Scheduler] Add MessageHandler result to the `PostRunEvent`
| Q | A
| ------------- | ---
| Branch? | 7.3
| Bug fix? | no
| New feature? | yes
| Deprecations? | no
| Issues |
| License | MIT
This PR will add the result of a MessageHandler to the PostRunEvent of the Scheduler Component. This can be used for example for retrieving the output of a RunCommandMessage scheduled by the scheduler component.
```
<?php
namespace App\Service;
use Symfony\Component\Console\Messenger\RunCommandMessage;
use Symfony\Component\Scheduler\Attribute\AsSchedule;
use Symfony\Component\Scheduler\RecurringMessage;
use Symfony\Component\Scheduler\Schedule;
use Symfony\Component\Scheduler\ScheduleProviderInterface;
#[AsSchedule]
class ScheduleProvider implements ScheduleProviderInterface
{
public function getSchedule(): Schedule
{
$schedule = new Schedule();
$schedule->add(RecurringMessage::cron('* * * * *', new RunCommandMessage('about')));
return $schedule;
}
}
```
```
<?php
namespace App\EventListener;
use Symfony\Component\Console\Messenger\RunCommandContext;
use Symfony\Component\EventDispatcher\Attribute\AsEventListener;
use Symfony\Component\Scheduler\Event\PostRunEvent;
#[AsEventListener(event: PostRunEvent::class, method: 'onMessage')]
class SchedulerListener
{
public function onMessage(PostRunEvent $event): void
{
$result = $event->getResult();
if ($result instanceof RunCommandContext) {
echo $result->output; //Log or store output somewhere
}
}
}
```
<!--
Replace this notice by a description of your feature/bugfix.
This will help reviewers and should be a good start for the documentation.
Additionally (see https://symfony.com/releases):
- Always add tests and ensure they pass.
- 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 the latest branch.
- For new features, provide some code snippets to help understand usage.
- Changelog entry should follow https://symfony.com/doc/current/contributing/code/conventions.html#writing-a-changelog-entry
- Never break backward compatibility (see https://symfony.com/bc).
-->
Commits
-------
306eeb6dd33 [Scheduler] Add MessageHandler result to the `PostRunEvent`
This PR was merged into the 7.3 branch.
Discussion
----------
[Scheduler] Normalize `TriggerInterface` as `string`
| Q | A
| ------------- | ---
| Branch? | 7.3
| Bug fix? | yes
| New feature? | yes
| Deprecations? | no
| Issues | Fix#53562
| License | MIT
Fix the issue with Scheduler & Serializer like `@kbond` described in https://github.com/symfony/symfony/issues/53562#issuecomment-2353228245.
Fixes the following error:
```
Could not decode stamp: The type of the "trigger" attribute for class "Symfony\Component\Scheduler\Generator\MessageContext" must be one of "Symfony\Component\Scheduler\Trigger\TriggerInterface" ("array" given).
```
Commits
-------
3aa47e0ada2 Normalize `TriggerInterface` as `string`