File tree Expand file tree Collapse file tree 3 files changed +23
-6
lines changed Expand file tree Collapse file tree 3 files changed +23
-6
lines changed Original file line number Diff line number Diff line change @@ -670,7 +670,7 @@ jobs:
670
670
- name : Update project dependencies
671
671
run : composer update --no-interaction --no-progress --ansi
672
672
- name : Require Symfony Uid
673
- run : composer require symfony/uid --dev --no-interaction --no-progress --ansi
673
+ run : composer require symfony/uid symfony/intl --dev --no-interaction --no-progress --ansi
674
674
- name : Flag held back Symfony packages
675
675
env :
676
676
symfony_version : ${{ matrix.symfony }}
Original file line number Diff line number Diff line change @@ -138,31 +138,31 @@ public function withDescription(string $description): self
138
138
return $ clone ;
139
139
}
140
140
141
- public function withGet (Operation $ get ): self
141
+ public function withGet (? Operation $ get ): self
142
142
{
143
143
$ clone = clone $ this ;
144
144
$ clone ->get = $ get ;
145
145
146
146
return $ clone ;
147
147
}
148
148
149
- public function withPut (Operation $ put ): self
149
+ public function withPut (? Operation $ put ): self
150
150
{
151
151
$ clone = clone $ this ;
152
152
$ clone ->put = $ put ;
153
153
154
154
return $ clone ;
155
155
}
156
156
157
- public function withPost (Operation $ post ): self
157
+ public function withPost (? Operation $ post ): self
158
158
{
159
159
$ clone = clone $ this ;
160
160
$ clone ->post = $ post ;
161
161
162
162
return $ clone ;
163
163
}
164
164
165
- public function withDelete (Operation $ delete ): self
165
+ public function withDelete (? Operation $ delete ): self
166
166
{
167
167
$ clone = clone $ this ;
168
168
$ clone ->delete = $ delete ;
@@ -186,7 +186,7 @@ public function withHead(Operation $head): self
186
186
return $ clone ;
187
187
}
188
188
189
- public function withPatch (Operation $ patch ): self
189
+ public function withPatch (? Operation $ patch ): self
190
190
{
191
191
$ clone = clone $ this ;
192
192
$ clone ->patch = $ patch ;
Original file line number Diff line number Diff line change 30
30
use ApiPlatform \Core \Metadata \Resource \ResourceNameCollection ;
31
31
use ApiPlatform \Core \OpenApi \Factory \OpenApiFactory ;
32
32
use ApiPlatform \Core \OpenApi \Model ;
33
+ use ApiPlatform \Core \OpenApi \Model \PathItem ;
33
34
use ApiPlatform \Core \OpenApi \OpenApi ;
34
35
use ApiPlatform \Core \OpenApi \Options ;
35
36
use ApiPlatform \Core \OpenApi \Serializer \OpenApiNormalizer ;
@@ -745,4 +746,20 @@ public function testSubresourceDocumentation()
745
746
$ normalizer = new OpenApiNormalizer ($ normalizers [0 ]);
746
747
$ normalizer ->normalize ($ openApi );
747
748
}
749
+
750
+ public function testResetPathItem ()
751
+ {
752
+ $ pathItem = new PathItem ();
753
+ $ pathItem ->withGet (null );
754
+ $ pathItem ->withDelete (null );
755
+ $ pathItem ->withPost (null );
756
+ $ pathItem ->withPut (null );
757
+ $ pathItem ->withPatch (null );
758
+
759
+ $ this ->assertNull ($ pathItem ->getGet ());
760
+ $ this ->assertNull ($ pathItem ->getDelete ());
761
+ $ this ->assertNull ($ pathItem ->getPost ());
762
+ $ this ->assertNull ($ pathItem ->getPut ());
763
+ $ this ->assertNull ($ pathItem ->getPatch ());
764
+ }
748
765
}
You can’t perform that action at this time.
0 commit comments