Skip to content
This repository has been archived by the owner on Sep 10, 2024. It is now read-only.

Call to undefined method status() #289

Closed
gofish543 opened this issue Jun 16, 2019 · 3 comments
Closed

Call to undefined method status() #289

gofish543 opened this issue Jun 16, 2019 · 3 comments

Comments

@gofish543
Copy link

Swoole throwing exceptions while testing file downloads

Error : Call to undefined method Symfony\Component\HttpFoundation\BinaryFileResponse::status()
 /mnt/d/TrapStats/vendor/swooletw/laravel-swoole/src/Server/AccessOutput.php:44
 /mnt/d/TrapStats/vendor/swooletw/laravel-swoole/src/Middleware/AccessLog.php:53
 /mnt/d/TrapStats/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:218
 /mnt/d/TrapStats/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:189
 /mnt/d/TrapStats/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/MakesHttpRequests.php:354
 /mnt/d/TrapStats/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/MakesHttpRequests.php:170
 /mnt/d/TrapStats/tests/Unit/Http/Controllers/Web/Round/ScoreCardTest.php:14

Please provide your PHP and Swoole version. (php -v and php --ri swoole)
php -v
PHP 7.3.5-1+ubuntu19.04.1+deb.sury.org+1 (cli) (built: May 3 2019 10:01:08) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.5, Copyright (c) 1998-2018 Zend Technologies
with Xdebug v2.7.2, Copyright (c) 2002-2019, by Derick Rethans
with Zend OPcache v7.3.5-1+ubuntu19.04.1+deb.sury.org+1, Copyright (c) 1999-2018, by Zend Technologies

php --ri swoole

Swoole => enabled
Author => Swoole Team [email protected]
Version => 4.3.4
Built => May 19 2019 15:52:58
coroutine => enabled
epoll => enabled
eventfd => enabled
signalfd => enabled
cpu_affinity => enabled
spinlock => enabled
rwlock => enabled
sockets => enabled
openssl => OpenSSL 1.1.1b 26 Feb 2019
http2 => enabled
pcre => enabled
zlib => enabled
mutex_timedlock => enabled
pthread_barrier => enabled
futex => enabled
mysqlnd => enabled
async_redis => enabled

Directive => Local Value => Master Value
swoole.enable_coroutine => On => On
swoole.display_errors => On => On
swoole.use_shortname => On => On
swoole.unixsock_buffer_size => 8388608 => 8388608

Please provide your Laravel/Lumen version.
Laravel 5.8.17
Which release version of this package are you using?
Swoole 2.6.6

Code that is causing failure
Test...

 $this->get(route('rounds.scorecard', [
                'round' => $this->completedRound
            ]))->assertStatus(200);

Controller

    public function scoreCard(Round $round) {
        $this->authorize('print', $round);

        return response()->download($round->createPrintOut(), "{$round->name}.pdf")->deleteFileAfterSend();
    }
@albertcht
Copy link
Member

Hi @gofish543 ,

I will check this issue soon.

@gofish543
Copy link
Author

@albertcht
No rush! If there's any additional data you need just give me a ping.

@roboticsexpert
Copy link
Contributor

check this ... it should fix your problem ... also if you disable access_log , you git rid it off
#385

@gofish543 gofish543 changed the title Call to undefined method stauts() Call to undefined method status() Jul 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants