Limited Time Offer!
For Less Than the Cost of a Starbucks Coffee, Access All DevOpsSchool Videos on YouTube Unlimitedly.
Master DevOps, SRE, DevSecOps Skills!
![](https://www.devsecopsnow.com/wp-content/uploads/2023/12/image-20-1024x465.png)
Problem:- When i run Composer install command in my laravel project to upgrade my project version after adding all the dependencies i got this env error
Error:
The environment file is invalid!
Failed to parse dotenv file. Encountered an invalid name at [GET-ALL-QUOTE-BY-FIRM].
Below is my env file
![](https://www.devsecopsnow.com/wp-content/uploads/2023/12/image-21.png)
The Solution is:
The problem most likely stems from the rule that special characters and spaces shouldn’t be used in variable names in.env files. In most configuration systems, variable names like GET-ALL-QUOTE-BY-FIRM and others with similar formats are invalid.
You should change the names to adhere to the accepted variable naming guidelines in order to fix this problem. Variable names should normally only contain underscores, numerals, and capital letters. For instance, you can use underscores in place of hyphens:
GET_ALL_QUOTE_BY_FIRM=/api/v1/j/get-all-quote-by-firm
GET_QUOTE_BY_FIRM_ID=/api/v1/j/get-quote-by-firm-id
GET_ALL_BID_BY_FIRM=/api/v1/j/get-all-bid-by-firm
CREATE_BID_BY_FIRM=/api/v1/j/create-bid-by-firm
![](https://www.devsecopsnow.com/wp-content/uploads/2023/12/image-22.png)
By Doing these steps you have to run composer install command:
composer install
Now you error will be solved and your laravel project will run.