I am trying to create a simple CLI app with PHP but I keep getting:
PHP Fatal error: Uncaught Error: Class 'Symfony\Component\Console\Application' not found in /Applications/MAMP/htdocs/newcli/dan.php:6
Stack trace:
#0 {main}
thrown in /Applications/MAMP/htdocs/newcli/dan.php on line 6
Fatal error: Uncaught Error: Class 'Symfony\Component\Console\Application' not found in /Applications/MAMP/htdocs/newcli/dan.php:6
Stack trace:
#0 {main}
thrown in /Applications/MAMP/htdocs/newcli/dan.php on line 6
What am I doing wrong? My PHP version: PHP 7.1.0RC6 (cli) (built: Nov 9 2016 04:45:59) ( NTS )
dan.php:
#! usr/bin/env php
<?php use Symfony\Component\Console\Application;
require 'vendor/autoload.php';
$app = new Application('Task App', '1.0');
$app->add(new Acme\ShowCommand());
$app->run();