Skip to content

Commit a60f7d6

Browse files
committed
feature #3101 [Vue] Remove deprecations for 3.0 (smnandre)
This PR was merged into the 3.x branch. Discussion ---------- [Vue] Remove deprecations for 3.0 | Q | A | -------------- | --- | Bug fix? | no | New feature? | yes <!-- please update src/**/CHANGELOG.md files --> | Deprecations? | no <!-- if yes, also update UPGRADE-*.md and src/**/CHANGELOG.md --> | Documentation? | no <!-- required for new features, or documentation updates --> | Issues | Fix #... <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead --> | License | MIT src/Vue/src/Twig/VueComponentExtension.php:35 ```php trigger_deprecation('symfony/ux-vue', '2.9', 'Passing an instance of "%s" to "%s" is deprecated, pass an instance of "%s" instead.', StimulusTwigExtension::class, __CLASS__, StimulusHelper::class); ``` Commits ------- 9d43a96 [Vue] Remove deprecations for 3.0
2 parents f55fe9c + 9d43a96 commit a60f7d6

File tree

2 files changed

+2
-13
lines changed

2 files changed

+2
-13
lines changed

src/Vue/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/Vue/src/Twig/VueComponentExtension.php

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
namespace Symfony\UX\Vue\Twig;
1313

1414
use Symfony\UX\StimulusBundle\Helper\StimulusHelper;
15-
use Symfony\WebpackEncoreBundle\Twig\StimulusTwigExtension;
1615
use Twig\Extension\AbstractExtension;
1716
use Twig\TwigFunction;
1817

@@ -24,19 +23,8 @@
2423
*/
2524
class VueComponentExtension extends AbstractExtension
2625
{
27-
private $stimulusHelper;
28-
29-
/**
30-
* @param $stimulus StimulusHelper
31-
*/
32-
public function __construct(StimulusHelper|StimulusTwigExtension $stimulus)
26+
public function __construct(private StimulusHelper $stimulusHelper)
3327
{
34-
if ($stimulus instanceof StimulusTwigExtension) {
35-
trigger_deprecation('symfony/ux-vue', '2.9', 'Passing an instance of "%s" to "%s" is deprecated, pass an instance of "%s" instead.', StimulusTwigExtension::class, __CLASS__, StimulusHelper::class);
36-
$stimulus = new StimulusHelper(null);
37-
}
38-
39-
$this->stimulusHelper = $stimulus;
4028
}
4129

4230
public function getFunctions(): array

0 commit comments

Comments
 (0)