Skip to content

bin/magento setup:upgrade error when use composer install --no-dev #36351

@rogerdz

Description

@rogerdz

Preconditions and environment

  • 2.4-develop with sample data.

Steps to reproduce

  1. Disable Sample data using command : bin/magento module:disable Magento_SampleData
  2. Run composer install --no-dev
  3. Run bin/magento indexer:reindex
  4. Check the debug log.

Expected result

No error

Actual result

Error: There is an error in /var/www/html/magento2/lib/internal/Magento/Framework/Api/SearchCriteria/CollectionProcessor/FilterProcessor.php at line: 143
Call to undefined function Magento\Framework\Api\SearchCriteria\CollectionProcessor\array_first()

Additional information

  • Function array_first is declared in composer dev package weew/helpers-array.
  • In production environment, I think no need install composer dev packages, so the code should not depend on these packages.

Release note

No response

Triage and priority

  • Severity: S0 - Affects critical data or functionality and leaves users without workaround.
  • Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
  • Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
  • Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
  • Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.

Metadata

Metadata

Assignees

Labels

Area: PerformanceComponent: SetupIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedPriority: P1Once P0 defects have been fixed, a defect having this priority is the next candidate for fixing.Progress: doneReported on 2.4.xIndicates original Magento version for the Issue report.Reproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branch

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions