Commit graph

17854 commits

Author SHA1 Message Date
Andre Klapper 520db4e188 PHPDoc: Replace non-existing return type const with string(|int)
Summary: `const` is not a valid type. See https://docs.phpdoc.org/guide/references/phpdoc/types.html and https://docs.phpdoc.org/guide/references/phpdoc/tags/return.html.

Test Plan: Read docs; run static code analysis.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D26068
2025-06-08 12:35:08 +02:00
Andre Klapper 83494d84ef PHPDoc: Replace non-existing return type tuple with array
Summary: `tuple` is not a valid type. See https://docs.phpdoc.org/guide/references/phpdoc/types.html and https://docs.phpdoc.org/guide/references/phpdoc/tags/return.html.

Test Plan: Read docs; run static code analysis.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D26066
2025-06-08 12:32:43 +02:00
Andre Klapper 4d338c2dc3 transaction.search: Fix PhpDoc
Summary: `isObjectTypeSupported()` returns a `bool`.

Test Plan: Run static code analysis; see its `return` line.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D26062
2025-06-08 12:32:02 +02:00
Andre Klapper 0b99d685df PHPDoc: Replace non-existing return type markup with string
Summary: `markup` is not a valid type. See https://docs.phpdoc.org/guide/references/phpdoc/types.html and https://docs.phpdoc.org/guide/references/phpdoc/tags/return.html.

Test Plan: Read docs; run static code analysis.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D26064
2025-06-08 12:31:30 +02:00
amy bones 23af8ee73f LiskDAO::getConfiguration return typing
Summary: This clears up a common source of type check errors when using php intelephense.

Test Plan: See the squiggles in vscode go away :)

Reviewers: O1 Blessed Committers, aklapper

Reviewed By: O1 Blessed Committers, aklapper

Subscribers: aklapper, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D26039
2025-06-06 08:58:50 -07:00
amy bones 6423759c33 phpDoc PhabricatorApplicationQuery
Summary:
Add the necessary phpDoc so `execute` and `executeOne` return at least
something useful.

Test Plan: Look at the inferred return type.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D26038
2025-06-06 08:58:50 -07:00
amy bones 425ab7a846 Add phpDoc to PhabricatorCursorPagedPolicyAwareQuery
Summary:
Adding class templates to `PhabricatorPolicyAwareQuery` and
`PhabricatorCursorPagedPolicyAwareQuery` to make `execute()` have the right
return signature, when the query classes are also annotated. Otherwise, the
return type is inferred as `PhabricatorPolicyInterface` as before.

Test Plan:
Add some annotations to query classes and see that `$query->execute()` infers
the more specific return type.

Diviner still works after ./bin/diviner generate. For example this page still exist:

/book/dev/class/PhabricatorCursorPagedPolicyAwareQuery/

And the method newResultObject() is now documented with the return type R|null.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: aklapper, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D26037
2025-06-06 08:58:50 -07:00
Andre Klapper 6d21978340 Fix PHP 8.1 "strlen(null)" exception for no query in primary search
Summary:
`strlen()` was used in Phabricator to check if a generic value is a non-empty string.
This behavior is deprecated since PHP 8.1. Phorge adopts `phutil_nonempty_string()` as a replacement.

Note: this may highlight other absurd input values that might be worth correcting
instead of just ignoring. If phutil_nonempty_string() throws an exception in your
instance, report it to Phorge to evaluate and fix that specific corner case.

```
ERROR 8192: strlen(): Passing null to parameter #1 ($string) of type string is deprecated at [/var/www/html/phorge/phorge/src/applications/search/controller/PhabricatorSearchController.php:34]
```

Test Plan: Visit `http://phorge.localhost/search/?search:primary=true`

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D26061
2025-06-05 10:51:04 +02:00
Andre Klapper a638bafe51 Add tooltip for "not" search token tag in Global Search results
Summary:
These tags already use colors to differentiate. Use a tooltip for "NOT" query token tags like all the other types also do, because consistency.

Closes T16093

Test Plan:
1. Go to https://we.phorge.it/search/query/advanced/
2. In the `Query` field, enter `bleh =zsd +a NOT(x) "phrase like this" a -phasa ~amp title:fb "use meo" érr`.
3. Click `Search` button.
4. Look at the tags shown for the string `Searched For: ...`.
5. See that only red tags also use a (minus) icon.
6. Don't see a minus icon for the red token tag anymore, now get a tooltip for the red token tag.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Maniphest Tasks: T16093

Differential Revision: https://we.phorge.it/D26057
2025-06-03 13:44:03 +02:00
Andre Klapper e410020f78 More Search-related PhpDoc additions
Summary: I'm still trying to understand search a bit better. As a side effect I add PhpDocs.

Test Plan: Inspect parameter and return formats, types, content while searching in Phorge.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D26042
2025-06-01 13:07:13 +02:00
Andre Klapper a7f94af9cf Explain consequences when adding second Multi-Factor Auth
Summary:
Warn users who already have MFA set up that adding a second Multi-Factor Auth will require entering both instead of being able to choose from one of them.
This is currently not clear. I was surprised by this, now I have another user also surprised.

Closes T16081

Test Plan:
1. As an admin, set up TOTP as an auth provider at http://phorge.localhost/auth/mfa/
2. As a user, add a first TOTP auth factor at http://phorge.localhost/settings/panel/multifactor/
3. As a user, try to add a second TOTP auth factor and see an additional sentence in the dialog

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: mainframe98, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Maniphest Tasks: T16081

Differential Revision: https://we.phorge.it/D26028
2025-06-01 10:10:37 +02:00
Andre Klapper 0c34164c8b Fix PHP 8.1 "strlen(null)" exception in Client ID handling of PhabricatorOAuthServerTokenController
Summary:
`strlen()` was used in Phabricator to check if a generic value is a non-empty string.
This behavior is deprecated since PHP 8.1. Phorge adopts `phutil_nonempty_string()` as a replacement.

Note: this may highlight other absurd input values that might be worth correcting
instead of just ignoring. If phutil_nonempty_string() throws an exception in your
instance, report it to Phorge to evaluate and fix that specific corner case.

```
strlen(): Passing null to parameter #1 ($string) of type string is deprecated
#0 PhabricatorOAuthServerTokenController::handleRequest(AphrontRequest) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:284]
```

See Q182

Test Plan: Read the code. `strlen` is used to get the length of an existing string and not to check for emptiness of a string. There is no string length comparison in the existing code.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D26034
2025-05-30 23:12:32 +02:00
Andre Klapper 87da4d2a33 Fix project typeahead query with columns when string is not name prefix
Summary:
Avoid an AphrontParameterQueryException when running a typeahead project name query with `mustHaveColumns` when the search string is not the `prefix` of the project name.
Since rP9a1d59ad5bd51ef4bf56533db260cc9e11a54fe6, Phorge runs queries in two phases: First `prefix`, then `content`, to sort project results accordingly.

`PhabricatorTypeaheadDatasource::loadResultsForPhase()` first goes for the `prefix` phase. This query may return zero results.
Current code does not correctly handle this situation.
Thus make the code smoothly skip to the `content` query phase and not run a `PhabricatorProjectColumnQuery` with an empty project PHID array parameter to end up in an exception.

Closes T16068

Test Plan:
* Have a parent project named `Foo` with a milestone named `Sprint Chocolate Cake`
* Create a project workboard for that milestone named `Sprint Chocolate Cake`
* In a project with no workboard yet, select "Import Columns" to end up on http://phorge.localhost/project/board/1/import/
* See that typing the second string token (`Chocolate`) shows no autocomplete project proposals
* Click the Magnifier button to `Browse Projects`
* Start typing `Chocolate` and get an AphrontParameterQueryException
* Apply the patch
* See that typing the second string token (`Chocolate`) now shows autocomplete project proposals
* Click the Magnifier button to `Browse Projects`
* Start typing `Chocolate` and get project search results

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Maniphest Tasks: T16068

Differential Revision: https://we.phorge.it/D26030
2025-05-28 15:22:55 +02:00
Andre Klapper 93d9e1b05d Search-related PhpDoc additions
Summary: I'm trying to understand search a bit better. As a side effect I add PhpDocs.

Test Plan: Inspect parameter and return formats, types, content while searching in Phorge.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D26033
2025-05-28 12:41:27 +02:00
Andre Klapper 0347f1f619 Remove orphan CSS selectors in base/main-menu-view.css
Summary:
* `phabricator-application-menu-expanded`
** Added in https://we.phorge.it/rPfed0a2a496536d5a2a22f712861383299fabd3bd, usage removed in https://we.phorge.it/rP6f5dab634db26a14ba2ee000a3cee75c9d6152fb from `src/view/page/menu/PhabricatorMainMenuView.php`
* `phabricator-core-menu-icon`
** Added in https://we.phorge.it/rPe3f6bbfff888008fcdf88f620b6716ab5add209b, usage removed in https://we.phorge.it/rP20035fe9a8ed53f4616528b114df61465f1d1f46 and https://we.phorge.it/rP6f5dab634db26a14ba2ee000a3cee75c9d6152fb
* `phabricator-expand-search-menu`
** Added in https://we.phorge.it/rP919bd4a03499305093d8882952a9dd3dac1c55a9, usage removed in https://we.phorge.it/rP6f5dab634db26a14ba2ee000a3cee75c9d6152fb from `src/view/page/menu/PhabricatorMainMenuView.php`
* `phabricator-main-menu-expand-button`
** Added in https://we.phorge.it/rP3c7944d297b2416d568ca2a7ab1e5c212adb78ff, usage removed in https://we.phorge.it/rP6f5dab634db26a14ba2ee000a3cee75c9d6152fb
* `phabricator-main-menu-group-logo`
** Added in https://we.phorge.it/rP3c7944d297b2416d568ca2a7ab1e5c212adb78ff, usage removed in https://we.phorge.it/rP54fe74d6216707267a1c818404507d2ee5ad82ad

Test Plan: Grep the code for each CSS selector (`grep --exclude="*.css" -R 'some-search-string' .`), also do partial searches, get no results.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D25998
2025-05-28 09:47:19 +02:00
Andre Klapper f4f616410c Remove orphan CSS selectors in phui/phui-document*.css
Summary:
* `phui-document-box`
** Added in https://we.phorge.it/rPf5a7e8bdbd9a6d68514bb0b08a4a7d626ca7044b, usage removed in https://we.phorge.it/rPbf227f77a5dc928f1380e4bc81059f83cfb96548
* `phui-document-properties`
** Added in https://we.phorge.it/rPc45ba304168239f0600d780476dc705b54b6f492, usage removed in https://we.phorge.it/rPa6e24cb2be9cc15a0eeacd6b90811c4b148c76ab

Test Plan: Grep the code for each CSS selector (`grep --exclude="*.css" -R 'some-search-string' .`), also do partial searches, get no results.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D26014
2025-05-27 23:20:43 +02:00
Andre Klapper 555e569ff8 Remove macOS specific font smoothing CSS
Summary:
Remove non-standard macOS specific font smoothing CSS which should be unneeded in the age of Retina displays and be superseded anyway by system and browser settings.

