Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Error when firing request from artisan command #11

Open
ortix opened this issue Nov 17, 2014 · 1 comment
Open

[Bug] Error when firing request from artisan command #11

ortix opened this issue Nov 17, 2014 · 1 comment

Comments

@ortix
Copy link

ortix commented Nov 17, 2014

I created an artisan command which has to fire some API POST requests. The problem is this block in Hmvc.php

// Masking route to allow testing with PHPUnit.
if ( ! $originalRoute instanceof Route)
{
    $originalRoute = new Route(new \Symfony\Component\HttpFoundation\Request());
}

It throws:

  Missing argument 2 for Illuminate\Routing\Route::__construct(), called in /var/www/animekyun/vendor/teepluss/hmvc/src/Teepluss/Hmvc/Hmvc.php on line 91 and defined 

This is my fire method in the command:

public function fire()
{
    $torrent = $this->argument('torrent');
    $url = $this->argument('url');
    $request = HMVC::post('api/episode', array('filename' => $torrent, 'url' => $url));
    dd($request);
    File::append(base_path() . '/test.txt', basename($torrent) . "\n");
    File::append(base_path() . '/test.txt', $url . "\n\n");
    Log::info('Call from Flexget', ['context' => 'File: ' . $torrent]);
}

For now I have removed that code block

@tony-was
Copy link

I am getting the same issue here. is there a fix for this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants