{"id":16506800,"url":"https://github.com/screamingdev/phpsemver","last_synced_at":"2025-03-21T08:31:16.445Z","repository":{"id":27558281,"uuid":"31040191","full_name":"ScreamingDev/phpsemver","owner":"ScreamingDev","description":"Check if your changes are a major change, minor change or just a patch.","archived":false,"fork":false,"pushed_at":"2022-03-26T00:48:13.000Z","size":378,"stargazers_count":27,"open_issues_count":16,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-11T09:03:05.410Z","etag":null,"topics":["assertions","php","semantic-versions","testing"],"latest_commit_sha":null,"homepage":null,"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/ScreamingDev.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-02-19T22:24:52.000Z","updated_at":"2022-10-03T16:10:53.000Z","dependencies_parsed_at":"2022-09-02T10:50:06.735Z","dependency_job_id":null,"html_url":"https://github.com/ScreamingDev/phpsemver","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ScreamingDev%2Fphpsemver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ScreamingDev%2Fphpsemver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ScreamingDev%2Fphpsemver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ScreamingDev%2Fphpsemver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ScreamingDev","download_url":"https://codeload.github.com/ScreamingDev/phpsemver/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244122472,"owners_count":20401431,"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":["assertions","php","semantic-versions","testing"],"created_at":"2024-10-11T15:22:17.172Z","updated_at":"2025-03-21T08:31:14.570Z","avatar_url":"https://github.com/ScreamingDev.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PHPSemVer\n\n\u003e Check your changes against semantic versions\n\n[![Build Status](https://travis-ci.org/sourcerer-mike/phpsemver.svg?branch=3.2.0)](https://travis-ci.org/sourcerer-mike/phpsemver)\n[![Coverage](https://codecov.io/github/sourcerer-mike/phpsemver/coverage.svg?branch=3.2.0)](http://codecov.io/github/sourcerer-mike/phpsemver?branch=3.2.0)\n\nInstall it via composer\n\n    composer require sourcerer-mike/phpsemver\n\nand test your code by comparing two versions\n\n    phpsemver compare 3.2.0 HEAD\n\nor the last commit with your current work:\n\n    phpsemver compare HEAD .\n    \n    +-------+-------------------------------------------------------------------+\n    | Level | Message                                                           |\n    +-------+-------------------------------------------------------------------+\n    | major | phpsemver_get_composer_config() removed.                          |\n    | major | PHPSemVer\\Specification removed.                                  |\n    | minor | PHPSemVer\\Config added.                                           |\n    | minor | PHPSemVer\\Wrapper\\AbstractWrapper::mergeTrees() added.            |\n    | patch | PHPSemVer\\Wrapper\\Directory::getAllFileNames() body changed.      |\n    | patch | PHPSemVer\\Wrapper\\Git::getAllFileNames() body changed.            |\n    +-------+-------------------------------------------------------------------+\n    \n    Total time: 0.94\n\nYou're welcome!\n\n## Features\n\n### Commands\n\nTry the several possibilities:\n\n- Use `compare` to check for changes.\n- Use `vcs:message` to enhance your commit messages.\n\n### Wrapper\n\nChoose between those wrapper(`phpsemver compare --type ...`):\n\n- GIT\n- Filesystem / Directories\n\nIf one argument is a directory, then the system will work on the file system.\n\n### Assertions\n\nMake assertions on:\n\n- Functions\n\t- IsAdded: Check if a function is new.\n\t- IsRemoved: Check if a function is removed.\n\t- BodyChanged: Check if someone changed the behaviour of a function.\n- Classes\n\t- IsAdded: Check if a classes is new.\n\t- IsRemoved: Check if a classes is removed.\n- Methods\n\t- IsAdded: Check if a method is new.\n\t- IsRemoved: Check if a method is removed.\n\t- BodyChanged: Check if someone changed the behaviour of a method.\n\t- ReturnTypeChanged: Watch for changed return types.\n\t- ReturnTypeRemoved: Watch for incompatible changes on methods.\n- Interfaces\n    - IsAdded: Check if an interface is new.\n    - IsRemoved: Check if an interface is removed.\n\nCombine them as you like in your own configuration file.\n\n\n## Configuration\n\nConfigure which assertions are used in a XML-File.\nThe delivered XSD file makes it easy to write your own configuration (in a proper IDE).\n\n    \u003c?xml version=\"1.0\"?\u003e\n    \u003cphpsemver\n            xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n            xsi:noNamespaceSchemaLocation=\"https://raw.githubusercontent.com/sourcerer-mike/phpsemver/3.2.0/etc/phpsemver.xsd\"\n            title=\"My own rules\"\u003e\n        \u003cRuleSet name=\"major\"\u003e\n            \u003cTrigger\u003e\n                \u003cFunctions\u003e\n                    \u003cIsRemoved /\u003e\n                \u003c/Functions\u003e\n            \u003c/Trigger\u003e\n        \u003c/RuleSet\u003e\n        \u003cRuleSet name=\"minor\"\u003e\n            \u003cTrigger\u003e\n                \u003cClasses\u003e\n                    \u003cIsAdded /\u003e\n                \u003c/Classes\u003e\n            \u003c/Trigger\u003e\n        \u003c/RuleSet\u003e\n        \u003cRuleSet name=\"patch\"\u003e\n    \n        \u003c/RuleSet\u003e\n        \u003cFilter\u003e\n            \u003cWhitelist\u003e\n                \u003cPattern\u003e@lib/.*@\u003c/Pattern\u003e\n            \u003c/Whitelist\u003e\n            \u003cBlacklist\u003e\n                \u003cPattern\u003e@lib/Test/.*@\u003c/Pattern\u003e\n            \u003c/Blacklist\u003e\n        \u003c/Filter\u003e\n    \u003c/phpsemver\u003e\n\nWrite your own and use it with the `--ruleset` option.\nSee the wiki entry for more information: https://github.com/sourcerer-mike/phpsemver/wiki/Configuration\n\n### Prepared rule sets\n\nThose projects do semantic versions in different ways.\nSo a special config is written for them which can be used via the `--ruleSet` option:\n\n- Drupal-Core\n- SemVer2\n- WordPress\n\nJust write `phpsemver --ruleSet Drupal-Core` and see the latest changes in Drupal.\nThere are other companies that follow some semantics in their rules like\nSymfony.\nDon't drag behind - catch up with PHPSemVer.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscreamingdev%2Fphpsemver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscreamingdev%2Fphpsemver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscreamingdev%2Fphpsemver/lists"}