- Removed support for Sylius 1.12
- Added support for Sylius 2.0 and 2.1
- PHP 8.2+ required
- Symfony 6.4+ or 7.3+ required
src/Twig/AvailabilityExtension.phpsrc/Twig/AvailabilityRuntime.php
templates/_javascript.html.twigtemplates/_addSubscription.html.twigtemplates/productSubscriptionForm.html.twigtemplates/_configurableButton.html.twig
src/Twig/Component/AddNotificationComponent.php- LiveComponent replacing old Twig extensionsrc/Factory/SubscriptionFactory.phpsrc/Processor/SubscriptionProcessor.php
namespace Webgriffe\SyliusBackInStockNotificationPlugin\Controller;
final class SubscriptionController extends AbstractController
{
public function __construct(
- private ChannelContextInterface $channelContext,
private TranslatorInterface $translator,
- private CustomerContextInterface $customerContext,
- private AvailabilityCheckerInterface $availabilityChecker,
- private ProductVariantRepositoryInterface $productVariantRepository,
- private SenderInterface $sender,
- private LocaleContextInterface $localeContext,
private SubscriptionRepositoryInterface $backInStockNotificationRepository,
- private FactoryInterface $backInStockNotificationFactory,
) {
} namespace Webgriffe\SyliusBackInStockNotificationPlugin\Command;
- use Symfony\Component\Console\Command\Command;
+ use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Command\Command;
- final class AlertCommand extends Command
+ #[AsCommand(
+ name: 'webgriffe:back-in-stock-notification:alert',
+ description: 'Send an email to the user if the product is returned in stock',
+ )]
+ final class AlertCommand extends Command
{
- protected function configure(): void
- {
- $this
- ->setName('webgriffe:back-in-stock-notification:alert')
- ->setDescription('Send an email to the user if the product is returned in stock');
- }
}JavaScript file assets/shop/back-in-stock-notification.js has been removed. The plugin now uses LiveComponent architecture where form handling and interactions are managed directly by the AddNotificationComponent instead of external JavaScript files.