Skip to content

erikbaranowski/sandbox-php7

Repository files navigation

sandbox-php7

About

This repository holds the configuration and instructions for hosting a php7 development sandbox.

Currently running PHP 7.3 on CentOS 7.6

Install

  1. install VirtualBox 5.2.30
  2. install Vagrant 2.2.4
  3. on Windows 7 SP1 ONLY you will have to update PowerShell to version 3 or above for Vagrant
  4. run cmd as admin
  5. cd to directory with this repo
  6. vagrant up

ssh

  1. install putty
  2. connect to 192.168.56.2 port 22 as vagrant/vagrant

Test Page

http://192.168.56.2/test

  • verified working in chrome/firefox

http://192.168.56.2/info

  • verified working in chrome/firefox

Unit Tests

phpunit

  • there is an alias in the .bash_profile so that you can run phpunit from any directory

phpunit-coverage

  • there is an alias in the .bash_profile so that you can run phpunit from any directory
  • See /sandbox/docs/index.html for results

Development/Debug

XDebug has already been configured with remote_autostart enabled in the vm (/etc/php.d/xdebug.ini)

  1. install Visual Studio Code
  2. install Visual Studio Code PHP plugins including PHP Debug
  3. Update the launch.json file in the workspace to include the following. "${workspaceRoot}/sandbox-php7" might need to be set differently depending on the relative path of your sandbox workspace to the Visual Studio Code workspace.
{
	"name": "Listen for XDebug",
	"type": "php",
	"request": "launch",
	"port": 9000,
	"pathMappings": {
		"/sandbox": "${workspaceRoot}/sandbox-php7"
	}
}
  1. Set the debugger to Listen for XDebug
  2. Set a breakpoint and go!

Dependency Management

composer install --optimize-autoloader

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published