The behaviors of “require”, “include”, “require_once”, and “include_once” in PHP are all very similar with some slight differences. Here is the table highlighting the different behaviors of these statements.
Ideally, the PHP package manager Composer can update itself with the command composer self-update Unfortunately, when I ran this command I got [RuntimeException] SHA384 is not supported by your openssl extension, could not verify the phar file integrity This is a known issue (see Composer Issue 7669) but unfortunately the thread does not offer a […]
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.
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.
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 […]
I spend most of my time doing my writing in markdown. One of the features I have mixed feelings about, is auto-numbering of ordered. There are often times when I need to modify the numbering. I like to do this by adding a backslash (\) before the period after the number, which renders the list as text. If you want to render the list with the ol/li markup, you can write the exact markup you want in your markdown document and it will render without any modifications.
I was working with an SVG and when it was sized down too small it became pixelated.