Code Monkey home page Code Monkey logo

connectwise-php-client's People

Contributors

jimmypuckett avatar ssfinney avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

connectwise-php-client's Issues

v5.6.0 sends body on GET request

Client::buildOptions() was changed in 5.6.0,

Old

 public function buildOptions(array $options = [])
     {
         return array_merge_recursive(
             $options,
             [
                 'headers' => $this->getHeaders(),
             ]
         );
     }

New

public function buildOptions(array $options = [])
     {
         return [
             'body'    => json_encode($options ?? []),
             'headers' => $this->getHeaders(),
         ];
     }

$options is an array by default and is passed as body on every request, meaning a GET request now has a body of []. The result is a 403 error from cloudflare.

Unexpected 'var_export' error - Revisited

This is the continuation of a closed issue with the same title. My apologies but I got sidetracked onto another project. I have circled back to getting this configured on my WAMP test box and I continue to get the errors at:

var_export($info->toArray(), false);

Parse error: syntax error, unexpected 'var_export' (T_STRING) in php shell code on line 15
php > array (
php ( 'version' => 'v2016.6.43325',
php ( 'isCloud' => false,
php ( 'serverTimeZone' => 'Eastern Standard Time',
php ( )

The subsequent var_export commands return the same errors.

Any additional guidance is appreciated.

Thanks in advance.

getAll() method and paging does not seem to be working

($verb === 'getAll') ? $this->page = 1 && $verb = 'get' : $this->page = 0;

When this line is run on the initial request, $this->page is actually set to true instead of an int. Technically, this would be OK, but the problem arises when my token immediately needs refreshing and then the same client instance is called with a post method, at which point $this->page is set to 0. The result is getAll only ever returns 1 page of data.

Paging and passing query options has numerous issues that I won't be able to go into right now, but I was able to make it work by changing the ternary expression to this:

if ($verb === 'getAll') {
    $this->page = 1;
    $verb = 'get';
}

If $verb is anything but getAll, it remains null, so the other comparisons still work, and the worst that happens is an unnecessary page=1 query parameter is passed.

If I have some time next month, I can put together an issue illustrating what I saw with the query/options passing as well as a pull request with a possible solution.

example of post in laravel

wondering if there is an example of using this to post data to connectwise from laravel. unclear how to add the JSON Body.

Environment variables

I apologize in advance if this is not the correct place to post this. Can someone please advise what values should be used for the integrator and password when setting up outside of Laravel?
$client->setIntegrator('')->setPassword('')

Unexpected 'var_export' error

Hi All,

I successfully installed the package and proceeded to the non-Laravel configuration step. As I am updating the objects in the interactive PHP shell, I get to:

var_export($info->toArray(), false); array ( 'version' => 'v2018.5.56760', 'isCloud' => false, 'serverTimeZone' => 'Eastern Standard Time', )

then receive the following error.

Parse error: syntax error, unexpected 'var_export' (T_STRING) in php shell code on line 6

image

I am dev'ing on a WAMP server with PHP version 7.1.9 and Apache 2.4.27

Any guidance is appreciated.

Thank You

Install error with Laravel 8.9.0

When I run composer require spinen/connectwise-php-client
.....
Problem 1
- Installation request for spinen/connectwise-php-client ^5.5 -> satisfiable by spinen/connectwise-php-client[5.5.0, 5.5.1, 5.5.2, 5.5.3].
- Can only install one of: guzzlehttp/guzzle[7.2.0, 6.5.x-dev].
- Can only install one of: guzzlehttp/guzzle[6.5.x-dev, 7.2.0].
- Can only install one of: guzzlehttp/guzzle[6.5.x-dev, 7.2.0].
- Conclusion: install guzzlehttp/guzzle 6.5.x-dev
- Installation request for guzzlehttp/guzzle (locked at 7.2.0, required as ^7.1) -> satisfiable by guzzlehttp/guzzle[7.2.0].

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

composer.json
"require": {
"php": "^7.3",
"aws/aws-sdk-php": "^3.156",
"fideloper/proxy": "^4.2",
"fruitcake/laravel-cors": "^2.0",
"guzzlehttp/guzzle": "^7.2.0",
"laravel/framework": "^8.0",
"laravel/jetstream": "^1.3",
"laravel/sanctum": "^2.6",
"laravel/tinker": "^2.0",
"livewire/livewire": "^2.0"
},

Laravel will not let me downgrade to guzzle 6.5.x-dev

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.