{"id":23359830,"url":"https://github.com/firehed/dependencies","last_synced_at":"2025-04-07T20:46:34.679Z","repository":{"id":138434853,"uuid":"1404097","full_name":"Firehed/dependencies","owner":"Firehed","description":"PHP dependency checker","archived":false,"fork":false,"pushed_at":"2011-03-30T06:17:51.000Z","size":96,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-02-13T22:27:03.101Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Firehed.png","metadata":{"files":{"readme":"README.markdown","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-02-23T21:41:09.000Z","updated_at":"2023-10-10T04:19:22.000Z","dependencies_parsed_at":null,"dependency_job_id":"0b330d27-bb98-45ec-92c4-94f6c9b96f86","html_url":"https://github.com/Firehed/dependencies","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Firehed%2Fdependencies","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Firehed%2Fdependencies/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Firehed%2Fdependencies/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Firehed%2Fdependencies/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Firehed","download_url":"https://codeload.github.com/Firehed/dependencies/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247729478,"owners_count":20986392,"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":[],"created_at":"2024-12-21T11:12:05.076Z","updated_at":"2025-04-07T20:46:34.396Z","avatar_url":"https://github.com/Firehed.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PHP Dependency checker\n\nDifferent applications end up depending on various non-standard functionality. Many of these applications end up running checks for the existence of these extensions on every request, adding unnecessary logic and overhead.\n\nIt's easier to simply keep track of extension dependencies in a single file run on the server before deployment. If it exits clean, it's OK to continue deployment. If not, something is missing from the environment and the deployment should be halted.\n\n## Setup\n\nIn the script, there are many calls to `show()`. The first parameter is simply a label for the extension, and the second param is some sort of check (returning `true`, `false`, or `\"skip\"`).  The `label` calls are purely aesthetic.\n\nExample:\n\n\tlabel('Text/Unicode');\n\t\tshow('mbstring extension', extension_loaded('mbstring'));\n\t\tif (extension_loaded('mbstring'))\n\t\t\tshow('mbstring overload is disabled', !(ini_get('mbstring.func_overload') \u0026 MB_OVERLOAD_STRING));\n\t\telse\n\t\t\tshow('mbstring overload is disabled', 'skip');\n\nDepending on your environment settings, you may see a result like this:\n\n\t-=[ Text/Unicode ]=-\n\tmbstring extension            [  OK  ]\n\tmbstring overload is disabled [  OK  ]\n\nOr, you may see something like this:\n\n\t-=[ Text/Unicode ]=-\n\tmbstring extension            [FAILED]\n\tmbstring overload is disabled [ SKIP ]\n\n\n\n## Usage\n\nAt the most basic level, simply run the script from the command line:\n\n`php check.php`\n\nAny missing functionality will be listed.\n\nTo integrate with a deployment script, check the return code of the script execution:\n\n\t\u003c?php\n\texec('php check.php', $out, $return);\n\tif ($return === 0) {\n\t\t// Continue with deployment\n\t}\n\telse {\n\t\t// Something was missing, halt\n\t\t// Maybe email implode(\"\\n\", $out) to a sysadmin.\n\t}\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffirehed%2Fdependencies","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffirehed%2Fdependencies","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffirehed%2Fdependencies/lists"}