{"id":27854119,"url":"https://github.com/lendable/composer-license-checker","last_synced_at":"2025-05-04T08:58:33.461Z","repository":{"id":65347327,"uuid":"590532256","full_name":"Lendable/composer-license-checker","owner":"Lendable","description":"Tool to check licensing of Composer depdencies against a set of rules to ensure compliance","archived":false,"fork":false,"pushed_at":"2025-05-04T00:43:29.000Z","size":704,"stargazers_count":12,"open_issues_count":10,"forks_count":1,"subscribers_count":45,"default_branch":"main","last_synced_at":"2025-05-04T08:58:25.213Z","etag":null,"topics":["compliance","composer","license-checking","php"],"latest_commit_sha":null,"homepage":"","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/Lendable.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-01-18T16:23:32.000Z","updated_at":"2025-04-08T10:17:35.000Z","dependencies_parsed_at":"2024-02-25T00:26:31.545Z","dependency_job_id":"561bc14b-1fa7-42b1-9728-8be025d40e2a","html_url":"https://github.com/Lendable/composer-license-checker","commit_stats":{"total_commits":90,"total_committers":4,"mean_commits":22.5,"dds":0.5777777777777777,"last_synced_commit":"3e0cc97bbe7d5ebae7f8cbae59cefddbaf5798d3"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lendable%2Fcomposer-license-checker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lendable%2Fcomposer-license-checker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lendable%2Fcomposer-license-checker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lendable%2Fcomposer-license-checker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Lendable","download_url":"https://codeload.github.com/Lendable/composer-license-checker/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252310963,"owners_count":21727516,"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":["compliance","composer","license-checking","php"],"created_at":"2025-05-04T08:58:32.685Z","updated_at":"2025-05-04T08:58:33.451Z","avatar_url":"https://github.com/Lendable.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Composer License Checker\n\n[![Latest Stable Version](https://poser.pugx.org/lendable/composer-license-checker/v/stable)](https://packagist.org/packages/lendable/composer-license-checker)\n[![License](https://poser.pugx.org/lendable/composer-license-checker/license)](https://packagist.org/packages/lendable/composer-license-checker)\n[![Continuous Integration](https://github.com/lendable/composer-license-checker/actions/workflows/ci.yml/badge.svg)](https://github.com/lendable/composer-license-checker/actions/workflows/ci.yml)\n\nThis library provides tooling to check licensing of dependencies against a set of rules to ensure compliance with open source licenses and minimize legal risk. It helps you to keep track of licenses of dependencies in use and make informed decisions on their usage.\n\n## Installation\n\n```sh\ncomposer require --dev lendable/composer-license-checker\n```\n\n## Usage\n\nCreate a configuration file in your project root, `.allowed-licenses.php` (or you can use the option `-a / --allow-file` to specify the location of the configuration).\n\n```php\n\u003c?php\n\ndeclare(strict_types=1);\n\nuse Lendable\\ComposerLicenseChecker\\LicenseConfigurationBuilder;\n\nreturn (new LicenseConfigurationBuilder())\n    -\u003eaddLicenses(\n        'MIT',\n        'BSD-2-Clause',\n        'BSD-3-Clause',\n        'Apache-2.0',\n        // And other licenses you wish to allow.\n    )\n    -\u003eaddAllowedVendor('vendor_name') // Allow any license from a specific vendor, i.e. your own company.\n    -\u003eaddAllowedPackage('vendor_name/foo_bar') // Allow a specific package regardless of licensing.\n    -\u003ebuild();\n\n```\n\n```sh\n./vendor/bin/composer-license-checker [--allow-file path/to/configuration_file.php]\n```\n\nIt is suggested you build this into your CI pipeline to automate checking it.\n\n## Licensing information providers\n\nThis tool can use two different sources for retrieving licensing information: using the `composer licenses` command and parsing the `installed.json` file created by Composer.\n\n### Using the `installed.json` provider (*default*)\nSpecify `--provider-id=json`. \n\nThe tool will parse the `installed.json` file created by Composer which has all the relevant information. This does not require Composer to be installed in the environment the tool is executed within. This file is internal to Composer however, so there is the potential that the schema may change in the future. If you experience issues, try using the `composer licenses` provider and report the issue.\n\n### Using `composer licenses` provider\nSpecify `--provider-id=licenses`.\n\nThe `composer licenses` command provides a (potentially) more stable API for retrieving licensing information. This however requires the tool to execute `composer` so it must be installed in the environment the tool is run within. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flendable%2Fcomposer-license-checker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flendable%2Fcomposer-license-checker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flendable%2Fcomposer-license-checker/lists"}