Open bkline opened 4 years ago
Can second this. Just came across this myself when running a fresh install of Drupal 9 and installing Drupal Console.
Same here .. fresh d9 install + drupal console .. hit on this error while rebuilding caches
Same here, i temporary remove code at line vendor/drupal/console/src/Utils/DrupalApi.php:266
$kernel->prepareLegacyRequest($request);
Drupal console work for now but need official update.
Same problem here. The workaround of @flashvnn seems to fix it.
Same here: Drupal Console 1.9.5, Drupal Core 9.0.7
I had the same error, but running drupal site:mode dev with Drupal Console version 1.9.7 and Drupal core 9.0.3. The workaround of @flashvnn seems to fix it for me too.
I'm also having the same issue with Drupal 9.1.0 and Drupal Console 1.9.7.
Same Drupal 9.1.0 Drupal Console 1.9.7 What's up with this ?
Same with Drupal Core 9.1.2 , Drupal Console 1.79.7.
Same with Drupal Core 9.1.3, 1.9.7
DrupalKernelInterface::prepareLegacyRequest.
Deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. Use DrupalKernel::boot() and DrupalKernel::preHandle() instead.
Same here, i temporary remove code at line vendor/drupal/console/src/Utils/DrupalApi.php:266
$kernel->prepareLegacyRequest($request);
Drupal console work for now but need official update.
@flashvnn This did work for me on latest drupal 9 version.
go to vendor/drupal/console/src/Utils/DrupalApi.php
uncomment somehwere around line 265:
// Prepare a NULL request.
// $kernel->prepareLegacyRequest($request);
prepareLegacyRequest(Request $request)
didn't solve the issue.
NOTE:
drupal cr
works but installing a module like so drupal moi
doesn't work. It's a solution but not the best out there!
It looks like there's more deprecated functions in the Drupal console codebase.
For fixing the drupal cr
command you need to replace the line 266 (the one with the prepareLegacyRequest()
call with following lines:
$kernel->boot();
$kernel->preHandle($request);
There is also a PR for this, it's #4269
To fix the drupal moi
command replace the line 178 (the one with the system_rebuild_module_data()
call) in the src/Command/Shared/ProjectDownloadTrait.php
with following:
$moduleList = \Drupal::service("extension.list.module")->getList();
It looks like there's more deprecated functions in the Drupal console codebase.
For fixing the
drupal cr
command you need to replace the line 266 (the one with theprepareLegacyRequest()
call with following lines:$kernel->boot(); $kernel->preHandle($request);
There is also a PR for this, it's #4269
To fix the
drupal moi
command replace the line 178 (the one with thesystem_rebuild_module_data()
call) in thesrc/Command/Shared/ProjectDownloadTrait.php
with following:$moduleList = \Drupal::service("extension.list.module")->getList();
Alright this works, great work!
Thanks, PR #4269 fixes that error! But why it is not merged yet almost year already?
Would be great to see this one getting fixed and closed...
@MurzNN
... why it is not merged yet almost year already?
Because the project has been abandoned?
The PR has been approved but no news on this 😔
@jmolivas (creator of drupal-console
) last responded in the #drupal-console
Slack channel November 30 of last year, so I'd say it's a pretty good guess that this project is dead. ⚰️
last responded in the
#drupal-console
Slack channel
Pretty strange to base yourself on the Drupal slack channel. To check if a repository is active or "dead".
The last commit on the repo here was on 15th of september (https://github.com/hechoendrupal/drupal-console/commit/b95700736df39b09c39e7a43d4cc2822147db621).
@jmolivas is not the only maintainer. So saying this project is "dead" is a bold statement to make...
I do believe this project could use a few extra active maintainers that could work on clearing the queue and bring this project back up to speed.
Those are the current maintainers, maybe try poking some of them as well.
https://github.com/orgs/hechoendrupal/people
~The https://github.com/simonf7/drupal-console seems further from this repo.~
The https://github.com/simonf7/drupal-console seems further from this repo.
No, those are commits for a merge request: https://github.com/hechoendrupal/drupal-console/pull/4321
The https://github.com/simonf7/drupal-console seems further from this repo.
No, those are commits for a merge request: #4321
Oh, ok. My bad.
If this project isn't dead, it's showing all the signs of being in a coma. 😉
Problem/Motivation
The issue was filed because clearing the Drupal cache is an essential part of a Drupal developer's workday.
How to reproduce
Here are the steps which led to the failure.
../vendor/bin/drupal deco ...
../vendor/bin/drupal cr
Solution
Rewrite calls to undefined methods.