-
-
Notifications
You must be signed in to change notification settings - Fork 279
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
[Laravel Preset] Job classes use public properties #108
Comments
Same with |
@dinhquochan it's actually more than only As for myself, it'd be nice to at least disable |
So, I think should be removed cc @nunomaduro |
So to fix this I see 3 ways.
This will mean that all classes of the class type (including classes which extends it) will have the listed properties allowed. I would prefer option 3, even though it adds more complexity, but it also adds flexibility. What are your guys thoughts on this? And do you see any issues with my approach? |
So for now you can fix this by using the |
@olivernybroe Once we know Laravel has mandatory public properties, would be useful at laravel preset config file a example for ignoring 'timestamp', for instance. |
@robsontenorio I totally agree. I would like to have the advantage to ignore public properties based on the parent class. |
@olivernybroe but the exclude only allows exact file paths? Or could we also use some kind of glob to exclude all files inside |
@Gummibeer yep, we only allow file paths at the moment. We have an issue open for folders #243 |
Anyone knows how to add this ? I kept trying different ways and can't figure how to disable the check . I even tried adding it to the remove array inside insights.php like so
but the comment is still there |
Like the Forbidden Global Constants
I would like to be able to ignore certain public properties.
Laravel allows us to specify a Queue Connection as a public property on the job itself (laravel/docs#5200) or even the amount of times we should retry the job (https://laravel.com/docs/5.6/queues#max-job-attempts-and-timeout), which conflicts with this
Forbidden public property
rule.For now I'm only opening an issue because I don't have enough knowledge to send a PR for this. I'm still getting to know the process, Sniffers, PHP CS, etc.
The text was updated successfully, but these errors were encountered: