IsraelOrtuno / pipedrive

Complete Pipedrive API client for PHP
MIT License
166 stars 58 forks source link

Call to undefined function camel_case() #66

Closed Zaszczyk closed 5 years ago

Zaszczyk commented 5 years ago

Hi, thank you a lot for this library 👍 I have started using that, but I am getting error:

Call to undefined function Devio\Pipedrive\Resources\Basics\camel_case()

with code: $pipedrive->make('organizations');

I see You use function camel_case() in:

src/Resources/Basics/Resource.php:123

However it is not defined anywhere, maybe it should be defined?

Zaszczyk commented 5 years ago

I got similar error with: Error: Call to undefined function Devio\Pipedrive\array_except() and Error: Call to undefined function Devio\Pipedrive\array_flatten() and Error: Call to undefined function Devio\Pipedrive\Http\array_set()

I found this functions are in something like Laravel/Support, but You don't have this library/class in require in composer.json. So I have to find body of these functions in Internet, then copy&paste it to code, it is bad.

IsraelOrtuno commented 5 years ago

Will fix this, it seems they have been removed in 5.8

IsraelOrtuno commented 5 years ago

Could you try to require "laravel/helpers" in your composer? https://github.com/laravel/helpers let me know if that helps and I will add it to the composer.json.

Zaszczyk commented 5 years ago

Thank you for quick response. I cannot try this solution because:

root@d7b16215951e:/var/www/html/www# composer require laravel/helpers:1.0.0 ./composer.json has been updated Loading composer repositories with package information Updating dependencies (including require-dev) Your requirements could not be resolved to an installable set of packages.

Problem 1

  • Installation request for laravel/helpers 1.0.0 -> satisfiable by laravel/helpers[v1.0.0].
  • Conclusion: remove illuminate/contracts 5.9.x-dev
  • Conclusion: don't install illuminate/contracts 5.9.x-dev
  • laravel/helpers v1.0.0 requires illuminate/support ~5.8.0 -> satisfiable by illuminate/support[5.8.x-dev, v5.8.0, v5.8.2, v5.8.3].
  • illuminate/support 5.8.x-dev requires illuminate/contracts 5.8.* -> satisfiable by illuminate/contracts[5.8.x-dev, v5.8.0, v5.8.2, v5.8.3].
  • illuminate/support v5.8.0 requires illuminate/contracts 5.8.* -> satisfiable by illuminate/contracts[5.8.x-dev, v5.8.0, v5.8.2, v5.8.3].
  • illuminate/support v5.8.2 requires illuminate/contracts 5.8.* -> satisfiable by illuminate/contracts[5.8.x-dev, v5.8.0, v5.8.2, v5.8.3].
  • illuminate/support v5.8.3 requires illuminate/contracts 5.8.* -> satisfiable by illuminate/contracts[5.8.x-dev, v5.8.0, v5.8.2, v5.8.3].
  • Can only install one of: illuminate/contracts[5.8.x-dev, 5.9.x-dev].
  • Can only install one of: illuminate/contracts[v5.8.0, 5.9.x-dev].
  • Can only install one of: illuminate/contracts[v5.8.2, 5.9.x-dev].
  • Can only install one of: illuminate/contracts[v5.8.3, 5.9.x-dev].
  • Installation request for illuminate/contracts (locked at 5.9.x-dev) -> satisfiable by illuminate/contracts[5.9.x-dev].

Installation failed, reverting ./composer.json to its original content.

laravel/helpers and illuminate/contracts cannot be installed parallel.

IsraelOrtuno commented 5 years ago

Hmm this is super weird, that package should not have conflicts with that 😅 let me test out

Zaszczyk commented 5 years ago

I have created pull request: #67, could you merge? :)

IsraelOrtuno commented 5 years ago

Feel free to update to version 2.1 ;) thanks for the PR.