phan / phan/phan

Include stubs for global constants from core modules and PECL extensions, add option to automatically load

Open
#2,279 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
PHP
Stars
5.6k
Forks
365
Avg merge
1h 25m
Merged PRs (30d)
6

Description

Phan knows about 5 functions from the PECL yaml extension
'yaml_emit'
'yaml_emit_file'
'yaml_parse'
'yaml_parse_file'
'yaml_parse_url'

But it is missing the constants, which can be used as arguments to this function

From http://php.net/manual/en/function.yaml-emit.php
YAML_ANY_ENCODING
YAML_UTF8_ENCODING
YAML_UTF16LE_ENCODING
YAML_UTF16BE_ENCODING.
YAML_ANY_BREAK
YAML_CR_BREAK
YAML_LN_BREAK
YAML_CRLN_BREAK

Please let phan know about the yaml constant, see http://php.net/manual/en/yaml.constants.php for a list

Thanks

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review how Phan currently represents the PECL yaml functions and global constants, then trace how core-module stubs are loaded. Add the YAML constants listed in the issue and address the requested automatic-loading option. Confirm that Phan recognizes these constants when used as yaml_emit arguments.

Written by the indexing model from the issue text.

Assessment

Tech stack
php, yaml
Domain
tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.