Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove laminas/laminas-dependency-plugin dependency #36495

Conversation

hostep
Copy link
Contributor

@hostep hostep commented Nov 19, 2022

Description (*)

This PR removes the laminas/laminas-dependency-plugin composer plugin.
The plugin was introduced in #26436 and its purpose is described as follows on their homepage:

This Composer plugin, when enabled in a project, intercepts requests to install packages from the zendframework and zfcampus vendors, and will replace them with the equivalents from the Laminas Project.

Reason why I think we should get rid of this, is that I'm currently unable to use a modern version of composer to install dependencies on the 2.4-develop branch:

$ composer --version
Composer version 2.4.4 2022-10-27 14:39:29

$ composer install
Installing dependencies from lock file (including require-dev)
Verifying lock file contents can be installed on current platform.
In Laminas\DependencyPlugin\DependencyRewriterV2::onPrePoolCreate
Your lock file does not contain a compatible set of packages. Please run composer update.

  Problem 1
    - laminas/laminas-dependency-plugin is locked to version 2.5.0 and an update of this package was not requested.
    - laminas/laminas-dependency-plugin 2.5.0 requires composer-plugin-api >=1.1.0 <2.3.0 -> found composer-plugin-api[2.3.0] but it does not match the constraint.

Which was a restriction added to that plugin in laminas/laminas-dependency-plugin@54d508a

I believe that after 2 years since Magento switched from Zend to Laminas, that this plugin is not really necessary anymore, most people will have gotten used to the Laminas components by now and should install those instead of the old Zend ones.

// cc @ihor-sviziev

Related Pull Requests

Fixed Issues (if relevant)

None that I know of

Manual testing scenarios (*)

  1. Use composer 2.3.x or 2.4.x
  2. Try to run composer install without getting errors

Questions or comments

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • README.md files for modified modules are updated and included in the pull request if any README.md predefined sections require an update
  • All automated tests passed successfully (all builds are green)

Resolved issues:

  1. resolves [Issue] Remove laminas/laminas-dependency-plugin dependency #36515: Remove laminas/laminas-dependency-plugin dependency
  2. resolves Unable to install Magento with Composer version 2.4.4 #36516: Unable to install Magento with Composer version 2.4.4

@m2-assistant
Copy link

m2-assistant bot commented Nov 19, 2022

Hi @hostep. Thank you for your contribution
Here are some useful tips how you can test your changes using Magento test environment.
Add the comment under your pull request to deploy test or vanilla Magento instance:

  • @magento give me test instance - deploy test instance based on PR changes
  • @magento give me 2.4-develop instance - deploy vanilla Magento instance

❗ Automated tests can be triggered manually with an appropriate comment:

  • @magento run all tests - run or re-run all required tests against the PR changes
  • @magento run <test-build(s)> - run or re-run specific test build(s)
    For example: @magento run Unit Tests

<test-build(s)> is a comma-separated list of build names. Allowed build names are:

  1. Database Compare
  2. Functional Tests CE
  3. Functional Tests EE,
  4. Functional Tests B2B
  5. Integration Tests
  6. Magento Health Index
  7. Sample Data Tests CE
  8. Sample Data Tests EE
  9. Sample Data Tests B2B
  10. Static Tests
  11. Unit Tests
  12. WebAPI Tests
  13. Semantic Version Checker

You can find more information about the builds here

ℹ️ Run only required test builds during development. Run all test builds before sending your pull request for review.

For more details, review the Magento Contributor Guide documentation.

⚠️ According to the Magento Contribution requirements, all Pull Requests must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.

🕙 You can find the schedule on the Magento Community Calendar page.

📞 The triage of Pull Requests happens in the queue order. If you want to speed up the delivery of your contribution, join the Community Contributions Triage session to discuss the appropriate ticket.

✏️ Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel

@hostep
Copy link
Contributor Author

hostep commented Nov 19, 2022

@magento run all tests

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

@hostep
Copy link
Contributor Author

hostep commented Nov 19, 2022

Failing tests don't seem to have anything to do with the changes in this PR.

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

1 similar comment
@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

@ihor-sviziev
Copy link
Contributor

As to me it fully make sense to remove this plugin as part of platform health project.
/CC @sidolov @andrewbess

@engcom-Hotel engcom-Hotel added the Priority: P2 A defect with this priority could have functionality issues which are not to expectations. label Nov 22, 2022
@m2-community-project m2-community-project bot removed this from Ready for Testing in Pull Requests Dashboard Nov 22, 2022
@hostep hostep force-pushed the remove-laminas-dependency-plugin branch from fb3bcc3 to f81e6cd Compare November 23, 2022 06:56
@hostep
Copy link
Contributor Author

hostep commented Nov 23, 2022

Rebased on latest 2.4-develop, because conflicts were introduced recently by e11b3bc

I'm afraid this will keep happening if the composer files are being updated all the time. The maintainers here have my permission to fix conflicts themselves in this PR during my holiday period (end November till end December).

@magento run all tests

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

@engcom-Lima
Copy link
Contributor

✔️ QA Passed

Preconditions:

  • Install fresh Magento 2.4-develop

Manual testing scenario:

  1. Use composer 2.4.x.
  2. Run composer install without getting errors.

Before: ✖️
Screenshot 2022-11-23 at 4 16 35 PM

After: ✔️
Screenshot 2022-11-23 at 4 53 38 PM

No additional manual test case is required as part of regression.

Builds are failed , hence, moving it to extended testing.

@engcom-Lima engcom-Lima moved this from Testing in Progress to Extended Testing (optional) in High Priority Pull Requests Dashboard Nov 23, 2022
@engcom-Lima
Copy link
Contributor

@magento create issue

@engcom-Echo
Copy link
Contributor

@magento run Integration Tests, Functional Tests EE, Functional Tests B2B

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

@engcom-Echo
Copy link
Contributor

@magento run Functional Tests EE

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

3 similar comments
@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

@engcom-Echo
Copy link
Contributor

@magento run Functional Tests B2B, Functional Tests EE

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

@engcom-Echo
Copy link
Contributor

@magento run Adobe CLA Signed?

@magento-automated-testing
Copy link

Failed to run the builds. Please try to re-run them later.

@engcom-Echo
Copy link
Contributor

@magento run Adobe CLA Signed?

@magento-automated-testing
Copy link

Failed to run the builds. Please try to re-run them later.

@engcom-Echo engcom-Echo moved this from Extended Testing (optional) to Merge in Progress in High Priority Pull Requests Dashboard Nov 24, 2022
@magento-devops-reposync-svc magento-devops-reposync-svc merged commit b51bf75 into magento:2.4-develop Dec 3, 2022
@ishakhsuvarov ishakhsuvarov moved this from Merge in Progress to Recently Merged in High Priority Pull Requests Dashboard Dec 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Progress: accept
Projects
None yet
6 participants