6.3
Name already in use
Commits on Mar 17, 2023
-
bug #49690 [WebProfilerBundle] replace helper with _self in serialize…
…r.html.twig (k0d3r1s) This PR was merged into the 6.3 branch. Discussion ---------- [WebProfilerBundle] replace helper with _self in serializer.html.twig | Q | A | ------------- | --- | Branch? | 6.3 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Fix #49686 | License | MIT While waiting for reply, here is a fix for bug in #49686. As`helper` was removed, now `_self` must be used, these looks like forgotten places Commits ------- b27aab9 [WebProfilerBundle] replace helper with _self in serializer.html.twig
-
minor #49716 [Scheduler] Fix some minor bugs (fabpot)
This PR was merged into the 6.3 branch. Discussion ---------- [Scheduler] Fix some minor bugs | Q | A | ------------- | --- | Branch? | 6.3 | Bug fix? | yes | New feature? | no <!-- please update src/**/CHANGELOG.md files --> | Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Tickets | n/a | License | MIT | Doc PR | n/a Commits ------- 9fc7cf5 [Scheduler] Fix some minor bugs
-
minor #49695 [Notifier] Add "retry" and "expire" options to Pushover …
…bridge (vlepeule) This PR was squashed before being merged into the 6.3 branch. Discussion ---------- [Notifier] Add "retry" and "expire" options to Pushover bridge | Q | A | ------------- | --- | Branch? | 6.3 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | - | License | MIT | Doc PR | - Add "retry" and "expire" options to handle "Emergency Priority", according to [Pushover API documentation](https://pushover.net/api#priority) : > To send an emergency-priority notification, the priority parameter must be set to 2 and the retry and expire parameters must be supplied. Commits ------- 2feabc6 [Notifier] Add "retry" and "expire" options to Pushover bridge
-
minor #49717 [Scheduler] Remove unused variable in AddScheduleMesseng…
…erPass (onEXHovia) This PR was merged into the 6.3 branch. Discussion ---------- [Scheduler] Remove unused variable in AddScheduleMessengerPass | Q | A | ------------- | --- | Branch? | 6.3 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | n/a | License | MIT | Doc PR | n/a Commits ------- 09df772 [Scheduler] Remove unused variable in AddScheduleMessengerPass
-
* 6.2: explicitly set the HTTP method override option to false
-
-
minor #49715 [FrameworkBundle] explicitly set the HTTP method overrid…
…e option to false (xabbuh) This PR was merged into the 6.2 branch. Discussion ---------- [FrameworkBundle] explicitly set the HTTP method override option to false | Q | A | ------------- | --- | Branch? | 6.2 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | | License | MIT | Doc PR | Commits ------- 489f9ca explicitly set the HTTP method override option to false
-
Commits on Mar 16, 2023
-
feature #47112 [Messenger] Add a scheduler component (upyx, fabpot)
This PR was merged into the 6.3 branch. Discussion ---------- [Messenger] Add a scheduler component | Q | A | ------------- | --- | Branch? | 6.3 | Bug fix? | no | New feature? | yes | Deprecations? | no | Tickets | no | License | MIT | Doc PR | TBD ### Introdution There is no easy way to schedule periodical tasks. There are few useful tools which I touched: - https://github.com/Guikingone/SchedulerBundle - https://github.com/Cron/Symfony-Bundle - https://github.com/zenstruck/schedule-bundle - https://github.com/lavary/crunz They are complicated. They doesn't allow to set time with precision in seconds (at least it isn't easy). They require difficult tricks to set not linear periods (like on sunset in Tokyo). ~They are~ Part of them inefficient with infrequent tasks because resources are needed on every run (e.g. Kubernetes [CronJob](https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/) creates and destroes an entire container). ### Proposal I use a custom transport of Messenger that **generates** messages periodically. It's a simple solution to run periodical jobs without external software. It's especially helpful in environments where additional runners are impossible or very painful (like Kubernetes). Configuration is very flexible and accurate, it's possible to configure any rules when to run or not to run. Compared to `crond`: there is no need to install something external, precision of schedule in microseconds instead of *minutes*, it's possible to set any periods. #### Simple example ```yaml # messenger.yaml framework: messenger: transports: schedule_default: 'schedule://default' ``` Few types of messages: ```php class SomeJob {} class OtherJob {} ``` A handlers: ```php #[AsMessageHandler] class SomeJobHandler { public function __invoke(SomeJob $job) { // do job or delegate it to other service } } #[AsMessageHandler] class OtherJobHandler { public function __invoke(OtherJob $job) { // do job or delegate it to other service } } ``` A schedules are provided by locators. It's possible to create many locators and/or provide many schedules by the same locator: ```php class ExampleLocator implements ScheduleLocatorInterface { public function get(string $id): ScheduleConfig { // once after an hour from now $deferForAnHour = new \DatePeriod( new \DateTimeImmutable('now'), new \DateInterval('PT1H'), 1, \DatePeriod::EXCLUDE_START_DATE ); return (new ScheduleConfig()) ->add(new OnceTrigger(new \DateTimeImmutable()), new WarmUpJob()) // once on every worker's start ->add(PeriodicalTrigger::create('P1D', '2022-01-01T03:00:00Z'), new SomeJob()) // every night at 3 a.m. (UTC) ->add(PeriodicalTrigger::fromPeriod($deferForAnHour), new OtherJob()) ; } public function has(string $id): bool { return 'default' === $id; } } ``` To run schedule: ```sh bin/console messenger:consume schedule_default ``` It's easy to run jobs manually: ```php #[AsCommand(name: 'some', description: 'Manually runs SomeJob')] class SomeCommand extends Command { public function __construct(private MessageBusInterface $bus) { } protected function execute(InputInterface $input, OutputInterface $output): int { $this->bus->dispatch(new SomeJob()); } } ``` #### Example with returning a result ```php class GoodJob { public function __construct(public readonly ?LoggerInterface $logger) { } } ``` ```php #[AsMessageHandler] class GoodHandler { public function __construct(private readonly LoggerInterface $logger) { } public function __invoke(GoodJob $job){ // compute $result ($job->logger ?? $this->logger)->info('The result is: {result}', ['result' => $result]) } } ``` ```php #[AsCommand(name: 'job', description: 'Manually runs job')] class SomeCommand extends Command { public function __construct(private MessageBusInterface $bus) { } protected function execute(InputInterface $input, OutputInterface $output): int { $this->bus->dispatch(new GoodJob(new ConsoleLogger($output))); // result will be printed in console } } ``` #### Configuring A minimal configuration: ```yaml # messenger.yaml framework: messenger: transports: schedule_default: 'schedule://default' ``` More complex example: ```yaml # messenger.yaml framework: messenger: transports: schedule_default: dsn: 'schedule://default' options: cache: 'app.cache' lock: 'default' ``` Example HA configuration with redis: ```yaml framework: cache: default_redis_provider: '%env(REDIS_DSN)%' lock: redis: '%env(REDIS_DSN)%' messenger: transports: schedule_default: dsn: 'schedule://default' options: cache: 'cache.redis' lock: resource: 'redis' ttl: 60 auto_release: true ``` ### Deprecations None ### Implementation This PR contains an implementation. ### ToDo - [x] Remove obsolete code - [x] Add a configuration to the Framework - [x] Specialize exceptions and improve messages - [x] Cover with tests - [ ] Add acceptance tests for HA - [x] Fix `CHANGELOG`s & `README`s - [ ] Add documentation Commits ------- a18127b [Scheduler] Rework the component 6d9311f Add the Scheduler component
-
minor #49707 [ErrorHandler] Fixed tests (lyrixx)
This PR was merged into the 6.3 branch. Discussion ---------- [ErrorHandler] Fixed tests | Q | A | ------------- | --- | Branch? | 6.3 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | | License | MIT | Doc PR | Commits ------- bb8b73e [ErrorHandler] Fixed tests
-
-
minor #49676 [Config] Improve performance of GlobResource (nicolas-gr…
…ekas) This PR was merged into the 6.3 branch. Discussion ---------- [Config] Improve performance of GlobResource | Q | A | ------------- | --- | Branch? | 6.3 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | Fix #49668 | License | MIT | Doc PR | - When using an extended glob pattern that contains `/**/`, we skip using the native `glob()` function and we fallback to using the Finder component. For a pattern like `./{apps,src}/**/*Controller.php`, the way finder works in `GlobResource` is that we list all files *recursively* in the directory before the pattern starts (`./` here) and we filter the paths using a regexp. This PR ensures that we scan only the `apps` and `src` directories when presented with such a pattern. Commits ------- 1771262 [Config] Improve performance of GlobResource
-
minor #49694 [Validator] Add PHPDoc void return types (mbuliard)
This PR was merged into the 6.3 branch. Discussion ---------- [Validator] Add PHPDoc void return types | Q | A | ------------- | --- | Branch? | 6.3 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | contribution to #47551 | License | MIT | Doc PR | - Add missing void PHPdoc return types for the Validator component Commits ------- e70241d [Validator] Add PHPDoc void return types
-
feature #49691 [FrameworkBundle] Add scoped httplug clients and depre…
…cate httplugs use like psr18 client (simonberger) This PR was squashed before being merged into the 6.3 branch. Discussion ---------- [FrameworkBundle] Add scoped httplug clients and deprecate httplugs use like psr18 client | Q | A | ------------- | --- | Branch? | 6.3 | Bug fix? | no | New feature? | yes | Deprecations? | yes | Tickets | Fix #49644 | License | MIT | Doc PR | symfony/symfony-docs#18064 This MR does 2 closely related things to try to fully integrate the HttplugClient with the unique features it brings and on the other hand deprecate its use like a psr18 client which it is in a pending deprecation state since a long time. - Added a new services `httplug.http_client` and alias `Http\Client\HttpAsyncClient` to inject the the `HttplugClient`. - Make the available service `Http\Client\HttpClient` a deprecated alias of it - Create httplug.<scoped_client_id> services for all scoped clients like it is done with the psr18 ClientInterface Commits ------- 20ab567 [FrameworkBundle] Add scoped httplug clients and deprecate httplugs use like psr18 client
-
[FrameworkBundle] Add scoped httplug clients and deprecate httplugs u…
…se like psr18 client
-
-
-
bug #49696 Fix DI logic when mailer is available but webhook is not (…
…fabpot) This PR was merged into the 6.3 branch. Discussion ---------- Fix DI logic when mailer is available but webhook is not | Q | A | ------------- | --- | Branch? | 6.3 | Bug fix? | yes | New feature? | no <!-- please update src/**/CHANGELOG.md files --> | Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Tickets | n/a | License | MIT | Doc PR | n/a Commits ------- 80cb3f5 Fix DI logic when mailer is available but webhook is not
-
Commits on Mar 15, 2023
-
-
feature #48542 [Webhook][RemoteEvent] Add the components (fabpot)
This PR was squashed before being merged into the 6.3 branch. Discussion ---------- [Webhook][RemoteEvent] Add the components | Q | A | ------------- | --- | Branch? | 6.3 | Bug fix? | no | New feature? | yes <!-- 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 exists, explain below instead --> | License | MIT | Doc PR | n/a See my keynote slide about this here: https://speakerdeck.com/fabpot/symfonycon-2022-keynote-webhooks Video from SymfonyCon Disneyland Paris https://live.symfony.com/account/replay/video/669 Commits ------- e51a2b1 [Webhook][RemoteEvent] Add the components
-
Commits on Mar 14, 2023
-
minor #49684 [DependencyInjection] Use weak references in ContainerBu…
…ilder (nicolas-grekas) This PR was merged into the 6.3 branch. Discussion ---------- [DependencyInjection] Use weak references in ContainerBuilder | Q | A | ------------- | --- | Branch? | 6.3 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | - | License | MIT | Doc PR | - Same as #48469 for ContainerBuilder. Commits ------- 749d4b9 [DependencyInjection] Use weak references in ContainerBuilder
-
minor #49683 [DependencyInjection] Generalize and simplify parsing of…
… autowiring attributes (nicolas-grekas) This PR was merged into the 6.3 branch. Discussion ---------- [DependencyInjection] Generalize and simplify parsing of autowiring attributes | Q | A | ------------- | --- | Branch? | 6.3 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | - | License | MIT | Doc PR | - This PR generalizes the relationship between the `Autowire` and the `TypedReference` classes, allowing to nest them inside each others (as supported already), but without loosing information in the process. It also removes the `AutowiringFailedException` currently thrown when encountering unknown attributes, to respect the declarative nature of attributes. Commits ------- e154659 [DependencyInjection] Generalize and simplify parsing of autowiring attributes
-
* 6.2: Fix some Composer keywords Fix some Composer keywords Fix some Composer keywords
-
-
-
-
* 6.2: Fix some Composer keywords [FrameworkBundle] Rename limiter’s `strategy` to `policy` in XSD [VarDumper] Fixed dumping of CutStub Fix test Change limit argument from string to integer. [Messenger] Fix `evaluate()` calls in `WorkerTest` [Mailer] STDOUT blocks infinitely under Windows when STDERR is filled