Repository navigation
Refactors API client for v1.0 - #85
Merged
Merged
Conversation
This release introduces a major overhaul of the API client, focusing on consistency, flexibility, and explicit stability guarantees. Key changes include: - Endpoint accessors have been restructured to align with Cloudflare's API documentation. - Write methods now consistently accept a single `array $values` argument, enhancing flexibility and future-proofing against upstream API changes. - Cloudflare-deprecated endpoints (`accounts()->roles()`, `workers()->environment()`) have been removed. - A new "Versioning and compatibility" section in the `README.md` explicitly defines the public API and outlines semantic versioning promises. - A comprehensive `UPGRADE.md` guide has been added to assist with the transition from previous versions. - Required parameters for methods now use `MissingArgumentException` for improved validation.
The UPGRADE.md file was added to assist with the transition from v0.5 to v1.0. As v1.0 has been released and the guide's purpose served, it is no longer needed in the repository.
Ensures the `TransformationFlows::update` method correctly throws `MissingArgumentException` when the mandatory `flows` argument is not provided, aligning with the v1.0 API client's parameter validation strategy.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Prepares the API client for its v1.0 release by implementing significant breaking changes and improvements:
create,update,edit) now accept a singlearray $valuesargument instead of individual parameters. This improves flexibility, allowing access to previously unreachable Cloudflare API fields (e.g., in Zone Lockdowns, D1, and Zones), and simplifies future API additions.UPGRADE.mdguide detailing all breaking changes from v0.5 to v1.0, including accessor moves, signature changes, and removed features.README.mdwith a clear "Versioning and compatibility" section, outlining public API, internal components, and versioning promises.illuminate/contractsandilluminate/supporttosuggestdependencies and discontinues support for Lumen.workers()->deployments()methods, changing$scriptMameto$scriptName.Retryclass to clarify its non-public API status.