apigee / apigee-devportal-kickstart-drupal

A fast demo and starting point for Apigee Developer Portals for Drupal
https://www.drupal.org/project/apigee_devportal_kickstart
GNU General Public License v2.0
26 stars 34 forks source link

Getting Type Error trying to install monolog module #564

Closed vvenning-lb closed 2 years ago

vvenning-lb commented 2 years ago

Description

A clear and concise description of what the bug is.

Error when trying to install the monolog 2.0 module on apigee kickstart on Drupal 9,4.1, PHP 7.4.25

Steps to Reproduce

Steps to reproduce the behavior:

Go to docroot of project. Get monolog using composer 'composer require 'drupal/monolog:^2.0'' Login as admin

  1. Go to '/admin/modules'
  2. Type 'monolog' in search
  3. Select and click 'install'

Actual Behavior

What happened after the steps to reproduce.

The website encountered an unexpected error. Please try again later. TypeError: Argument 2 passed to Drupal\apigee_edge\ParamConverter\DeveloperAppNameConverter::__construct() must implement interface Drupal\Core\Logger\LoggerChannelInterface, instance of Monolog\Logger given, called in /var/www/html/web/core/lib/Drupal/Component/DependencyInjection/Container.php on line 263 in Drupal\apigee_edge\ParamConverter\DeveloperAppNameConverter->construct() (line 60 of modules/contrib/apigee_edge/src/ParamConverter/DeveloperAppNameConverter.php). Drupal\apigee_edge\ParamConverter\DeveloperAppNameConverter->construct(Object, Object) (Line: 263) Drupal\Component\DependencyInjection\Container->createService(Array, 'paramconverter.developer_app_name') (Line: 176) Drupal\Component\DependencyInjection\Container->get('paramconverter.developer_app_name', 1) (Line: 438) Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters(Array) (Line: 277) Drupal\Component\DependencyInjection\Container->createService(Array, 'paramconverter_manager') (Line: 176) Drupal\Component\DependencyInjection\Container->get('paramconverter_manager', 1) (Line: 438) Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters(Array) (Line: 240) Drupal\Component\DependencyInjection\Container->createService(Array, 'access_manager') (Line: 176) Drupal\Component\DependencyInjection\Container->get('access_manager', 1) (Line: 438) Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters(Array) (Line: 240) Drupal\Component\DependencyInjection\Container->createService(Array, 'plugin.manager.menu.local_action') (Line: 176) Drupal\Component\DependencyInjection\Container->get('plugin.manager.menu.local_action', 1) (Line: 438) Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters(Array) (Line: 277) Drupal\Component\DependencyInjection\Container->createService(Array, 'plugin.cache_clearer') (Line: 176) Drupal\Component\DependencyInjection\Container->get('plugin.cache_clearer') (Line: 270) Drupal\Core\Extension\ModuleInstaller->install(Array, 1) (Line: 83) Drupal\Core\ProxyClass\Extension\ModuleInstaller->install(Array) (Line: 502) Drupal\system\Form\ModulesListForm->submitForm(Array, Object) call_user_func_array(Array, Array) (Line: 114) Drupal\Core\Form\FormSubmitter->executeSubmitHandlers(Array, Object) (Line: 52) Drupal\Core\Form\FormSubmitter->doSubmitForm(Array, Object) (Line: 592) Drupal\Core\Form\FormBuilder->processForm('system_modules', Array, Object) (Line: 320) Drupal\Core\Form\FormBuilder->buildForm(Object, Object) (Line: 73) Drupal\Core\Controller\FormController->getContentResult(Object, Object) call_user_func_array(Array, Array) (Line: 123) Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber{closure}() (Line: 564) Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124) Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97) Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber{closure}() (Line: 158) Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 80) Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 58) Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48) Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 106) Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85) Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 48) Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51) Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23) Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 709) Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

Expected Behavior

A clear and concise description of what you expected to happen.

The monolg module installs, and can be configured

Screenshots

If applicable, add screenshots to help explain your problem.

image

Notes

Add any other context about the problem here.

Version Info

This can be the version you can see on admin/modules in Drupal or the output of this command: composer show. Add Drupal core and other version information if needed.

image

shishir-intelli commented 2 years ago

Hi @vvenning-lb, It seems that the Monolog module is not compatible with Drupal's core LoggerChannel Interface. We are using Drupal\Core\Logger\LoggerChannelInterface for logging. Reference : https://www.drupal.org/project/monolog/issues/2749859

shishir-intelli commented 2 years ago

@vvenning-lb, Closing this issue for now, please feel free to reopen if you need any further help.