0 comments on “xDebug with phpStorm”

xDebug with phpStorm

VVV -enabled vagrant boxes are “ready to go” with real-time xDebug debugging. You’ll need to enable it after you’ve booted the guest OS by getting into the guest via command line.

Boot your vagrant box.

vagrant ssh

Once you are into the guest type…

xdebug_on

The xdebug broadcaster is now enabled for the guest OS. Any time you surf to a guest web page it will broadcast Xdebug data. Your IDE should be able to listen for xdebug publications and associate the local code to the xdebug publication. It may require that you “map” your folder structure from your IDE to the relevant server-named path, for example map ~/MyDrive/vagrant-local/www/wordpress-one/public_html to /srv/www/wordpress-one/public_html for it to associate the code in the IDE to the code in the server broadcast messages.

0 comments on “Keeping Forks Updated with Upstream”

Keeping Forks Updated with Upstream

When forking a repository you are making a new copy of the original source , creating what can become a completely different codebase over time. Often that is not the intention when working on a project ; you typically want your own copy to mess with but need it to be “in alignment” with the main production software, or “upstream”, on a regular basis.

Keeping your fork updated is done by using a secondary remote source on your local git clone of the forked repository. By default git clone creates a single remote with a default name of “origin”. Origin is typically the github or bitbucket copy of the codebase stored via git.

Any git repository can have multiple remotes assigned to them. One of the first things you should do when forking a repo and cloning it to a local box is to setup the “upstream” remote point of reference. I use the graphical git tool Sourcetree to help with this.

After cloning your fork, double-click the repository name in Sourcetree to open the commit browser window. With that window open you can open the Repository | Repository Setting menu. Open the sub-tab for “remotes”, add a new remote, name it “upstream” and put in the git URL that represents the original code repository from where your forked version came.

You can now fetch upstream branches alongside your own. When you want to bring your forked copy “in alignment” with the upstream, checkout the branch you want to have aligned… develop for example… fetch the same branch from upstream, them merge upstream/develop into your origin/develop branch. Push your local develop back to origin/develop and valla — your forked copy is now ‘in alignment” with upstream for that particular branch.

0 comments on “Fresh VVV Setup for Plugin Dev”

Fresh VVV Setup for Plugin Dev

Starting out you’ll need…

Virtualbox (6.1)
Vagrant (2.2.15)
Install the vagrant-goodhost plugins
A running copy of git

This is all per the VVV System Requirements

Getting the box up…

Clone of VVV to a local directory.

git clone -b stable git://github.com/Varying-Vagrant-Vagrants/VVV.git ./vagrant-local

# vagrant up

This will download, build, and boot a default WordPress box.

Getting the SLP software

Fork the main SLP bitbucket repo to your own local copy.

Clone that fork into the one.wordpress.test wp-content/plugins directory…

cd ./vagrant-local/www/wordpress-one/public_html/wp-content/plugins/

# git clone git@bitbucket.org:lance_cleveland/store-locator-plus.git


# git checkout develop