v1.0 roadmap #719
Replies: 3 comments 9 replies
-
Roadmap looks great! I personnaly don't mind breaking changes, so backward compatibility is not required in my case. Not sure it should be in the roadmap, but one thing that could be great to work on is the demos.
All this could be used as the subject of the screencasts to make it worth. |
Beta Was this translation helpful? Give feedback.
-
I think there should be something similar to a This below sounds like a good idea:
You could just stop documenting the old APIs; while not actively removing or breaking the old functionality. |
Beta Was this translation helpful? Give feedback.
-
Hello @romalytvynenko and thank you for your work.
|
Beta Was this translation helpful? Give feedback.
-
Hey!
Last week, I released v0.12.x. This release is meant to gather feedback on the experimental configuration API and finalize it before v1.0.
In this discussion, I want to outline the plans for v1.0 to make the roadmap clear and transparent.
Here are the key things I plan to finalize before tagging v1.0, along with some thoughts on backward compatibility.
Backward Compatibility
While I want to improve Scramble’s APIs, I recognize that the library has been in v0.x for a long time, and many of you rely on the current APIs.
For v1.0, my goal is to preserve the existing APIs as much as possible to avoid breaking changes. There will be some deprecations and possibly minor breaking changes, but I’ll try to minimize them.
Before v1.0, all new APIs will be released as experimental so I can gather feedback. "Experimental API" means changes may still occur between patch versions (
0.12.x
and0.12.y
).Configuration
With support for multiple API documents in a single project, it became clear that Scramble's configuration needs an update. Right now, configuration is global, making it unclear how to manage multiple API documents effectively.
This was introduced in v0.12.0 and is ready for you to try!
Extensions
As Scramble evolved, the need for extension points became clearer. There should be a way to modify Scramble’s behavior by registering custom extensions before or after specific ones.
For v1.0, I plan to introduce these extension points:
OperationExtension
does.Each transformer will receive the entity it modifies (document, operation, or schema) along with context information. For example, an operation transformer will get the route, configuration, and other relevant details.
You will also be able to control the order of extensions when registering them, including placing them before Scramble’s built-in extensions.
These extensions (except schema transformation) are available now in v0.12.x as experimental!
Full OpenAPI 3.1.0 Support
v1.0 will fully support OpenAPI 3.1.0, allowing you to document everything the specification offers.
For example, you’ll be able to document callbacks, links, custom authentication, and more—things Scramble currently doesn’t handle.
Attributes
With more people using Scramble, it became clear that there should be an easy way to manually override generated documentation. PHP attributes solve this well by allowing modifications at the route level.
You should be able to redefine parameters, request bodies, responses, etc.
In v0.12.x, I introduced five new attributes for defining request parameters:
#[QueryParameter]
#[HeaderParameter]
#[CookieParameter]
#[PathParameter]
#[BodyParameter]
What’s still missing:
Support for Closure-Based Routes
Right now, Scramble only documents routes defined in controllers. For v1.0, I’d like to add support for closure-based routes as well.
Caching
Generating the OpenAPI document is resource-intensive because Scramble needs to parse a lot of PHP code into an AST and analyze it. Caching will help reduce resource usage and avoid unnecessary re-analysis.
Ideally, only changed files should be re-analyzed between documentation generations. However, this is complex, so simpler caching strategies may be needed.
Thoughts?
So that is the v1.0 roadmap.
Is there something missing? Is something highlighted here resonates with you?
Let me know what you think!
Beta Was this translation helpful? Give feedback.
All reactions