Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

skeith22's avatar

Somethings wrong with a fresh Laravel 6 terminal outputs

A fresh copy of Laravel 6 has issues with terminal outputs/response.

Windows 10

PHP v7.2.24

Composer v1.9.1

Laravel v6

Composer Laravel Installer v2.2

Steps to reproduce

  1. Laravel new test
  2. cd test
  3. php artisan list

php artisan list has this response

$ art list
Laravel Framework ?[32m6.5.0?[39m

?[33mUsage:?[39m
  command [options] [arguments]

?[33mOptions:?[39m
  ?[32m-h, --help?[39m            Display this help message
  ?[32m-q, --quiet?[39m           Do not output any message
  ?[32m-V, --version?[39m         Display this application version
  ?[32m    --ansi?[39m            Force ANSI output
  ?[32m    --no-ansi?[39m         Disable ANSI output
  ?[32m-n, --no-interaction?[39m  Do not ask any interactive question
  ?[32m    --env[=ENV]?[39m       The environment the command should run under
  ?[32m-v|vv|vvv, --verbose?[39m  Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

?[33mAvailable commands:?[39m
  ?[32mclear-compiled?[39m       Remove the compiled class file
  ?[32mdown?[39m                 Put the application into maintenance mode
  ?[32menv?[39m                  Display the current framework environment
  ?[32mhelp?[39m                 Displays help for a command
  ?[32minspire?[39m              Display an inspiring quote
  ?[32mlist?[39m                 Lists commands
  ?[32mmigrate?[39m              Run the database migrations
  ?[32moptimize?[39m             Cache the framework bootstrap files
  ?[32mpreset?[39m               Swap the front-end scaffolding for the application
  ?[32mserve?[39m                Serve the application on the PHP development server
  ?[32mtinker?[39m               Interact with your application
  ?[32mup?[39m                   Bring the application out of maintenance mode
 ?[33mauth?[39m
  ?[32mauth:clear-resets?[39m    Flush expired password reset tokens
 ?[33mcache?[39m
  ?[32mcache:clear?[39m          Flush the application cache
  ?[32mcache:forget?[39m         Remove an item from the cache
  ?[32mcache:table?[39m          Create a migration for the cache database table
 ?[33mconfig?[39m
  ?[32mconfig:cache?[39m         Create a cache file for faster configuration loading
  ?[32mconfig:clear?[39m         Remove the configuration cache file
 ?[33mdb?[39m
  ?[32mdb:seed?[39m              Seed the database with records
  ?[32mdb:wipe?[39m              Drop all tables, views, and types
 ?[33mevent?[39m
  ?[32mevent:cache?[39m          Discover and cache the application's events and listeners
  ?[32mevent:clear?[39m          Clear all cached events and listeners
  ?[32mevent:generate?[39m       Generate the missing events and listeners based on registration
  ?[32mevent:list?[39m           List the application's events and listeners
 ?[33mkey?[39m
  ?[32mkey:generate?[39m         Set the application key
 ?[33mmake?[39m
  ?[32mmake:channel?[39m         Create a new channel class
  ?[32mmake:command?[39m         Create a new Artisan command
  ?[32mmake:controller?[39m      Create a new controller class
  ?[32mmake:event?[39m           Create a new event class
  ?[32mmake:exception?[39m       Create a new custom exception class
  ?[32mmake:factory?[39m         Create a new model factory
  ?[32mmake:job?[39m             Create a new job class
  ?[32mmake:listener?[39m        Create a new event listener class
  ?[32mmake:mail?[39m            Create a new email class
  ?[32mmake:middleware?[39m      Create a new middleware class
  ?[32mmake:migration?[39m       Create a new migration file
  ?[32mmake:model?[39m           Create a new Eloquent model class
  ?[32mmake:notification?[39m    Create a new notification class
  ?[32mmake:observer?[39m        Create a new observer class
  ?[32mmake:policy?[39m          Create a new policy class
  ?[32mmake:provider?[39m        Create a new service provider class
  ?[32mmake:request?[39m         Create a new form request class
  ?[32mmake:resource?[39m        Create a new resource
  ?[32mmake:rule?[39m            Create a new validation rule
  ?[32mmake:seeder?[39m          Create a new seeder class
  ?[32mmake:test?[39m            Create a new test class
 ?[33mmigrate?[39m
  ?[32mmigrate:fresh?[39m        Drop all tables and re-run all migrations
  ?[32mmigrate:install?[39m      Create the migration repository
  ?[32mmigrate:refresh?[39m      Reset and re-run all migrations
  ?[32mmigrate:reset?[39m        Rollback all database migrations
  ?[32mmigrate:rollback?[39m     Rollback the last database migration
  ?[32mmigrate:status?[39m       Show the status of each migration
 ?[33mnotifications?[39m
  ?[32mnotifications:table?[39m  Create a migration for the notifications table
 ?[33moptimize?[39m
  ?[32moptimize:clear?[39m       Remove the cached bootstrap files
 ?[33mpackage?[39m
  ?[32mpackage:discover?[39m     Rebuild the cached package manifest
 ?[33mqueue?[39m
  ?[32mqueue:failed?[39m         List all of the failed queue jobs
  ?[32mqueue:failed-table?[39m   Create a migration for the failed queue jobs database table
  ?[32mqueue:flush?[39m          Flush all of the failed queue jobs
  ?[32mqueue:forget?[39m         Delete a failed queue job
  ?[32mqueue:listen?[39m         Listen to a given queue
  ?[32mqueue:restart?[39m        Restart queue worker daemons after their current job
  ?[32mqueue:retry?[39m          Retry a failed queue job
  ?[32mqueue:table?[39m          Create a migration for the queue jobs database table
  ?[32mqueue:work?[39m           Start processing jobs on the queue as a daemon
 ?[33mroute?[39m
  ?[32mroute:cache?[39m          Create a route cache file for faster route registration
  ?[32mroute:clear?[39m          Remove the route cache file
  ?[32mroute:list?[39m           List all registered routes
 ?[33mschedule?[39m
  ?[32mschedule:run?[39m         Run the scheduled commands
 ?[33msession?[39m
  ?[32msession:table?[39m        Create a migration for the session database table
 ?[33mstorage?[39m
  ?[32mstorage:link?[39m         Create a symbolic link from "public/storage" to "storage/app/public"
 ?[33mvendor?[39m
  ?[32mvendor:publish?[39m       Publish any publishable assets from vendor packages
 ?[33mview?[39m
  ?[32mview:cache?[39m           Compile all of the application's Blade templates
  ?[32mview:clear?[39m           Clear all compiled view files
0 likes
57 replies
Jaytee's avatar

Have you modified any of the route files in routes ?

jlrdw's avatar

Try clearing composer cache, update composer to latest version, then composer update.

lemmon's avatar

Hey @skeith22, you must downgrade symfony/console to 4.3.4

composer require symfony/console:4.3.4
lemmon's avatar

I had the same problem and someone helped me with the above information.

@nakov helped me on that one.

Jaytee's avatar

@lemmon Laravel 6.5 already uses 4.3.4 which is also the version OP is using.

It's possible that it's just glitched. I've usually seen this occur due to a routes file being modified and leaving just <?php at the top of the file.

Could also just be a glitch, so try @jlrdw 's solution. If that fails, actually remove the entire vendor folder and composer install again

lemmon's avatar

@jaytee

laravel 6.5 is on symfony/console:4.3.6

I just recreated the problem 5 minutes ago. it only happens to us windows guys and the solutiion is to downgrade to symfony/console:4.3.4

jlrdw's avatar

It would help if you would get your version from the released versions which would be a stable version with the correct composer file.

http://github.com/laravel/laravel/tags

The latest laravel from that link, then a composer install of the framework.

If it's not in that latest release section, do not use it that means it's not stable.

Jaytee's avatar

Ahh, sorry, was looking at the wrong version number. My fresh app (8 hours ago) is indeed 6.5 and 4.3.6, but that has no issues.

I've just created another app for the purpose of this thread. Running 6.5 along with 4.3.6, and also do not have an issue. I'm also on windows.

lemmon's avatar

@jaytee here is my current symfony/console version

$ composer show | grep symfony/console
symfony/console                       v4.3.6     Symfony Console Component

Here is a small bit of the output for my php artisan list

$ php artisan list
Laravel Framework ?[32m6.5.0?[39m

?[33mUsage:?[39m
  command [options] [arguments]

?[33mOptions:?[39m
  ?[32m-h, --help?[39m            Display this help message
  ?[32m-q, --quiet?[39m           Do not output any message
  ?[32m-V, --version?[39m         Display this application version
  ?[32m    --ansi?[39m            Force ANSI output
  ?[32m    --no-ansi?[39m         Disable ANSI output
  ?[32m-n, --no-interaction?[39m  Do not ask any interactive question
  ?[32m    --env[=ENV]?[39m       The environment the command should run under
  ?[32m-v|vv|vvv, --verbose?[39m  Increase the verbosity of messages: 1 for norm
al output, 2 for more verbose output and 3 for debug

jlrdw's avatar

@lemmon look at my latest answer above, you have to get a latest version from the release page not somewhere else any other version is unstable. That's why there's a release page with stable versions.

Usually the problem is someone thinks they have a correct version but they have the wrong composer file to match the correct framework.

You have to match a correct laravel version with a correct framework version to get a proper install.

if you would have had a correct composer file you wouldn't have to downgrade anything that is wrong.

lemmon's avatar

composer require symfony/console:4.3.4

and it is fixed

Jaytee's avatar

Here's mine:

$ composer show | grep symfony/console
symfony/console                       v4.3.6     Symfony Console Component
$ php artisan list
Laravel Framework 6.5.0

Usage:
  command [options] [arguments]

Options:
  -h, --help            Display this help message
  -q, --quiet           Do not output any message
  -V, --version         Display this application version
      --ansi            Force ANSI output
      --no-ansi         Disable ANSI output
  -n, --no-interaction  Do not ask any interactive question
      --env[=ENV]       The environment the command should run under
  -v|vv|vvv, --verbose  Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

Available commands:
  clear-compiled       Remove the compiled class file
  down                 Put the application into maintenance mode
  env                  Display the current framework environment
  help                 Displays help for a command
  inspire              Display an inspiring quote
  list                 Lists commands
  migrate              Run the database migrations
  optimize             Cache the framework bootstrap files
  preset               Swap the front-end scaffolding for the application
  serve                Serve the application on the PHP development server
  tinker               Interact with your application
  up                   Bring the application out of maintenance mode
 auth
  auth:clear-resets    Flush expired password reset tokens
 cache
  cache:clear          Flush the application cache
  cache:forget         Remove an item from the cache
  cache:table          Create a migration for the cache database table
 config
  config:cache         Create a cache file for faster configuration loading
  config:clear         Remove the configuration cache file
 db
  db:seed              Seed the database with records
  db:wipe              Drop all tables, views, and types
 event
  event:cache          Discover and cache the application's events and listeners
  event:clear          Clear all cached events and listeners
  event:generate       Generate the missing events and listeners based on registration
  event:list           List the application's events and listeners
 key
  key:generate         Set the application key
 make
  make:channel         Create a new channel class
  make:command         Create a new Artisan command
  make:controller      Create a new controller class
  make:event           Create a new event class
  make:exception       Create a new custom exception class
  make:factory         Create a new model factory
  make:job             Create a new job class
  make:listener        Create a new event listener class
  make:mail            Create a new email class
  make:middleware      Create a new middleware class
  make:migration       Create a new migration file
  make:model           Create a new Eloquent model class
  make:notification    Create a new notification class
  make:observer        Create a new observer class
  make:policy          Create a new policy class
  make:provider        Create a new service provider class
  make:request         Create a new form request class
  make:resource        Create a new resource
  make:rule            Create a new validation rule
  make:seeder          Create a new seeder class
  make:test            Create a new test class
 migrate
  migrate:fresh        Drop all tables and re-run all migrations
  migrate:install      Create the migration repository
  migrate:refresh      Reset and re-run all migrations
  migrate:reset        Rollback all database migrations
  migrate:rollback     Rollback the last database migration
  migrate:status       Show the status of each migration
 notifications
  notifications:table  Create a migration for the notifications table
 optimize
  optimize:clear       Remove the cached bootstrap files
 package
  package:discover     Rebuild the cached package manifest
 queue
  queue:failed         List all of the failed queue jobs
  queue:failed-table   Create a migration for the failed queue jobs database table
  queue:flush          Flush all of the failed queue jobs
  queue:forget         Delete a failed queue job
  queue:listen         Listen to a given queue
  queue:restart        Restart queue worker daemons after their current job
  queue:retry          Retry a failed queue job
  queue:table          Create a migration for the queue jobs database table
  queue:work           Start processing jobs on the queue as a daemon
 route
  route:cache          Create a route cache file for faster route registration
  route:clear          Remove the route cache file
  route:list           List all registered routes
 schedule
  schedule:run         Run the scheduled commands
 session
  session:table        Create a migration for the session database table
 storage
  storage:link         Create a symbolic link from "public/storage" to "storage/app/public"
 vendor
  vendor:publish       Publish any publishable assets from vendor packages
 view
  view:cache           Compile all of the application's Blade templates
  view:clear           Clear all compiled view files
lemmon's avatar

@jlrdw I am using:

composer global require laravel/installer

I thought it was giving me the nightly version, is that not the one that I want?

lemmon's avatar

@jaytee Are you using git bash on a windows machine?

I was told this bug only happens on window with git bash.

Jaytee's avatar

laravel/installer should give you a stable version by default. Passing the --dev flag will give you dev builds.

Yep, I'm using Hyper.js with bash. Just told Hyper to use standard windows (whatever that is), results were still the same. CMD results were the same and Powershell had the same results.

Jaytee's avatar

I'd make sure you're pulling in a stable version (like @jlrdw said), and run a composer update too.

lemmon's avatar

After downgrade:

$ composer show | grep symfony/console
symfony/console                       v4.3.4     Symfony Console Component
$ php artisan list
Laravel Framework 6.5.0

Usage:
  command [options] [arguments]

Options:
  -h, --help            Display this help message
  -q, --quiet           Do not output any message
  -V, --version         Display this application version
      --ansi            Force ANSI output
      --no-ansi         Disable ANSI output
  -n, --no-interaction  Do not ask any interactive question
      --env[=ENV]       The environment the command should run under
  -v|vv|vvv, --verbose  Increase the verbosity of messages: 1 for normal output,
 2 for more verbose output and 3 for debug

I wish there was another way to fix it than to downgrade.

Thank you guys.

jlrdw's avatar

@lemmon search this forum on how many times has been install problems and confusion on versions.

I have never used any of those things in the docs to install.

I always get a stable version from the link I showed somewhere above, then use it when I do my composer install which automatically matches the correct framework version to the version I got from the stable release.

But that's just me but I have contributed to Frameworks to and I know a little bit about GitHub and stable release pages.

Jaytee's avatar

I usually use the installer, or occasionally composer create-project laravel/laravel {name} when the command can't be found (if new computer etc).

If I ever receive issues like this, I run a composer update to update the dependencies.

I also don't see any issues regarding this, both open/closed, on the Laravel repository and Symfony Console.

lemmon's avatar

Just ran

$ composer self-update
Updating to version 1.9.1 (stable channel).
   Downloading (100%)
Use composer self-update --rollback to return to version 1.8.5
lemmon's avatar

I have added a new laravel using Installer and the problem persists?

1 like
lemmon's avatar

should I use the verified version?

Jaytee's avatar

@lemmon That's extremely interesting. I match all of the criteria for that issue, and yet it doesn't affect me. And once again, nope, I haven't rolled back to 4.3.4 and all of my consoles work fine, with and without bash.

jlrdw's avatar

What do you mean by updated your composer install do you mean any extra dependencies that don't come with laravel.

Because the composer.json file from the latest release Edition will auto match the correct framework to pull in whenever you do a composer install.

But of course you would have to update any added dependencies that's not part of laravel.

and I'm referring to the one you have to download and un zip.

lemmon's avatar
$ composer self-update
Updating to version 1.9.1 (stable channel).
   Downloading (100%)
Use composer self-update --rollback to return to version 1.8.5

Is what I did.

Next

Please or to participate in this conversation.