Closed ijokitalo closed 5 years ago
Hi @ijokitalo please update the package version, should be 2.1 now.
Hi Max!
Unfortunately updating the package to 2.1 version didn't fix the issue.
I needed to drop Dingo Api from the project on time being.
Thanks for your reply and efforts.
Cheers
-- -Ismo
On Tue, Mar 5, 2019 at 1:13 AM Max notifications@github.com wrote:
Closed #1631 https://github.com/dingo/api/issues/1631.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/dingo/api/issues/1631#event-2179401377, or mute the thread https://github.com/notifications/unsubscribe-auth/AIk-sF9BV2Vm4hpaTNlQuXYhcwUE1Vngks5vTaihgaJpZM4bcfHv .
-- -Ismo
I confirm this happened to me also for laravel/lumen 5.8, I tested on 5.7 and it's working fine.
@ijokitalo How certain are you? Can you please pastebin your composer.json and composer.lock files?
@ejancorp can you also please update the dingo package?
update the package version (Y) "dingo/api": "^2.1",
Hi Max,
rather certain because the composer was simply whining about the missing function's implementation and silenced when I brutally added the missing function.
I have been using Dingo earlier in some other projects and I loved it. Now there seems to be some irks that I cannot comprehend.
Another issue that I noticed that Dingo was messing up the web routing which I found really very unreal.
I can do some reinstallation and testing next weekend and report back to you.
I do not want waste the bandwith of the other list users so if you would like have the fore mentioned feedback please send a message to ijokitalo@gmail.com and we'll do this offline.
-Ismo
On Tue, Mar 12, 2019 at 3:27 AM Max notifications@github.com wrote:
@ijokitalo https://github.com/ijokitalo How certain are you? Can you please pastebin your composer.json and composer.lock files?
@ejancorp https://github.com/ejancorp can you also please update the dingo package?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/dingo/api/issues/1631#issuecomment-471809703, or mute the thread https://github.com/notifications/unsubscribe-auth/AIk-sOKW8vQICc0B8-oGDRySUT7orFQEks5vVwJzgaJpZM4bcfHv .
-- -Ismo
update the package version (Y) "dingo/api": "^2.1",
Nope Jean it did't work as far I remember. But as said I try these over the weekend.
@ijokitalo Sure, though I think it's appropriate to keep it here all in one place rather than by email, please feel free to report your findings here.
If you are using the latest tag of Dingo, the file /vendor/dingo/api/src/Exception/Handler.php should have the following inside it:
/**
* Determine if the exception should be reported.
*
* @param \Exception $e
*
* @return bool
*/
public function shouldReport(Exception $e)
{
return true;
}
So if you fixed the problem by adding it, that means it wasn't there, and I would suggest the only way that's possible is if for some reason you are not actually using the latest vesion of Dingo.
It may be because there are some conflicting dependencies in your composer file, so this is why I suggest that if anyone is having this problem, please attach your composer.json and composer.lock files, so we can clearly see what version is being used.
Actual Behaviour
When installing package 1.0.0 to 2.0-alfa or what so ever version then during optimization of autoload files composer gives:
PHP Fatal error: Class Dingo\Api\Exception\Handler contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (Illuminate\Contracts\Debug\ExceptionHandler::shouldReport) in /Users/ismo/Code/acfakta_org/vendor/dingo/api/src/Exception/Handler.php on line 16
Same happens when doing php artisan serve after the installation.
Expected Behaviour
Composer and Artisan to finish wo errors.
Steps to Reproduce
Install DIngo version 1.0. - 2.0. in system with: -PHP 7.1.* -Laravel 5.8
composer update -> error php artisan serve ->error
Possible Solutions
Add empty function shouldReport into your /vendor/dingo/api/src/Exception/Handler.php
This will make Laravel happy but I doubt that it is the correct fix.
Maybe it is my mistake. In that case please guide me.
Cheers
-Ismo