Closes T16059

Test Plan: Run browsers under macOS. Which I do not have.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Maniphest Tasks: T16059

Differential Revision: https://we.phorge.it/D25989
2025-05-25 12:04:47 +02:00
Andre Klapper ed7abd7c41 Ignore bogus cards parameter string values in Hovercards calls
Summary:
Do not throw an exception when passing bogus parameter string values to hovercards. Instead, just convert to an empty array.
In consequence, see a proper hovercard correctly displaying `Unknown Object (????)` instead of an exception:
```
EXCEPTION: (TypeError) idx(): Argument #1 ($array) must be of type array, string given, called in /var/www/html/phorge/phorge/src/applications/search/controller/PhabricatorSearchHovercardController.php on line 37 at [<arcanist>/src/utils/utils.php:37]
```
See also similar rPa5384ca60470e56a5312d5a7147ddd3ffa2e75d8.

Closes T16075

Test Plan:
* Go to http://phorge.localhost/search/hovercard/?__path__=%2fsearch%2fhovercard%2f&cards={"layout":"foo"}
* Get an error message before applying the patch. Get an empty hovercard after applying the patch.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Maniphest Tasks: T16075

Differential Revision: https://we.phorge.it/D26023
2025-05-24 10:40:12 +02:00
Andre Klapper d784533cf7 Remove unused CSS file aphront/panel-view.css
Summary:
* `aphront-panel-flush`
** Added in https://we.phorge.it/rP3f11c8a602f0a7567f8a51bc3b1a2dddbd46eec2, usage removed in https://we.phorge.it/rPc05306d746d7e06e3f2a5eb712af89a616abfdc6 by deleting `src/applications/differential/view/DifferentialAddCommentView.php`
* `aphront-panel-preview`
** Added in https://we.phorge.it/rP3f11c8a602f0a7567f8a51bc3b1a2dddbd46eec2, usage removed in https://we.phorge.it/rP6bfb101aff20a1f1f0435178e2de044a945676ba and in https://we.phorge.it/rPc05306d746d7e06e3f2a5eb712af89a616abfdc6 by deleting `src/applications/differential/view/DifferentialAddCommentView.php`
* `aphront-panel-preview-loading-text`
** Added in https://we.phorge.it/rP3f11c8a602f0a7567f8a51bc3b1a2dddbd46eec2, usage removed in https://we.phorge.it/rP6bfb101aff20a1f1f0435178e2de044a945676ba and in https://we.phorge.it/rPc05306d746d7e06e3f2a5eb712af89a616abfdc6 by deleting `src/applications/differential/view/DifferentialAddCommentView.php`

Test Plan: Grep the code for each CSS selector (`grep --exclude="*.css" -R 'some-search-string' .`), also do partial searches, get no results.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D26007
2025-05-24 09:28:35 +02:00
Andre Klapper 5e64a0a819 Remove orphan CSS selectors in PHUIFormView
Summary:
* `aphront-form-drag-and-drop-upload`
** Usage removed in https://we.phorge.it/rPdd76143399d8b77a14baca44f99051aa6298e487
* `aphront-form-important`
** Usage removed in https://we.phorge.it/rPc585f97e90d2ff1e2713f613c2e56149ae37aaf6
* `aphront-form-control-togglebuttons`
** Usage removed in https://we.phorge.it/rPa1403183dfcfb6886cc75153044745d9cc70687b
* `aphront-form-control-image`
** Usage removed in https://we.phorge.it/rPa1403183dfcfb6886cc75153044745d9cc70687b
* `aphront-form-drag-and-drop-file-list`
** Usage removed in https://we.phorge.it/rPdd76143399d8b77a14baca44f99051aa6298e487
* `aphront-form-crop`
** Usage removed in https://we.phorge.it/rPa1403183dfcfb6886cc75153044745d9cc70687b

Extra children checks:

* `crop-box`
** Usage removed in https://we.phorge.it/rPa1403183dfcfb6886cc75153044745d9cc70687b
* `crop-image`
** Usage removed in https://we.phorge.it/rPa1403183dfcfb6886cc75153044745d9cc70687b and https://we.phorge.it/rP524906a4396a33974974977065bf0ae05ca7dc5c
* `default-image`
** Usage removed in https://we.phorge.it/rPa1403183dfcfb6886cc75153044745d9cc70687b

