Skip to content
Advertisement

PHP Fatal error: Uncaught Error: Class ‘SymfonyComponentConsoleApplication’ not found

I am trying to create a simple CLI app with PHP but I keep getting:

JavaScript

What am I doing wrong? My PHP version: PHP 7.1.0RC6 (cli) (built: Nov 9 2016 04:45:59) ( NTS )

dan.php:

JavaScript

Advertisement

Answer

The use statement must be placed after the require 'vendor/autoload.php'

JavaScript
User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement