Skip to content

[Documentation:Developer] Update Advanced Setup Guideline #606

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions _docs/developer/getting_started/phpstorm.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Under the `Mappings` tab, set the following:
This step will configure PhpStorm to use the PHP CLI that is configured inside your vagrant machine.
It is important to use this PHP installation as opposed to some other one as it ensures environment consistency among developers and production servers.

Under PhpStorm settings, open `Languages & Frameworks` > `PHP`. Press the `...` button next to `CLI Interpreter` and, on the left list of the interpreters window, press the `+` and select `From Docker, Vagrant, VM, Remote...`.
Under PhpStorm settings, open `PHP`. Press the `...` button next to `CLI Interpreter` and, on the left list of the interpreters window, press the `+` and select `From Docker, Vagrant, VM, Remote...`.
Select `Vagrant` from the list of radio buttons.
Then press `OK` to add the interpreter and `OK` to save the list of interpreters.

Expand All @@ -61,7 +61,7 @@ Open `Tools` > `Deployment...` > `Options`. Set `Upload changed files automatica

## Enable PHP debugging using xdebug

Under PhpStorm settings, open `Languages & Frameworks` > `PHP` > `Debug`. In the pre-configuration steps, press `Validate` to open the configuration validator. Choose `Remote Web Server` and set the following:
Under PhpStorm settings, open `PHP` > `Debug`. In the pre-configuration steps, press `Validate` to open the configuration validator. Choose `Remote Web Server` and set the following:

- `Path to create validation script`: `<submitty repository root>/site/public`
- `Deployment Server`: Use the SFTP connection you set up in the first step
Expand Down Expand Up @@ -91,7 +91,7 @@ Now you can browse the tables in the database window by expanding the tabs next

## Running PHPUnit tests

Under PhpStorm settings, open `Languages & Frameworks` > `PHP` > `Test Frameworks`. Press the `+` button to add a testing configuration, using the `PHPUnit by Remote Interpreter` type. Choose the interpreter you configured in earlier steps. Then set:
Under PhpStorm settings, open `PHP` > `Test Frameworks`. Press the `+` button to add a testing configuration, using the `PHPUnit by Remote Interpreter` type. Choose the interpreter you configured in earlier steps. Then set:

- `PHPUnit Library`: `Use Composer autoloader`
- `Path to script`: `/usr/local/submitty/GIT_CHECKOUT/Submitty/site/vendor/autoloader.php`
Expand Down Expand Up @@ -132,7 +132,7 @@ Press `OK` to save the run configuration. If you then `Debug` the configuration,

During debugging, you may get decently upset at how often you step into magic methods and class loaders etc. There's an easy fix for this:

Under PhpStorm settings, open `Languages & Frameworks` > `PHP` > `Debug` > `Step Filters`. Check `Skip magic methods` and add the following to `Skipped Methods`:
Under PhpStorm settings, open `PHP` > `Debug` > `Step Filters`. Check `Skip magic methods` and add the following to `Skipped Methods`:

- `app\views\AbstractView->__construct`
- `app\models\AbstractModel->convertName`
Expand Down
Loading