Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Latest version is a breaking change #715

Closed
rabol opened this issue Aug 25, 2023 · 3 comments
Closed

Latest version is a breaking change #715

rabol opened this issue Aug 25, 2023 · 3 comments

Comments

@rabol
Copy link

rabol commented Aug 25, 2023

          This is a breaking change

After I updated to the latest version i get this error:

 TypeError 

  Cannot assign null to property Knuckles\Camel\Extraction\Parameter::$enumValues of type array

  at vendor/spatie/data-transfer-object/src/Reflection/DataTransferObjectProperty.php:48

Originally posted by @rabol in #713 (comment)

@rabol
Copy link
Author

rabol commented Aug 25, 2023

this is causing the above issue:

 #[Endpoint('Get signature', 'This endpoint allows you to retrieve an stored signature')]
 #[UrlParam('signature_id', 'Id uf the signature', example: '42342-4234-rfdsff-3432f')]
    
    public function show(Request $request, string $signature_id)
    {
        $us = UserSignature::whereId($signature_id)->first();
        if (is_null($us)) {
            return $this->sendError(error: 'Signature does not exists');
        }

        if ($us->user_id != $request->user()->id) {
            return $this->sendError(error: 'Signature does not belong to you');
        }

        return $this->sendResponse(new UserSignatureResource($us));
    }

There is no Enum in the above

if I uncomment all #[UrlParam() it works

@shalvah
Copy link
Contributor

shalvah commented Aug 25, 2023

Hmm, thought I had covered for that, but I'll take a look.

@shalvah
Copy link
Contributor

shalvah commented Aug 25, 2023

This should be fixed now (4.23.1).

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

No branches or pull requests

2 participants