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

500 error #90

Closed
pepeshark opened this issue Aug 15, 2019 · 2 comments
Closed

500 error #90

pepeshark opened this issue Aug 15, 2019 · 2 comments

Comments

@pepeshark
Copy link

pepeshark commented Aug 15, 2019

Hi,
I have got an error message when I am trying php artisan opcache:compile --force
It's a fresh laravel install with a test controller and route.

Controller:
`namespace App\Http\Controllers;

use Illuminate\Http\Request;

class WelcomeController extends Controller
{
//
public function index(){
return view('welcome');
}
}
Routes:Route::get('/', 'WelcomeController@index');`

Official docker php image, version 7.3.8

Error message
"syntax error, unexpected '\' (T_NS_SEPARATOR), expecting function (T_FUNCTION) or const (T_CONST)"

Do you have any idea?
Thanks

@pepeshark
Copy link
Author

OK I have found the problem.
I have php 7.3.8
Laravel contains symfony/var-dumper/Tests/Fixtures/Php74
This class contains php 7.4 specified typed property. It is normal when laravel-opcache pachage try to cache this file on 7.3 and I get an error message.

Do you have idea how can I ignore this file manually?

@pepeshark
Copy link
Author

Nevermind, I can solve it with this config:
'exclude' => [ 'tests', 'stubs', 'Dumper', 'Tests' ]

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

1 participant