Skip to content

[9.x] Removes unnecessary creatable API singleton parameter - #46677

Merged
taylorotwell merged 1 commit into
laravel:9.xfrom
drradao:fix/creatable-api-singleton-resource
Apr 4, 2023
Merged

[9.x] Removes unnecessary creatable API singleton parameter#46677
taylorotwell merged 1 commit into
laravel:9.xfrom
drradao:fix/creatable-api-singleton-resource

Conversation

@drradao

@drradao drradao commented Apr 3, 2023

Copy link
Copy Markdown
Contributor

Issue

Currently the creatable() and destroyable() methods in an API singleton resource route registartion accept boolean parameters that aren't taken into consideration later.

Route::apiSingleton('route', Controller::class)
    ->creatable()
    ->destroyable();

Possible solution

Removal of these parameters as suggested here

@GrahamCampbell

Copy link
Copy Markdown
Collaborator

This is strictly speaking a breaking change, so should go to master. In any case this is not a bug fix, so 9.x would not be appropriate.

@GrahamCampbell

Copy link
Copy Markdown
Collaborator

Oh, catching up on the other PR. I guess this is a bug fix. ;)

@drradao

drradao commented Apr 3, 2023

Copy link
Copy Markdown
Contributor Author

I guess it could be breaking if someone is passing a value there...

We could also add a comment in the parameter stating that the feature isn't there so people don't spam the optimize:clear command like maniacs thinking that they're cached 😄

@taylorotwell
taylorotwell merged commit c0d09c5 into laravel:9.x Apr 4, 2023
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.

3 participants