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

ArgumentsAnalyzer - pass by reference not analyzed correctly #3964

Closed
wants to merge 3 commits into from
Closed

ArgumentsAnalyzer - pass by reference not analyzed correctly #3964

wants to merge 3 commits into from

Conversation

SpacePossum
Copy link
Contributor

name ended up being array&


try {
$fixer->fix(new \SplFileInfo(__FILE__), $tokens);
} catch (RequiredFixerConfigurationException $e) {
Copy link
Member

Choose a reason for hiding this comment

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

if this happen, we do not know that fixer works for empty file

by silencing the error, we lied to our-self that it does

@@ -126,6 +126,16 @@ public function provideArgumentsInfoCases()
3
)
)],
['<?php function(array & $a){};', 3, 7, new ArgumentAnalysis(
Copy link
Member

Choose a reason for hiding this comment

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

👍

@dmvdbrugge
Copy link
Contributor

You could've save the trouble, as this was already in pr: #3924 ...

@keradus
Copy link
Member

keradus commented Aug 9, 2018

@SpacePossum , can you please leave testFixersHandleSingleToken (and similar) tests here only and merge 3924 first ?

@keradus
Copy link
Member

keradus commented Aug 10, 2018

@SpacePossum , I merged 3924, please rebase to leave only tests for empty content

@keradus keradus removed the kind/bug label Aug 10, 2018
@keradus keradus added this to the 2.12.3 milestone Aug 10, 2018
@SpacePossum
Copy link
Contributor Author

nothing much of value here, closing as such

@SpacePossum SpacePossum deleted the 2_12_by_ref_analyzer_fixes branch August 13, 2018 06:09
@keradus
Copy link
Member

keradus commented Aug 13, 2018

what about those tests for empty (or almost-empty) files ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants