Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[PHPUnitBridge] Fix deprecation type detection when trigger_deprecation is used#38013

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

@l-vo
Copy link
Contributor

QA
Branch?5.1
Bug fix?yes
New feature?no
Deprecations?no
Tickets
LicenseMIT
Doc PR

when trigger_deprecation is used, the deprecation types (self, direct, indirect) are not properly detected because the file where the deprecation come from is alwaysdeprecation-contracts/functions.php. This PR aims to fix that.

@l-vol-vo marked this pull request as ready for reviewAugust 31, 2020 16:39
@l-vol-vo changed the title[WIP][PHPUnitBridge] Fix deprecation type detection when trigger_deprecation is user[PHPUnitBridge] Fix deprecation type detection when trigger_deprecation is userAug 31, 2020
@l-vol-vo changed the title[PHPUnitBridge] Fix deprecation type detection when trigger_deprecation is user[PHPUnitBridge] Fix deprecation type detection when trigger_deprecation is usedAug 31, 2020
@nicolas-grekasnicolas-grekas added this to the5.1 milestoneAug 31, 2020
@l-vol-voforce-pushed thefix_deprecations_type_detection branch 3 times, most recently from5750b22 to92d4a84CompareAugust 31, 2020 20:00
$backtraceTriggerDeprecation =$trace[2] ??null;
if ($backtraceTriggerDeprecation &&'trigger_deprecation' ===$backtraceTriggerDeprecation['function']) {
$file =$backtraceTriggerDeprecation['file'];
unset($trace[1]);

Choose a reason for hiding this comment

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

can be removed ifarray_values() is removed below, isn't it? that would save some memcopies.

Copy link
ContributorAuthor

@l-vol-voAug 31, 2020
edited
Loading

Choose a reason for hiding this comment

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

I'm not sure to understand properly.unset is not here because ofarray_values, it'sarray_values that is needed because ofunset. Andunset is needed since if I keep the trace ofdeprecations-contracts/functions.php file,deprecations-contracts/functions.php is considered to determinedirect andindirect deprecations instead of the file that calltrigger_deprecation.

@nicolas-grekasnicolas-grekasforce-pushed thefix_deprecations_type_detection branch from92d4a84 tofd39961CompareSeptember 2, 2020 15:22
@nicolas-grekas
Copy link
Member

Thank you@l-vo.

@nicolas-grekasnicolas-grekas merged commita8726df intosymfony:5.1Sep 2, 2020
@xabbuhxabbuh mentioned this pull requestSep 3, 2020
@fabpotfabpot mentioned this pull requestSep 27, 2020
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@nicolas-grekasnicolas-grekasnicolas-grekas approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

5.1

Development

Successfully merging this pull request may close these issues.

3 participants

@l-vo@nicolas-grekas@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp