{"id":15046090,"url":"https://github.com/nilportugues/php-forbidden-functions","last_synced_at":"2025-07-09T05:03:42.652Z","repository":{"id":57027249,"uuid":"45630513","full_name":"nilportugues/php-forbidden-functions","owner":"nilportugues","description":"[Git hook] Command line to look for functions that should be avoided","archived":false,"fork":false,"pushed_at":"2016-03-06T10:13:05.000Z","size":27,"stargazers_count":10,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-09T05:03:32.027Z","etag":null,"topics":["ci","composer","forbidden-functions","git","git-hook","git-hooks","php","php7","quality","quality-assurance"],"latest_commit_sha":null,"homepage":"http://nilportugues.com","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nilportugues.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-11-05T18:21:42.000Z","updated_at":"2022-02-12T07:32:32.000Z","dependencies_parsed_at":"2022-08-23T16:20:37.399Z","dependency_job_id":null,"html_url":"https://github.com/nilportugues/php-forbidden-functions","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/nilportugues/php-forbidden-functions","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nilportugues%2Fphp-forbidden-functions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nilportugues%2Fphp-forbidden-functions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nilportugues%2Fphp-forbidden-functions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nilportugues%2Fphp-forbidden-functions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nilportugues","download_url":"https://codeload.github.com/nilportugues/php-forbidden-functions/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nilportugues%2Fphp-forbidden-functions/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264396587,"owners_count":23601539,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ci","composer","forbidden-functions","git","git-hook","git-hooks","php","php7","quality","quality-assurance"],"created_at":"2024-09-24T20:52:41.645Z","updated_at":"2025-07-09T05:03:42.636Z","avatar_url":"https://github.com/nilportugues.png","language":"PHP","readme":"# PHP Forbidden Functions\n\n[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/nilportugues/php_forbidden_functions/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/nilportugues/php_forbidden_functions/?branch=master) [![SensioLabsInsight](https://insight.sensiolabs.com/projects/ba34c91a-4ee4-4b0d-8c7c-8ad3019a6fcc/mini.png)](https://insight.sensiolabs.com/projects/ba34c91a-4ee4-4b0d-8c7c-8ad3019a6fcc) [![Latest Stable Version](https://poser.pugx.org/nilportugues/php_forbidden/v/stable)](https://packagist.org/packages/nilportugues/php_forbidden) [![Total Downloads](https://poser.pugx.org/nilportugues/php_forbidden/downloads)](https://packagist.org/packages/nilportugues/php_forbidden) [![License](https://poser.pugx.org/nilportugues/php_forbidden/license)](https://packagist.org/packages/nilportugues/php_forbidden)\n[![Donate](https://www.paypalobjects.com/en_US/i/btn/btn_donate_SM.gif)](https://paypal.me/nilportugues)\n\nWhy? Because someone should look for forbidden functions that should be avoided in production.\n\nTypical examples are `print_r`, `var_dump`, `exit` and `die` function calls.\n\n## Installation\n\nUse [Composer](https://getcomposer.org) to install the package:\n\n```\n$ composer require --dev nilportugues/php_forbidden\n```\n\n## Usage\n\nIt is really this simple:\n\n```\n$ php bin/php_forbidden check \u003cpath/to/directory\u003e\n```\n\n```\n$ php bin/php_forbidden check \u003cpath/to/file\u003e\n```\n\nYou can also pipe STDIN in, if you want to use this tool with Gulp for instance:\n\n```\n$ cat \u003cpath/to/file\u003e | php bin/php_forbidden check\n```\n\nwhich means that this also works writing code directly from the shell (if you have some reason to do it):\n\n```\n$ php bin/php_forbidden check\n\u003c?php\n// Insert your code\n// and press CTRL+D to send EOF\n```\n\n### Configuration file\n\nWhen run the first time, if no `php_forbidden_function.yml` file is found, it will be generated.\n\nA configuration for instance, should formatted as follows:\n\n```yml\nforbidden:\n  - file_get_contents\n  - fopen\n  - die\n  - var_dump\n  - print_r\n```\n\nYou can specify an alternate location for the configuration file by passing in the `-c` parameter. Example:\n\n```\n$  php bin/php_forbidden check -c configs/php_forbidden_function.yml src/\n```\n\n## Contribute\n\nContributions to the package are always welcome!\n\n* Report any bugs or issues you find on the [issue tracker](https://github.com/nilportugues/php_forbidden_functions/issues/new).\n* You can grab the source code at the package's [Git repository](https://github.com/nilportugues/php_forbidden_functions).\n\n\n## Support\n\nGet in touch with me using one of the following means:\n\n - Emailing me at \u003ccontact@nilportugues.com\u003e\n - Opening an [Issue](https://github.com/nilportugues/php_forbidden_functions/issues/new)\n\n\n## Authors\n\n* [Nil Portugués Calderó](http://nilportugues.com)\n* [The Community Contributors](https://github.com/nilportugues/php_forbidden_functions/graphs/contributors)\n\n\n## License\nThe code base is licensed under the [MIT license](LICENSE).\n","funding_links":["https://paypal.me/nilportugues"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnilportugues%2Fphp-forbidden-functions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnilportugues%2Fphp-forbidden-functions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnilportugues%2Fphp-forbidden-functions/lists"}