Never Nop Tech

Never Nop Tech

分享軟體、旅遊、生活。

解決 Error creating a new project using PHP Version < 7.0

今天下 composer install跳出了下面的錯誤:

Problem 1
– Installation request for doctrine/inflector v1.2.0 -> satisfiable by doctrine/inflector[v1.2.0].
– doctrine/inflector v1.2.0 requires php ^7.0 -> your PHP version (5.6.31) does not satisfy that requirement.
Problem 2
– doctrine/inflector v1.2.0 requires php ^7.0 -> your PHP version (5.6.31) does not satisfy that requirement.
– laravel/framework v5.4.30 requires doctrine/inflector ~1.0 -> satisfiable by doctrine/inflector[v1.2.0].
– Installation request for laravel/framework v5.4.30 -> satisfiable by laravel/framework[v5.4.30].

解決方式:

delete composer.lock file in root folder and run composer install again.

參考資料:

https://github.com/laravel/framework/issues/20214