Test Plan: Grep the code for each CSS selector (`grep --exclude="*.css" -R 'some-search-string' .`), also do partial searches, get no results.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D25995
2025-05-23 02:08:49 +02:00
Andre Klapper b174cce279 Fix wrong argument count in numerous calls' signatures
Summary:
Fix incorrect method/function argument counts which are trivial:
* /src/applications/config/controller/PhabricatorConfigController.php:13  Method PhabricatorFile::getBestURI() invoked with 1 parameter, 0 required.
* /src/applications/conpherence/controller/ConpherenceListController.php:135  Method ConpherenceController::buildHeaderPaneContent() invoked with 2 parameters, 1 required.
* /src/applications/differential/lipsum/PhabricatorDifferentialRevisionTestDataGenerator.php:74  Method PhutilContextFreeGrammar::generate() invoked with 2 parameters, 0 required.
* /src/applications/differential/storage/DifferentialChangeset.php:589  Method LiskDAO::makeEphemeral() invoked with 1 parameter, 0 required.
* /src/applications/diffusion/management/DiffusionRepositorySubversionManagementPanel.php:59  Method DiffusionRepositoryManagementPanel::newCurtainView() invoked with 1 parameter, 0 required.
* /src/applications/diffusion/xaction/DiffusionCommitAuditTransaction.php:123  Method PhabricatorRepositoryCommit::hasAuditAuthority() invoked with 3 parameters, 2 required.
* /src/applications/harbormaster/storage/build/HarbormasterBuildArtifact.php:165  Method HarbormasterBuildArtifact::releaseArtifact() invoked with 1 parameter, 0 required.
* /src/applications/repository/engine/PhabricatorRepositoryPullEngine.php:457  Method PhabricatorRepository::getFetchRules() invoked with 1 parameter, 0 required.
* /src/applications/search/menuitem/PhabricatorConpherenceProfileMenuItem.php:67  Method PhabricatorConpherenceProfileMenuItem::getConpherence() invoked with 1 parameter, 0 required.
* /src/applications/search/menuitem/PhabricatorConpherenceProfileMenuItem.php:104  Method PhabricatorConpherenceProfileMenuItem::getConpherence() invoked with 1 parameter, 0 required.
* /src/applications/search/query/PhabricatorSearchDocumentQuery.php:52  Static method PhabricatorSearchService::newResultSet() invoked with 2 parameters, 1 required.
* /src/infrastructure/editor/PhabricatorEditorURIEngine.php:71  Method PhabricatorEditorURIEngine::getURITokensForRepository() invoked with 1 parameter, 0 required.
* /src/infrastructure/editor/PhabricatorEditorURIEngine.php:84  Method PhabricatorEditorURIEngine::getURITokensForRepository() invoked with 1 parameter, 0 required.

Test Plan:
Look up function/method definitions, compare with their calls. Run static code analysis.

Also, test the revision generator and it finally works as intended with 10-20 random description lines (not just 1):

    ./bin/lipsum generate revisions

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D25978
2025-05-22 18:28:05 +02:00
Andre Klapper 947b704411 Remove unused FatCow icon files
Summary:
Remove some of those small PNG files. Most of the flag icons are still used by the Flags application.

The `key_question.png` icon is covered by D26005.

Test Plan: Grep for the filenames.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D26006
2025-05-22 08:53:51 +02:00
Valerio Bozzolan af4ac8bd95 AphrontFormDateControlValue: fix PHP 8.1 strlen(null) from AphrontFormDateControlValue.php:72
Summary: Closes T16082

Test Plan:
Visit this page:

http://phorge.localhost/calendar/event/edit/form/default/?start=1747749600&end=1747753200

No warning anymore from your Dark Console.

The Start and End fields are still prefixed with '2025-05-20', so, no regressions.

Reviewers: O1 Blessed Committers, mainframe98, aklapper

Reviewed By: O1 Blessed Committers, mainframe98, aklapper

Subscribers: aklapper, tobiaswiese, Matthew, Cigaryno

Maniphest Tasks: T16082

Differential Revision: https://we.phorge.it/D26029
2025-05-21 11:59:31 +02:00
Andre Klapper f4d3c96846 Make User-Agent regex detect Firefox on Android
Summary:
Set the `device-phone` CSS class also for Firefox on Android to (hopefully) avoid or decrease large layout shifts.
See https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/User-Agent/Firefox

Closes T16071

Test Plan:
Check if the given regex matches User-Agent strings.

Also, emulate a desktop and a mobile visit with cURL, and check their HTML body CSS classes:

    lang=bash
    curl --silent --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:128.0) Gecko/20100101 Firefox/128.0" http://phorge.localhost | grep -Po '<body class=".*?"'
    curl --silent --user-agent "Mozilla/5.0 (Android 11; Mobile; rv:138.0) Gecko/138.0 Firefox/138.0"   http://phorge.localhost | grep -Po '<body class=".*?"'

Output before the change, observe that the second line is recognized as desktop by mistake:

    lang=html,counterexample
    <body class="device-desktop platform-linux phui-theme-blindigo phabricator-home"
    <body class="device-desktop phui-theme-blindigo phabricator-home"

Output after the change, observe that the second line is finally recognized as mobile:

    lang=html
    <body class="device-desktop platform-linux phui-theme-blindigo phabricator-home"
    <body class="device-phone device phui-theme-blindigo phabricator-home"

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Maniphest Tasks: T16071

