After formatting the homestead.yaml file in phpstorm, the indentation of the format is inconsistent with the homestead.yaml.example
1. After formatting the homestead.yaml file in phpstorm, the indentation of the format is incorrect, the format is as follows. as shown in Figure 1
---
ip: "192.168.10.10"
memory: 2048
cpus: 1
provider: virtualbox
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
- ~/.ssh/id_rsa.pub
folders:
- map: E:/wwwroot/refactoring
to: /home/vagrant/Code/refactoring
sites:
- map: refactoring.test
to: /home/vagrant/Code/refactoring
databases:
- homestead
features:
- mysql: true
- mariadb: false
- postgresql: false
- ohmyzsh: false
- webdriver: false
services:
- enabled:
- "mysql"
# - disabled:
# - "postgresql@11-main"
#ports:
# - send: 33060 # MySQL/MariaDB
# to: 3306
# - send: 4040
# to: 4040
# - send: 54320 # PostgreSQL
# to: 5432
# - send: 8025 # Mailhog
# to: 8025
# - send: 9600
# to: 9600
# - send: 27017
# to: 27017
2. Check the format of homestead.yaml.example, – there is only one space with map. as shown in Figure 2
---
ip: "192.168.56.56"
memory: 2048
cpus: 2
provider: virtualbox
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders:
- map: ~/code
to: /home/vagrant/code
sites:
- map: homestead.test
to: /home/vagrant/code/public
databases:
- homestead
features:
- mariadb: false
- ohmyzsh: false
- webdriver: false
#services:
# - enabled:
# - "postgresql@12-main"
# - disabled:
# - "postgresql@11-main"
# ports:
# - send: 50000
# to: 5000
# - send: 7777
# to: 777
# protocol: udp
3. Reference:https://www.jetbrains.com.cn/help/phpstorm/2021.3/yaml.html. Settings – Editor – Code Style – YAML . Settings may be overridden by EditorConfig. Disabled. as shown in Figure 3
4. Format the code again. The format is basically the same as homestead.yaml.example . as shown in Figure 4
---
ip: "192.168.10.10"
memory: 2048
cpus: 1
provider: virtualbox
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
- ~/.ssh/id_rsa.pub
folders:
- map: E:/wwwroot/refactoring
to: /home/vagrant/Code/refactoring
sites:
- map: refactoring.test
to: /home/vagrant/Code/refactoring
databases:
- homestead
features:
- mysql: true
- mariadb: false
- postgresql: false
- ohmyzsh: false
- webdriver: false
services:
- enabled:
- "mysql"
# - disabled:
# - "postgresql@11-main"
#ports:
# - send: 33060 # MySQL/MariaDB
# to: 3306
# - send: 4040
# to: 4040
# - send: 54320 # PostgreSQL
# to: 5432
# - send: 8025 # Mailhog
# to: 8025
# - send: 9600
# to: 9600
# - send: 27017
# to: 27017



