-
-
Notifications
You must be signed in to change notification settings - Fork 11
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
Config validation fails with 2.6.1 #67
Comments
Hey @goellner! I'm sorry that you're running into issues with the package. I've just tried reproducing this issue with a fresh Laravel 11 installation like so: config-validation/hashing.php: use AshAllenDesign\ConfigValidator\Services\Rule;
return [
Rule::make('bcrypt.rounds')->rules(['required', 'integer']),
Rule::make('argon.memory')->rules(['required', 'integer']),
Rule::make('argon.threads')->rules(['required', 'integer']),
Rule::make('argon.time')->rules(['required', 'integer']),
]; I can't seem to get the validation to fail with what I have there. Would it be possible for you to give me steps to reproduce the issue on a fresh Laravel installation, or maybe provide a fresh Laravel installation that has the error? Just to double check too, does this still fail after running?:
I'll make sure to look at this as a priority today! 😄 |
Hello Ash - I get the same issue as @goellner I am on Laravel 11.7. If I use version 2.6.1 I get 200+ validation errors. I went back to version 2.6.0 and see expected results. |
Hey @ronfuller! I'm sorry that you're having issues with the package too. I could never seem to get the package to break in the way that's being described, so I was wondering whether you'd be able to provide a fresh Laravel app repo (with the package installed) that has the issue, please? That'd make things a lot easier for me to investigate the issue 😄 |
Hi @ash-jc-allen, I just installed the package in a new Laravel app and had the same issues. So I ran the most minimal test possible: Created a new Laravel app with the latest version (Laravel 11.10.0). It gave me 189 errors. Not surprising that there were some errors, since I didn't do anything else after creating the bare Laravel app (nothing to set up env etc.). But I then wound back to v2.6.0 of the package:
(I realise that last step wasn't necessary - the default rulesets haven't changed.) This time when I ran Same when I went the other way, and upgraded the package to 2.6.1 again: back to 189 errors. I'm running PHP 8.3.7 on MacOS (the PHP install that comes with Herd). I haven't pushed the repo to Github, but can do so if you'd like ... but there's not much to the test! |
Hey @sshead, thanks for this! I think Imight have just realised what's causing the problem (or at least some of it). I've not updated the defaults for quite a while, so the names of the config fields in them aren't up to date with the names that ship with the Laravel 11 config files. That's definitely something I need to update! As for the extra errors displaying, I need to take a look at that too. I think it's related to this change here: #66 When I was updating the package to work with This is just a working theory at the moment though and needs some investigation on my end! Hopefully I can take a look at it some point this week 😄 |
Created a fresh Laravel 11 installation with the package (2.7.0) here: https://share.zight.com/L1u2xJ4b
haven't changed anything from the defaults tested with php 8.3 and 8.2. same results. think the issue is that it is getting a |
Hey @goellner! In all fairness, I think a lot of the default rulesets need updating. It's something that's been on my list for a while but it keeps getting pushed down by client work haha! But yeah, it does look a bit odd that it's marking them as invalid. Maybe that's something for me to investigate over my Christmas break 😄 |
Hello,
updated all composer packages today and noticed that the config validation is throwing 210 errors now. Example:
the first example is bcrypt rounds and I haven't overwritten the rounds in my env. I also have a lot of errors where the value has to be a string, but it already is:
It does not fail with version 2.6.0 and also not with 2.5.0. If you need more information just ping me in a reply please.
The text was updated successfully, but these errors were encountered: