Because updating a project should not be complicated and done without any break into your applications, it is important to ensure compatibility between minor versions of our projects.
That’s why we strictly follow the Semantic Versioning for all of our libraries and applications.
The following rules come from the Symfony BC Promise that we fully embrace.
Using our Interfaces
Use Case | Backward Compatibility |
---|---|
If you… | Then we guarantee BC… |
Type hint against the interface | Yes |
Call a method | Yes |
If you implement the interface and… | Then we guarantee BC… |
Implement a method | Yes |
Add an argument to an implemented method | Yes |
Add a default value to an argument | Yes |
Add a return type to an implemented method | Yes |
Using our Classes
Use Case | Backward Compatibility |
---|---|
If you… | Then we guarantee BC… |
Type hint against the class | Yes |
Create a new instance | Yes |
Extend the class | Yes |
Access a public property | Yes |
Call a public method | Yes |
If you extend the class and… | Then we guarantee BC… |
Access a protected property | Yes |
Call a protected method | Yes |
Override a public property | Yes |
Override a protected property | Yes |
Override a public method | Yes |
Override a protected method | Yes |
Add a new property | No |
Add a new method | No |
Add an argument to an overridden method | Yes |
Add a default value to an argument | Yes |
Call a private method (via Reflection) | No |
Access a private property (via Reflection) | No |
Using our Traits
Use Case | Backward Compatibility |
---|---|
If you… | Then we guarantee BC… |
Use a trait | Yes |
If you use the trait and… | Then we guarantee BC… |
Use it to implement an interface | Yes |
Use it to implement an abstract method | Yes |
Use it to extend a parent class | Yes |
Use it to define an abstract class | Yes |
Use a public, protected or private property | Yes |
Use a public, protected or private method | Yes |
Exceptions To These Rules
These rules are not true for the following cases:
- A tag
@internal
is set, - The file is in a test folder or a test namespace.
These methods, classes, traits or interfaces should not be used or implemented.