Differential Revision: https://we.phorge.it/D26021
2025-05-20 08:33:40 +02:00
Andre Klapper 361b512bd5 Add PHPDoc to PhabricatorPHIDType::canLoadNamedObject()
Summary:
All implementations of `canLoadNamedObject($name)` in classes which extend `PhabricatorPHIDType` run a `preg_match()` on the `$name` parameter being passed.
Thus the parameter must always be a string.
(Spoiler: This isn't always the case currently.)

Test Plan: Read the code.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D26025
2025-05-19 20:44:29 +02:00
Andre Klapper 7e4c1e93b5 Remove orphan CSS selectors in diffusion/diffusion-*.css
Summary:
* `diffusion-clone-extras`
** Added in https://we.phorge.it/rPa0e820ad9a2e6ae66c8522338ec19dd0a5e430d8, usage removed in https://we.phorge.it/rP29d1115037b84454c4fd186c47f33f162cc337b9
* `diffusion-search-boxen`
** Added in https://we.phorge.it/rP8f94aa8a0647af1dfaad9fa2c1c919841d466749, usage removed in https://we.phorge.it/rP0a9ad6d5e7d1807710eaafc6144a25854cbfaa77
* `phabricator-remarkup-toc`
** Added in https://we.phorge.it/rPd3546f94c15f27bab707d44d6b8a40e2fdeef6a2 and usage also removed in the very same commit (unused `.phabricator-remarkup-toc` is also defined in `core/remarkup.css` for Phriction tackled in D26016)
* `diffusion-page-header-view`
** Added in https://we.phorge.it/rPb25b379ca089055b63da6a5ba984f6ab0e2af6b9 together with calls to `diffusion-panel-header-view` so this might be a typo, still I also fail to find a combination of `diffusion-panel-header-view a.phui-header-action-link` browsing Diffusion pages

Test Plan: Grep the code for each CSS selector (`grep --exclude="*.css" -R 'some-search-string' .`), also do partial searches, get no results.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D26017
2025-05-19 07:19:32 +02:00
Andre Klapper 39216af0db Remove orphan CSS selectors in phui/phui-action-panel.css
Summary:
* `phui-action-panel-status`
** Added in https://we.phorge.it/rP1d05861fb31597d39d8fadc434e79ffe75d8c468, usage removed in https://we.phorge.it/rPa62337dcd83128aebb0940171524eb375ebac293

Test Plan: Grep the code for each CSS selector (`grep --exclude="*.css" -R 'some-search-string' .`), also do partial searches, get no results.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D26009
2025-05-18 23:12:15 +02:00
Andre Klapper 4195c91af0 Remove orphan CSS selectors in phui/phui-header-view.css
Summary:
* `phabricator-form-view`
** Added in https://we.phorge.it/rP93938765c371c2d4cceff7f725d2243ecfa3cba2, usage removed in https://we.phorge.it/rPfe2a96e37ff03b003cb10928e6d9f077dd44aa05
* `phui-header-tags`
** Added in https://we.phorge.it/rPe8bb24fd60724492ac3b28fdee759e4b079342c9, usage removed in https://we.phorge.it/rP9baa965b8609dc6412c137e0e1502542a9fcea31 by using `phui-header-action-*`
* `policy-space-container`
** Added in https://we.phorge.it/rP4811e6e7c1226d3c51649f47c2e7b49beb68aa19, seems to have never been used

Test Plan: Grep the code for each CSS selector (`grep --exclude="*.css" -R 'some-search-string' .`), also do partial searches, get no results.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D26008
2025-05-18 23:11:30 +02:00
Andre Klapper 2ce2574785 Remove orphan CSS selectors for differential-haunt-mode
Summary:
Added in rP29d8fc04e50b83fc7cf09f428ef905aa5e54e838.
Usage removed in rPb5722a99635adb513036b9741fccdfc61b5e4472.

Test Plan: Grep the code for "haunt". Get no results.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D25997
2025-05-17 11:20:06 +02:00
Andre Klapper b7ff9ba6f8 Unhandled Exception: Add last call to error message
Summary:
Phorge does not expose the location of the last call in unhandled exceptions on the web page. One has to open the error log or console to find the location.
The error message in the yellow box comes directly from PHP's `$throwable->getMessage()`, and the stacktrace comes directly from PHP's `$throwable->getTrace()`.
Thus manually concatenate the error message string with `$throwable->getFile()` and `$throwable->getLine()` to display the location of the last call but strip the absolute path not to expose server details.

Closes T15689

Test Plan:
Introduce a random PHP error and load the Phorge page.
For example, add `$chart_view += $chart_panel;` in src/applications/project/controller/PhabricatorProjectReportsController.php and go to http://phorge.localhost/project/reports/1/

Reviewers: O1 Blessed Committers, mainframe98, valerio.bozzolan

Reviewed By: O1 Blessed Committers, mainframe98, valerio.bozzolan

Subscribers: mainframe98, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Maniphest Tasks: T15689

Differential Revision: https://we.phorge.it/D25955
2025-05-17 03:29:30 +02:00
Andre Klapper 78f9c26dab Remove orphan CSS selectors in phui/phui-crumbs-view.css
Summary:
* `phui-crumb-icon`
** Added in https://we.phorge.it/rP45ae9cf340c7c888669d70b344fe6a894d429746, usage removed in https://we.phorge.it/rP64f145ef46a28ebd092b49ad4e9c937c7210321f

Test Plan: Grep the code for each CSS selector (`grep --exclude="*.css" -R 'some-search-string' .`), also do partial searches, get no results.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D26013
2025-05-17 03:14:53 +02:00
Andre Klapper 9ce9833916 Remove unused CSS file differential/revision-list.css
Summary:
`revision-age-fresh`, `revision-age-old`, `revision-age-stale` were added in rPb50cdc6e439c4f2915a47cb40cd94425832c22a2.
Their usage was removed in rPd9f01d6fb7f50e707805bc059aa15dcafca05160 from `src/applications/differential/view/DifferentialRevisionListView.php`.

Test Plan: Grep the code for `revision-age`. No results.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D25996
2025-05-17 03:12:48 +02:00
Andre Klapper b51f365700 Remove orphan CSS selectors in phui/phui-form-view.css
Summary:
* `drag-and-drop-file-target`
** Added in https://we.phorge.it/rP8573a1e14231867a145f09535e3e297c4dcda3e2; usage removed in https://we.phorge.it/rPdd76143399d8b77a14baca44f99051aa6298e487 by deleting `webroot/rsrc/js/core/behavior-drag-and-drop.js`
* `drag-and-drop-instructions`
** Added in https://we.phorge.it/rP109a202b6c77d61141d8ff4c98ce2548064334ef; usage removed in https://we.phorge.it/rPdd76143399d8b77a14baca44f99051aa6298e487 by deleting `webroot/rsrc/js/core/behavior-drag-and-drop.js`
* `recaptcha_only_if_privacy`
** Added in https://we.phorge.it/rP1329b7b51ef88825b36cf47b3c680542c2895579, looks like it has never been used

Test Plan: Grep the code for each CSS selector (`grep --exclude="*.css" -R 'some-search-string' .`), also do partial searches, get no results.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D26011
2025-05-15 05:33:01 +02:00
Andre Klapper 854dc7f3f5 Remove orphan CSS selectors in core/z-index.css
Summary:
* `project-board-header`
** Added in 183dd2a627, usage removed in https://we.phorge.it/rP6349741760a84de46f6a53d57fadef3b044b15ee also from `webroot/rsrc/css/phui/phui-workboard-view.css` but not from `core/z-index.css`
* `pholio-new-inline-comment`
** Added in https://we.phorge.it/rPe5af167ec99cdb29fcb3bb44e44c5afd3d0c6d7e, `.pholio-new-inline-comment` was removed from `webroot/rsrc/css/application/pholio/pholio-inline-comments.css` in https://we.phorge.it/rP85870e79aaf2f5dd0065f7b84d2e491062929027 but not from `core/z-index.css`; usage was removed in https://we.phorge.it/rP942f504893578c361c02727a4b615c70dc761af9 by deleting `src/applications/pholio/view/PholioInlineCommentSaveView.php`

For further cleanups in `core/z-index.css`, see D25997.

Test Plan: Grep the code for each CSS selector (`grep --exclude="*.css" -R 'some-search-string' .`), also do partial searches, get no results.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D26010
2025-05-15 00:34:23 +02:00
Andre Klapper 44b33e6345 Remove orphan CSS selectors in phui/phui-remarkup-preview.css
Summary:
* `phui-panel-preview`
** Added in https://we.phorge.it/rPfe2a96e37ff03b003cb10928e6d9f077dd44aa05, usage removed in https://we.phorge.it/rPe053cdd9031225547d1ea6c92ba8d466bae14d0a

Test Plan: Grep the code for each CSS selector (`grep --exclude="*.css" -R 'some-search-string' .`), also do partial searches, get no results.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D26012
2025-05-15 00:20:27 +02:00
Andre Klapper 06cf731779 Remove orphan CSS selectors in phui/phui-lightbox.css
Summary:
* `lightbox-download-form`
** Usage removed in https://we.phorge.it/rPa2fdf14275f932fcf70baf345ec2d944ffbd5a45

Test Plan: Grep the code for each CSS selector (`grep --exclude="*.css" -R 'some-search-string' .`), also do partial searches, get no results.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D26015
2025-05-15 00:12:16 +02:00
Valerio Bozzolan 511379044d transaction.search: add auto-generated documentation for objectType and handle unmanaged exception
Summary:
Finally we have some auto-generated documentation for the page /conduit/method/transaction.search/ about the supported values of objectType.
This is useful since we have 70+ of them, and they are totally obscure to newcomers (and us, core team, lol).

{F3942084}

The already-existing exception messages now do not suggest anymore values that exist but are not supported (e.g. XACT).

Moreover, we handle an unmanaged exception in transaction.search, when the existing `objectType` is not supported (e.g. XACT).

Closes T16054
Closes T16057

Test Plan:
Visit the page /conduit/method/transaction.search/ and enjoy the new amazing auto-generated table.

From the same page, visit the test form and set objectType = "XACT" and Call Method. You do not see anymore this confusing exception:

    get_class() expects parameter 1 to be object, null given

Instead, you finally see this informative exception message (similar to the already-existing ones):

    In call to "transaction.search", specified "objectType" ("XACT") is not supported because it does not implement "newObject()". Valid object types are: ABND, ADEV, AINT, ANAM, ANET, ASRV, DIFF, DREV, BOOK, DRYB, FBAK, FITV, HMBD, HMCP, HMCS, HMBB, HRUL, HWBH, HWBR, TASK, NUAI, NUAQ, NUAS, CDTL, FPRV, AUTH, CTNM, AMSG, APAS, AKEY, BDGE, CEVT, CEXP, CIMP, CONF, CONP, CDWN, DSHB, DSHP, PRTL, FORM, FILE, LEGD, MCRO, APPE, OASC, OPKG, PPAK, PPUB, PVER, PSTE, USER, BLOG, POST, PHRL, PANL, PCOL, PROJ, WTRG, CMIT, RIDT, REPO, RURI, POLL, SPCE, PSET, BULK, PVAR, MOCK, AEML, ACNT, CART, PMRC, PAYM, PHPR, PSUB, WIKI, ANSW, QUES.

Additionally, you can verify that the new documentation and the new methods in general are NOT called for normal valid API requests, so, not affecting production performance. An example of a valid request is: objectType = "TASK".

Reviewers: O1 Blessed Committers, avivey

Reviewed By: O1 Blessed Committers, avivey

Subscribers: avivey, aklapper, tobiaswiese, Matthew, Cigaryno

Maniphest Tasks: T16054, T16057

Differential Revision: https://we.phorge.it/D25988
2025-05-13 22:34:30 +02:00
Andre Klapper 94a9724637 Add two trivial PHPDocs lines to PhabricatorTypeaheadDatasource
Summary: Trivial but as I was looking into this code it cannot hurt I guess...

Test Plan: Manually check classes/types of parameters.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D26019
2025-05-13 09:18:34 +02:00
Andre Klapper 1f19cbf748 Set "preconnect" HTTP header when "security.alternate-file-domain" is set
Summary:
When a CDN or alternate file domain is configured, reduce perceived latency by resolving DNS and establishing a connection.

See https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/rel/preconnect and https://we.phorge.it/book/phorge/article/configuring_file_domain/

Closes T15859

Test Plan:
1. Set http://phorge.localhost/config/edit/security.alternate-file-domain/ via `./bin/config set "security.alternate-file-domain" "https://whatever.example.com/"`
2. Open the "Network" tab in your web browser's "Developer Tools" and go to http://phorge.localhost/
3. Check under "Headers" that "Response Headers" includes the new header `Link: <https://whatever.example.com/>; rel="preconnect"`.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: avivey, speck, l2dy, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Maniphest Tasks: T15859

Differential Revision: https://we.phorge.it/D25694
2025-05-11 09:27:00 +02:00
Andre Klapper 6619fef2ff Remove use of deprecated E_STRICT PHP constant
Summary:
The `E_STRICT` PHP constant is deprecated since PHP 8.4 per https://www.php.net/manual/en/migration84.deprecated.php.
Per https://wiki.php.net/rfc/deprecations_php_8_4#remove_e_strict_error_level_and_deprecate_e_strict_constant, the `E_STRICT` constant was still in use in-between PHP 7.0 and 7.4 for PHP's `mysqli` extension and PHP's `htmlentities()` function.

The `E_STRICT` notice was removed from PHP's `mysqli` extension in e895e96286 for PHP 7.4.0.
Since rP23a49eb403c9ea6c58f4ae2f22416e90a9d24c14, Phorge requires 7.2.25.
Phorge does not call PHP's `htmlentities()` function.

`E_STRICT` is a part of `E_ALL` since PHP 5.4.0 per https://github.com/php/php-src/blob/php-5.4.0/NEWS#L69, thus there is no gain in keeping it.

Closes T15989

Test Plan: None.

Reviewers: O1 Blessed Committers, avivey

Reviewed By: O1 Blessed Committers, avivey

Subscribers: avivey, keithzg, mainframe98, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Maniphest Tasks: T15989

Differential Revision: https://we.phorge.it/D25887
2025-05-09 11:23:36 +02:00
Andre Klapper 8d688f59d1 README: Update URI of FatCow icon set
Summary: Original URI is a 404. Thus link to functional URIs.

Test Plan: Open a web browser, fill in URIs, see where you end up on your journey.

Reviewers: O1 Blessed Committers, mainframe98, valerio.bozzolan

Reviewed By: O1 Blessed Committers, mainframe98, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D26004
2025-05-09 05:46:06 +02:00
Andre Klapper 07e40af06a Remove orphan CSS selectors in ponder/ponder-view.css
Summary:
* `ponder-answer-wiki-header`
** Added in https://we.phorge.it/rPe9f4ca6ca338142b2cf44e61d313d3c6810435d4, usage removed in https://we.phorge.it/rPfe7e288cf558051c5405679d8569ce26847482ef
* `ponder-question-container`
** Added in https://we.phorge.it/rPe9f4ca6ca338142b2cf44e61d313d3c6810435d4, seems to never have been used
* `ponder-view-properties`
** Added in https://we.phorge.it/rPe9f4ca6ca338142b2cf44e61d313d3c6810435d4, usage removed in https://we.phorge.it/rPfe7e288cf558051c5405679d8569ce26847482ef

Test Plan:
Grep the code for each CSS selector (`grep --exclude="*.css" -R 'some-search-string' .`), also do partial searches, get no results.

Visit a Ponder question, both in frontend and backend, and play with these selectors. Nothing happens.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D25999
2025-05-08 18:37:03 +02:00
Andre Klapper a5868f388f Remove orphan CSS selectors in config/config-options.css
Summary:
* `config-options-current-value`
** Added in https://we.phorge.it/rP25ca17da46348d974ffa9bc451a0a81ed6babbcf, usage removed in https://we.phorge.it/rP530145ba3be62b6c54b8f3bc8aca09f2f369697d by deleting `src/applications/config/controller/PhabricatorConfigGroupController.php`

Test Plan: Grep the code for each CSS selector (`grep --exclude="*.css" -R 'some-search-string' .`), also do partial searches, get no results.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D26002
2025-05-08 18:35:44 +02:00
Andre Klapper 67880e5c44 Remove orphan CSS selectors in slowvote/slowvote.css
Summary:
* slowvote-header-content
** Added in https://we.phorge.it/rP89ee928a51c72d9fda17a59f73b060a92cc0c665, usage removed in https://we.phorge.it/rPaa22a578d01b8b5c69c89b9dc4a370552534f6dd from `src/applications/slowvote/view/SlowvoteEmbedView.php`

Test Plan: Grep the code for each CSS selector (`grep --exclude="*.css" -R 'some-search-string' .`), also do partial searches, get no results.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D26003
2025-05-08 16:53:34 +02:00
Andre Klapper 6c4ccf1dc9 Remove orphan CSS selectors in maniphest/task-summary.css
Summary:
* `maniphest-task-updated`
** Added in rPdf0c3df3cc6dbaa151e1b32ff4e01052eb3dad3e, usage removed in rP018de5dec742b6a38d02710670c1dd30101f5b9f by deleting `src/applications/maniphest/view/ManiphestTaskSummaryView.php`

Test Plan: Grep the code for each CSS selector (`grep --exclude="*.css" -R 'some-search-string' .`), also do partial searches, get no results.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D26001
2025-05-08 16:46:38 +02:00
Andre Klapper 5f7250fea6 Remove unused feed/feed.css and maniphest/task-edit.css
Summary:
* `webroot/rsrc/css/application/feed/feed.css: .phabricator-public-feed-frame .phui-feed-story-foot`, `webroot/rsrc/css/application/feed/feed.css: .phabricator-public-feed-frame .phui-feed-story`, `webroot/rsrc/css/application/feed/feed.css: .phabricator-public-feed-frame .phui-feed-wrap`
** Added in https://we.phorge.it/rP6e86a04ab106f4d3c9e32f2b3890a0fa137e43a2, usage removed in https://we.phorge.it/rP6a996d76fd1a1a144177b1fb9e10c816f0e8e98e
* `webroot/rsrc/css/application/feed/feed.css: .phabricator-feed-newer-link`, `webroot/rsrc/css/application/feed/feed.css: .phabricator-feed-older-link`
** Added in https://we.phorge.it/rP29acc848c14a1680a54a3a744610f8c83e27bb12, usage removed in https://we.phorge.it/rP310cf00fc3cce6a023ad160a29def26845d82e26
* `webroot/rsrc/css/application/maniphest/task-edit.css: .maniphest-auxiliary-header`
** Added in https://we.phorge.it/rP3c1a0b76fac86c9f40222c5bb79fcddb996d1c9e, usage removed in https://we.phorge.it/rP5251e2f14d8e54157cc33094e7c29d8a6c2f9259

Note: This is always a bit dangerous because of some concatenation like `'class' => 'toggle'.$more` in the codebase.

Test Plan:
Grep the code for the parent CSS selector, also doing a partial search. Example:

    $ grep --exclude="*.css" -R 'feed-newer-link' .
    $ grep --exclude="*.css" -R 'feed-older-link' .
    $ grep --exclude="*.css" -R 'public-feed-frame ' .
    $ grep --exclude="*.css" -R 'auxiliary-header' .

No results.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D25985
2025-05-08 14:21:40 +02:00
Andre Klapper 66bad4e5ee Fix PHP 8.1 "strlen(null)" exceptions searching in Conpherence
Summary:
`strlen()` was used in Phabricator to check if a generic value is a non-empty string.
This behavior is deprecated since PHP 8.1. Phorge adopts `phutil_nonempty_string()` as a replacement.

Note: this may highlight other absurd input values that might be worth correcting
instead of just ignoring. If phutil_nonempty_string() throws an exception in your
instance, report it to Phorge to evaluate and fix that specific corner case.

```
ERROR 8192: strlen(): Passing null to parameter #1 ($string) of type string is deprecated at [/var/www/html/phorge/phorge/src/applications/conpherence/query/ConpherenceFulltextQuery.php:58]
```

```
ERROR 8192: strlen(): Passing null to parameter #1 ($string) of type string is deprecated at [/var/www/html/phorge/phorge/src/applications/conpherence/query/ConpherenceFulltextQuery.php:73]
```

Closes T16062

Test Plan: Go to a Conpherence room and search for an existing string.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Maniphest Tasks: T16062

Differential Revision: https://we.phorge.it/D25994
2025-05-07 18:24:37 +02:00
Andre Klapper a3cad3a362 Remove orphan CSS selectors in UIExample
Summary:
`jxui-active`, `jxui-blue-background`, `jxui-example-container` and `jxui-red-border` were added in rP998d43e828b010ca0051ffab74108111826027f1.
Their usage was removed in rP7725d7cc45c7792610746b4a773e4cb12743d873.

Test Plan: Grep the codebase for `jxui`.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D25993
2025-05-07 10:16:41 +02:00
Andre Klapper 9047e940e0 Remove unused code in ManiphestReportController::renderBurn()
Summary:
`ManiphestReportController` (which renders global `/maniphest/report/burn/`) wastes CPU cycles. Thus remove useless code.

It constructs table rows never to be shown: The code calculates rows and adds them via `$table = new AphrontTableView($rows)`, then defines `$panel = new PHUIObjectBoxView()` and does `$panel->setTable($table)` but a bit later `$panel = id(new PhabricatorProjectBurndownChartEngine())` overwrites that table and all its data.
This re-definition of `$panel` was introduced in rP5c1b91ab457db9f3db10d8cc5e07831512645ebb.

Its code creates a `PhabricatorProjectBurndownChartEngine` anyway, similar to `PhabricatorProjectReportsController`. So none of those expensive database queries are needed at all. Variables like `list($burn_x, $burn_y) = $this->buildSeries($data);` are never read since rPf8ebc71b8f217ed156f416ddb4cd028dcaa28174.

Bug: T16005

Test Plan:
1. Make sure `/applications/view/PhabricatorFactApplication/` is installed
2. Go to `/maniphest/report/burn/` for global view, go to some URL like `/maniphest/report/burn/?project=PHID-PROJ-1234567890abcdef` for per-project view
3. See that the "Burnup Rate" chart is rendered in the same way before and after applying this patch
4. Optionally, run `./bin/cache purge --all` (but seems not relevant here) and reload
5. Optionally, go to `/project/reports/1/` and as expected the burndown chart is the same as in step 2

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Maniphest Tasks: T16005

Differential Revision: https://we.phorge.it/D25902
2025-05-04 11:05:20 +03:00
Andre Klapper 261fdca137 CSS: Add "clip-path" to deprecated "clip" property
Summary:
Add "clip-path" as progressive enhancement for deprecated "clip" property to be more future-proof.
See the Phorge task for details.

Closes T16046

Test Plan: Probably browse Phorge pages which use FontAwesome icons, plus test with a screenreader software? (I didn't.)

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Maniphest Tasks: T16046

Differential Revision: https://we.phorge.it/D25983
2025-05-04 00:59:35 +03:00