arispati / phpdev
A more enjoyable local development experience for WSL on Windows.
Requires
- php: ^8.3
- illuminate/collections: ^11.0
- illuminate/container: ^11.0
- mnapoli/silly: ^1.9
- symfony/process: ^7.1
README
PhpDev is a local PHP development environment inspired by Laravel Valet for WSL on Windows.
Installation
PhpDev requires WSL on Windows with Ubuntu OS, Nginx and Homebrew.
Before installation, you should make sure that no other programs such as Apache that binding to your local machine's port 80.
To get started, you first need to ensure that Homebrew is up to date using the update
command:
brew update
Next, you should use Homebrew to install PHP:
brew install php
After installing PHP, you are ready to install the Composer package manager. After Composer has been installed, you may install PhpDev as a global Composer package:
composer global require arispati/phpdev
Make sure the
$HOME/.config/composer/vendor/bin
directory is in your system's "PATH".
Finally, you may execute PhpDev's install command. This will configure and install PhpDev services. In addition, the daemons PhpDev depends on will be configured to launch when your system starts:
phpdev install
Upgrading
You may update your PhpDev installation by executing the composer global require arispati/phpdev
command in your terminal. After upgrading, it is good practice to run the phpdev install
command so PhpDev can make additional upgrades to your configuration files if necessary.
Commands
Link Command
phpdev link [path] [-s|--site=] [-p|--php=]
Example:
phpdev link public -s laravel -p 8.4
Link
laravel.test
withpublic
folder as web root directory
ℹ️ You still have to add laravel.test
to the hosts
file on windows
Proxy Command
phpdev proxy site destination
Example:
phpdev proxy laravel http://127.0.0.1:8000
Proxy
laravel.test
tohttp://127.0.0.1:8000
Unlink Command
phpdev unlink site
Example:
phpdev unlink laravel
Remove
laravel.test
Switch command
phpdev switch site php
Example:
phpdev switch laravel 8.4
Switch php version of
laravel.test
toPHP 8.4