Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[FrameworkBundle] Fix registration of the Scheduler component #49731

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 19, 2023

Conversation

fabpot
Copy link
Member

@fabpot fabpot commented Mar 19, 2023

Q A
Branch? 6.3
Bug fix? yes
New feature? no
Deprecations? no
Tickets n/a
License MIT
Doc PR n/a

@@ -1614,7 +1614,7 @@ private function addSchedulerSection(ArrayNodeDefinition $rootNode, callable $en
->children()
->arrayNode('scheduler')
->info('Scheduler configuration')
->{$enableIfStandalone('symfony/scheduler', SchedulerTransportFactory::class)}()
->{$enableIfStandalone('symfony/scheduler', Schedule::class)}()
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to use a class that has no dependencies on other components.
Here, if we require Scheduler without Messenger, you will get a PHP error.

if (!interface_exists(MessageBusInterface::class)) {
throw new LogicException('Scheduler support cannot be enabled as the Messenger component is not installed. Try running "composer require symfony/messenger".');
}

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not needed as already done line 536.

{
return $this->lock ?? new NoLock();
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lock is an optional dep.

@fabpot fabpot force-pushed the scheduler-wiring-fix branch from 47a83de to 251ed12 Compare March 19, 2023 15:01
@fabpot fabpot merged commit 7fc526e into symfony:6.3 Mar 19, 2023
@fabpot fabpot deleted the scheduler-wiring-fix branch March 19, 2023 15:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.