Page MenuHomePhabricator

Resolve static analysis errors found by etsy/phan
Closed, ResolvedPublic

Description

Upgrading the elasticsearch plugins has been relatively easy because the compiler is able to tell us about changed/missing methods/classes/etc. The phan project can give us similar information about php. Resolve all, or as many as possible, errors than phan identifies in CirrusSearch so we can use it with the upgraded Elastica library to identify other possible issues.

Event Timeline

Restricted Application added projects: Discovery, Discovery-Search. · View Herald TranscriptApr 13 2016, 8:23 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Change 283350 had a related patch set uploaded (by EBernhardson):
Replace deprecated ConfigFactory::getDefaultInstance()

https://gerrit.wikimedia.org/r/283350

Change 283353 had a related patch set uploaded (by EBernhardson):
Cleanup annotations/signatures in CirrusSearch\\Sanity

https://gerrit.wikimedia.org/r/283353

Change 283352 had a related patch set uploaded (by EBernhardson):
Minor static analysis cleanups

https://gerrit.wikimedia.org/r/283352

Change 283354 had a related patch set uploaded (by EBernhardson):
Cleanup annotations and signatures in CirrusSearch\BuildDocument

https://gerrit.wikimedia.org/r/283354

Change 283355 had a related patch set uploaded (by EBernhardson):
Cleanup annotations and signatures in CirrusSearch\LanguageDetect

https://gerrit.wikimedia.org/r/283355

Change 283356 had a related patch set uploaded (by EBernhardson):
Remove call to nonexistent method

https://gerrit.wikimedia.org/r/283356

Change 283357 had a related patch set uploaded (by EBernhardson):
Make static analysis happy by forcing to string

https://gerrit.wikimedia.org/r/283357

Change 283358 had a related patch set uploaded (by EBernhardson):
Add missing properties and methods to updateSuggesterIndex

https://gerrit.wikimedia.org/r/283358

Change 283465 had a related patch set uploaded (by EBernhardson):
search: getInterwikiResults returns array of SearchResultSets

https://gerrit.wikimedia.org/r/283465

Change 283350 merged by jenkins-bot:
Replace deprecated ConfigFactory::getDefaultInstance()

https://gerrit.wikimedia.org/r/283350

Change 283556 had a related patch set uploaded (by EBernhardson):
Add/update a variety of annotations to be correct

https://gerrit.wikimedia.org/r/283556

Change 283557 had a related patch set uploaded (by EBernhardson):
Standardize on catching/passing Elasticas ExceptionInterface

https://gerrit.wikimedia.org/r/283557

Change 283558 had a related patch set uploaded (by EBernhardson):
Annotate SearchResult and related classes

https://gerrit.wikimedia.org/r/283558

Change 283559 had a related patch set uploaded (by EBernhardson):
Fix missing variable in RescoreBuilder

https://gerrit.wikimedia.org/r/283559

Change 283560 had a related patch set uploaded (by EBernhardson):
Add script to run etsy/phan from in vagrant

https://gerrit.wikimedia.org/r/283560

Change 283561 had a related patch set uploaded (by EBernhardson):
Only call getData() if the right type of Action is used

https://gerrit.wikimedia.org/r/283561

Change 283562 had a related patch set uploaded (by EBernhardson):
Make sure the Config instance really has a getElement method

https://gerrit.wikimedia.org/r/283562

Change 283352 merged by jenkins-bot:
Minor static analysis cleanups

https://gerrit.wikimedia.org/r/283352

Change 283353 merged by jenkins-bot:
Cleanup annotations/signatures in CirrusSearch\\Sanity

https://gerrit.wikimedia.org/r/283353

Change 283578 had a related patch set uploaded (by EBernhardson):
Add more type annotations to CirrusSearch\Search namespace

https://gerrit.wikimedia.org/r/283578

Change 283579 had a related patch set uploaded (by EBernhardson):
Add more type annotations to CirrusSearch\BuildDocument namespace

https://gerrit.wikimedia.org/r/283579

Change 283580 had a related patch set uploaded (by EBernhardson):
Add annotations to Api, Elastica, and Extra sub-namespaces

https://gerrit.wikimedia.org/r/283580

Change 283581 had a related patch set uploaded (by EBernhardson):
Very minor cleanups to CirrusSearch\Job namespace

https://gerrit.wikimedia.org/r/283581

Change 283582 had a related patch set uploaded (by EBernhardson):
Trivial whitespace changes to Elastica\LanguageDetector

https://gerrit.wikimedia.org/r/283582

Change 283583 had a related patch set uploaded (by EBernhardson):
Expand annotations in Elasticsearch\Maintenance namespace

https://gerrit.wikimedia.org/r/283583

Change 283354 merged by jenkins-bot:
Cleanup annotations and signatures in CirrusSearch\BuildDocument

https://gerrit.wikimedia.org/r/283354

Change 283355 merged by jenkins-bot:
Cleanup annotations and signatures in CirrusSearch\LanguageDetect

https://gerrit.wikimedia.org/r/283355

Change 283356 merged by jenkins-bot:
Implement missing setMaxNgramsExtracted method

https://gerrit.wikimedia.org/r/283356

Change 283357 merged by jenkins-bot:
Make static analysis happy by forcing to string

https://gerrit.wikimedia.org/r/283357

Change 283582 merged by jenkins-bot:
Trivial whitespace changes to Elastica\LanguageDetector

https://gerrit.wikimedia.org/r/283582

Change 283581 merged by jenkins-bot:
Very minor cleanups to CirrusSearch\Job namespace

https://gerrit.wikimedia.org/r/283581

Change 283465 merged by jenkins-bot:
search: getInterwikiResults returns array of SearchResultSets

https://gerrit.wikimedia.org/r/283465

