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

Superfluous query on HEAD request in serializer #20002

Closed
Gerych1984 opened this issue Oct 9, 2023 · 2 comments
Closed

Superfluous query on HEAD request in serializer #20002

Gerych1984 opened this issue Oct 9, 2023 · 2 comments

Comments

@Gerych1984
Copy link

Q A
Yii version all
PHP version >= 7.3

Good day everybody. On Head request, Serializer makes an unnecessary DataProviderInterface::getModels request (and it can be some slow, heavy query). To fix it need to move strings 191-196 after if ($this->request->getIsHead()) condition. Thanks

@bizley
Copy link
Member

bizley commented Oct 9, 2023

Indeed. Do you have a time to prepare PR fixing this maybe?

@bizley bizley added this to the 2.0.50 milestone Oct 9, 2023
@Gerych1984
Copy link
Author

Indeed. Do you have a time to prepare PR fixing this maybe?

I will try

@bizley bizley closed this as completed in 3014fa2 Oct 20, 2023
bizley added a commit that referenced this issue Oct 20, 2023
…on_HEAD_request_in_serializer

fix: #20002 optimize head request on serializeDataProvider
xicond pushed a commit to xicond/yii2 that referenced this issue Oct 26, 2023
terabytesoftw added a commit to terabytesoftw/yii2 that referenced this issue Jul 10, 2024
terabytesoftw added a commit to terabytesoftw/yii2 that referenced this issue Jul 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants