Comments (5)
You have to insert the setContainer-Call in the Resources/config/services/controllers.xml like this:
<service id="Adyen\Shopware\Storefront\Controller\NotificationReceiverController">
<argument type="service" id="Adyen\Shopware\Service\NotificationReceiverService"/>
<call method="setContainer">
<argument type="service" id="service_container"/>
</call>
<tag name="controller.service_arguments"/>
</service>
from adyen-shopware6.
me or the plugin? :-)
from adyen-shopware6.
adyen of course, but now you have a workaround. ;-)
from adyen-shopware6.
Thanks a lot. Workaround is working, a new plugin release would be nice.
from adyen-shopware6.
If you don't want to touch the plugin, you can also fix this in your own plugin (e.g. theme) via a compiler pass:
<?php
declare(strict_types=1);
namespace MyPlugin\DependencyInjection;
/**
* Add potentially missing method call to set the container for a controller
*/
class AdyenCompilerPass implements \Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface
{
/**
* @inheritDoc
*/
public function process(\Symfony\Component\DependencyInjection\ContainerBuilder $container)
{
$class = 'Adyen\\Shopware\\Storefront\\Controller\\NotificationReceiverController';
if (!$container->has($class)) {
return;
}
$definition = $container->getDefinition($class);
if (!$definition->hasMethodCall('setContainer')) {
$definition->addMethodCall(
'setContainer',
[new \Symfony\Component\DependencyInjection\Reference('service_container')]
);
}
}
}
The compiler pass must then be registered in your plugin class:
<?php
declare(strict_types=1);
namespace MyPlugin;
use Shopware\Core\Framework\Plugin;
use Shopware\Storefront\Framework\ThemeInterface;
use Shopware\Core\Framework\Plugin\Context\UpdateContext;
use Shopware\Core\System\CustomField\CustomFieldTypes;
/**
* Plugin class
*/
class MyPlugin extends Plugin
{
/**
* @inheritDoc
*/
public function build(\Symfony\Component\DependencyInjection\ContainerBuilder $container): void
{
// Call parent method first.
parent::build($container);
// Add compiler pass to fix controller in the Adyen plugin.
$container->addCompilerPass(new \MyPlugin\DependencyInjection\AdyenCompilerPass());
}
}
from adyen-shopware6.
Related Issues (20)
- Adyens monolog version crashes with standard vendors monolog version HOT 4
- Various properties in FrontendProxyController do not use the Abstract* version but the constructor does HOT 4
- Headless sales channel - webhooks cannot be used HOT 1
- [ECP-8841] AbstractPaymentMethodHandler breaks the payment flow in Shopware checkout HOT 4
- Shopware 6.5.2.1 - Installation and activation are failing HOT 2
- [ECP-8840] "origin" is used from "additionalData" instead of the root property. HOT 2
- [ECP-8842] AbstractPaymentMethodHandler - Might result in TypeError upon adding the product URL $isOpenInvoice=true HOT 1
- [ECP-8628] From version 3.12.1 the plugin is no longer compatible with Shopware 6.4.*, although composer.json says "shopware/core": "^6.4.0.0" HOT 1
- [ECP-8839] CheckoutStateDataValidator is deprecated and should not be used anymore HOT 1
- Critical error when configuration is empty HOT 1
- [ECP-8904] Reinstallation flow not working HOT 1
- [ECP-8713] Building assets of Administration and Storefront without a Database HOT 8
- Implement log rotate HOT 1
- [ECP-8838] NS_BINDING_ABORTED on cancel paypal payment. HOT 1
- [ECP-8832] CartPlugin already registered HOT 10
- [ECP-8886] Improvement - Card component reset's after selecting shipping method HOT 1
- [ECP-9094] Easy way to change API settings depending on order data, e.g. depending on the products HOT 3
- [ECP-8915] AbstractPaymentMethodHandler NullPointer Exception for Products without Category/Categories HOT 1
- [ECP-9027]Incorrect Composer Version Constraints: Plugin is Not Compatible With SW Versions Older Than 6.4.15.0 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from adyen-shopware6.