Change 283562 merged by jenkins-bot:
Make sure the Config instance really has a getElement method

https://gerrit.wikimedia.org/r/283562

Change 283583 merged by jenkins-bot:
Expand annotations in Elasticsearch\Maintenance namespace

https://gerrit.wikimedia.org/r/283583

Change 283558 merged by jenkins-bot:
Annotate SearchResult and related classes

https://gerrit.wikimedia.org/r/283558

Change 283578 merged by jenkins-bot:
Add more type annotations to CirrusSearch\Search namespace

https://gerrit.wikimedia.org/r/283578

Change 283561 merged by jenkins-bot:
Only call getData() if the right type of Action is used

https://gerrit.wikimedia.org/r/283561

Change 283358 merged by jenkins-bot:
Add missing properties and methods to maint classes

https://gerrit.wikimedia.org/r/283358

Change 284260 had a related patch set uploaded (by EBernhardson):
Apply more annotations/type signature updates

https://gerrit.wikimedia.org/r/284260

Restricted Application added a subscriber: TerraCodes. · View Herald TranscriptApr 19 2016, 8:02 PM

Change 284238 had a related patch set uploaded (by EBernhardson):
More PhpDoc cleanups

https://gerrit.wikimedia.org/r/284238

Change 284261 had a related patch set uploaded (by EBernhardson):
Drop unused method indexToIndexTypes

https://gerrit.wikimedia.org/r/284261

Change 284216 had a related patch set uploaded (by EBernhardson):
Fix a few minor analysis issues in test cases

https://gerrit.wikimedia.org/r/284216

Change 284211 had a related patch set uploaded (by EBernhardson):
Remove unused method

https://gerrit.wikimedia.org/r/284211

Change 284208 had a related patch set uploaded (by EBernhardson):
Add some missing @return annotations

https://gerrit.wikimedia.org/r/284208

Change 284209 had a related patch set uploaded (by EBernhardson):
Remove some unused use statements

https://gerrit.wikimedia.org/r/284209

Change 284210 had a related patch set uploaded (by EBernhardson):
Remove unused variables

https://gerrit.wikimedia.org/r/284210

Change 284212 had a related patch set uploaded (by EBernhardson):
Cleanup some potentially undefined variables

https://gerrit.wikimedia.org/r/284212

Change 283563 had a related patch set uploaded (by EBernhardson):
Add @suppress annotations for unfixable static analysis

https://gerrit.wikimedia.org/r/283563

Change 284345 had a related patch set uploaded (by EBernhardson):
Spelling corrections

https://gerrit.wikimedia.org/r/284345

Change 284362 had a related patch set uploaded (by EBernhardson):
Standardize namespace/use syntax and spacing

https://gerrit.wikimedia.org/r/284362

Change 284261 merged by jenkins-bot:
Drop unused method indexToIndexTypes

https://gerrit.wikimedia.org/r/284261

Change 284345 merged by jenkins-bot:
Spelling corrections

https://gerrit.wikimedia.org/r/284345

Change 284211 merged by jenkins-bot:
Remove unused method

https://gerrit.wikimedia.org/r/284211

Deskana triaged this task as Normal priority.Apr 19 2016, 11:53 PM
Deskana removed a project: Discovery-Search.

Change 284212 merged by jenkins-bot:
Use the correct $exception variable instead of $e

https://gerrit.wikimedia.org/r/284212

Change 284216 merged by jenkins-bot:
Fix a few minor analysis issues in test cases

https://gerrit.wikimedia.org/r/284216

Change 284209 merged by jenkins-bot:
Remove some unused use statements

https://gerrit.wikimedia.org/r/284209

Change 284208 merged by jenkins-bot:
Add some missing @return annotations

https://gerrit.wikimedia.org/r/284208

Change 283557 merged by jenkins-bot:
Standardize on catching/passing Elasticas ExceptionInterface

https://gerrit.wikimedia.org/r/283557

Change 283579 merged by jenkins-bot:
Add more type annotations to CirrusSearch\BuildDocument namespace

https://gerrit.wikimedia.org/r/283579

Change 284210 merged by jenkins-bot:
Remove unused variables

https://gerrit.wikimedia.org/r/284210

Change 284362 merged by jenkins-bot:
Standardize namespace/use syntax and spacing

https://gerrit.wikimedia.org/r/284362

Change 283556 merged by jenkins-bot:
Add/update a variety of annotations to be correct

https://gerrit.wikimedia.org/r/283556

Change 283563 merged by jenkins-bot:
Add @suppress annotations for unfixable static analysis

https://gerrit.wikimedia.org/r/283563

Change 283560 merged by jenkins-bot:
Add script to run etsy/phan from in vagrant

https://gerrit.wikimedia.org/r/283560

Change 283580 merged by jenkins-bot:
Add annotations to Api, Elastica, and Extra sub-namespaces

https://gerrit.wikimedia.org/r/283580

Change 284837 had a related patch set uploaded (by EBernhardson):
Replace deprecated ConfigFactory::getDefaultInstance()

https://gerrit.wikimedia.org/r/284837

Change 284837 abandoned by EBernhardson:
Replace deprecated ConfigFactory::getDefaultInstance()

https://gerrit.wikimedia.org/r/284837

Change 284238 merged by jenkins-bot:
More PhpDoc cleanups

https://gerrit.wikimedia.org/r/284238

Change 284260 merged by jenkins-bot:
Apply more annotations/type signature updates

https://gerrit.wikimedia.org/r/284260

Change 283559 merged by jenkins-bot:
Fix missing variable in RescoreBuilder

https://gerrit.wikimedia.org/r/283559

Deskana closed this task as Resolved.Apr 26 2016, 10:14 PM
Deskana added a subscriber: Deskana.

I'll take your word for it. ;-)