Hi,
I installed the module on Drupal 8.9.1 via composer and cannot activate it. The message:
Upgrade Status should be used on a Drupal 8 site to detect deprecated APIs present. It does not in itself know about deprecated APIs and Drupal 9 does not have Drupal 8's deprecated APIs anymore.
Any idea how to fix it?
Comments
Comment #2
isalmanhaider commentedFollowing!
I am on Drupal 8.9.1 installed upgrade_status through composer, but when I try to enable I get this error
"Error message Upgrade Status should be used on a Drupal 8 site to detect deprecated APIs present. It does not in itself know about deprecated APIs and Drupal 9 does not have Drupal 8's deprecated APIs anymore."Comment #3
isalmanhaider commentedhttps://www.drupal.org/files/issues/2020-06-18/3152276.patch
Comment #4
greatmatter commentedThat patch only duplicates the problem code...I think...
Comment #5
onejam commentedI ran into the same problem. After installing Status Upgrade module 2.8 via composer, i am not able to enable this module. Tried the patch #3 but doesn't fix it. I'm also running Drupal 8.9.1
Comment #6
superfedya commentedThis patch is already installed in the last version, doesn't work.
Comment #7
RedPlanet commentedHello, I have the same problem with version 2.8 installed by composer, Drupal is on version 8.8.8.
The patch from message #3 did not work, any other ideas?
Comment #8
mmjvb commentedif (version_compare('9.0.0', \Drupal::VERSION) >= 0) {should read
if (version_compare('9.0.0', \Drupal::VERSION) < 0) {or
if (version_compare(\Drupal::VERSION, '9.0.0' ) >= 0) {EDIT
My mistake, error should be provided in case of 9.0.0 or higher
if (version_compare('9.0.0', \Drupal::VERSION) < 1) {or
if (version_compare('9.0.0', \Drupal::VERSION) <= 0) {as written in the patch
Comment #9
mmjvb commentedConsidering you can't use the module on the intended version of Drupal, set to major.
Comment #10
gábor hojtsyOops. I wonder how can our automated testing install it on 8.9?
Comment #11
gábor hojtsySo as per https://www.php.net/manual/en/function.version-compare.php
So
if (version_compare('9.0.0', \Drupal::VERSION) >= 0) {Is indeed entirely wrong as an error condition. It would fire if the version would be supported but also for 9.0.0. It should be <=.
Comment #12
gábor hojtsyComment #14
gábor hojtsyComment #15
gábor hojtsyReleased https://www.drupal.org/project/upgrade_status/releases/8.x-2.9. So sorry for this mistake. Hope it all works now.
Comment #16
gábor hojtsyBackstory at https://twitter.com/gaborhojtsy/status/1274414707617783808?s=19 :)
Comment #17
mmjvb commentedStill wrong in my opinion. Would allow install on 9.0.0 !
Comment #18
gábor hojtsyHm why? Returns 0 if they are equal no?
Comment #19
mmjvb commentedIndeed, equal returns 0. My understanding is you don't want it on 9.0.0. Which means < 0, not <= 0.
Comment #20
gábor hojtsyNo. Using the project on any version of Drupal 9 would return a very misleading and limited result set. People should use this project on Drupal 8. Yes I could also make it incompatible with Drupal 9 with composer but that does not make it impossible for people to get it from the tarball and/or complain that they wanted to install but got a generic Drupal / composer message. This is the only way to give specific actionable guidance to people who try to use it on the wrong Drupal major version.
Comment #21
mmjvb commentedMy bad. Was convinced it was wrong, but I stand corrected. Thanks and sorry for the inconvenience.
Comment #22
gábor hojtsyIt's fine, thanks for reporting the original problem :)
Comment #23
terismikilis commentedI had the same problem, but now installing it without problem! thanks for fixing it! :)