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 deprecated HttpHeadActionInterface class #35201

Open
wants to merge 3 commits into
base: 2.4-develop
Choose a base branch
from

Conversation

markshust
Copy link
Contributor

Description (*)

The HttpHeadActionInterface interface has been deprecated and is no longer used. The HttpGetActionInterface interface extends this interface; rather, it should extend the base ActionInterface. The HttpHeadActionInterface interface is not used anywhere else in Magento's code.

Related Pull Requests

N/A

Fixed Issues (if relevant)

N/A

Manual testing scenarios (*)

  1. Standard GET and HEAD requests should be tested throughout Magento.

Questions or comments

  • Are there any negatives to removing the HttpHeadActionInterface interface?

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)

@m2-assistant
Copy link

m2-assistant bot commented Mar 16, 2022

Hi @markshust. 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

@sdzhepa sdzhepa added the Priority: P3 May be fixed according to the position in the backlog. label Mar 17, 2022
@ihor-sviziev
Copy link
Contributor

Hi @markshust,
I think the only negative for removing any class is backward compatibility, so technically, we can remove it only in next major version
I believe tests will show it
@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.

@markshust
Copy link
Contributor Author

@ihor-sviziev understood. How can we view the details of the failed tests? I'm getting timeouts when trying to check them out, so I'm not sure what is failing.

@nuzil
Copy link
Contributor

nuzil commented Apr 6, 2022

Hey @markshust
Semantic are failed cause of removed interface, can you put it back?

Functional here:
https://public-results-storage-prod.magento-testing-service.engineering/reports/magento/magento2/pull/35201/8a1bf864c0eeeafc04745c0f4a07033b/Functional/allure-report-ce/index.html#suites/c1b8c59972484588326cae5ed68f8997/b9f65ca517ff6259/

I assume failing is not related to changes

@manavluhar
Copy link
Contributor

@markshust @ihor-sviziev @nuzil
According to me, for now we should keep HttpHeadActionInterface and proceed with updating HttpGetActionInterface

@@ -1,21 +0,0 @@
<?php
/**
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@markshust Can we please have this file back?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@manavluhar @nuzil the whole point of this ticket was to remove this file, as it is deprecated, only used in one spot, and shouldn't be causing failing tests. I'm unsure why someone would want to keep this file around.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@markshust backward compatibility, @nuzil can add further.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought that's what SemVer and the patch releases are for. How long will cruft like this build up if we never have plans to remove it?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got your point @markshust, let the maintainer review it.

@engcom-Lima
Copy link
Contributor

Hi @markshust

Thanks for your contribution and collaboration.

There are conflicts in the file, could you please resolve the conflicts so that we can proceed further with this PR?

Thanks

@engcom-Lima engcom-Lima added the Triage: Dev.Experience Issue related to Developer Experience and needs help with Triage to Confirm or Reject it label Sep 4, 2023
@engcom-Dash
Copy link
Contributor

Closing this PR since it has not been updated for a long time. Please feel free to reopen it if needed.

@markshust
Copy link
Contributor Author

markshust commented Dec 27, 2024

I don't believe there are or were any conflicts with this PR? It's a simple deletion and change of an interface implementation.

The whole point of this PR was that this line was marking the HttpHeadActionInterface as deprecated, per https://github.com/magento/magento2/blob/2.4-develop/lib/internal/Magento/Framework/App/Action/HttpHeadActionInterface.php#L16

@deprecated 102.0.2 Both GET and HEAD requests map to HttpGetActionInterface

Is there a process in place to:

  1. refactor any/all deprecated classes, and
  2. introduce a code change that no longer depends on deprecated implementations?

I think it's totally ok if this change breaks (many) builds, because it's flagged as deprecated. This change doesn't really technically do much, if anything, so it seems silly to merge it in. However, tickets like this play to the exact purpose and usage of deprecated docblocks/annotations for the entire framework.

Does @deprecated mean anything, or should this deprecation annotation be removed?

@ihor-sviziev ihor-sviziev reopened this Dec 27, 2024
Copy link

m2-assistant bot commented Dec 27, 2024

Hi @markshust. Thank you for your contribution!
Here are some useful tips on how you can test your changes using Magento test environment.
❗ 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 Code Contributions documentation.
Join Magento Community Engineering Slack and ask your questions in #github channel.

@ihor-sviziev
Copy link
Contributor

ihor-sviziev commented Dec 27, 2024

@markshust
I just re-opened this PR, resolved conflicts, and approved. I'm not sure why @engcom-Lima wasn't able to do that himself.

I see that deprecation was added 5 years ago in release 2.3.2 d8eb160. I think it's good enough to do a cleanup for deprecated class.

@markshust
Copy link
Contributor Author

Just wanted to check to see if there was an update on this to merge it in?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: App Priority: P3 May be fixed according to the position in the backlog. Progress: ready for testing Release Line: 2.4 Triage: Dev.Experience Issue related to Developer Experience and needs help with Triage to Confirm or Reject it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants