File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2222use Interop \Queue \Context ;
2323use Interop \Queue \Message as QueueMessage ;
2424use JsonSerializable ;
25- use ReturnTypeWillChange ;
2625use RuntimeException ;
2726
2827class Message implements JsonSerializable
@@ -122,7 +121,12 @@ public function getTarget(): array
122121 public function getArgument (mixed $ key = null , mixed $ default = null ): mixed
123122 {
124123 // support old jobs that still use args key
125- $ data = $ this ->parsedBody ['data ' ] ?? $ this ->parsedBody ['args ' ][0 ];
124+ if (array_key_exists ('data ' , $ this ->parsedBody )) {
125+ $ data = $ this ->parsedBody ['data ' ];
126+ } else {
127+ // support old jobs that still use args key
128+ $ data = $ this ->parsedBody ['args ' ][0 ];
129+ }
126130
127131 if ($ key === null ) {
128132 return $ data ;
@@ -156,7 +160,6 @@ public function __toString(): string
156160 *
157161 * @return array<string, mixed>
158162 */
159- #[ReturnTypeWillChange]
160163 public function jsonSerialize (): array
161164 {
162165 return $ this ->parsedBody ;
You can’t perform that action at this time.
0 commit comments