Open biopowder opened 5 years ago
Yup, I'm getting the same thing. Pretty much any query:
$c = \PragmaRX\Countries\Package\Countries::where('name.common', 'United Kingdom')->first();
dd($c);
Same thing for me. I guess this must be caused by some dependency since the package itself hasn't changed, right?
No it has changed: https://github.com/antonioribeiro/countries/commit/d6ccd36e4e983d0b7142a151d7ad5c544070943b And it also sounds like this is most likely the problem.
Problem is that in ia-str the function camel_case has been removed (this commit: https://github.com/antonioribeiro/ia-str/commit/cc6c232da986f7e808b7dee48bf0e3b75bc349eb#diff-07f5c0ef2af42d2ee5412a1d79c49eac). Looks like this is related to the upgrade to Laravel 6 but the dependency from 0.6.0 (pragmarx/countries) should be 5.8.x to make this work but it actually is not explicitly specifying the dependency. I didn't dig deep enough to find out what requires ia-str but what works as a workaround for now is requiring ia-str in a lower version. In my case I set it to the version I've used before: "pragmarx/ia-str": "5.8.7"
I'm using pragmarx/countries in version 0.6.0 and did run a composer upgrade today. Afterwards things broke. During the composer upgrade pragmarx/ia-arr, pragmarx/ia-collection and pragmarx/ia-str have been upgraded to version 6.0.3 each.
Most likely you have "pragmarx/countries": "^0.5"
in composer.json. Change it to "pragmarx/countries": "^0.7"
and update the deps.
@karser sure but shouldn't "pragmarx/countries": "^0.5" require the correct versions of the dependencies? Right now if you run composer upgrade everything breaks with 0.5.x but I think it should require the correct versions of the ia-str lib.
It should I suppose.
Sorry for this mess. Would you please check it now?
Can't test due to another issue: mkdir(): Permission denied
ErrorException …/vendor/pragmarx/countries/src/package/Services/Cache/Managers/Nette.php66 49 mkdir …/vendor/pragmarx/countries/src/package/Services/Cache/Managers/Nette.php66 48 PragmaRX\Countries\Package\Services\Cache\Managers\Nette getCacheDir …/vendor/pragmarx/countries/src/package/Services/Cache/Managers/Nette.php83 47 PragmaRX\Countries\Package\Services\Cache\Managers\Nette getStorage …/vendor/pragmarx/countries/src/package/Services/Cache/Managers/Nette.php42 46 PragmaRX\Countries\Package\Services\Cache\Managers\Nette construct …/vendor/pragmarx/countries/src/package/Services/Cache/Service.php68 45 PragmaRX\Countries\Package\Services\Cache\Service instantiateManager …/vendor/pragmarx/countries/src/package/Services/Cache/Service.php43 44 PragmaRX\Countries\Package\Services\Cache\Service construct …/vendor/pragmarx/countries/src/package/Services/Countries.php70 43 PragmaRX\Countries\Package\Services\Countries construct …/vendor/pragmarx/countries/src/package/Countries.php36 42 PragmaRX\Countries\Package\Countries construct
Sorry for this mess. Would you please check it now?
It seems to be working. I think the error that biopowder mentioned is unrelated to this issue.
for laravel 6, execute this
composer require laravel/helpers
Laravel: 6 PHP: PHP Version 7.3.8
Code:
Error:
Stacktrace: