Itโs been a fairly quiet week here at the ProcessWire HQ as itโs a Thanksgiving week where the kids donโt have school, which means less time in the office. This is the time of year when we think about what weโre thankful for, and Iโm especially thankful for all of you and the ProcessWire community.
Even with the holiday week, work continues on our next main/master version of ProcessWire. This week Bernhard and Adrian identified that ProcessWire doesnโt work well with PHP 8.4 due to some new deprecations introduced by this version of PHP. Itโs a technical detail, but PHP 8.4+ wants a question mark before function/method arguments of named types that have a default value of null. So if the function arguments were (PageArray $items = null) PHP 8.4 wants it to be (?PageArray $items = null).
Why? Who knows, perhaps not even PHP does, as โ?โ points directly to it being a question, one with no obvious answer. Perhaps it wants to make sure we really meant what we wrote, so the โ?โ is an โare you sure?โ. Without question, the โ= nullโ part is a pretty clear statement about what the intention is, no? I question the question mark, doesnโt this turn arguments into questions? Questionable arguments?
Being so close to a new master/main version, thereโs no question that we want to make sure it works with the latest available PHP version, questionable or not. So that meant adding new questions to 72 different core files, which youโll find on the dev branch this week. There may be more questions yet to answer, but those are the instances I was able to find so far. Thereโs a tradeoff in that the questions were introduced by PHP 7.1, so itโll produce a parse error on any prior versions of PHP. Meaning, our minimum required PHP version is now 7.1. Prior to today, it was 7.0 (actually, PW still even worked even on PHP 5.6, not that it matters). Similar questions will have to be added to modules before they are PHP 8.4 compatible to not throw deprecation notices, so Iโll be making some questionable updates to Pro and public modules in the coming weeks as well. Thanks for putting up with all my questions and have a great weekend! Please reply with your questions below.