Skip to content

Commit

Permalink
DOC Document change to return types in composer plugins (#685)
Browse files Browse the repository at this point in the history
  • Loading branch information
GuySartorelli authored Feb 19, 2025
1 parent 8642304 commit a9523c5
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions en/08_Changelogs/5.4.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,18 @@ See [indexes](/developer_guides/model/indexes/) to learn about indexes in Silver

## API changes

### Return type changes in composer plugins

We have made an exception to our [definition of public API](/project_governance/public_api/) by adding a return type to the `execute()` method in the symfony commands for `silverstripe/vendor-plugin` and `silverstripe/recipe-plugin`.

The exception was made for the following reasons:

- This change ensures CMS 5 can continue to be installed in scenarios where Composer is installed with Symfony 7. This can be done manually, and is also likely to be a future default.
- The likelihood of someone subclassing the relevant classes is very low.
- For installations of installer with earlier versions of Symfony this won't cause any problems, since PHP allows return types to be more specific in subclasses. This is known as [covariance](https://www.php.net/manual/en/language.oop5.variance.php#language.oop5.variance.covariance).

### Deprecated API

- The class names for the `TopPage` feature in [`dnadesign/silverstripe-elemental`](https://github.com/silverstripe/silverstripe-elemental) do not follow the correct naming convention for Silverstripe CMS. The existing classes have been deprecated and will be renamed to match the correct naming convention in a future major release.
- [`SilverStripe\ORM\ArrayLib`](api:SilverStripe\ORM\ArrayLib) has been deprecated. It will be renamed to `SilverStripe\Core\ArrayLib`
- [`SilverStripe\ORM\ArrayList`](api:SilverStripe\ORM\ArrayList) has been deprecated. It will be renamed to `SilverStripe\Model\List\ArrayList`
Expand Down

0 comments on commit a9523c5

Please sign in to comment.