Support the ongoing development of Laravel.io →
Installation Configuration

Hi guys...

So i setup a clean install of larval 5.0.1 with the barryvdh debugbar nothing really done yet, cleaned it out and tried it 2 or 3 times the same result...

The minute i Run the command $php artisan app:name xxx and it changes the namespace using PSR-4 everything breaks and you cannot even run any more artisan commands to change things back...

just gives you error in app kernel.php file...

this is the error below


PHP Parse error:  parse error, expecting `"identifier (T_STRING)"' or `"\\ (T_NS_SEPARATOR)"' or `'{'' in ../app/Console/Kernel.php on line 1
Script php artisan clear-compiled handling the post-update-cmd event returned with an error


                                                                               
  [RuntimeException]                                                           
  Error Output: PHP Parse error:  parse error, expecting `"identifier (T_STRI  
  NG)"' or `"\\ (T_NS_SEPARATOR)"' or `'{'' in ../app/Console/Kernel.php on line 1 


it literally refers the the first line with he name space in the file which if removed brings up many more errors in other related files

I am on a mac... ironically i ran this earlier today on a windows system and I didn't experience the issue...

Last updated 3 years ago.
0

UPDATE: This error was caused because i was using a Reserver keyword as a namespace... typical mistake...

0

Sign in to participate in this thread!

Eventy

Your banner here too?

XenitXTD xenitxtd Joined 15 Oct 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.