May 30 2023
May 24 2023
Apr 30 2023
I think the string typehint isn't supported until recent-ish PHP, so its availability will depend on your minimum supported version.
Apr 29 2023
As an example, given this code
private $name;
I was ready to suggest that after further investigation was made, recalling the "recent" refactor work of the mercurial command-with-extensions changes we looked at 😄
For https://we.phorge.it/T15281, consider modifying DiffusionGitCommandEngine->newFormattedCommand() to pass explicit configuration to Git (as we do in Mercurial) rather than requiring administrators correctly configure Git via .gitconfig via $HOME.
Gotcha. I'm going to take a swing at updating past 8.0 and see what crops up. Also thanks for the tip with PHPAST. I haven't looked too much into it other than trying to get it working on Windows a year or so back
With the caveat that I mostly dig holes in the dirt now and no longer remember how computers work:
Would this be reasonable to address with a new server-side setup check, similar to the checks for post_max_size and op_cache values?
Apr 26 2023
I favor dealing with them on a case-by-case basis since they don't seem especially pervasive and I think in most of the cases where I've fixed the issue, the fix I chose wasn't just to swap the call. I think these strlen() errors are often a correct/useful symptom of undesirable slop in type handling.
Apr 25 2023
Feb 4 2023
Oct 26 2022
Jun 7 2022
Jun 3 2022
May 19 2022
May 17 2022
Thank you!
A user just ran into this exception with Arcanist (current master changeset) while running arc diff (using Mercurial) with PHP 8.1. I haven't looked too in depth but it seems similar to other PHP 8.1 issues.
[2022-05-17 20:49:47] EXCEPTION: (RuntimeException) substr(): Passing null to parameter #1 ($string) of type string is deprecated at [<arcanist>/src/error/PhutilErrorHandler.php:261] arcanist(head=master, ref.master=3cc486d5c156) #0 PhutilErrorHandler::handleError(integer, string, string, integer) #1 substr(NULL, integer, integer) called at [<arcanist>/src/repository/api/ArcanistRepositoryAPI.php:807] #2 ArcanistRepositoryAPI::getDisplayHash(NULL) called at [<arcanist>/src/repository/marker/ArcanistRepositoryMarkerQuery.php:67] #3 ArcanistRepositoryMarkerQuery::execute() called at [<arcanist>/src/repository/query/ArcanistRepositoryQuery.php:20] #4 ArcanistRepositoryQuery::executeOne() called at [<arcanist>/src/repository/api/ArcanistMercurialAPI.php:988] #5 ArcanistMercurialAPI::getActiveBookmark() called at [<arcanist>/src/workflow/ArcanistDiffWorkflow.php:2253] #6 ArcanistDiffWorkflow::buildDiffSpecification() called at [<arcanist>/src/workflow/ArcanistDiffWorkflow.php:380] #7 ArcanistDiffWorkflow::run() called at [<arcanist>/scripts/arcanist.php:427] <<< [1] (+8,567) <exec> 8,567,426 us
May 16 2022
May 12 2022
May 10 2022
I am pretty sure that this error message does not exist prior to PHP 8.1, and PHP 7.4 can not possibly emit it. See here for some evidence that this is true -- note that the error message is not present in the script output until PHP 8.1:
Trying to fresh install using PHP 7.4 or PHP 8.1, have the same result when executing:
- ./bin/config set phd.user root
[2022-05-10 02:01:12] EXCEPTION: (RuntimeException) strlen(): Passing null to parameter #1 ($string) of type string is deprecated at [<arcanist>/src/error/PhutilErrorHandler.php:261] arcanist(head=master, ref.master=fc5b228db537), phabricator(head=master, ref.master=698ada2470b1) #0 PhutilErrorHandler::handleError(integer, string, string, integer) called at [<phabricator>/src/infrastructure/env/PhabricatorEnv.php:128] #1 PhabricatorEnv::initializeCommonEnvironment(boolean) called at [<phabricator>/src/infrastructure/env/PhabricatorEnv.php:75] #2 PhabricatorEnv::initializeScriptEnvironment(boolean) called at [<phabricator>/scripts/init/lib.php:26] #3 init_phabricator_script(array) called at [<phabricator>/scripts/init/init-setup.php:11] #4 require_once(string) called at [<phabricator>/scripts/setup/manage_config.php:5]
May 3 2022
Apr 25 2022
Apr 20 2022
It's likely that D21451 didn't catch exhaustively all of these, but the motivating use case is now moot. If further need arises somehow, this strategy can be applied to those cases.
Almost every host currently in production was provisioned with Piledriver and things have been stable for quite a while, so I'm calling this resolved. See elsewhere for issues with Ubuntu20, mail, etc.
Moved the rest of this to T13640.
See also T13646: some very early service calls during initialization currently occur before --trace becomes active. These calls should be visible, possibly by buffering them and then dumping the buffer once --trace comes online.
PHP 8.1 disallows strlen(null).
Apr 19 2022
Apr 13 2022
With max_connections at 1024, the server above still looks fine after ~14 days:
Apr 1 2022
Elsewhere, I compacted Phacility free instances onto a small number of database servers. I attempted to "fill up" these servers, and succeeded, sort of, but maybe too much -- they eventually fall over and need to be rebooted.