{"id":15488542,"url":"https://github.com/blakewilson/wp-enforce-semver","last_synced_at":"2025-04-19T13:50:15.140Z","repository":{"id":202570611,"uuid":"656992030","full_name":"blakewilson/wp-enforce-semver","owner":"blakewilson","description":"Enforce SemVer in your WordPress plugins with this simple class.","archived":false,"fork":false,"pushed_at":"2024-07-07T04:49:15.000Z","size":221,"stargazers_count":11,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-10-19T08:14:13.415Z","etag":null,"topics":["composer","php","semantic-versioning","semver","wordpress","wordpress-plugin"],"latest_commit_sha":null,"homepage":"https://packagist.org/packages/blakewilson/wp-enforce-semver","language":"TypeScript","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/blakewilson.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"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}},"created_at":"2023-06-22T04:46:39.000Z","updated_at":"2024-10-18T20:15:29.000Z","dependencies_parsed_at":"2024-07-07T05:41:20.120Z","dependency_job_id":null,"html_url":"https://github.com/blakewilson/wp-enforce-semver","commit_stats":{"total_commits":54,"total_committers":2,"mean_commits":27.0,"dds":0.03703703703703709,"last_synced_commit":"e9c1919d14880c181d3520c640705eedeca1fcc6"},"previous_names":["blakewilson/semantic-versioning-plugin"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blakewilson%2Fwp-enforce-semver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blakewilson%2Fwp-enforce-semver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blakewilson%2Fwp-enforce-semver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blakewilson%2Fwp-enforce-semver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/blakewilson","download_url":"https://codeload.github.com/blakewilson/wp-enforce-semver/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249157404,"owners_count":21221940,"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","php","semantic-versioning","semver","wordpress","wordpress-plugin"],"created_at":"2024-10-02T07:01:12.508Z","updated_at":"2025-04-19T13:50:15.121Z","avatar_url":"https://github.com/blakewilson.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Enforce SemVer in Your WordPress Plugin\n\n![Screenshot of plugins list with Semantic Versioning for WordPress enabled](https://github.com/blakewilson/wp-enforce-semver/blob/main/.assets/screenshot-1.png?raw=true)\n\nEasily enforce [SemVer](https://semver.org) in your WordPress plugins.\n\nBy using this class, auto updates will be disabled when the plugin's new version is a `major` update, and provide a helpful notice in the update section of the plugin that there may be breaking changes.\n\n## Usage\n\n1. Install the class as a dependency via composer:\n\n```\ncomposer require blakewilson/wp-enforce-semver\n```\n\n2. Initialize the class in your plugin:\n\n```php\n// Init autoloader from Composer\nif ( file_exists( plugin_dir_path( __FILE__ ) . 'vendor/autoload.php' ) ) {\n\trequire plugin_dir_path( __FILE__ ) . 'vendor/autoload.php';\n}\n\nuse EnforceSemVer\\EnforceSemVer;\n\nnew EnforceSemVer('my-plugin/my-plugin.php');\n```\n\nAnd that's it! Once your end-users install your plugin, they will be protected against auto updates for major releases, and see a helpful message in the plugins list next to your plugin update:\n\n![Screenshot of plugins list with Semantic Versioning for WordPress enabled](https://github.com/blakewilson/wp-enforce-semver/blob/main/.assets/screenshot-1.png?raw=true)\n\nAdditionally, this notice text can be modified via a filter:\n\n```php\nadd_filter( 'semantic_versioning_notice_text', function($notice_text, $plugin_file_name) {\n\t// Modify notice text here.\n\n\treturn $notice_text;\n});\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblakewilson%2Fwp-enforce-semver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblakewilson%2Fwp-enforce-semver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblakewilson%2Fwp-enforce-semver/lists"}