Problem/Motivation

A dependency of Upgrade Status is in conflict with a dependency of Search API Solr.

PHP: 8.3
Drupal: 10.2.2
Upgrade Status: 4.0.0

Steps to reproduce

PHP: 8.3
Drupal: 10.2.2
Upgrade Status: 4.0.0

root@6704b3679ca8:/project# composer require drupal/search_api_solr:^4.3
./composer.json has been updated
Running composer update drupal/search_api_solr
> DrupalProject\composer\ScriptHandler::checkComposerVersion
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - laminas/laminas-stdlib[3.2.0, ..., 3.2.1] require php ^5.6 || ^7.0 -> your php version (8.3; overridden via config.platform, same as actual) does not satisfy that requirement.
    - laminas/laminas-stdlib[3.6.0, ..., 3.11.x-dev] require php ^7.3 || ~8.0.0 || ~8.1.0 -> your php version (8.3; overridden via config.platform, same as actual) does not satisfy that requirement.
    - laminas/laminas-stdlib[3.12.0, ..., 3.13.x-dev] require php ^7.4 || ~8.0.0 || ~8.1.0 -> your php version (8.3; overridden via config.platform, same as actual) does not satisfy that requirement.
    - laminas/laminas-stdlib[3.14.0, ..., 3.16.x-dev] require php ~8.0.0 || ~8.1.0 || ~8.2.0 -> your php version (8.3; overridden via config.platform, same as actual) does not satisfy that requirement.
    - laminas/laminas-stdlib[3.17.0, ..., 3.17.x-dev] require php ~8.1.0 || ~8.2.0 -> your php version (8.3; overridden via config.platform, same as actual) does not satisfy that requirement.
    - drupal/search_api_solr[4.3.0-alpha1, ..., 4.x-dev] require laminas/laminas-stdlib ^3.2 -> satisfiable by laminas/laminas-stdlib[3.2.0, ..., 3.20.x-dev].
    - laminas/laminas-stdlib[3.5.0, ..., 3.20.x-dev] conflict with zendframework/zend-stdlib *.
    - laminas/laminas-stdlib[3.2.0, ..., 3.4.0] cannot be installed as that would require removing zendframework/zend-stdlib[2.7.4]. laminas/laminas-stdlib replaces zendframework/zend-stdlib and thus cannot coexist with it.
    - zendframework/zend-text 2.5.1 requires zendframework/zend-stdlib ~2.5 -> satisfiable by zendframework/zend-stdlib[2.7.4].
    - mathieuviossat/arraytotexttable v1.0.7 requires zendframework/zend-text ^2.0.3 -> satisfiable by zendframework/zend-text[2.5.1].
    - drupal/upgrade_status 4.0.0 requires mathieuviossat/arraytotexttable ~1.0.0 -> satisfiable by mathieuviossat/arraytotexttable[v1.0.7].
    - drupal/upgrade_status is locked to version 4.0.0 and an update of this package was not requested.
    - Root composer.json requires drupal/search_api_solr ^4.3 -> satisfiable by drupal/search_api_solr[4.3.0-alpha1, ..., 4.x-dev].

Search API Solr 4.x requires "laminas/laminas-stdlib": "^3.2"

Upgrade Status 4.0.0 requires "mathieuviossat/arraytotexttable": "~1.0.0", which requires zendframework/[stuff] which is conflicting with laminas.

Proposed resolution

Update mathieuviossat/arraytotexttable package dependencies so a new release of this package could be made.

Maybe this is the fix from the PR: https://github.com/viossat/arraytotexttable/pull/9

Remaining tasks

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

Grimreaper created an issue. See original summary.

grimreaper’s picture

Assigned: Unassigned » grimreaper
gábor hojtsy’s picture

Thanks for the report. Looks like this requires third party fixes.

grimreaper’s picture

Assigned: grimreaper » Unassigned
Status: Active » Closed (works as designed)

Unrelated to Upgrade Status.

It is mathieuviossat/arraytotexttable not compatible with PHP 8.3, so not the latest version is downloaded so conflict between zend and laminas.

I made a PR on Github: https://github.com/viossat/arraytotexttable/pull/11

grimreaper’s picture

Status: Closed (works as designed) » Active

In my case I was stucked with mathieuviossat/arraytotexttable 1.0.7, while latest version is 1.0.10.

PS: I missed comment #3 while posting comment 4, so I don't know if the issue should be kept opened for information.

gábor hojtsy’s picture

grimreaper’s picture

PR merged and new version of mathieuviossat/arraytotexttable available! \o/

But problem somewhere else. I tracked it down:

- drupal/core-recommended 10.2.3 requires psr/container (~2.0.2).
- Which prevents laminas/laminas-servicemanager to be installed on version >3.22.0 (PHP 8.3 compat). (because it needs psr/container 1)
- Which prevents laminas/laminas-text to be installed on version >2.11.0 (PHP 8.3 compat).
- Which prevents mathieuviossat/arraytotexttable to be installed on the latest version.

I do not copy/past composer output here for readability.

grimreaper’s picture

