Skip to content

Commit d30a7d4

Browse files
committed
feature #3100 [Turbo] Remove deprecations for 3.0 (smnandre)
This PR was merged into the 3.x branch. Discussion ---------- [Turbo] Remove deprecations for 3.0 | Q | A | -------------- | --- | Bug fix? | no | New feature? | yes | Deprecations? | no | Documentation? | no | Issues | Fix #... | License | MIT src/Turbo/src/Bridge/Mercure/TurboStreamListenRenderer.php:39 ```php trigger_deprecation('symfony/ux-turbo', '2.9', 'Passing an instance of "%s" as second argument of "%s" is deprecated, pass an instance of "%s" instead.', StimulusTwigExtension::class, __CLASS__, StimulusHelper::class); ``` Commits ------- 67c299e [Turbo] Remove deprecations for 3.0
2 parents 0b8669f + 67c299e commit d30a7d4

File tree

2 files changed

+2
-12
lines changed

2 files changed

+2
-12
lines changed

src/Turbo/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
- Minimum required Symfony version is now 6.4
66
- Minimum required PHP version is now 8.2
7+
- Remove old compatibility layer with deprecated `StimulusTwigExtension` from WebpackEncoreBundle ^1.0, use StimulusBundle instead
78

89
## 2.30
910

src/Turbo/src/Bridge/Mercure/TurboStreamListenRenderer.php

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
use Symfony\UX\StimulusBundle\Helper\StimulusHelper;
1717
use Symfony\UX\Turbo\Broadcaster\IdAccessor;
1818
use Symfony\UX\Turbo\Twig\TurboStreamListenRendererWithOptionsInterface;
19-
use Symfony\WebpackEncoreBundle\Twig\StimulusTwigExtension;
2019
use Twig\Environment;
2120
use Twig\Error\RuntimeError;
2221

@@ -27,22 +26,12 @@
2726
*/
2827
final class TurboStreamListenRenderer implements TurboStreamListenRendererWithOptionsInterface
2928
{
30-
private StimulusHelper $stimulusHelper;
31-
3229
public function __construct(
3330
private HubInterface $hub,
34-
StimulusHelper|StimulusTwigExtension $stimulus,
31+
private StimulusHelper $stimulusHelper,
3532
private IdAccessor $idAccessor,
3633
private Environment $twig,
3734
) {
38-
if ($stimulus instanceof StimulusTwigExtension) {
39-
trigger_deprecation('symfony/ux-turbo', '2.9', 'Passing an instance of "%s" as second argument of "%s" is deprecated, pass an instance of "%s" instead.', StimulusTwigExtension::class, __CLASS__, StimulusHelper::class);
40-
41-
$stimulus = new StimulusHelper(null);
42-
}
43-
44-
/* @var StimulusHelper $stimulus */
45-
$this->stimulusHelper = $stimulus;
4635
}
4736

4837
public function renderTurboStreamListen(Environment $env, $topic /* array $eventSourceOptions = [] */): string

0 commit comments

Comments
 (0)