{"id":15501334,"url":"https://github.com/aaemnnosttv/composer-hash-plugin","last_synced_at":"2025-04-04T17:23:55.694Z","repository":{"id":56938984,"uuid":"208612295","full_name":"aaemnnosttv/composer-hash-plugin","owner":"aaemnnosttv","description":"Composer plugin for writing the composer hash to a file on install/update.","archived":false,"fork":false,"pushed_at":"2021-08-15T14:11:20.000Z","size":31,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-04T04:09:01.358Z","etag":null,"topics":["composer-plugin"],"latest_commit_sha":null,"homepage":null,"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/aaemnnosttv.png","metadata":{"files":{"readme":"README.md","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":"2019-09-15T15:12:20.000Z","updated_at":"2021-08-15T14:11:23.000Z","dependencies_parsed_at":"2022-08-21T06:50:23.661Z","dependency_job_id":null,"html_url":"https://github.com/aaemnnosttv/composer-hash-plugin","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/aaemnnosttv%2Fcomposer-hash-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aaemnnosttv%2Fcomposer-hash-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aaemnnosttv%2Fcomposer-hash-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aaemnnosttv%2Fcomposer-hash-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aaemnnosttv","download_url":"https://codeload.github.com/aaemnnosttv/composer-hash-plugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247218228,"owners_count":20903219,"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":["composer-plugin"],"created_at":"2024-10-02T09:03:45.340Z","updated_at":"2025-04-04T17:23:55.672Z","avatar_url":"https://github.com/aaemnnosttv.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Composer Hash Plugin\n\n[![Tests](https://github.com/aaemnnosttv/composer-hash-plugin/actions/workflows/test.yml/badge.svg)](https://github.com/aaemnnosttv/composer-hash-plugin/actions/workflows/test.yml)\n\nA Composer plugin for writing the Composer hash to a file on install/update to verify parity with VCS.\n\n## Overview\n\nThis package aims to solve the problem of your installed dependencies getting out of sync with those defined by your lock file.\nAs such, it is intended to be used in projects where the `composer.lock` file is under version control.\n\nOnce installed, the plugin will write the current `content-hash` from your `composer.lock` file to a new `composer.hash` file after each `composer install` or `update`.\nThis is the only thing it will do automatically.\n\n**This new file is intended to be excluded from version control.**\nThe hashes can then be verified, but that has to be done (semi) manually. See below.\n\n## API\n\nSince the hash file is written automatically, the API exposes methods for verifying the hashes.\n\n### CLI\n\n```sh\n$ composer hash-verify\n```\n\nIf hash verification fails, the command provides additional feedback and exits with a non-zero exit code.\n\n### PHP\n\nThe plugin exposes a `ComposerHash\\Hash::verify($path)` method where `$path` is the absolute path to the project's root directory containing `composer.json`.\nThis function checks that the `composer.hash` matches the corresponding hash in the `composer.lock` file (if it doesn't, a `HashMismatchException` is thrown.\nOther exceptions are thrown if called with an invalid path or if Composer files are unreadable.\n \n## Installation\n\n```sh\n$ composer require aaemnnosttv/composer-hash-plugin\n```\n\nNote: the generated `composer.hash` file is intended to be ignored by source control so be sure to update your `.gitignore` or other VCS equivalent accordingly.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faaemnnosttv%2Fcomposer-hash-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faaemnnosttv%2Fcomposer-hash-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faaemnnosttv%2Fcomposer-hash-plugin/lists"}