The problem is that Major version 4 of laminas/laminas-servicemanager is not marked as PHP 8.3 compatible... Because major version 4 of laminas/laminas-servicemanager is psr/container 2 compatible.

Edit: the dev branch of 4.0.x is PHP 8.3 compatible. https://github.com/laminas/laminas-servicemanager/blob/4.0.x/composer.js...

So it "just" needs a new release of laminas/laminas-servicemanager...

gábor hojtsy’s picture

It is unfortunate that https://github.com/laminas/laminas-servicemanager/blob/4.0.0-rc2/compose... also does not yet support PHP 8.3. Would a 4.0.0-rc3 of servicemanager help? https://github.com/laminas/laminas-servicemanager/commits/4.0.x/ seems to not have much else since rc2. An issue there to request an RC3 would probably be worth it / helpful :)

gábor hojtsy’s picture

Also Drupal core requires psr container 2 since Drupal 10.0. So looks like the combo of that and PHP 8.3 is causing problems? In #3395725: [PHP 8.2] Composer - Upgrade Status conflicts with core 10.1.5 it is also claimed that this already causes problems on PHP 8.2.

gábor hojtsy’s picture

Title: Composer conflict prevents search_api_solr to be installed » laminas/laminas-servicemanager not having a PHP 8.3 compatible release causes compatibility problems

The latest laminas-text from https://github.com/laminas/laminas-text/blob/2.11.0/composer.json did support PHP 8.3.0, so this seems to be down to laminas/laminas-servicemanager not having a PHP 8.3 compatible release.

gábor hojtsy’s picture

Title: laminas/laminas-servicemanager not having a PHP 8.3 compatible release causes compatibility problems » Dependency tree of mathieuviossat/arraytotexttable causes compatibility issues with PHP 8.2 and 8.3

Ok after various trials in a gitpod instance I figured its probably best to go with a text table generator that has much less dependencies. We only use the whole thing in one place after all :D So we can replace with a more lightweight solution like https://packagist.org/packages/dekor/php-array-table

gábor hojtsy’s picture

Status: Active » Needs review

With this MR on drupalpod, I can verify the new dependency is used:

gitpod /workspace/DrupalPod (main) $ composer show drupal/upgrade_status
Notice: running 'composer show drupal/upgrade_status' in ddev
name     : drupal/upgrade_status
descrip. : Review Drupal major upgrade readiness of the environment and components of the site.
keywords : 
versions : * 4.x-dev
type     : drupal-module
license  : GNU General Public License v2.0 or later (GPL-2.0-or-later) (OSI approved) https://spdx.org/licenses/GPL-2.0-or-later.html#licenseText
homepage : http://drupal.org/project/upgrade_status
source   : []  
dist     : [path] repos/upgrade_status 8e9851b3b4666d8c3f2a1d699a04cf8dfe75f582
path     : /var/www/html/repos/upgrade_status
names    : drupal/upgrade_status

requires
dekor/php-array-table ^2.0
mglaman/phpstan-drupal ^1.0.0
nikic/php-parser ^4.0.0
phpstan/phpstan-deprecation-rules ^1.0.0
symfony/process ^3.4|^4.0|^5.0|^6.0
webflo/drupal-finder ^1.2

I can require Search API Solr on top of this without issue:

gitpod /workspace/DrupalPod (main) $ composer require drupal/search_api_solr
Notice: running 'composer require drupal/search_api_solr' in ddev
./composer.json has been updated
Running composer update drupal/search_api_solr
Loading composer repositories with package information
Updating dependencies
Lock file operations: 6 installs, 0 updates, 0 removals
  - Locking drupal/search_api (1.31.0)
  - Locking drupal/search_api_solr (4.3.2)
  - Locking halaxa/json-machine (1.1.4)
  - Locking laminas/laminas-stdlib (3.19.0)
  - Locking maennchen/zipstream-php (3.1.0)
  - Locking solarium/solarium (6.3.5)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 6 installs, 0 updates, 0 removals
  - Downloading halaxa/json-machine (1.1.4)
  - Downloading solarium/solarium (6.3.5)
  - Downloading maennchen/zipstream-php (3.1.0)
  - Downloading laminas/laminas-stdlib (3.19.0)
  - Downloading drupal/search_api (1.31.0)
  - Downloading drupal/search_api_solr (4.3.2)
  - Installing halaxa/json-machine (1.1.4): Extracting archive
  - Installing solarium/solarium (6.3.5): Extracting archive
  - Installing maennchen/zipstream-php (3.1.0): Extracting archive
  - Installing laminas/laminas-stdlib (3.19.0): Extracting archive
  - Installing drupal/search_api (1.31.0): Extracting archive
  - Installing drupal/search_api_solr (4.3.2): Extracting archive
7 package suggestions were added by new dependencies, use `composer suggest` to see details.
Generating autoload files
95 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
PHP CodeSniffer Config installed_paths set to ../../drupal/coder/coder_sniffer,../../sirbrillig/phpcs-variable-analysis,../../slevomat/coding-standard,vendor/drupal/coder/coder_sniffer
phpstan/extension-installer: Extensions installed
> repos/add-project-as-symlink.sh
Replace project with a symlink
No security vulnerability advisories found.
Using version ^4.3 for drupal/search_api_solr

