diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index 357cefb..9dad8db 100755 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -20,8 +20,8 @@ Not obligatory, but suggest an idea for implementing addition or change. Include as many relevant details about the environment you experienced the bug in and how to reproduce it. -* Version used (e.g. PHP 7.1): -* Operating system and version (e.g. Ubuntu 16.04, Windows 7): +* Version used (e.g. PHP 8.0): +* Operating system and version (e.g. Ubuntu 20.04, Windows 11): * Link to your project: * ... * ... diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index c74eaec..3484e61 100755 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -20,13 +20,6 @@ see how your change affects other areas of the code, etc. ## Screenshots (if appropriate) -## Types of changes - -What types of changes does your code introduce? Put an `x` in all the boxes that apply: -- [ ] Bug fix (non-breaking change which fixes an issue) -- [ ] New feature (non-breaking change which adds functionality) -- [ ] Breaking change (fix or feature that would cause existing functionality to change) - ## Checklist: Go over all the following points, and put an `x` in all the boxes that apply. @@ -35,6 +28,8 @@ Please, please, please, don't send your pull request until all of the boxes are - [ ] I have read the **[CONTRIBUTING](../.github/CONTRIBUTING.md)** document. - [ ] My pull request addresses exactly one patch/feature. +- [ ] My pull request contains a title that can be used as a release note. +- [ ] I have added the appropriate labels to my pull request (e.g. breaking-change, new-feature, bugfix). - [ ] I have created a branch for this patch/feature. - [ ] Each individual commit in the pull request is meaningful. - [ ] I have added tests to cover my changes. diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..5ee4a99 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,8 @@ +--- +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: daily + time: "04:00" diff --git a/.github/labels.yml b/.github/labels.yml new file mode 100644 index 0000000..b7beb1e --- /dev/null +++ b/.github/labels.yml @@ -0,0 +1,52 @@ +--- +- name: "breaking-change" + color: ee0701 + description: "A breaking change for existing users." +- name: "bugfix" + color: ee0701 + description: "Inconsistencies or issues which will cause a problem for users or implementors." +- name: "documentation" + color: 0052cc + description: "Solely about the documentation of the project." +- name: "enhancement" + color: 1d76db + description: "Enhancement of the code, not introducing new features." +- name: "refactor" + color: 1d76db + description: "Improvement of existing code, not introducing new features." +- name: "performance" + color: 1d76db + description: "Improving performance, not introducing new features." +- name: "new-feature" + color: 0e8a16 + description: "New features or options." +- name: "maintenance" + color: 2af79e + description: "Generic maintenance tasks." +- name: "ci" + color: 1d76db + description: "Work that improves the continue integration." +- name: "dependencies" + color: 1d76db + description: "Upgrade or downgrade of project dependencies." + +- name: "in-progress" + color: fbca04 + description: "Issue is currently being resolved by a developer." + +- name: "security" + color: ee0701 + description: "Marks a security issue that needs to be resolved asap." +- name: "incomplete" + color: fef2c0 + description: "Marks a PR or issue that is missing information." +- name: "invalid" + color: fef2c0 + description: "Marks a PR or issue that is missing information." + +- name: "major" + color: b60205 + description: "This PR causes a major version bump in the version number." +- name: "minor" + color: 0e8a16 + description: "This PR causes a minor version bump in the version number." diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml new file mode 100644 index 0000000..cf418ad --- /dev/null +++ b/.github/release-drafter.yml @@ -0,0 +1,57 @@ +--- +name-template: "v$RESOLVED_VERSION" +tag-template: "v$RESOLVED_VERSION" +change-template: "- #$NUMBER $TITLE @$AUTHOR" +sort-direction: ascending + +categories: + - title: "🚨 Breaking changes" + labels: + - "breaking-change" + - title: "✨ New features" + labels: + - "new-feature" + - title: "πŸ› Bug fixes" + labels: + - "bugfix" + - title: "πŸš€ Enhancements" + labels: + - "enhancement" + - "refactor" + - "performance" + - title: "🧰 Maintenance" + labels: + - "maintenance" + - "ci" + - "security" + - title: "πŸ“š Documentation" + labels: + - "documentation" + - title: "⬆️ Dependency updates" + labels: + - "dependencies" + +version-resolver: + major: + labels: + - "major" + - "breaking-change" + minor: + labels: + - "minor" + - "new-feature" + patch: + labels: + - "bugfix" + - "ci" + - "dependencies" + - "documentation" + - "enhancement" + - "performance" + - "refactor" + default: patch + +template: | + ## What’s changed + + $CHANGES diff --git a/.github/workflows/draft-release.yaml b/.github/workflows/draft-release.yaml new file mode 100644 index 0000000..9307cba --- /dev/null +++ b/.github/workflows/draft-release.yaml @@ -0,0 +1,18 @@ +--- +name: Release Drafter + +on: + push: + branches: + - master + - develop + +jobs: + update_release_draft: + name: ✏️ Draft release + runs-on: ubuntu-latest + steps: + - name: πŸš€ Run Release Drafter + uses: release-drafter/release-drafter@v5.15.0 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/labels.yaml b/.github/workflows/labels.yaml new file mode 100644 index 0000000..05068ad --- /dev/null +++ b/.github/workflows/labels.yaml @@ -0,0 +1,22 @@ +--- +name: Sync labels + +on: + workflow_dispatch: + push: + branches: + - master + paths: + - .github/labels.yml + +jobs: + labels: + name: ♻️ Sync labels + runs-on: ubuntu-latest + steps: + - name: ‡️ Check out code from GitHub + uses: actions/checkout@v2.4.0 + - name: πŸš€ Run Label Syncer + uses: micnncim/action-label-syncer@v1.3.0 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/pr-labels.yaml b/.github/workflows/pr-labels.yaml new file mode 100644 index 0000000..e3e5d63 --- /dev/null +++ b/.github/workflows/pr-labels.yaml @@ -0,0 +1,22 @@ +--- +name: PR Labels + +# yamllint disable-line rule:truthy +on: + pull_request_target: + types: [opened, labeled, unlabeled, synchronize] + +jobs: + pr_labels: + name: Verify + runs-on: ubuntu-latest + steps: + - name: 🏷 Verify PR has a valid label + uses: jesusvasquez333/verify-pr-label-action@v1.4.0 + with: + github-token: "${{ secrets.GITHUB_TOKEN }}" + pull-request-number: "${{ github.event.pull_request.number }}" + valid-labels: >- + breaking-change, bugfix, documentation, enhancement, + refactor, performance, new-feature, maintenance, ci, dependencies + disable-reviews: true diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index 746de23..0000000 --- a/CHANGELOG.md +++ /dev/null @@ -1,182 +0,0 @@ -# Changelog - -All notable changes to `powerdns-php` will be documented in this file. - -Updates should follow the [Keep a CHANGELOG](http://keepachangelog.com/) principles. - -## Unreleased -[Compare v3.4.0 - Unreleased](https://github.com/exonet/powerdns-php/compare/v3.4.0...develop) - -## [v3.4.0](https://github.com/exonet/powerdns-php/releases/tag/v3.4.0) - 2021-10-19 -[Compare v3.3.1 - v3.4.0](https://github.com/exonet/powerdns-php/compare/v3.3.1...v3.4.0) -### Added -- The `setConnector` method in the Powerdns class. - -### Changed -- The private methods in the `Connector` class are now protected instead of private. - -### Fixed -- Filling the `SearchResult` resource no longer results in 'Undefined index' notices. (#78) - -## [v3.3.1](https://github.com/exonet/powerdns-php/releases/tag/v3.3.1) - 2021-07-06 -[Compare v3.3.0 - v3.3.1](https://github.com/exonet/powerdns-php/compare/v3.3.0...v3.3.1) -### Fixed -- Replace deprecated Guzzle function (#75) - -## [v3.3.0](https://github.com/exonet/powerdns-php/releases/tag/v3.3.0) - 2021-06-07 -[Compare v3.2.0 - v3.3.0](https://github.com/exonet/powerdns-php/compare/v3.2.0...v3.3.0) -### Added -- Added interfaces for Connector and Powerdns. (@frankvanhest - #72) -- Run tests against PowerDNS 4.4. (@frankvanhest - #73) - -## [v3.2.0](https://github.com/exonet/powerdns-php/releases/tag/v3.2.0) - 2021-05-06 -[Compare v3.1.0 - v3.2.0](https://github.com/exonet/powerdns-php/compare/v3.1.0...v3.2.0) -### Added -- Added a method `unsetNsec3param()` to unset the nsec3param for a zone. -- Unit tests for enabling, disabling and setting DNSSEC. -- It is now possible to set/get resource records to a zone resource. See `examples/new_domain_from_zone_resource.php` for an example. - -### Changed -- Calling `setNsec3Param()` with value `null` will unset the `nsec3param`. -- The internals of getting ResourceSets. Previously a GET request was made to get the resource sets, now the zone resource is being used which already contains all resource sets. - -### Fixed -- Updated the stable composer.phar URL to properly run tests. - -## [v3.1.0](https://github.com/exonet/powerdns-php/releases/tag/v3.1.0) - 2021-02-01 -[Compare v3.0.0 - v3.1.0](https://github.com/exonet/powerdns-php/compare/v2.0.0...v3.1.0) -### Added -- The `omitDnssecAndEditedSerialFields` parameter in `listZones`. (@frankvanhest - #61) - -## [v3.0.0](https://github.com/exonet/powerdns-php/releases/tag/v3.0.0) - 2021-01-05 -[Compare v2.6.0 - v3.0.0](https://github.com/exonet/powerdns-php/compare/v2.6.0...v3.0.0) -### Breaking -- Dropped support for unsupported PHP versions. PHP 7.3 (or newer) is now required. - -### Changed -- Updated Guzzle to 7.2. (@itspluxstahre #50) -- Updated PHPUnit to 9.5.0. -- When running tests a `composer update` will be executed for each environment to validate the packages/config for the specified PHP version. - -## [v2.6.0](https://github.com/exonet/powerdns-php/releases/tag/v2.6.0) - 2020-12-21 -[Compare v2.5.2 - v2.6.0](https://github.com/exonet/powerdns-php/compare/v2.5.2...v2.6.0) -### Added -- Support for PHP 8. (@akondas #54) -- Support for the PowerDNS search endpoint. (#51) -- The `notify` method on a zone. (@frankvanhest #56) - -## [v2.5.2](https://github.com/exonet/powerdns-php/releases/tag/v2.5.2) - 2020-11-26 -[Compare v2.5.1 - v2.5.2](https://github.com/exonet/powerdns-php/compare/v2.5.1...v2.5.2) -### Added -- The `LUA` record type. (#53) - -## [v2.5.1](https://github.com/exonet/powerdns-php/releases/tag/v2.5.1) - 2020-11-06 -[Compare v2.5.0 - v2.5.1](https://github.com/exonet/powerdns-php/compare/v2.5.0...v2.5.1) -### Fixed -- The `account` is send to PowerDNS when creating a zone. (#47) - -## [v2.5.0](https://github.com/exonet/powerdns-php/releases/tag/v2.5.0) - 2020-10-30 -[Compare v2.4.0 - v2.5.0](https://github.com/exonet/powerdns-php/compare/v2.4.0...v2.5.0) -### Added -- Get PowerDNS statistics. - -## [v2.4.0](https://github.com/exonet/powerdns-php/releases/tag/v2.4.0) - 2020-08-04 -[Compare v2.3.1 - v2.4.0](https://github.com/exonet/powerdns-php/compare/v2.3.1...v2.4.0) -### Added -- Export a zone in AXFR format. (#35) -- Get the zone from a ResourceRecord. (#40) -- Get the PowerDNS version of a server with `$client->serverVersion()`. -- Added a `docker-compose.yml` and `run-tests.sh` script to easy test against a combination of different PHP and PowerDNS versions. - -### Changed -- Travis now uses Docker to run the tests. - -### Fixed -- `$resouceRecord->getComments()` no longer throws an exception if there are no comments. (#38) - -## [v2.3.1](https://github.com/exonet/powerdns-php/releases/tag/v2.3.1) - 2020-05-12 -[Compare v2.3.0 - v2.3.1](https://github.com/exonet/powerdns-php/compare/v2.3.0...v2.3.1) -### Fixed -- No longer throw an exception when throwing an exception if the response body is not an error. (#32) - -## [v2.3.0](https://github.com/exonet/powerdns-php/releases/tag/v2.3.0) - 2020-04-30 -[Compare v2.2.0 - v2.3.0](https://github.com/exonet/powerdns-php/compare/v2.2.0...v2.3.0) -### Added -- The record type `SPF`. ([Th3Mouk](https://github.com/Th3Mouk) - [#30](https://github.com/exonet/powerdns-php/pull/30)) - -### Fixed -- Removed record types `APL`, `HIP` and `TA` which are not supported by PowerDNS. - -## [v2.2.0](https://github.com/exonet/powerdns-php/releases/tag/v2.2.0) - 2020-04-01 -[Compare v2.1.0 - v2.2.0](https://github.com/exonet/powerdns-php/compare/v2.1.0...v2.2.0) -### Added -- Create a new zone based on a zone resource object. - -## [v2.1.0](https://github.com/exonet/powerdns-php/releases/tag/v2.1.0) - 2020-03-11 -[Compare v2.0.0 - v2.1.0](https://github.com/exonet/powerdns-php/compare/v2.0.0...v2.1.0) -### Added -- It is now possible to set the NSEC3PARAM on a zone. ([mkevenaar-docktera](https://github.com/mkevenaar-docktera) - #25 #26) - -### Changed -- The validation of the NSEC3PARAM is improved. (#27) - -## [v2.0.0](https://github.com/exonet/powerdns-php/releases/tag/v2.0.0) - 2020-01-29 -[Compare v1.1.0 - v2.0.0](https://github.com/exonet/powerdns-php/compare/v1.1.0...v2.0.0) -### Breaking -- Renamed `SOA-EDIT-API` to `SOA-EDIT` when creating a new zone. -- Implemented new `SOA-EDIT-API` logic when creating a new zone that defaults to `DEFAULT` so the `SOA-EDIT` value will be used. - -This change will break your SOA increment if not configured correctly in the zone meta data. You need to update the zone -meta yourself in whatever backend you use for PowerDNS. See the following quote from the [PowerDNS website (section API)](https://doc.powerdns.com/md/authoritative/upgrading/): - -> Incompatible change: SOA-EDIT-API now follows SOA-EDIT-DNSUPDATE instead of SOA-EDIT (incl. the fact that it now has -> a default value of DEFAULT). You must update your existing SOA-EDIT-API metadata (set SOA-EDIT to your previous -> SOA-EDIT-API value, and SOA-EDIT-API to SOA-EDIT to keep the old behaviour). - -### Added -- PowerDNS 4.2 support (see 'breaking' above). -- PHP 7.4 support -- Functional tests for SOA increments. - -## [v1.1.0](https://github.com/exonet/powerdns-php/releases/tag/v1.1.0) - 2019-10-21 -[Compare v1.0.1 - v1.1.0](https://github.com/exonet/powerdns-php/compare/v1.0.1...v1.1.0) -### Added -- `$powerdns->listZones: Zone[];` to get all zones. ([jackdpeterson](https://github.com/jackdpeterson) - #14) -- `$zone->getCanonicalName(): string;` to get the canonical zone name. ([jackdpeterson](https://github.com/jackdpeterson) - #14) - -## [v1.0.1](https://github.com/exonet/powerdns-php/releases/tag/v1.0.1) - 2019-07-17 -[Compare v1.0.0 - v1.0.1](https://github.com/exonet/powerdns-php/compare/v1.0.0...v1.0.1) -### Changed -- The `Content-Type` header is now also set when making calls to the API. ([#11](https://github.com/exonet/powerdns-php/issues/11)) - -### Fixed -- Changed the payload key from `set_ptr` to the correct `set-ptr` in the RRSetTransformer. ([#12](https://github.com/exonet/powerdns-php/issues/12)) - -## [v1.0.0](https://github.com/exonet/powerdns-php/releases/tag/v1.0.0) - 2019-07-05 -[Compare v0.2.4 - v1.0.0](https://github.com/exonet/powerdns-php/compare/v0.2.4...v1.0.0) -### Changed -- Public release with quick-start example in readme. - -## [v0.2.4](https://github.com/exonet/powerdns-php/releases/tag/v0.2.4) - 2019-06-18 -[Compare v0.2.3 - v0.2.3](https://github.com/exonet/powerdns-php/compare/v0.2.3...v0.2.4) -### Changed -- Renamed the `toggleDnssec` method to `setDnssec`. - -## [v0.2.3](https://github.com/exonet/powerdns-php/releases/tag/v0.2.3) - 2019-04-10 -[Compare v0.2.2 - v0.2.3](https://github.com/exonet/powerdns-php/compare/v0.2.2...v0.2.3) -### Removed -- The alias functionality that replaces the `@` for the full domain name in the content section when adding DNS records. - -## [v0.2.2](https://github.com/exonet/powerdns-php/releases/tag/v0.2.2) - 2019-03-18 -[Compare v0.2.1 - v0.2.2](https://github.com/exonet/powerdns-php/compare/v0.2.1...v0.2.2) -### Added -- It is now possible to enable/disable DNSSEC directly on a zone. - -## [v0.2.1](https://github.com/exonet/powerdns-php/releases/tag/v0.2.1) - 2019-03-12 -[Compare v0.2.0 - v0.2.1](https://github.com/exonet/powerdns-php/compare/v0.2.0...v0.2.1) -### Fixed -- DS records in the Cryptokey resource can be `null`. - -## [v0.2.0](https://github.com/exonet/powerdns-php/releases/tag/v0.2.0) - 2019-03-04 -### Added -- Initial public release. diff --git a/README.md b/README.md index 2d2d879..590e390 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ $zone->create([ See the [examples](examples) directory for more. ## Change log -Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently. +Please see [releases](link-releases) for more information on what has changed recently. ## Testing Testing against multiple PHP / PowerDNS versions can be done by using the provided `docker-compose.yml` and the @@ -82,3 +82,4 @@ The MIT License (MIT). Please see [License File](LICENSE.md) for more informatio [link-downloads]: https://packagist.org/packages/exonet/powerdns-php [link-author]: https://github.com/exonet [link-contributors]: ../../contributors +[link-releases]: https://github.com/exonet/powerdns-php/releases