Skip to content

Commit 85b3ef3

Browse files
committed
Added new phpunit/composer installation instructions
1 parent 3933cad commit 85b3ef3

File tree

2 files changed

+21
-2
lines changed

2 files changed

+21
-2
lines changed

_docs/developer/testing/install_php.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ If you are missing extensions you can install them with `PECL` which will be
2323
installed automatically with PHP, but you should have everything required by
2424
default.
2525

26+
### Windows
27+
28+
Download [php 8.1](https://windows.php.net/download/) as a zip file under the thread safe category. Then extract the contents of the zip to a folder, and add the path to that folder to your path system variable. It's suggested that one extracts the contents of the zip to a folder called `php`, which can be put at `C:\php` for simplicity. You can then add `C:\php` to your path system environment variable.
29+
2630
-------------
2731

2832
Verify you have PHP installed correctly, submitty requires a version greater than 7.0

_docs/developer/testing/php_unit_tests.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,27 @@ Before running PHP Unit Tests, you must install the required dependencies. You m
1313
##### Inside the Vagrant VM
1414

1515
1. Install [Composer](https://getcomposer.org/download/) through the command-line installation copy-paste.
16-
2. `cd` to `/usr/local/submitty/GIT_CHECKOUT/Submitty/site/`
16+
2. `cd` to `/usr/local/submitty/GIT_CHECKOUT/Submitty/site/`.
1717
3. run `composer update`
1818

1919
*Please be aware that many unit tests will not work inside the VM. It is suggested that you run tests individually.*
2020

21-
##### On Your Local Machine
21+
##### On Mac
22+
23+
1. Install [Composer](https://getcomposer.org/download/) using brew.
24+
2. `cd` to your `Submitty/site/` folder.
25+
3. run `composer install`
26+
27+
##### On Windows (Not Suggested)
28+
29+
1. Navigate to your php folder, and open the php configuration settings file.
30+
2. Ctrl-F and uncomment the line labelled `extension=fileinfo` (remove the semi-colon). Do the same for the line labelled `extension=sodium`.
31+
3. Install [Composer](https://getcomposer.org/download/), click the link labelled Composer-Setup.exe.
32+
4. Restart your terminal.
33+
5. `cd` to your `Submitty/site/` folder.
34+
6. Run `composer update`. If you are getting timeout errors, try using a VPN.
35+
36+
*This is not a good way to run unit tests because many file paths will be broken. Like with the vagrant VM, it is suggested that you run tests individually.*
2237

2338
### Running PHP Unit Tests
2439

0 commit comments

Comments
 (0)