v1.2 of the php-d3-lib has been released

Yeah buddy!!  I am happy to announce v1.2 of the php-d3-lib has been released and merged into the master branch.

The highlights:

Check it out on Github and feel free to contribute.  If you have ideas or would like to discuss more, leave a comment, drop me a line or reach out to me on Twitter.

Thanks for reading and have a great day.

How To Turn On Semantic Highlighting for PHP in PhpStorm

I have to be honest with you: semantic highlighting for PHP has changed my coding life.  I am very much spoiled by it now and you know what, I don’t mind at all.  There I said it.  I am definitely a code snob now and I am perfectly ok with it.  I am also much more efficient with my code since I can visually see the connections between different instances of a variable on the screen, all color coded and sweet looking, but before I get ahead of myself…

What is Semantic Highlighting?

Great question.  Let me show you rather than spend a bunch of time explaining it:

In short, “semantic highlighting” color codes variables based on their current instance within a method, function or file (depending on what you are working with).  As indicated in my screenshot, all of the $ranges variables are colored the same color green which makes it easier to keep track of that particular variable and it’s updates and changes throughout the code.  As you can see also in the screenshot, the other variables are color coded as well.  Imagine this kind of visual clarity across your whole PHP project… it’s glorious. 😍

That’s awesome but how do I do it?

Another great question.  Here’s how you enable “Semantic Highlighting” for PHP in PhpStorm: (I’ll show you first cuz that is faster)

For those who would rather read…

  1. Open the main Preferences / Settings screen
  2. Choose Editor -> Color Scheme -> PHP in the waterfall menu on the left
  3. Choose “Semantic Highlighting” from the list on the right
  4. Check the “Semantic Highlighting” box on the far right side above the list of colors
  5. Click Ok

That’s it!  You’re done.  Wasn’t that easy-peasy?

Now, with semantic highlighting enabled, you can enjoy a next level of awesomeness as your code takes on a whole new color-full (see what I did there 😉) life.

Happy coding!

Php-d3-lib update: v1.1 has been released

Woot!  I am happy to report that Php-d3-lib v1.1 has been rolled out.

v1.1 includes:

  • a brand new simple line graph option with tool tips
  • all existing graphs and charts updated to D3.js v4
  • all graphs and charts updated with the “autosize” option so graphs will size to their container on load and screen resize
  • General code improvements
  • Cleaned up examples

The code is up on Github in the master branch if you would like to contribute to it or use it.


Development continues with v1.2

Development is ongoing and the items below are what I am planning for the next release, v1.2:

  • Add a sunburst chart generator
  • Add a class for handling color processing for all charts and graphs
  • Add a class for handling tooltips for all charts and graphs
  • Additional code cleanup both the js and PHP

If you have a feature, graph or chart you would like to see included in an upcoming release, please feel free to contact me about it or just submit a PR with it.  This is an open project and your contributions are always welcome. 🙂

As always, please feel free to leave a comment below and enjoy the updated library.

Happy coding!

How to prune deleted remote branches within Sourcetree

Situation: You’ve deleted some branches from your online repo but they don’t go away from your “Remotes” section in your Sourcetree sidebar.

So I just discovered how to resolve this and wanted to share the wealth.  See below:

1. Click “Repository” in top menu.

2. Click “Fetch”

3. Check the “Fetch from all remotes” box

4. Check the “Prune tracking branches no longer on remote(s)” box <- this is the key option

5. Click OK.

That’s all folks.  I hope this helps you as much as it helped me.

Happy Coding! 🤓