Skip to content

Commit c6ea0e1

Browse files
committed
Flesh out and hook up migration guide for v6
1 parent 5f3f9c7 commit c6ea0e1

3 files changed

Lines changed: 14 additions & 3 deletions

File tree

docs/.vitepress/config.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ function getGuideSidebar() {
2020
{
2121
text: 'Upgrading',
2222
items: [
23+
{ text: 'Migration from 5.x to 6.x', link: '/guide/migrating-to-v6' },
2324
{ text: 'Migration from 4.x to 5.x', link: '/guide/migrating-to-v5' },
2425
{ text: 'Migration from 3.x to 4.x', link: '/guide/migrating-to-v4' },
2526
{ text: 'Migration from 2.x to 3.x', link: '/guide/migrating-to-v3' },
@@ -64,7 +65,7 @@ module.exports = {
6465
srcExclude: [
6566
'examples/Readme.md'
6667
],
67-
themeConfig: {
68+
themeConfig: {
6869
socialLinks: [
6970
{ icon: 'github', link: 'https://github.com/zircote/swagger-php' },
7071
],

docs/guide/migrating-to-v6.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,15 @@ v6 is mostly a cleanup release with updated dependencies. The main changes are:
1010
For most installations upgrading should not require any changes.
1111

1212
## Removed deprecated elements
13-
### `\Openapi\Generator::getProcessors()` and `\Openapi\Generator::setProcessors()`
13+
### Methods `\Openapi\Generator::getProcessors()` and `\Openapi\Generator::setProcessors()`
1414
Use `getProcessorPipeline()` and `setProcessorPipeline(new Pipeline(...))` methods instead
15+
16+
### Static method `\Openapi\Generator::scan()`
17+
Main entry point into the `Generator` is now the **non-static** `generate()` method:
18+
```php
19+
(new Generator())->generate(/* ... */);
20+
```
21+
22+
### `Utils` helper
23+
Most methods in the class were internal to start with and the `Util::finder()` factory methods is now replaced with
24+
the new `SourceFinder` class.

src/Processors/Concerns/DocblockTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public function isRoot(OA\AbstractAnnotation $annotation): bool
3737
OA\Schema::class => true,
3838
OAT\Schema::class => true,
3939
];
40-
// try to find best root match
40+
// try to find the best root match
4141
foreach ($matchPriorityMap as $className => $strict) {
4242
foreach ($annotation->_context->annotations as $contextAnnotation) {
4343
if ($strict) {

0 commit comments

Comments
 (0)