Closed kirill533 closed 5 years ago
@kirill533 , thanks for your efforts trying to spin this up. Let me see what I can do to help sort out your problem.
How have you deployed this package, and how are you serving it to trip the message you got in your initial report?
I run "php artisan serve" in package directory and then I access the URL posted. In the browser I get the error report I have posted. I also dumped response inside the phpunit test XMLMetadataTest.php and saw the same html output.
This unit test and 15 others fail with the same error: `Expected :3.0; Actual :null
/home/kirill533/projects/POData-Laravel-NorthWind/tests/XMLMetadataTest.php:38 /home/kirill533/projects/POData-Laravel-NorthWind/tests/XMLMetadataTest.php:157 /home/kirill533/projects/POData-Laravel-NorthWind/tests/XMLMetadataTest.php:186`
@kirill533 , I've managed to reproduce your report in its essentials, including the version number showing up as null, not 3.0 (per test expectations). Thanks for the pointer - I'm wondering where routing got bored somewhere in the past two years and wandered off.
@kirill533 , I've pushed out changes that should fix up your routing issues. Can you pull them and see if your pain persists?
@kirill533 , I've sent up a pull request at #2 - can you review my initial cut at setup docs and point out where I've assumed too much background knowledge, flat out missed something, etc?
As for remaining validation failures, @c-harris would be better suited to help you.
Thank for fixing it so fast and for mentioning me in the readme. The problem with the exception is fixed.
But for the setup instructions. I think, I have to anyway modify config/database.php file to setup connection properly (I still use mysql).
I am also trying to create some user to be able to access the API, but it is not so obvious how can I do that. Could you please extend the setup instructions by pointing on how to setup the api user? I cannot manage to create users table.
Following instructions on this page https://stackoverflow.com/questions/53257296/creating-users-table-in-laravel I managed to create table for users.
Then I used "php artisan tinker" and run
DB::table('users')->insert(['name'=>'MyUsername','email'=>'thisis@myemail.com','password'=>Hash::make('123456')])
, so finally I got my user setup.
For login to the API I used email (not the user name) and that seemed to work.
Credit where credit is due, @kirill533 - you've pointed out where I did assume too much.
Is what's up in #2 now any clearer, @kirill533 ?
Hi @CyberiaResurrection, now it is looking sufficient. Discovering APP_DISABLE_AUTH option was very useful. Thanks a lot!
Thanks for the feedback and glad to hear you're underway. Closing this issue, then rolling up #2.
I tried to setup the test env following the travis.yml file. First I was getting errors related to cipher.
I did the following to fix it:
But now tests fail and on the page http://localhost:8000/odata.svc/$metadata I get following error:
Same error also makes phpunit tests fail.
Did I made everything right? Would that be possible to provide some instructions on how to setup the working application?