myparcelnl / woocommerce

MyParcel plug-in for WooCommerce
https://developer.myparcel.nl/nl/documentatie/10.woocommerce.html
MIT License
13 stars 22 forks source link

php fatal error #1201

Open adirkuhn opened 1 week ago

adirkuhn commented 1 week ago

MyParcel plugin version

5.0.0

WooCommerce version

9.4.2

WordPress version

6.7.1

PHP version

8.1.12

What went wrong?

I'm getting this fatal error when opening the plugin settings page:

[PDK]: MyParcelNL\WooCommerce\Pdk\Plugin\WcShippingMethodRepository::__construct(): Argument #1 ($wcShippingRepository) must be of type MyParcelNL\WooCommerce\WooCommerce\Contract\WcShippingRepositoryInterface, MyParcelNL\Pdk\Storage\MemoryCacheStorage given, called in /var/www/html/wp-content/plugins/woocommerce-myparcel/vendor/myparcelnl/pdk/.cache/CompiledContainer.php on line 1692

Reproduction steps

  1. Install the 5.0 plugin
  2. enable it
  3. go to settings page

Relevant log output

2024-11-26T22:29:03+00:00 Erro [PDK]: MyParcelNL\WooCommerce\Pdk\Plugin\WcShippingMethodRepository::__construct(): Argument #1 ($wcShippingRepository) must be of type MyParcelNL\WooCommerce\WooCommerce\Contract\WcShippingRepositoryInterface, MyParcelNL\Pdk\Storage\MemoryCacheStorage given, called in /var/www/html/wp-content/plugins/woocommerce-myparcel/vendor/myparcelnl/pdk/.cache/CompiledContainer.php on line 1692
{
    "trace": [
        {
            "file": "\/var\/www\/html\/wp-content\/plugins\/woocommerce-myparcel\/vendor\/myparcelnl\/pdk\/.cache\/CompiledContainer.php",
            "line": 1692,
            "function": "__construct",
            "class": "MyParcelNL\\WooCommerce\\Pdk\\Plugin\\WcShippingMethodRepository",
            "type": "->"
        },
        {
            "file": "\/var\/www\/html\/wp-content\/plugins\/woocommerce-myparcel\/vendor\/php-di\/php-di\/src\/CompiledContainer.php",
            "line": 52,
            "function": "get218",
            "class": "CompiledContainer",
            "type": "->"
        },
        {
            "file": "\/var\/www\/html\/wp-content\/plugins\/woocommerce-myparcel\/vendor\/myparcelnl\/pdk\/.cache\/CompiledContainer.php",
            "line": 808,
            "function": "get",
            "class": "_MyParcelNL\\DI\\CompiledContainer",
            "type": "->"
        },
        {
            "file": "\/var\/www\/html\/wp-content\/plugins\/woocommerce-myparcel\/vendor\/php-di\/php-di\/src\/CompiledContainer.php",
            "line": 52,
            "function": "get79",
            "class": "CompiledContainer",
            "type": "->"
        },
        {
            "file": "\/var\/www\/html\/wp-content\/plugins\/woocommerce-myparcel\/vendor\/php-di\/php-di\/src\/Definition\/Reference.php",
            "line": 45,
            "function": "get",
            "class": "_MyParcelNL\\DI\\CompiledContainer",
            "type": "->"
        },
        {
            "file": "\/var\/www\/html\/wp-content\/plugins\/woocommerce-myparcel\/vendor\/php-di\/php-di\/src\/Definition\/Resolver\/ResolverDispatcher.php",
            "line": 60,
            "function": "resolve",
            "class": "_MyParcelNL\\DI\\Definition\\Reference",
            "type": "->"
        },
        {
            "file": "\/var\/www\/html\/wp-content\/plugins\/woocommerce-myparcel\/vendor\/php-di\/php-di\/src\/Definition\/Resolver\/ParameterResolver.php",
            "line": 62,
            "function": "resolve",
            "class": "_MyParcelNL\\DI\\Definition\\Resolver\\ResolverDispatcher",
            "type": "->"
        },
        {
            "file": "\/var\/www\/html\/wp-content\/plugins\/woocommerce-myparcel\/vendor\/php-di\/php-di\/src\/Definition\/Resolver\/ObjectCreator.php",
            "line": 111,
            "function": "resolveParameters",
            "class": "_MyParcelNL\\DI\\Definition\\Resolver\\ParameterResolver",
            "type": "->"
        },
        {
            "file": "\/var\/www\/html\/wp-content\/plugins\/woocommerce-myparcel\/vendor\/php-di\/php-di\/src\/Definition\/Resolver\/ObjectCreator.php",
            "line": 62,
            "function": "createInstance",
            "class": "_MyParcelNL\\DI\\Definition\\Resolver\\ObjectCreator",
            "type": "->"
        },
        {
            "file": "\/var\/www\/html\/wp-content\/plugins\/woocommerce-myparcel\/vendor\/php-di\/php-di\/src\/Definition\/Resolver\/ResolverDispatcher.php",
            "line": 63,
            "function": "resolve",
            "class": "_MyParcelNL\\DI\\Definition\\Resolver\\ObjectCreator",
            "type": "->"
        },
        {
            "file": "\/var\/www\/html\/wp-content\/plugins\/woocommerce-myparcel\/vendor\/php-di\/php-di\/src\/Container.php",
            "line": 321,
            "function": "resolve",
            "class": "_MyParcelNL\\DI\\Definition\\Resolver\\ResolverDispatcher",
            "type": "->"
        },
        {
            "file": "\/var\/www\/html\/wp-content\/plugins\/woocommerce-myparcel\/vendor\/php-di\/php-di\/src\/Container.php",
            "line": 116,
            "function": "resolveDefinition",
            "class": "_MyParcelNL\\DI\\Container",
            "type": "->"
        },
        {
            "file": "\/var\/www\/html\/wp-content\/plugins\/woocommerce-myparcel\/vendor\/php-di\/php-di\/src\/CompiledContainer.php",
            "line": 60,
            "function": "get",
            "class": "_MyParcelNL\\DI\\Container",
            "type": "->"
        },
        {
            "file": "\/var\/www\/html\/wp-content\/plugins\/woocommerce-myparcel\/vendor\/myparcelnl\/pdk\/src\/Base\/Pdk.php",
            "line": 60,
            "function": "get",
            "class": "_MyParcelNL\\DI\\CompiledContainer",
            "type": "->"
        },
        {
            "file": "\/var\/www\/html\/wp-content\/plugins\/woocommerce-myparcel\/vendor\/myparcelnl\/pdk\/src\/Base\/Facade.php",
            "line": 25,
            "function": "get",
            "class": "MyParcelNL\\Pdk\\Base\\Pdk",
            "type": "->"
        },
        {
            "file": "\/var\/www\/html\/wp-content\/plugins\/woocommerce-myparcel\/vendor\/myparcelnl\/pdk\/src\/Context\/Model\/PluginSettingsViewContext.php",
            "line": 40,
            "function": "__callStatic",
            "class": "MyParcelNL\\Pdk\\Base\\Facade",
            "type": "::"
        },
        {
            "file": "\/var\/www\/html\/wp-content\/plugins\/woocommerce-myparcel\/vendor\/myparcelnl\/pdk\/src\/Context\/Service\/ContextService.php",
            "line": 77,
            "function": "__construct",
            "class": "MyParcelNL\\Pdk\\Context\\Model\\PluginSettingsViewContext",
            "type": "->"
        },
        {
            "file": "\/var\/www\/html\/wp-content\/plugins\/woocommerce-myparcel\/vendor\/myparcelnl\/pdk\/src\/Context\/Service\/ContextService.php",
            "line": 131,
            "function": "createPluginSettingsViewContext",
            "class": "MyParcelNL\\Pdk\\Context\\Service\\ContextService",
            "type": "->"
        },
        {
            "file": "\/var\/www\/html\/wp-content\/plugins\/woocommerce-myparcel\/vendor\/myparcelnl\/pdk\/src\/Context\/Service\/ContextService.php",
            "line": 44,
            "function": "resolveContext",
            "class": "MyParcelNL\\Pdk\\Context\\Service\\ContextService",
            "type": "->"
        },
        {
            "function": "MyParcelNL\\Pdk\\Context\\Service\\{closure}",
            "class": "MyParcelNL\\Pdk\\Context\\Service\\ContextService",
            "type": "->"
        },
        {
            "file": "\/var\/www\/html\/wp-content\/plugins\/woocommerce-myparcel\/vendor\/myparcelnl\/pdk\/src\/Context\/Service\/ContextService.php",
            "line": 46,
            "function": "array_reduce"
        },
        {
            "file": "\/var\/www\/html\/wp-content\/plugins\/woocommerce-myparcel\/vendor\/myparcelnl\/pdk\/src\/Frontend\/Service\/FrontendRenderService.php",
            "line": 213,
            "function": "createContexts",
            "class": "MyParcelNL\\Pdk\\Context\\Service\\ContextService",
            "type": "->"
        },
        {
            "file": "\/var\/www\/html\/wp-content\/plugins\/woocommerce-myparcel\/vendor\/myparcelnl\/pdk\/src\/Frontend\/Service\/FrontendRenderService.php",
            "line": 200,
            "function": "renderTemplate",
            "class": "MyParcelNL\\Pdk\\Frontend\\Service\\FrontendRenderService",
            "type": "->"
        },
        {
            "file": "\/var\/www\/html\/wp-content\/plugins\/woocommerce-myparcel\/vendor\/myparcelnl\/pdk\/src\/Frontend\/Service\/FrontendRenderService.php",
            "line": 148,
            "function": "renderComponent",
            "class": "MyParcelNL\\Pdk\\Frontend\\Service\\FrontendRenderService",
            "type": "->"
        },
        {
            "file": "\/var\/www\/html\/wp-content\/plugins\/woocommerce-myparcel\/vendor\/myparcelnl\/pdk\/src\/Base\/Facade.php",
            "line": 25,
            "function": "renderPluginSettings",
            "class": "MyParcelNL\\Pdk\\Frontend\\Service\\FrontendRenderService",
            "type": "->"
        },
        {
            "file": "\/var\/www\/html\/wp-content\/plugins\/woocommerce-myparcel\/src\/Pdk\/Hooks\/PdkPluginSettingsHooks.php",
            "line": 54,
            "function": "__callStatic",
            "class": "MyParcelNL\\Pdk\\Base\\Facade",
            "type": "::"
        },
        {
            "file": "\/var\/www\/html\/wp-includes\/class-wp-hook.php",
            "line": 324,
            "function": "renderPdkPluginSettings",
            "class": "MyParcelNL\\WooCommerce\\Pdk\\Hooks\\PdkPluginSettingsHooks",
            "type": "->"
        },
        {
            "file": "\/var\/www\/html\/wp-includes\/class-wp-hook.php",
            "line": 348,
            "function": "apply_filters",
            "class": "WP_Hook",
            "type": "->"
        },
        {
            "file": "\/var\/www\/html\/wp-includes\/plugin.php",
            "line": 517,
            "function": "do_action",
            "class": "WP_Hook",
            "type": "->"
        },
        {
            "file": "\/var\/www\/html\/wp-admin\/admin.php",
            "line": 259,
            "function": "do_action"
        }
    ],
    "template": "<div data-pdk-context=\"__CONTEXT__\" id=\"__ID__\"><\/div>\n<script id=\"__ID__-script\">\n  (() => {\n    var e = '__EVENT_PONG__';\n    var listener = function (event) {\n      event.detail.render('__COMPONENT__', '#__ID__');\n      document.getElementById('__ID__-script').remove();\n      document.removeEventListener(e, listener);\n    };\n\n    document.addEventListener(e, listener);\n    document.dispatchEvent(new Event('__EVENT_PING__'));\n  })();\n<\/script>\n",
    "contexts": [
        "pluginSettingsView"
    ],
    "templateParameters": {
        "__ID__": "pdk-plugin-settings-1628336174",
        "__COMPONENT__": "PluginSettings",
        "__EVENT_PING__": "myparcel_pdk_ping",
        "__EVENT_PONG__": "myparcel_pdk_pong"
    },
    "contextArguments": []
}

Additional context

No response