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

Missing imports #73

Open
phptek opened this issue Nov 19, 2019 · 5 comments
Open

Missing imports #73

phptek opened this issue Nov 19, 2019 · 5 comments

Comments

@phptek
Copy link

phptek commented Nov 19, 2019

AFAICT there are half a dozen missing imports, that cause problems in using this module with framework v4.

I ascertained the following were required just with a casual glance down the ZenValidatorConstraint.php file:

use SilverStripe\Assets\File;
use SilverStripe\View\Requirements;
use SilverStripe\i18n\i18n;
use \Exception;
use SilverStripe\Forms\CheckboxSetField;
use SilverStripe\Control\Director;
@lekoala
Copy link
Collaborator

lekoala commented Nov 19, 2019

that's odd because i'm pretty sure i managed to use it on a ss4 website :-D
but you are definetely right so maybe i missed something somewhere. i didn't test extensively. i'll look into it, i have a website using this module and it should have everything in order otherwise my customer is not going to be happy ;-)

this module would definetely need a bit of update, also since https://github.com/praxisnetau/silverware-validator doesn't seem to get any recent updates

@lekoala
Copy link
Collaborator

lekoala commented Nov 19, 2019

034f511 should fix this as well as a lot of code formatting issues, i'm running some tests to see if everything is indeed working as it should

@phptek
Copy link
Author

phptek commented Nov 19, 2019

034f511 only adds Requirements - the following imports are still missing from that:

use SilverStripe\Assets\File;
use SilverStripe\i18n\i18n;
use SilverStripe\Forms\CheckboxSetField;
use SilverStripe\Control\Director

And sure, heaps of people might be using the module, but if your're not using the problematic constraints, PHP won't tell you about them until you try to call missing deps :-)

@phptek
Copy link
Author

phptek commented Nov 19, 2019

I can see that dev-master now has the correct imports - excellent, and that you've also fixed the composer vendormodule problem (double excellent) however, packagist hasn't been updated for "dev-master" since September (Just manually visited packagist.org to check) .

So after a composer update, I still see:

vagrant@my-project: (develop-ss4) $> composer info sheadawson/silverstripe-zenvalidator | grep source
source   : [git] https://github.com/sheadawson/silverstripe-zenvalidator.git f7022d590431d8d5f4b87f7c5d2d21e8f8ac4def

@lekoala
Copy link
Collaborator

lekoala commented Nov 20, 2019

@sheadawson is it possible to setup the auto update hook on packagist? i don't think i have the required permissions

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