Code Monkey home page Code Monkey logo

checkr's People

Contributors

fossabot avatar linuxs avatar lyal avatar pbarsallo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

checkr's Issues

Best way to test the integration?

Hi, what would be the best way to write tests like whether a listener I have runs the correct report?

I tried mocking Checkr facade, but that's not working because Client instantiates new Resource classes manually (new $resource(...)).

I then tried mocking Resource and Client like this:

$checkrReport = Mockery::mock(Report::class);
        $checkrReport
            ->shouldReceive('create')
            ->once()
            ->andReturn((object) ['id' => 66]);

        $checkrClient = Mockery::mock(Client::class);
        $checkrClient
            ->shouldReceive('api')
            ->once()
            ->with('report', ['package' => 'driver_pro', 'candidate_id' => 1])
            ->andReturn($checkrReport);

$this->app->instance(Client::class, $checkrClient);

But that didn't get me past Lyal\Checkr\Exceptions\Client\NotFound: The requested resource could not be found. Response: {"error":"TestCandidate not found"}.

Any thoughts?

Config needs to be published

I was struggling to find out why the API key was wrong when I had set it up properly in my .env file. Turns out, it doesn't work without config file being published. README.md should make that clear.

New api field

Hey @lyal I'm getting

Unknown attribute on resource Lyal\Checkr\Entities\Resources\Report: municipal_criminal_search_ids {"exception":"[object] (Lyal\\Checkr\\Exceptions\\InvalidAttributeException(code: 0): Unknown attribute on resource Lyal\\Chec
kr\\Entities\\Resources\\Report: municipal_criminal_search_ids at [...]

Looks like municipal_criminal_search_ids is needed as well? I just tested and it works once I add it to Resources/Report.php.

Not sure if Checkr keeps silently adding those fields or what. Are there any side effects if I just catch InvalidAttributeException and ignore it?

Thanks!

Unable to add package in laravel

image

Your requirements could not be resolved to an installable set of packages.

Problem 1
- Root composer.json requires lyal/checkr ^0.14.0 -> satisfiable by lyal/checkr[0.14].
- lyal/checkr 0.14 requires guzzlehttp/guzzle ~6.0|~5.0|~4.0 -> found guzzlehttp/guzzle[4.0.0-rc.1, ..., 4.x-dev, 5.0.0, ..., 5.3.x-dev, 6.0.0, ..., 6.5.x-dev] but it conflicts with your root composer.json require (^7.0.1).

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.

Installation failed, reverting ./composer.json and ./composer.lock to their original content.

Declaration of Lyal\\Checkr\\Entities\\Resources\\Candidate must be compatible with Lyal\\Checkr\\Traits\\Listable error

I just upgraded to laravel8 and updated my composer to use "lyal/checkr": "^0.3" and PHP 8.0

It seems that PHP 8.0 broke this.

Thanks.

Got the following error:

{
"class": "Symfony\Component\ErrorHandler\Error\FatalError",
"message": "Declaration of Lyal\Checkr\Entities\Resources\Candidate::__construct($values = null, ?Lyal\Checkr\Client $client = null) must be compatible with Lyal\Checkr\Traits\Listable::__construct($values, $client)",
"code": 0,
"file": "/var/app/current/vendor/lyal/checkr/src/Entities/Resources/Candidate.php:21"
}

Use keys from config, not env?

Hi, thanks for doing this package!

I noticed that keys are fetched from env directly. Wouldn't fetching from config('checkr.key_production') be more effective as config will be cached and faster to access?

Thanks

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.