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

Commit 7fc526e

Browse filesBrowse files
committed
bug #49731 [FrameworkBundle] Fix registration of the Scheduler component (fabpot)
This PR was squashed before being merged into the 6.3 branch. Discussion ---------- [FrameworkBundle] Fix registration of the Scheduler component | 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 ------- 251ed12 [Scheduler] Fix usage without a Lock 313644f [FrameworkBundle] Fix registration of the Scheduler component
2 parents ecd57a6 + 251ed12 commit 7fc526e
Copy full SHA for 7fc526e

File tree

Expand file treeCollapse file tree

3 files changed

+4
-9
lines changed
Filter options
Expand file treeCollapse file tree

3 files changed

+4
-9
lines changed

‎src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
use Symfony\Component\PropertyInfo\PropertyInfoExtractorInterface;
3838
use Symfony\Component\RateLimiter\Policy\TokenBucketLimiter;
3939
use Symfony\Component\RemoteEvent\RemoteEvent;
40-
use Symfony\Component\Scheduler\Messenger\SchedulerTransportFactory;
40+
use Symfony\Component\Scheduler\Schedule;
4141
use Symfony\Component\Semaphore\Semaphore;
4242
use Symfony\Component\Serializer\Serializer;
4343
use Symfony\Component\Translation\Translator;
@@ -1614,7 +1614,7 @@ private function addSchedulerSection(ArrayNodeDefinition $rootNode, callable $en
16141614
->children()
16151615
->arrayNode('scheduler')
16161616
->info('Scheduler configuration')
1617-
->{$enableIfStandalone('symfony/scheduler', SchedulerTransportFactory::class)}()
1617+
->{$enableIfStandalone('symfony/scheduler', Schedule::class)}()
16181618
->end()
16191619
->end()
16201620
;

‎src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php
-4Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2015,10 +2015,6 @@ private function registerSchedulerConfiguration(array $config, ContainerBuilder
20152015
throw new LogicException('Scheduler support cannot be enabled as the Scheduler component is not installed. Try running "composer require symfony/scheduler".');
20162016
}
20172017

2018-
if (!interface_exists(MessageBusInterface::class)) {
2019-
throw new LogicException('Scheduler support cannot be enabled as the Messenger component is not installed. Try running "composer require symfony/messenger".');
2020-
}
2021-
20222018
$loader->load('scheduler.php');
20232019
}
20242020

‎src/Symfony/Component/Scheduler/Schedule.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Scheduler/Schedule.php
+2-3Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
namespace Symfony\Component\Scheduler;
1313

1414
use Symfony\Component\Lock\LockInterface;
15-
use Symfony\Component\Lock\NoLock;
1615
use Symfony\Contracts\Cache\CacheInterface;
1716

1817
/**
@@ -46,9 +45,9 @@ public function lock(LockInterface $lock): static
4645
return $this;
4746
}
4847

49-
public function getLock(): LockInterface
48+
public function getLock(): ?LockInterface
5049
{
51-
return $this->lock ?? new NoLock();
50+
return $this->lock;
5251
}
5352

5453
/**

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.