The text to table conversion is as good as before:

gitpod /workspace/DrupalPod (main) $ drush upgrade_status:analyze admin_toolbar
Notice: running 'drush upgrade_status:analyze admin_toolbar' in ddev
 [notice] Processing /var/www/html/web/modules/contrib/admin_toolbar.

================================================================================
Admin Toolbar,  3.4.2
Scanned on Wed, 02/21/2024 - 10:39

FILE: web/modules/contrib/admin_toolbar/admin_toolbar_search/src/SearchLinks.php

STATUS         LINE                           MESSAGE                           
--------------------------------------------------------------------------------
Check manually 123  Relying on entity queries to check access by default is     
                    deprecated in drupal:9.2.0 and an error will be thrown from 
                    drupal:10.0.0. Call                                         
                    \Drupal\Core\Entity\Query\QueryInterface::accessCheck() with
                    TRUE or FALSE to specify whether access should be checked.  
--------------------------------------------------------------------------------

FILE:
web/modules/contrib/admin_toolbar/admin_toolbar_tools/src/Plugin/Derivative/Extr
aLinks.php

STATUS         LINE                           MESSAGE                           
--------------------------------------------------------------------------------
Check manually 114  Relying on entity queries to check access by default is     
                    deprecated in drupal:9.2.0 and an error will be thrown from 
                    drupal:10.0.0. Call                                         
                    \Drupal\Core\Entity\Query\QueryInterface::accessCheck() with
                    TRUE or FALSE to specify whether access should be checked.  
--------------------------------------------------------------------------------

FILE:
web/modules/contrib/admin_toolbar/admin_toolbar_search/admin_toolbar_search.modu
le

STATUS         LINE                           MESSAGE                           
--------------------------------------------------------------------------------
Check manually 76   The 'admin_toolbar_search/search' library is not defined    
                    because the defining extension is not installed. Cannot     
                    decide if it is deprecated or not.                          
--------------------------------------------------------------------------------
Check manually 120  The 'admin_toolbar_search/search' library is not defined    
                    because the defining extension is not installed. Cannot     
                    decide if it is deprecated or not.                          
--------------------------------------------------------------------------------

FILE: web/modules/contrib/admin_toolbar/admin_toolbar.info.yml

STATUS         LINE                           MESSAGE                           
--------------------------------------------------------------------------------
Check manually 0    Value of core_version_requirement: ^9.2 || ^10 is not       
                    compatible with the next major version of Drupal core. See  
                    https://drupal.org/node/3070687.                            
--------------------------------------------------------------------------------

FILE:
web/modules/contrib/admin_toolbar/admin_toolbar_links_access_filter/admin_toolba
r_links_access_filter.info.yml

STATUS         LINE                           MESSAGE                           
--------------------------------------------------------------------------------
Check manually 0    Value of core_version_requirement: ^9.2 || ^10 is not       
                    compatible with the next major version of Drupal core. See  
                    https://drupal.org/node/3070687.                            
--------------------------------------------------------------------------------

FILE:
web/modules/contrib/admin_toolbar/admin_toolbar_search/admin_toolbar_search.info
.yml

STATUS         LINE                           MESSAGE                           
--------------------------------------------------------------------------------
Check manually 0    Value of core_version_requirement: ^9.2 || ^10 is not       
                    compatible with the next major version of Drupal core. See  
                    https://drupal.org/node/3070687.                            
--------------------------------------------------------------------------------

FILE:
web/modules/contrib/admin_toolbar/admin_toolbar_tools/admin_toolbar_tools.info.y
ml

STATUS         LINE                           MESSAGE                           
--------------------------------------------------------------------------------
Check manually 0    Value of core_version_requirement: ^9.2 || ^10 is not       
                    compatible with the next major version of Drupal core. See  
                    https://drupal.org/node/3070687.                            
--------------------------------------------------------------------------------

Look good?

gábor hojtsy’s picture

Carrying credits from #3395725: [PHP 8.2] Composer - Upgrade Status conflicts with core 10.1.5 now that this resolves that too.

gábor hojtsy’s picture

gábor hojtsy’s picture

And applying credits for #3414198: Upgrade Status 4.0.0 is not compatible with D10 upgrade which is also a duplicate.

gábor hojtsy’s picture

#3409983: Add support for PHP 8.2 was also a duplicate but credits are already here.

  • Gábor Hojtsy committed 8a10bb7a on 4.x
    Issue #3419115 by Gábor Hojtsy, Grimreaper, nsavitsky, PapaGrande,...
gábor hojtsy’s picture

Status: Needs review » Fixed

Added tests prove this works on PHP 8.3 and will ensure this keeps working on PHP 8.3. Thanks all for your effort and sorry this took so much time! Enjoy!

grimreaper’s picture

Hi,

Thanks a lot!

I confirm that now I can add Search API Solr. Composer automatically took dev version of Upgrade Status for compatibility.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.