Relying on A Dev-Master Dependency in Composer
If your project installation instructions recommend requiring dev-master in composer, I may need to reconsider my choice of package
— Lorna Mitchell (@lornajane) December 2, 2015
I got a few responses asking me to expand so I thought I would take the opportunity to write more than 140 characters on this topic. Continue reading
Insert Data with Phinx
change()
description.
One thing I didn’t immediately find was how to insert data. Continue reading
Generating a File List for Phan
phan -f filelist.txt
I generated my filelist.txt
files with a little help from grep – by looking for all files with opening PHP tags in, and putting that list of filenames into a file. My command looks like this:
grep -R -l "<?php" * > filelist.txt
This simply greps recursively (the -R
switch) in all files looking for <?php
and when it finds it, outputs only the filename (the -l
switch does that bit). Then I just put all the output into my filelist.txt
file.
Phan is in its early stages but it’s ready for you to run on your own projects. Look out that you may need to put your bootstrap or other include files first in the filelist.txt
file if phan isn’t finding things in the right order – luckily with it all in one file, it’s relatively easy to move things around if you need to.
Git Won’t Check Out A Path It Autocompleted
Why My Open Source Project Needs a Code of Conduct
I feel the same way about codes of conduct for open source projects as I do about codes of conduct for events. You can absolutely run a totally safe and effective event without one, but by having one you make very clear what your expectations are – and in turn this manages the expectations of the people attending that event. Continue reading
PHP: Calling Methods on Non-Objects
Ada Lovelace Day: The Allies
PHP Learning Path from O’Reilly
I think it’s a pretty well-rounded collection and it’s only $99 for a couple of weeks, so get the PHP Learning Path here and let me know what you think?
New in PHP 7: null coalesce operator
In PHP 5, we already have a ternary operator, which tests a value, and then returns the second element if that returns true and the third if it doesn’t:
echo $count ? $count : 10; // outputs 10
Continue reading