Page MenuHomePhorge

Fix PHP 8.1 incompatibilities mostly
AbandonedPublic

Authored by MacFan4000 on Dec 7 2021, 14:09.
Referenced Files
Unknown Object (File)
Sat, Nov 19, 08:43
Unknown Object (File)
Fri, Nov 18, 22:37
Unknown Object (File)
Fri, Nov 18, 04:18
Unknown Object (File)
Wed, Nov 16, 06:08
Unknown Object (File)
Wed, Nov 16, 06:08
Unknown Object (File)
Fri, Nov 11, 18:37
Unknown Object (File)
Fri, Nov 11, 18:37
Unknown Object (File)
Fri, Nov 11, 18:37

Details

Summary

This fixes most issues with php 8.1. Some issues still linger that I was unable to fix. Part of T15064.

Test Plan

Used php linting, tested in browser, checked error logs, etc

Diff Detail

Repository
rARC Arcanist
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

Ekubischta added a subscriber: Ekubischta.

Just a warning that I found a few bugs just by spot checking...

I think that this revision should be abandoned

  1. It is impossible to test
  2. Should we be suppressing "null to string" errors with "@" ? (The issue here is that the built in strlen function does not accept null)

I think a better approach would be to

  • Write a replacement global function called phorge_strlen
  • Replace all strlen functions with our new function

Repeat for any other functions that we feel have this issue

src/console/grid/ArcanistGridView.php
158

Find and Replace bug

src/console/view/PhutilConsoleList.php
45

Find and Replace bug

src/console/view/PhutilConsoleTable.php
82

Find and Replace bug

228

Find and Replace bug

236

Find and Replace bug

This revision now requires changes to proceed.Fri, Nov 11, 16:09