-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Move note about docs to "before working on a fix" since everything until then is relevant for docs too - Remove note that "Every file view on GitHub has an 'edit this file" link.' because that's confusing at best - Move definition of public API to its own page and refer to it always as "public API", not just "API" - fix a link
- Loading branch information
1 parent
c2bb37f
commit 5e19111
Showing
7 changed files
with
81 additions
and
51 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
--- | ||
title: Definition of Public API | ||
summary: A definition of what we consider to be "public API" which is protected by semantic versioning | ||
icon: code | ||
--- | ||
|
||
# Definition of public API | ||
|
||
The following is a definition of what we consider to be "public API". Public API is protected by semantic versioning. | ||
|
||
New public API will not be introduced in patches, but can be introduced in minor and major releases. | ||
|
||
Existing public API will not be removed or altered in patches or minor releases, but can be removed or altered in major releases. | ||
|
||
## Explicitly included | ||
|
||
These are explicitly included in our definition of public API (unless excluded below): | ||
|
||
* **global** functions, constants, and variables | ||
* namespaces, classes, interfaces, enums, and traits | ||
* public and protected scope (including methods, properties and constants) | ||
* private static class property declarations (considered to be configuration variables) | ||
* configuration default values (in yml files and in private statics) | ||
* yml configuration file and fragment names (see [yml configuration syntax](/developer_guides/configuration/configuration/#syntax)) | ||
* extension hooks (e.g. `$this->extend('someExtensionHook', $someVariable);`) | ||
|
||
## Explicitly excluded | ||
|
||
These are explicitly _not_ public API: | ||
|
||
* private scope (with the exception for `private static` properties which aren't annotated with `@internal`) | ||
* all entities marked as `@internal` | ||
* yml configuration in recipes | ||
* HTML, CSS, JavaScript (within reason), SQL, and anything else that is not PHP | ||
|
||
## Implicit or undefined scenarios | ||
|
||
Other entities might be considered to be included or excluded from the public API on case-by-case basis based on how likely it is to cause problems during an upgrade. | ||
|
||
API from third party dependencies may implicitly be incorporated into our definition of public API if: | ||
|
||
* they are defined as a parameter type for a supported method | ||
* they are defined as a return type for a supported method | ||
* they are extended by a Silverstripe CMS class. | ||
|
||
When defining a return type or a parameter type, it is preferable to use a more generic interface rather than a specific class. Third party dependencies that are used for internal purposes and are not explicitly exposed via the Silverstripe CMS public API are not covered by semantic versioning and maybe substituted without notice. |