Skip to content

Commit

Permalink
Fix documentation linting issues
Browse files Browse the repository at this point in the history
Signed-off-by: George Steel <george@net-glue.co.uk>
  • Loading branch information
gsteel committed Oct 11, 2024
1 parent 643457c commit 020cc5c
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions docs/book/v3/migration/to-version-3.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ The biggest breaking change in v3 relates to the `Laminas\Serializer\Serializer`
its potential side-effects and for not following the [`S`](https://en.wikipedia.org/wiki/Single-responsibility_principle) within [`SOLID`](https://en.wikipedia.org/wiki/SOLID).

This class was:
- a registry (by providing a method to both persist and provide a "default" serializer instance)
- a factory (by providing methods to create objects based on arguments passed to methods)
- a serializer (by providing `serialize` and `unserialize` which then called magically an `AdapterInterface` implementation)
- a registry (by providing a method to both persist and provide a "default" serializer instance)

Check failure on line 13 in docs/book/v3/migration/to-version-3.md

View workflow job for this annotation

GitHub Actions / ci / QA Checks (Documentation Linting [8.1, locked], ubuntu-latest, laminas/laminas-continuous-integra...

Lists should be surrounded by blank lines [Context: "- a registry (by providing a m..."]

Check failure on line 13 in docs/book/v3/migration/to-version-3.md

View workflow job for this annotation

GitHub Actions / ci / QA Checks (Documentation Linting [8.1, locked], ubuntu-latest, laminas/laminas-continuous-integra...

Lists should be surrounded by blank lines [Context: "- a registry (by providing a m..."]
- a factory (by providing methods to create objects based on arguments passed to methods)
- a serializer (by providing `serialize` and `unserialize` which then called magically an `AdapterInterface` implementation)

To enable projects and 3rd-party libraries to provide their own serializer implementations (which are also available via the `AdapterPluginManager`), this class was removed in favor of dependency injection.

Expand All @@ -22,7 +22,7 @@ used in projects.
#### Projects Making Use of `Serializer#setDefaultAdapter`

In case you are using this method within a `laminas-mvc` or `mezzio` project, laminas got your back. You can now configure the projects default adapter by using the [dependency configuration](../intro.md#project-defaults).
If your project uses `Serializer#setDefaultAdapter` outside of `laminas-mvc` or `mezzio` projects, you have to provide your own registry.
If your project uses `Serializer#setDefaultAdapter` outside of `laminas-mvc` or `mezzio` projects, you have to provide your own registry.
You can either copy the current implementation into your project or implement an own minimal implementation such as:

```php
Expand Down Expand Up @@ -69,7 +69,6 @@ There are no replacements for these methods. You can either instantiate `PhpSeri

This method has multiple ways to get called:


##### Passing an Instance of `AdapterInterface`

```php
Expand Down

0 comments on commit 020cc5c

Please sign in to comment.