-
Notifications
You must be signed in to change notification settings - Fork 354
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document the public API #392
Comments
Public API (6.0.0)As of MethodsValidator
Factory
SchemaStorage & SchemaStorageInterface
UriResolver & UriResolverInterface
UriRetriever & UriRetrieverInterface
Class Constants
Class Properties
Data Formats
Exceptions
Please let me know if I have missed anything, or if anything in the list above needs changing. I'm fully aware that there are public methods which are not in this list - I deliberately omitted stuff I felt should not be considered part of the public API, so if you think I've omitted something that should be included, sing out! |
Also, if this happens, then there will also be methods on that class which need to be considered part of the public API. |
Some food for thought: http://fabien.potencier.org/pragmatism-over-theory-protected-vs-private.html Fabien makes some good points about If you wish to restrict this it could be a good idea to make the property itself private and have a protected getter. |
@curry684 Unfortunately, the way this project is architected means that there will always be methods that are not part of the public API, which are declared as public or protected. No way to avoid that other than significant refactoring of the library that will break a lot of people's workflows. From your link:
This is the kind of thing I'm going for here - to have a well-documented public API, and thereby avoid the confusion that may arise from relying solely on the accessibility to determine whether or not something is part of the API (which won't work for this library in its current architecture).
This is a very good point - I'll need to go through and see which properties need to available for inheritance, and which do not. I have no objection in principle to certain protected properties being considered part of the public API, but I would like to document them as such. |
Although, adding a getter for |
That was my main intent with giving the food for thought: you are both working towards a new major version and documenting the API. That is the best time, if any, to evaluate all extension points that ever happened to get created, intentionally or not. In 6.0 it's perfectly acceptable to change a property from protected to private and give it a protected getter instead. Internal breakage should be zero with a proper refactoring tool. |
This proposal works for me as a first phase for documentation |
Closing this issue for now since there isn't any ask for it and we are very bound for time/contribution. |
What
The public API needs to be documented to make it clear what is intended for user access (i.e. cannot be broken without a major version bump), and what is internal to the library.
Why
So that we know what can and cannot be altered without breaking backwards-compatibility when making internal changes to the library or adding new features.
The text was updated successfully, but these errors were encountered: