Recently, I tried to import a site into Local by Flywheel and it failed with the message, “TypeError: Cannot read property ‘devMode’ on null”. It turns out the site export was created with “Local Lightning” while I’m using the classic Local by Flywheel. By modifying the local-site.json file in the import, I was still able to import the site.
What does declare(strict_types=1); do in PHP? PHP is a weakly typed language, which means that when a value is of the wrong type, PHP tries to cast it to the proper type. For example if you try to add an integer and a string, echo 5 + “3”; PHP will try to cast the string […]
By default phpcs does NOT display the relevant name of the sniff when a sniff fails. By adding the ‘-s’ argument, the sniff names will be displayed. See the following from ‘phpcs –help’. Alternatively, this can be added to your PHP CodeSniffer XML Ruleset.
Curl is a fantastic tool for making web requests from the command line. As a developer, I find this tool particularly useful. Retrieve Content at a URL curl https://salferrarello.com/ Making a HEAD Call Sometimes, we want to see the Header Values returned from a URL using the HEAD. The HTTP HEAD method requests the headers […]
Sometimes after running git stash pop, I get a conflict warning and I want to discard any changes to a file. However, when I try to checkout the file I get an error message. Using reset and then checkout, lets me accomplish this goal.
I’m currently reading Neal Stephenson’s “Fall; or, Dodge in Hell” and it includes a description of a band called Pompitus Bombasticus.
This seemed like the perfect music to listen to when I’m programming. I was disappointed to find out Pompitus Bombasticus does not exist. However, if you too are in search of the mythical Pompitus Bombasticus, I suggest you check out the group Two Steps from Hell (which does actually exist).
When setting up a new site using PHPUnit 8.x and PHP 7.2, I got the error message: setUp() must be compatible with PHPUnit\Framework\TestCase::setUp Because we can now define the method as returning no value (with :void) and this is part of the method definition starting in PHPUnit 8.0.0, we need to add this in our […]
Why did the unicycle win the race against the bicycle? The bicycle was two tired. But what about the Corvette?
When using the WordPress plugin [The Events Calendar](https://theeventscalendar.com/) by Modern Tribe the default link in the calendar will point to the Event page. However, sometimes we want to point this link to the Event Website value (which we can set when creating the event). This is the code I use to do this.