Coder Social home page Coder Social logo

laravel-task's Introduction

Hi πŸ‘‹, I'm VΓ­ctor

A passionate developer from Madrid, Spain.

πŸ“« You can reach me on [email protected] or on twitter

laravel-task's People

Contributors

victor-falcon avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

laravel-task's Issues

πŸ› Ide helper information fails when we add a primitive type to the task constructor

To replicate just create a task with a primitive in the constructor:

final class GetUser extends Task
{
    use Taskable;

    private string $email;

    public function __construct(string $email)
    {
        $this->email = $email;
    }

    public function handle(): User
    {
        return User::whereEmail($this->email)->firstOrFail();
    }
}

And run artisan task:ide-help.

Output:

❯ ./vessel artisan task:ide-help

   Illuminate\Contracts\Container\BindingResolutionException 

  Unresolvable dependency resolving [Parameter #0 [ <required> string $email ]] in class App\Tasks\User\GetUser

  at vendor/laravel/framework/src/Illuminate/Container/Container.php:1053
    1049β–•     protected function unresolvablePrimitive(ReflectionParameter $parameter)
    1050β–•     {
    1051β–•         $message = "Unresolvable dependency resolving [$parameter] in class {$parameter->getDeclaringClass()->getName()}";
    1052β–• 
  ➜ 1053β–•         throw new BindingResolutionException($message);
    1054β–•     }
    1055β–• 
    1056β–•     /**
    1057β–•      * Register a new before resolving callback for all types.

      +22 vendor frames 
  23  artisan:37
      Illuminate\Foundation\Console\Kernel::handle()

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.