Skip to content

Added nullsafe operator to actionDocBlock in OperationsBuilder#88

Open
ricklambrechts wants to merge 1 commit intovyuldashev:masterfrom
ricklambrechts:null-check-actiondocblock
Open

Added nullsafe operator to actionDocBlock in OperationsBuilder#88
ricklambrechts wants to merge 1 commit intovyuldashev:masterfrom
ricklambrechts:null-check-actiondocblock

Conversation

@ricklambrechts
Copy link
Copy Markdown

When there is no docblock for a controller function like:

#[OpenApi\Operation]
public function __invoke(): Response

You will get the following exception:

Call to a member function getSummary() on null {"exception":"[object] (Error(code: 0): Call to a member function getSummary() on null at /var/www/html/vendor/vyuldashev/laravel-openapi/src/Builders/Paths/OperationsBuilder.php:82)

This PR fixes that you don't need to have a docblock for your function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant