xelaris
Repos
24
Followers
6
Following
1

Events

pull request closed
Fix api regression in filterInput by accepting null

Although the parameter to withQuery is supposed to be a string, according to php doc, before version 6.8.0 a null value was accepted implicitly. Other libraries like spatie/url-signer relied on that behavior. Although it already got fixed for spatie/url-signer in https://github.com/spatie/url-signer/pull/38, it might be good to keep the previous behavior to not break other dependent libraries.

Created at 1 week ago
issue comment
Fix api regression in filterInput by accepting null

@nyamsprod thank you for the quick feedback. Your reasoning makes sense to me. Let's close this PR then.

Created at 1 week ago
pull request opened
Fix api regression in filterInput by accepting null

Although the parameter to withQuery is supposed to be a string, according to php doc, before version 6.8.0 a null value was accepted implicitly. Other libraries like spatie/url-signer relied on that behavior. Although it already got fixed for spatie/url-signer in https://github.com/spatie/url-signer/pull/38, it might be good to keep the previous behavior to not break other dependent libraries.

Created at 1 week ago

Fix api regression in filterInput by accepting null

Created at 1 week ago
create branch
xelaris create branch bugfix/filter-null-input
Created at 1 week ago
Created at 1 week ago
Container exception if SwiftMailerBundle is installed but not loaded

SyliusMailerBundle version affected: 1.8.0

Description
Upgrading from 1.7.0. to 1.8.0 causes the following error:

In CheckExceptionOnInvalidReferenceBehaviorPass.php line 86: The service "sylius.email_sender.adapter.swiftmailer" has a dependency on a non-existent service "swiftmailer.mailer.default".

Version 1.8.0 decides, wether to remove or not remove the sylius.email_sender.adapter.swiftmailer service, by leveraging ContainerBuilder::willBeAvailable, which checks for the package to be installed, but not if the bundle is actually loaded.

We are using a custom sender adapter, which doesn't rely on SwiftMailer, thus the SwiftMailerBundle isn't loaded in the application. Although swiftmailer/swiftmailer and symfony/swiftmailer-bundle are installed as a transitive dependency of Sylius (1.11.7).

Hence sylius.email_sender.adapter.swiftmailer ends up in the container, while the dependency swiftmailer.mailer.default doesn't.

Steps to reproduce
Upgrade to sylius/mailer-bundle 1.8.0 in a Sylius 1.11.7 application, without having the SwiftMailerBundle loaded (no entry in bundles.php).

Possible Solution
Checking if the SwiftmailerBundle is actually loaded, would do the trick, although I'm not sure if it's possible at that point within the SyliusMailerExtension (maybe at least the order within bundles.php would matter?).

As a workaround we are adding "conflict": { "sylius/mailer-bundle": "^1.8.0" } to composer.json.

Created at 2 weeks ago