Skip to content

Commit da0c94d

Browse files
committed
[DOCS] Add an API and deprecation policy
As discussed here: #715
1 parent 97cc5e4 commit da0c94d

File tree

4 files changed

+63
-0
lines changed

4 files changed

+63
-0
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,6 @@
77
/CONTRIBUTING.md export-ignore
88
/bin/ export-ignore
99
/config/ export-ignore
10+
/docs/ export-ignore
1011
/phpunit.xml export-ignore
1112
/tests/ export-ignore

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
All notable changes to this project will be documented in this file.
44
This project adheres to [Semantic Versioning](https://semver.org/).
55

6+
Please also have a look at our
7+
[API and deprecation policy](docs/API-and-deprecation-policy.md).
8+
69
## x.y.z
710

811
### Added
@@ -46,6 +49,10 @@ This project adheres to [Semantic Versioning](https://semver.org/).
4649
characters (#485)
4750
- Fix (regression) failure to parse at-rules with strict parsing (#456)
4851

52+
### Documentation
53+
54+
- Add an API and deprecation policy (#720)
55+
4956
@ziegenberg is a new contributor to this release and did a lot of the heavy
5057
lifting. Thanks! :heart:
5158

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -780,6 +780,11 @@ classDiagram
780780
ValueList --> "*" Value : aComponents
781781
```
782782

783+
## API and deprecation policy
784+
785+
Please have a look at our
786+
[API and deprecation policy](docs/API-and-deprecation-policy.md).
787+
783788
## Contributing
784789

785790
Contributions in the form of bug reports, feature requests, or pull requests are

docs/API-and-deprecation-policy.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# API and Deprecation Policy
2+
3+
## API Policy
4+
5+
The code in this library is intended to be called by other projects. It is not
6+
intended to be extended. If you want to extend any classes, you're on your own,
7+
and your code might break with any new release of this library.
8+
9+
Any classes, methods and properties that are `public` and not marked as
10+
`@internal` are considered to be part of the API. Those methods will continue
11+
working in a compatible way over minor and bug-fix releases according
12+
to [Semantic Versioning](https://semver.org/). though we might change the native
13+
type declarations in a way that might could break subclasses, though.
14+
15+
Any classes, methods and properties that are `protected` or `private` are _not_
16+
considered part of the API. Please do not rely on them. If you do, you're on
17+
your own.
18+
19+
Any code that is marked as `@internal` is subject to change or removal without
20+
notice. Please do not call it. There be dragons.
21+
22+
If a class is marked as `@internal`, all properties and methods of this class
23+
are by definition considered to be internal as well.
24+
25+
When we change some code from public to `@internal` in a release, the first
26+
release that might change that code in a breaking way will be the next major
27+
release after that. This will allow you to change your code accordingly.
28+
29+
For example, we might mark some code as `@internal` in version 8.7.0. The first
30+
version that possibly changes this code in a breaking way will then be version
31+
9.0.0.
32+
33+
Before you upgrade your code to the next major version of this library, please
34+
update to the latest release of the previous major version and make sure that
35+
your code does not reference any code that is marked as `@internal`.
36+
37+
## Deprecation Policy
38+
39+
Code that we plan to remove is marked as `@deprecated`. In the corresponding
40+
annotation, we also note in which release the code will be removed.
41+
42+
When we mark some code as `@deprecated` in a release, we'll usually remove it in
43+
the next major release.
44+
45+
For example, when we mark some code as `@deprecated` in version 8.7.0, we'll
46+
remove it in version 9.0.0 (or sometimes a later major release).
47+
48+
Before you upgrade your code to the next major version of this library, please
49+
update to the latest release of the previous major version and make sure that
50+
your code does not reference any code that is marked as `@deprecated`.

0 commit comments

Comments
 (0)