When the permissions on a file change in a commit, Git will include this in the diff. Git refers to this as a mode change. When I’m looking at a “git diff” (or specifically a “git diff –name-only” where I’m looking for a list of files that have been changed), I often want to ignore mode changes (a.k.a. permission changes). By adding “-G.” to the command, mode changes will be ignored.
When I tried to run Local by Flywheel I received the notification, “Regenerating Machine Certificates:
Local detected invalid Docker Machine TLS certificates and is fixing them now.” over and over again making Local by Flywheel unusable.
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 […]