Skip to content

Github mirror of "mediawiki/tools/phan/Utils" - our actual code is hosted with Gerrit (please see https://www.mediawiki.org/wiki/Developer_access for contributing)

License

Notifications You must be signed in to change notification settings

wikimedia/mediawiki-tools-phan-Utils

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MediaWiki Phan Utils

This repo contains some utilities that can be used when developing Phan plugins. This code was originally written as part of MediaWiki's taint-check.

Install

$ `composer require mediawiki/phan-utils`

Usage

Add use MediaWikiPhanUtils\MediaWikiPhanUtils to the visitor class. Note that the implementing class MUST have the following properties:

/**
 * @property \Phan\Language\Context $context
 * @property \Phan\CodeBase $code_base
 */

Additionally, the class SHOULD implement the following method:

protected function getLogChannel() : string

to specify the name of the channel used in debug logs.

Environment variables

You can use the PHAN_DEBUG variable to print debug information. The variable can take the name of a file (if running from shell, /dev/stderr is convenient), or - for stdout.

License

GNU General Public License, version 2 or later

About

Github mirror of "mediawiki/tools/phan/Utils" - our actual code is hosted with Gerrit (please see https://www.mediawiki.org/wiki/Developer_access for contributing)

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages