zendframework / zend-validator

Validator component from Zend Framework
BSD 3-Clause "New" or "Revised" License
181 stars 136 forks source link

Fatal error: Uncaught Error: Class 'Zend\Uri\Uri' not found #274

Closed yogeshhelpful closed 4 years ago

yogeshhelpful commented 4 years ago

I am getting this error. I have all files and folder of Zend-validator in zendframework\zend-validator\src

Reference screenshot of error:- https://i.stack.imgur.com/8owzB.png Reference screenshot of folder/files structure :- https://i.stack.imgur.com/C9UeC.png

Fatal error: Uncaught Error: Class 'Zend\Uri\Uri' not found in C:\xampp\htdocs\test\vendor\zendframework\zend-validator\src\Uri.php:88 Stack trace: #0 C:\xampp\htdocs\test\vendor\zendframework\zend-validator\src\Uri.php(173): Zend\Validator\Uri->getUriHandler() #1 C:\xampp\htdocs\test\vendor\zendframework\zend-validator\src\ValidatorChain.php(246): Zend\Validator\Uri->isValid('', Array) #2 C:\xampp\htdocs\test\vendor\zendframework\zend-inputfilter\src\Input.php(434): Zend\Validator\ValidatorChain->isValid('', Array) #3 C:\xampp\htdocs\test\vendor\zendframework\zend-inputfilter\src\BaseInputFilter.php(275): Zend\InputFilter\Input->isValid(Array) #4 C:\xampp\htdocs\test\vendor\zendframework\zend-inputfilter\src\BaseInputFilter.php(229): Zend\InputFilter\BaseInputFilter->validateInputs(Array, Array, NULL) #5 C:\xampp\htdocs\test\application\controllers\ApplicationsController.php(217): Zend\InputFilter\BaseInputFilter->isValid() #6 C:\xampp\htdocs\test\library\Zend\Controller\Action.php(516): Applicati in C:\xampp\htdocs\test\vendor\zendframework\zend-validator\src\Uri.php on line 88

yogeshhelpful commented 4 years ago

Class Zend/Uri/Uri is part of another package, zendframework/zend-uri, which is suggested by the validator. Take a look on line 44 of zend-uri composer.json:

To solve this problem, execute this command from the project's root folder: composer require zendframework/zend-uri