You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+26-10Lines changed: 26 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,7 @@
10
10
*[Installation steps](#installation-steps)
11
11
*[Default credentials and settings](#default-credentials-and-settings)
12
12
*[Getting updates and fixes](#getting-updates-and-fixes)
13
+
*[Troubleshooting](#troubleshooting)
13
14
*[Day-to-day development scenarios](#day-to-day-development-scenarios)
14
15
*[Reinstall Magento](#reinstall-magento)
15
16
*[Clear magento cache](#clear-magento-cache)
@@ -61,6 +62,8 @@ Software listed below should be available in [PATH](https://en.wikipedia.org/wik
61
62
-[NFS server](https://en.wikipedia.org/wiki/Network_File_System) must be installed and running on \*nix and OSX hosts. Is usually available, so just try to follow [installation steps](#how-to-install) first.
62
63
63
64
### Installation steps
65
+
66
+
:information_source: In case of any issues during installation, please read [troubleshooting section](#troubleshooting)
64
67
65
68
1. Open terminal and change directory to the one which you want to contain Magento project.  On Windows use Git Bash, which is available after Git installation
66
69
@@ -78,15 +81,12 @@ Software listed below should be available in [PATH](https://en.wikipedia.org/wik
78
81
79
82
1. Optionally, copy [etc/config.yaml.dist](etc/config.yaml.dist) as `etc/config.yaml` and make necessary customizations
:information_source: On OSX and \*nix hosts NFS will be used by default to sync your project files with guest. On some hosts Vagrant cannot configure NFS properly, in this case it is possible to deploy project without NFS by setting `use_nfs` option in [config.yaml](etc/config.yaml.dist) to `0` <br />
89
-
:information_source: On Windows hosts you might face `Composer Install Error: ZipArchive::extractTo(): Full extraction path exceed MAXPATHLEN (260)` exception during `composer install`. This can be fixed in 2 ways: decrease path length to the project directory or set `composer_prefer_source` option in [config.yaml](etc/config.yaml.dist) to `1`
90
90
91
91
1. Use `vagrant-magento` directory as project root in PHP Storm (not `vagrant-magento/magento2ce`). This is important, because in this case PHP Storm will be configured automatically by [init_project.sh](init_project.sh). If NFS files sync is disabled in [config](etc/config.yaml.dist) and  on Windows hosts [verify deployment configuration in PHP Storm](docs/phpstorm-configuration-windows-hosts.md)
92
92
@@ -124,6 +124,14 @@ Current vagrant project follows [semantic versioning](http://semver.org/spec/v2.
124
124
For example your current branch is `2.0`, then it will be safe to pull any changes from `origin/2.0`. However branch `3.0` will contain changes backward incompatible with `2.0`.
125
125
Note, that semantic versioning is only used for `x.0` branches (not for `develop`).
126
126
127
+
### Troubleshooting
128
+
129
+
1. On OSX and \*nix hosts NFS will be used by default to sync your project files with guest. On some hosts Vagrant cannot configure NFS properly, in this case it is possible to deploy project without NFS by setting `use_nfs` option in [config.yaml](etc/config.yaml.dist) to `0` <br />
130
+
1. On Windows hosts you might face `Composer Install Error: ZipArchive::extractTo(): Full extraction path exceed MAXPATHLEN (260)` exception during `composer install`. This can be fixed in 2 ways: decrease path length to the project directory or set `composer_prefer_source` option in [config.yaml](etc/config.yaml.dist) to `1`
131
+
1. Make sure that you used `vagrant-magento` directory as project root in PHP Storm (not `vagrant-magento/magento2ce`)
132
+
1. If code is not synchronized properly on Windows hosts (or when NFS mode is disabled in [config.yaml](etc/config.yaml.dist) explicitly), make sure that PhpStorm is running before making any changes in the code. This is important because otherwise PhpStorm will not be able to detect changes and upload them to the guest machine
133
+
1. Please make sure that currently installed software, specified in [requirements section](#requirements), meets minimum version requirement
134
+
127
135
## Day-to-day development scenarios
128
136
129
137
### Reinstall Magento
@@ -155,11 +163,7 @@ bash m-switch-to-ce
155
163
OR
156
164
bash m-switch-to-ee
157
165
```
158
-
:information_source: On OSX and \*nix hosts without NFS
159
-
you will be asked to wait until uploading process in PhpStorm is finished(PhpStorm should be lunched). To continue the process you need to press any key.
160
-
process is finished. To continue the process you need to press any key.
161
-
:information_source: On Windows hosts you will be asked to wait until uploading
162
-
process in PhpStorm is finished(PhpStorm should be lunched). To continue the process you need to press any key.
166
+
:information_source: On Windows hosts (or when NFS mode is disabled in [config.yaml](etc/config.yaml.dist) explicitly) you will be asked to wait until code is uploaded to guest machine by PhpStorm (PhpStorm must be lunched). To continue the process press any key.
163
167
164
168
### Update composer dependencies
165
169
@@ -188,7 +192,19 @@ XDebug is already configured to connect to the host machine automatically. So ju
188
192
1. Set XDEBUG_SESSION=1 cookie (e.g. using 'easy Xdebug' extension for Firefox). See [XDebug documentation](http://xdebug.org/docs/remote) for more details
189
193
1. Start listening for PHP Debug connections in PhpStorm on default 9000 port. See how to [integrate XDebug with PhpStorm](https://www.jetbrains.com/phpstorm/help/configuring-xdebug.html#integrationWithProduct)
190
194
1. Set beakpoint or set option in PhpStorm menu 'Run -> Break at first line in PHP scripts'
191
-
195
+
196
+
To debug a CLI script:
197
+
198
+
1. Create [remote debug configuration](https://www.jetbrains.com/help/phpstorm/2016.1/run-debug-configuration-php-remote-debug.html) in PhpStorm, use `PHPSTORM` as IDE key
199
+
1. Run created remote debug configuration
200
+
1. Run CLI command on the guest as follows (`xdebug.remote_host` value might be different for you):
To debug Magento Setup script, go to [Magento installation script](scripts/guest/m-reinstall) and find `php ${install_cmd}`. Follow steps above for any CLI script
207
+
192
208
### Connecting to MySQL DB
193
209
194
210
Answer can be found [here](https://github.com/paliarush/magento2-vagrant-for-developers/issues/8)
0 commit comments