I think the string typehint isn't supported until recent-ish PHP, so its availability will depend on your minimum supported version.
- Queries
- All Stories
- Search
- Advanced Search
- Transactions
- Transaction Logs
Advanced Search
May 30 2023
May 24 2023
Apr 30 2023
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.
In T13588#256584, @epriestley wrote:PHP 8.1 disallows strlen(null).
...
Broadly, Phabricator likely will not pass the empty string as a constraint in these cases...
...
D21762 introduces phutil_nonempty_string(), which is like this test but slightly stricter (it raises an exception for wonky values) and easier to revisit later (i.e., use of this function is a hint that the code can be made more strict about value types).
...
Upshot:
- if (strlen($maybe_null)) may be replaced in all cases with if (phutil_nonempty_string($maybe_null)) to work in PHP 8.1 and not break any code which wasn't already extremely suspicious (...stringlike() may be required if the value may be an object, usually a URI object).
- This is usually not the most desirable replacement, but probably 95% of these aren't realistically worth being surgical about.
- In new code, prefer increasing type strictness over these more-flexible tests.
Apr 25 2023
Feb 4 2023
Oct 26 2022
Jun 7 2022
Jun 3 2022
May 19 2022
May 17 2022
Thank you!
In T13588#256950, @cspeckmim wrote:A user just ran into this exception with Arcanist...
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.
Dec 16 2021
PHP 8.1 changed semantics of static variables in methods. See:
See also T13588. Using static::class to work around changes to the scope of static in PHP 8.1 is also possible now that PHP 5.5 is the minimum version, and some uses of get_class($this) might be replaceable. There's no strong motivator for this, it's just a little cleaner.
Dec 11 2021
I put all the database migration stuff everywhere and it appears stable. I'm hooking up Postmark as an outbound pathway now. If I get that working, I'll let it sit for a while and start migrating databases.
Dec 10 2021
Finally, there are other some MySQL version issues which can be avoided with:
Dec 9 2021
The new core/ support for the API is partially deployed; the new services/ support isn't anywhere yet.
See also T13232. Here's a possible build strategy for PHP 8.1 under macOS Mojave. Anyone reasonable should probably give up and use brew instead.
Dec 4 2021
The latest version of Phabricator itself is everywhere.
I'm going to hold it until the weekend and try deploying then if things look calm on my end.
Dec 1 2021
While waiting to deploy db stuff, I was planning to look at pruning dead data out of S3 -- but, on closer examination, the total S3 bill is something like $1/day, so no priority on that whatsoever.
Piledriver also needs to be able to provision database hosts, but these are more-or-less a trivial subset of repository hosts.
- Make InstancesStateQuery use a dictionary when building the database ref information internally.
Piledriver also needs to be able to provision database hosts, but these are more-or-less a trivial subset of repository hosts.
I completed all the repository migrations over the weekend and seemingly haven't run into any issues.
Nov 21 2021
Just for completeness, vault used to be an HAProxy host serving as an SSH load balancer, but this responsibility moved to lb001 once ELBs became able to listen on inbound port 22 and TCP forward, so there is no longer a vault class of machines.
Nov 20 2021
The new provisioning process for repository shards is:
Nov 19 2021
Piledriver was built before the FutureGraph stuff settled in T11968; it runs into the same general set of sequencing problems and yield would likely be a good approach.
Nov 18 2021
I can't figure out how to delete...
I got rid of everything I could, and nothing appears to be affected.
We have a lot of leftover VPC cruft that I'm going to nuke, notably meta and admin VPCs that (as far as I can tell) have nothing in them, and then a bunch of subnets (meta.private-a, meta.private-b, block-public-222, admin.public-a, admin.public-b, meta.public-a, meta.public-b, block-private-3) and some NGWs etc. I'm like 99% sure this stuff is all leftover from testing years ago and nothing depends on it, but I guess we'll see what happens when I delete all of it.
Here's the last known state of the world from T12816:
Nov 17 2021
Oct 23 2021
Thank you for the answer, appreciate it, and your effort that goes into arcanist.
Oct 21 2021
The non-public parts of Phage are currently very specific to Phacility's cluster and probably not generally useful. The current version of PhageRemoteWorkflow is similar to P2107 and depends on particular Phacility services and hosts to enumerate valid remotes and negotiate a connection to them through a bastion pool. These service-listing and bastion-host components are not generalized and not trivially generalizable.
It seem to me like certain parts of phage are not published in a public repo. Are there plans to open up missing pieces?
Sep 28 2021
See also T12404#256288 for a note on each removal.
each is usually easy to replace and I'm happy to accept a change to replace it if someone wants to reproduce/test it. I believe this (totally ridiculous) construction:
From https://discourse.phabricator-community.org/t/sending-emails-causes-an-exception/4966, looks like the PHPMailer uses each which is removed in php 8.
From https://discourse.phabricator-community.org/t/sending-emails-causes-an-exception/4966, it appears that both class.smtp.php and class.phpmailer-lite.php have calls to each which is removed in PHP 8.
Jul 21 2021
Jul 11 2021
I think not all versions of Windows + PHP require adjusting php.ini, but some nontrivial subset do -- enough that arc itself emits some flavor of guidance on this: