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

Change whitelist and blacklist to only and except #300

Merged
merged 4 commits into from Jun 26, 2020

Conversation

bakerkretzmar
Copy link
Collaborator

This PR renames Ziggy's whitelist and blacklist functionality to include and exclude.

Suggestions for further tweaks to this language are welcome, I played around with allow/deny too but Ziggy isn't actually really 'allowing' or 'denying' anything, so I think include and exclude are more accurate.

@mattstauffer
Copy link
Member

I do wish we had a better word than "include", because it's often additive instead of "only".

But I can't think of a better term. I'm all for renaming as a concept though.

@bakerkretzmar
Copy link
Collaborator Author

bakerkretzmar commented Jun 21, 2020

I'm going to update this to use only and except.

Among other advantages, those are the names used for similar functionality in Laravel's Arr helper, Collections and Eloquent Collections, and the Route Facade, so they'll already be familiar to a lot of people.

One drawback here is that macroing the Route Facade (which I already don't love doing) with only and except, to get Route::only() and Route::except() specifically for Ziggy, feels... confusing.

@bakerkretzmar bakerkretzmar changed the title Change whitelist and blacklist to include and exclude Change whitelist and blacklist to only and except Jun 21, 2020
@bakerkretzmar bakerkretzmar changed the base branch from master to develop June 26, 2020 13:34
@bakerkretzmar bakerkretzmar merged commit bc94fd1 into develop Jun 26, 2020
@bakerkretzmar bakerkretzmar deleted the jbk/language branch June 26, 2020 17:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants