commits
Signed-off-by: Andrei Jiroh Halili <ajhalili2006@andreijiroh.dev>
Summary:
As a sysadmin, I'm much more interested in tasks which have not successfully completed, so allow me to filter Bulk Jobs on status to exclude completed ones.
Closes T16514
Test Plan:
* Go to http://phorge.localhost/applications/view/PhabricatorManiphestApplication/ and allow yourself to "Can Bulk Edit Tasks"
* Create some Bulk Edit Jobs with different statuses (e.g. Completed; or created but not run yet which is called Confirmed)
* Go to http://phorge.localhost/daemon/bulk/query/advanced/, see a new "Status" dropdown
* Set some "Status" values, get filtered results
* Check that this also works on http://phorge.localhost/daemon/bulk/query/authored/ and http://phorge.localhost/daemon/bulk/query/all/
* Click "Save Query", add a name, see new query in the sidebar, click new sidebar entry, get filtered results as expected
Reviewers: O1 Blessed Committers, mainframe98, valerio.bozzolan
Reviewed By: O1 Blessed Committers, mainframe98, valerio.bozzolan
Subscribers: avivey, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T16514
Differential Revision: https://we.phorge.it/D26781
Summary:
The utf8mb4 character set was added to MySQL in version 5.5.3 in 03/2010 per https://web.archive.org/web/20191114070848/https://dev.mysql.com/doc/relnotes/mysql/5.5/en/news-5-5-3.html
It's unclear since when MariaDB exactly supports it, but https://mariadb.com/docs/release-notes/community-server/changelogs/changelogs-mariadb-55-series/mariadb-5560-changelog for MariaDB 5.5.60 from 04/2018 mentions it. For completeness: Some web sources state that MariaDB 10.2.5 was the first version in which utf8mb4 tables can have indexes with type VARCHAR(255).
In any case, Phorge requires MySQL 8.0 and MariaDB 10.5.1 since rP555fb3a8 / rP24666e18, see https://we.phorge.it/book/phorge/article/installation_guide/
Thus there is no sense in still supporting this storage option nowadays.
(For some overall historical context, see https://adamhooper.medium.com/in-mysql-never-use-utf8-use-utf8mb4-11761243e434 )
Refs T16400
Test Plan:
* Run `./bin/storage help`, see no more "--disable-utf8mb4" under "OPTION REFERENCE"
* Grep the source code
Reviewers: O1 Blessed Committers, valerio.bozzolan
Reviewed By: O1 Blessed Committers, valerio.bozzolan
Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T16400
Differential Revision: https://we.phorge.it/D26811
Summary:
Do not recreate the thumbnail profile picture via a file transform when creating a Phorge account via external authentication via GitLab but use the already existing thumbnail file. This saves database space and fixes this crash:
#1062: Duplicate entry 'PHID-FILE-ffps4pzs36kkikrpvgdh-profile' for key 'originalPHID'
Closes T16532
Ref T16527
Ref T16528
Co-authored-by: Andre Klapper
Test Plan:
Prepare GitHub OAuth:
* Log into Github, create a new OAuth App via https://github.com/settings/applications/new
* As an admin, set up GitHub Auth provider via http://phorge.localhost/auth/
* Copy Client ID into "OAuth App ID" and Client Secret into "OAuth App Secret"
* Log out as admin
Then:
* Go to http://phorge.localhost/auth/start/ and click GitHub button
* Enter Username and Password on GitHub website, click "Sign in"
* Enter data on resulting http://phorge.localhost/auth/register/ and click "Register Account"
* Without this patch, get an error `#1062: Duplicate entry 'PHID-FILE-foobar' for key 'originalPHID'`
Also, to be sure:
* Visit your {nav profile > Manage > Edit Settings > External Accounts} and Unlink your GitHub profile (with the "x" icon)
* From the same page {nav Link External Account} to link GitHub again and confirm: it still works
Reviewers: O1 Blessed Committers, avivey, aklapper
Reviewed By: O1 Blessed Committers, avivey, aklapper
Subscribers: avivey, ajhalili2006, #affects_filed_by_subscribed_by_recap_time_squad, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Tags: #auth, #affects_filed_by_subscribed_by_recap_time_squad
Maniphest Tasks: T16527, T16528, T16532
Differential Revision: https://we.phorge.it/D26803
Summary: Each test case `@provides` the same resource. This caused every test to overwrite the others, picking one hash at random based on the order of the files, which depends on implementation.
Test Plan: * Run ./bin/celerity map
Reviewers: aklapper, O1 Blessed Committers, avivey
Reviewed By: O1 Blessed Committers, avivey
Subscribers: avivey, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T16533
Differential Revision: https://we.phorge.it/D26810
Summary:
Add some more consistency between the terms "project", "tag", hashtag, "slug".
And also between "assign to" vs "add related" vs "associated with" vs "tagged with".
This might not be the perfect color for the bikeshed but feels a bit better.
Closes T15546
Closes T15701
Test Plan: Grep the code, go through about 500 results, check in which context the relevant ones are used (to not rename repository tags, for example).
Reviewers: O1 Blessed Committers, mainframe98, valerio.bozzolan
Reviewed By: O1 Blessed Committers, mainframe98, valerio.bozzolan
Subscribers: mainframe98, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T15546, T15701
Differential Revision: https://we.phorge.it/D26773
Summary:
"Thanks" to a recent change designed to keep track of transformed images
(ee4245098b9f4cb996501631d94de07840db2620) it's more evident that
Phorge was creating duplicate PhabricatorFile(s).
These duplicate files - now tracked - were causing this regression:
#1062: Duplicate entry 'PHID-FILE-ffps4pzs36kkikrpvgdh-profile' for key 'originalPHID'
This crash was reproduced in the "Edit Profile Picture" menu, when selecting
your GitHub profile picture.
After this patch, the original image has the "profile transform" generated only once
in your database. So, consequent "Edit Profile Picture" on the same GitHub
image does not pollute your database table 'phabricator_file.file' with duplicates,
and this error is fixed.
See also D26803 with a similar bug by @aklapper, during the early
phase of the GitHub image import.
Closes T16527
Ref T16528
Test Plan:
Prepare GitHub OAuth (curtesy of aklapper):
* Log into github.com create a new OAuth App via https://github.com/settings/applications/new
* As an admin, set up GitHub Auth provider via http://phorge.localhost/auth/
* Copy Client ID into "OAuth App ID" and Client Secret into "OAuth App Secret"
Then:
* visit profile Settings > External Accounts, and connect GitHub
* visit profile Manage > Edit Profile Picture, and select the GitHub image
The error `#1062: Duplicate entry 'PHID-FILE-foobar' for key 'originalPHID'` does not appear.
Check for regressions:
Upload a new image as profile picture: it still works.
Reviewers: O1 Blessed Committers, avivey
Reviewed By: O1 Blessed Committers, avivey
Subscribers: avivey, tobiaswiese, Matthew, aklapper, Cigaryno
Maniphest Tasks: T16528, T16527
Differential Revision: https://we.phorge.it/D26804
Summary:
From time to time we discover that things using editors (PhabricatorApplicationTransactionEditor)
have transactions not marked as "is create".
As workaround, we use to manually call this method on every specific transaction:
PhabricatorApplicationTransaction#setIsCreateTransaction(true);
After this change, manually setting "is create" on every transaction is no longer necessary,
since transactions should be marked as "is create" by simply checking the entity ID.
We can then remove similar unnecessary extra workarounds in Phorge core, and Phorge extensions.
Like this, it's not needed anymore:
aad704d0fce53225f91f36c8133dbeb2d6199a0d
Incidentally, the "is create" check is now faster during object creations, since there is no
need to always traverse the array of transactions anymore to know that.
Closes T16086
Closes T16222
Closes T16085
Closes T16223
Ref T16220
Test Plan:
From the UX, before and after the change:
- create a task: you still see "created this task" in the feed
- update the task again changing title and description: it still works, you see "renamed" and "updated the task description"
- create a repository and visit its history: you still see "created this object"
- edit the name of the same repository: you still see "renamed this repository"
- create a paste: you still see "created this paste"
- rename that paste: you still see "changed the title of this paste"
- create a project: you still see "created this project"
- rename that project: you still see "renamed this project"
- create a calendar event: you still see "created this event"
- rename that calendar event: you still see "renamed this event"
- create a wiki document: you still see "created this document"
- rename that wiki document: you still see "changed the title from"
Run this broken API call to test T16223, before and after the patch:
echo '{
"title":"Created from API maniphest.createtask",
"description":"description",
"priority":"50",
"viewPolicy":"obj.maniphest.author",
"editPolicy":"obj.maniphest.author"
}' | arc call-conduit --conduit-uri http://phorge.localhost maniphest.createtask --
After this patch, you finally see the feed about the custom policy = "Author", so it's more consistent with the frontend.
----
Create a simple task using the recent API:
echo '{"transactions":[
{"type": "title", "value": "Created from API maniphest.edit"},
{"type": "description", "value": "description"}
]}' | arc call-conduit --conduit-uri http://phorge.localhost maniphest.edit --
Still works, still successfully marked as "created" in the feed. No regressions.
Manually update it, no regressions.
----
Create a more complicated task with custom policies using the recent API:
echo '{"transactions":[
{"type": "title", "value": "Created from API maniphest.edit with policies"},
{"type": "description", "value": "description"},
{"type": "priority", "value": "normal"},
{"type": "view", "value": "obj.maniphest.author"},
{"type": "edit", "value": "obj.maniphest.author"}
]}' | arc call-conduit --conduit-uri http://phorge.localhost maniphest.edit --
Still works, still successfully marked as "created" in the feed. Still info about the initial policies. No regressions.
Manually update it, no regressions.
----
Run all unit tests:
arc unit --everything
All green (but another unrelated about remarkup - T15973)
Reviewers: O1 Blessed Committers, avivey
Reviewed By: O1 Blessed Committers, avivey
Subscribers: aklapper, avivey, tobiaswiese, Matthew, Cigaryno
Maniphest Tasks: T16220, T16222, T16086, T16085, T16223
Differential Revision: https://we.phorge.it/D26272
Summary:
`PhabricatorApplicationSearchEngine::buildConduitResponse()` already does some validation for passed `constraints`.
It should do the same for passed `attachments`.
Closes T16525
Test Plan:
* Look at http://phorge.localhost/conduit/method/maniphest.search/#attachments and understand which attachment keys are valid for this endpoint.
* In the `attachments` field, enter nonsense like `{"subscribers":["foo","bar"],"invalidkey":["foo"]}` or `{"foo":"bar"}`, and press "Call Method"
* Get an error message after applying this patch
* In the `attachments` field, enter half-nonsense (at least valid keys) like `{"subscribers":["foo","bar"],"projects":[""]}`, and press "Call Method"
* Get results and no error, as before (as this patch only introduces validation of keys but not of values)
Reviewers: O1 Blessed Committers, valerio.bozzolan
Reviewed By: O1 Blessed Committers, valerio.bozzolan
Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T16525
Differential Revision: https://we.phorge.it/D26796
Summary:
The user intention is to change the question status, so listing and defaulting to the current status makes no sense. Remove the current status from the list of available options.
Also, the sidebar entry names "Close Question" and "Reopen Question" are misleading as the resulting dialog allows changing the question status from Closed from Closed. Replace that with a generic "Change Question Status" menu entry.
Closes T16443
Test Plan: Go to a Ponder Question, look at the second option in the sidebar menu, select it, look at the available list options, change the question status.
Reviewers: O1 Blessed Committers, valerio.bozzolan
Reviewed By: O1 Blessed Committers, valerio.bozzolan
Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T16443
Differential Revision: https://we.phorge.it/D26645
Summary:
Setting null as an array key is deprecated since PHP 8.5 per https://www.php.net/releases/8.5/en.php: "Using null as an array offset or when calling array_key_exists() is now deprecated. Use an empty string instead."
```
ERROR 8192: Using null as an array offset is deprecated, use an empty string instead at [/var/www/html/phorge/phorge/src/applications/nuance/controller/NuanceSourceEditController.php:18]
```
Closes T16531
Test Plan:
* PHP 8.5
* `./bin/config set phabricator.show-prototypes true`
* Go to http://phorge.localhost/nuance/source/edit/form/default/
Reviewers: O1 Blessed Committers, valerio.bozzolan
Reviewed By: O1 Blessed Committers, valerio.bozzolan
Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T16531
Differential Revision: https://we.phorge.it/D26806
Summary:
Setting null as an array key is deprecated since PHP 8.5 per https://www.php.net/releases/8.5/en.php: "Using null as an array offset or when calling array_key_exists() is now deprecated. Use an empty string instead."
```
ERROR 8192: Using null as an array offset is deprecated, use an empty string instead at [/var/www/html/phorge/phorge/src/applications/herald/controller/HeraldRuleController.php:273]
```
Closes T16530
Test Plan: On PHP 8.5, go to http://phorge.localhost/herald/edit/?content_type=HeraldPreCommitRefAdapter&rule_type=object&targetPHID=PHID-PROJ-somevalidprojectphid
Reviewers: O1 Blessed Committers, valerio.bozzolan
Reviewed By: O1 Blessed Committers, valerio.bozzolan
Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T16530
Differential Revision: https://we.phorge.it/D26805
Summary:
Setting null as an array key is deprecated since PHP 8.5 per https://www.php.net/releases/8.5/en.php: "Using null as an array offset or when calling array_key_exists() is now deprecated. Use an empty string instead."
Looked into the phid array to spot a null value; followed up the callstack to find where it comes from and fix the root cause.
```
ERROR 8192: Using null as an array offset is deprecated, use an empty string instead at [/var/www/html/phorge/phorge/src/applications/phid/query/PhabricatorObjectQuery.php:132]
#0 PhabricatorObjectQuery::loadObjectsByPHID(array, array) called at [<phorge>/src/applications/phid/query/PhabricatorObjectQuery.php:73]
[...]
#10 PhabricatorApplicationSearchEngine::buildResponse() called at [<phorge>/src/applications/files/controller/PhabricatorFileListController.php:16]
```
Closes T16529
Test Plan:
* PHP 8.5
* Have some files that recently got automagically created (like user avatars, or maybe also transforms)
* Go to http://phorge.localhost/file/query/all/ and make sure "Upload Source" says "(Show All)"
Reviewers: O1 Blessed Committers, mainframe98
Reviewed By: O1 Blessed Committers, mainframe98
Subscribers: mainframe98, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T16529
Differential Revision: https://we.phorge.it/D26801
Summary:
Those two things are in the same one chart. Thus use consistent naming.
Closes T16176
Test Plan:
* Go to http://phorge.localhost/maniphest/report/burn/ and look at the sidebar and the title of the chart
* Enable the "Facts" application at http://phorge.localhost/applications/view/PhabricatorFactApplication/, go to http://phorge.localhost/project/reports/1/, and look at the title of the chart
Reviewers: O1 Blessed Committers, valerio.bozzolan
Reviewed By: O1 Blessed Committers, valerio.bozzolan
Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T16176
Differential Revision: https://we.phorge.it/D26202
Summary: Setting null as an array key is deprecated since PHP 8.5 per https://www.php.net/releases/8.5/en.php: "Using null as an array offset or when calling array_key_exists() is now deprecated. Use an empty string instead."
Test Plan:
Run static code analysis:
```
/src/applications/repository/daemon/PhabricatorRepositoryPullLocalDaemon.php:269 Possibly invalid array key type int|string|null.
```
Reviewers: O1 Blessed Committers, valerio.bozzolan, mainframe98
Reviewed By: O1 Blessed Committers, mainframe98
Subscribers: mainframe98, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Differential Revision: https://we.phorge.it/D26678
Summary:
Phorge stopped using MyISAM tables long ago.
See for example https://we.phorge.it/Q82 and https://we.phorge.it/T16083
Test Plan: Run `./bin/diviner generate`, read http://phorge.localhost/book/phorge/article/cluster_databases/
Reviewers: O1 Blessed Committers, valerio.bozzolan
Reviewed By: O1 Blessed Committers, valerio.bozzolan
Subscribers: avivey, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Differential Revision: https://we.phorge.it/D26473
Summary: GitHub nowadays allows disabling Pull Requests, and it looks like they are already disabled for projects under the phorgeit organization on GitHub.
Test Plan:
* Read https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/disabling-pull-requests
* Find the Backspace key to delete a sentence in the docs
Reviewers: O1 Blessed Committers, mainframe98
Reviewed By: O1 Blessed Committers, mainframe98
Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Differential Revision: https://we.phorge.it/D26802
Summary: List all method statuses; link to Changelog for convenience.
Test Plan: Run `./bin/diviner generate`; look at http://phorge.localhost/book/phorge/article/conduit_changes/
Reviewers: O1 Blessed Committers, avivey
Reviewed By: O1 Blessed Committers, avivey
Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Differential Revision: https://we.phorge.it/D26800
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/repository/storage/PhabricatorRepository.php:2785]
```
Closes T16524
Test Plan:
1. PHP 8.1 or higher
2. Go to http://phorge.localhost/conduit/method/diffusion.repository.search/
3. In the "Attachments" field, enter `{"metrics": true}`
4. Click "Call Method"
Reviewers: O1 Blessed Committers, mainframe98
Reviewed By: O1 Blessed Committers, mainframe98
Subscribers: mainframe98, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T16524
Differential Revision: https://we.phorge.it/D26795
Summary:
Setting null as an array key is deprecated since PHP 8.5 per https://www.php.net/releases/8.5/en.php: "Using null as an array offset or when calling array_key_exists() is now deprecated. Use an empty string instead."
```
ERROR 8192: Using null as an array offset is deprecated, use an empty string instead at [/var/www/html/phorge/phorge/src/applications/diviner/atomizer/DivinerJavelinAtomizer.php:70]
```
Closes T16526
Test Plan:
* PHP 8.5
* Build Peast
* `./bin/diviner generate --book webroot/rsrc/externals/javelin/docs/javelin.book`
Reviewers: O1 Blessed Committers, mainframe98
Reviewed By: O1 Blessed Committers, mainframe98
Subscribers: mainframe98, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T16526
Differential Revision: https://we.phorge.it/D26797
Summary:
When looking at the Credential Secret you often probably want to copy it.
Highlight the entire string in the text field when clicking into the text field.
Closes T16520
Test Plan:
1. Go to http://phorge.localhost/passphrase/edit/?type=token
2. Set a `Name`, set some `Token`, click "Save"
3. On resulting http://phorge.localhost/K1, click "Show Secret"
4. In the dialog, click "Show Secret"
5. Click into the "Plaintext" field
6. See that Credential Secret value gets selected
Reviewers: O1 Blessed Committers, mainframe98
Reviewed By: O1 Blessed Committers, mainframe98
Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T16520
Differential Revision: https://we.phorge.it/D26791
Summary:
Bring back documentation for Javelin by porting the DivinerJavelinAtomizer class to Phorge.
It has been rewritten to support modern Diviner, and to use Peast, rather than jsast.
This allows it to support modern JavaScript syntax without relying on strange binaries
distributed from ponds in some farcical aquatic ceremony.
Ref T15123
Test Plan:
* Run `./bin/diviner generate --book webroot/rsrc/externals/javelin/docs/javelin.book`
* Look at http://phorge.localhost/book/javelin/ and see class documentation under "Free Radicals"
Reviewers: O1 Blessed Committers, avivey
Reviewed By: O1 Blessed Committers, avivey
Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T15123
Differential Revision: https://we.phorge.it/D26787
Summary:
Similar to how D26785 does this for PhutilPHPParserLibrary.
Requires D26785 in rARC.
Test Plan:
* Remove your local installation of Peast and run support/peast/build-peast.php
* Run again to observe existing file is reused
Reviewers: avivey, O1 Blessed Committers
Reviewed By: avivey, O1 Blessed Committers
Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Differential Revision: https://we.phorge.it/D26786
Summary:
This makes it an entirely PHP-only linter implementation,
similar in setup to the PHPAST linter found in arcanist.
Ref T15123
Test Plan:
* Run `./support/peast/build-peast.php`
* Remove all linters but `javelin` from .arclint
* Run arc lint --everything --never-apply-patches
* Observe (lack of) lint violations
(Optional:)
* Compile javelinsymbols from source using instructions in T15123
* Put it in $PATH
* Observe the futility of your effort because javelinsymbols (or more precise, libfbjs) cannot parse the JS in Phorge
* And even if it could, the lint violations are beligerent and numerous
Reviewers: O1 Blessed Committers, avivey
Reviewed By: O1 Blessed Committers, avivey
Subscribers: avivey, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T15123
Differential Revision: https://we.phorge.it/D26774
Summary:
Allow clicking once to copy a created API token to be used in some external application anyway, instead of having to click into the text field and copy its value.
This is a one-liner change thanks to rP265e44e7.
Closes T16518
Test Plan:
1. `./bin/config set phabricator.show-prototypes true`
2. Install/enable http://phorge.localhost/applications/view/PhabricatorOAuthServerApplication/
3. Go to http://phorge.localhost/oauthserver/ and create an Auth Server
4. Go to http://phorge.localhost/oauthserver/client/view/1
5. Select "Generate Test Token"
6. Click "Authorize Application"
7. See a Copy button next to the "Token" text field; hover over it, click it, paste, etc
Reviewers: O1 Blessed Committers, valerio.bozzolan
Reviewed By: O1 Blessed Committers, valerio.bozzolan
Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T16518
Differential Revision: https://we.phorge.it/D26792
Summary:
We do not set the `audited` default saved query as default (first in the list) when Audit is disabled, so the NUX welcome screen is wrong.
Welcome to Diffusion Commits instead and talk about commits instead in that case.
Followup to rP821708414e.
Closes T16521
Test Plan:
* Disable Audit via http://phorge.localhost/applications/view/PhabricatorAuditApplication/
* Go to http://phorge.localhost/diffusion/commit/?nux=1
Reviewers: O1 Blessed Committers, valerio.bozzolan
Reviewed By: O1 Blessed Committers, valerio.bozzolan
Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T16521
Differential Revision: https://we.phorge.it/D26793
Summary:
When looking at the Access Token you often probably want to copy it. While buttons are one way (that's for a followup patch), clicking into the text field is another user pattern.
Highlight the entire string in the text field when doing so.
Also do not allow writing into that field.
Same game as rP8447af89.
Closes T16517
Test Plan:
1. `./bin/config set phabricator.show-prototypes true`
2. Install/enable http://phorge.localhost/applications/view/PhabricatorOAuthServerApplication/
3. Go to http://phorge.localhost/oauthserver/ and create an Auth Server
4. Go to http://phorge.localhost/oauthserver/client/view/1
5. Select "Generate Test Token"
6. Click "Authorize Application"
7. Click into the "Token" value field, see that the value gets selected
8. Click into the "Token" value field, try to type some letters and see that you cannot
Reviewers: O1 Blessed Committers, valerio.bozzolan
Reviewed By: O1 Blessed Committers, valerio.bozzolan
Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T16517
Differential Revision: https://we.phorge.it/D26789
Summary:
Allow clicking once to copy an OAuth Server Application Secret to be used in some external application anyway, instead of having to click into the text field and copy its value.
Also make clicking into the text field select its value.
Also convert this from an AphrontFormTextAreaControl to an AphrontFormTextControl as this is a single line, and use the standard dialog width, for the sake of consistency.
Closes T16519
Test Plan:
1. `./bin/config set phabricator.show-prototypes true`
2. Install/enable http://phorge.localhost/applications/view/PhabricatorOAuthServerApplication/
3. Go to http://phorge.localhost/oauthserver/ and create an Auth Server
4. Go to http://phorge.localhost/oauthserver/client/view/1
5. Select "Show Application Secret"
6. Click "Show Application Secret"
7. See a Copy button next to the "Token" text field; hover over it, click it, paste, etc
8. Click into the "Token" text field, see that the value gets selected
Reviewers: O1 Blessed Committers, valerio.bozzolan
Reviewed By: O1 Blessed Committers, valerio.bozzolan
Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T16519
Differential Revision: https://we.phorge.it/D26790
Summary: As far as I can tell, the Octicons were only used for a couple of weeks in June 2017, between rP83a89166 and rPcdeba0f85b.
Test Plan: `git log -i -G octicon`
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/D26784
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/legalpad/xaction/LegalpadDocumentTitleTransaction.php:22]
```
Same game as rPf7890322 in which I added the wrong exception to the commit message, sigh.
Closes T16505
Test Plan:
* Create a Legalpad at http://phorge.localhost/legalpad/edit/
* Go to http://phorge.localhost/feed/transactions/
Reviewers: O1 Blessed Committers, mainframe98
Reviewed By: O1 Blessed Committers, mainframe98
Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T16505
Differential Revision: https://we.phorge.it/D26788
Summary:
Setting null as an array key is deprecated since PHP 8.5 per https://www.php.net/releases/8.5/en.php: "Using null as an array offset or when calling array_key_exists() is now deprecated. Use an empty string instead."
```
ERROR 8192: Using null as an array offset is deprecated, use an empty string instead at [/var/www/html/phorge/phorge/src/applications/phid/handle/pool/PhabricatorHandlePool.php:29]
#0 PhabricatorHandlePool::newHandleList(array) called at [<phorge>/src/applications/people/storage/PhabricatorUser.php:973]
#1 PhabricatorUser::loadHandles(array) called at [<phorge>/src/applications/people/storage/PhabricatorUser.php:987]
#2 PhabricatorUser::renderHandle(NULL) called at [<phorge>/src/applications/transactions/storage/PhabricatorModularTransactionType.php:185]
#3 PhabricatorModularTransactionType::renderHandle(NULL) called at [<phorge>/src/applications/transactions/storage/PhabricatorModularTransactionType.php:195]
#4 PhabricatorModularTransactionType::renderOldHandle() called at [<phorge>/src/applications/almanac/xaction/AlmanacInterfaceNetworkTransaction.php:20]
```
Closes T16506
Test Plan:
1. PHP 8.5
2. Go to http://phorge.localhost/almanac/network/edit/ and create some Network
3. Go to http://phorge.localhost/almanac/device/edit/form/default/
4. Enter a name, click "Create Device"
5. On resulting http://phorge.localhost/almanac/device/view/device2/ , click "Add Interface"
6. Select that Network, enter random stuff under "Address", enter a random number under "Port", click "Create Interface"
7. Go to http://phorge.localhost/feed/transactions/
Reviewers: O1 Blessed Committers, mainframe98
Reviewed By: O1 Blessed Committers, mainframe98
Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T16506
Differential Revision: https://we.phorge.it/D26783
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/transactions/xaction/PhabricatorEditEngineNameTransaction.php:17]
```
Closes T16515
Test Plan: Unclear, likely rename some EditEngine (see e.g. http://phorge.localhost/transactions/editengine/) and go to http://phorge.localhost/feed/transactions/ and export data
Reviewers: O1 Blessed Committers, mainframe98
Reviewed By: O1 Blessed Committers, mainframe98
Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T16515
Differential Revision: https://we.phorge.it/D26782
Summary:
Make long referenced object titles (markup like `{D1}` or `{T1}` wrap in a Remarkup context (description section, comment preview, transaction comments) not to become unreadable.
Keep current `white-space: nowrap` for `.phui-tag-view` (introduced in rPce30f8c88bf6541ebbdfa1dd6920658a4cd0255f) for other contexts.
Closes T16077
Test Plan:
* Paste the monogram of an object with a long name in curly brackets in a task description and a task comment on a screen with low viewport width.
* Create a project tag with a long name and associate it to a task, look at that task in a list of Maniphest query search results on a screen with low viewport width.
Reviewers: O1 Blessed Committers, valerio.bozzolan
Reviewed By: O1 Blessed Committers, valerio.bozzolan
Subscribers: keithzg, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T16077
Differential Revision: https://we.phorge.it/D26024
Summary: Closes T16513
Test Plan: Run static code analysis; read the code.
Reviewers: O1 Blessed Committers, mainframe98
Reviewed By: O1 Blessed Committers, mainframe98
Subscribers: mainframe98, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T16513
Differential Revision: https://we.phorge.it/D26777
Summary: Closes T16512
Test Plan: Run static code analysis; look at other setValueFromStorage() implementations in other `PhabricatorCustomField` subclasses.
Reviewers: O1 Blessed Committers, mainframe98
Reviewed By: O1 Blessed Committers, mainframe98
Subscribers: mainframe98, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T16512
Differential Revision: https://we.phorge.it/D26776
Summary:
Setting null as an array key is deprecated since PHP 8.5 per https://www.php.net/releases/8.5/en.php: "Using null as an array offset or when calling array_key_exists() is now deprecated. Use an empty string instead."
```
ERROR 8192: Using null as an array offset is deprecated, use an empty string instead at [/var/www/html/phorge/phorge/src/applications/conpherence/storage/ConpherenceThread.php:276]
```
Closes T16510
Test Plan: A bit unclear. For me: PHP 8.5, have Conpherence application enabled, go to Feed Transactions at http://phorge.localhost/feed/transactions/
Reviewers: O1 Blessed Committers, mainframe98
Reviewed By: O1 Blessed Committers, mainframe98
Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T16510
Differential Revision: https://we.phorge.it/D26775
Summary:
This allows Diviner to support atomizing PHP source files that use
features of newer versions of PHP.
Ref T16289
Test Plan:
* (Optional) Edit source files to use new PHP features (enums, union types)
* Run `./bin/diviner generate --clean`
* Look at the generated documention on http://phorge.localhost/book/dev/ of the file modified
Reviewers: O1 Blessed Committers, aklapper
Reviewed By: O1 Blessed Committers, aklapper
Subscribers: aklapper, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T16289
Differential Revision: https://we.phorge.it/D26755
Summary:
Allow clicking once to copy a created API token to be used in some external application anyway, instead of having to click into the text field and select text and copy it.
Note that
* `.aphront-form-input` hardcodes `margin-left: 20%; margin-right: 20%; width: 60%;`; `AphrontFormTextControl` or `AphrontFormTextAreaControl` operate within these 60%, and fill that via `.aphront-form-input input[type="text"], .aphront-form-input input[type="password"] { width: 100%; }` - this patch reduces those 100% to 85% to create enough space for the Copy Button not to end up in a separate line.
* this CSS is also applied to `.aphront-form-input.has-copy-button textarea` which is currently unused but would be needed to add a Copy button also to `PhabricatorOAuthClientSecretController` and `PassphraseCredentialRevealController`.
* `margin-left: 4px;` is also used by the same button in DiffusionCloneURIView already.
* this also makes existing `errorMessage`s across the codebase more generic if copying ever failed. Less work for translators.
Closes T16197
Test Plan:
* Go to http://phorge.localhost/settings/user/testadmin/page/apitokens/
* Click "Generate Token"
* See a Copy button next to the "API Token" text field; hover over it, click it, paste, etc
* Go back to overview at http://phorge.localhost/settings/user/testadmin/page/apitokens/, click on a token
* Repeat step 3
Reviewers: O1 Blessed Committers, mainframe98
Reviewed By: O1 Blessed Committers, mainframe98
Subscribers: mainframe98, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T16197
Differential Revision: https://we.phorge.it/D26222
Summary:
Linking ancient resolved Maniphest tasks in the class description feels ugly.
People who really want to know more about the history can dig the git log instead.
Test Plan: Go to https://we.phorge.it/book/dev/class/PeopleProfilePictureBeforeDestructionEngineExtension/ and look at the class description.
Reviewers: O1 Blessed Committers, valerio.bozzolan
Reviewed By: O1 Blessed Committers, valerio.bozzolan
Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T16074
Differential Revision: https://we.phorge.it/D26770
Summary: Fix celerity map. Not sure how we managed, I thought we have a unit test for this nowadays?
Test Plan: Run `./bin/celerity map` on git master, see a difference
Reviewers: O1 Blessed Committers, avivey
Reviewed By: O1 Blessed Committers, avivey
Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Differential Revision: https://we.phorge.it/D26771
Summary:
In Diffusion repositories, project tags associated with the repository are only shown on the "Manage > Edit Basic Information" page. (?)
Also display them in the repositories main page, alongside the existing tags (Status, Visibility).
Note that a project tag does not line-wrap, so a long project name can move the "Pattern Search" field out of the viewport on smaller screen widths due to T16287 and `.phui-tag-view {white-space: nowrap;}`.
Closes T15526
Test Plan:
1. Create a Diffusion repository; create some project tags
2. Go to http://phorge.localhost/diffusion/36/manage/ and select "Edit Basic Information"
3. Under "Tags", add several project tags, and "Save Changes"
4. Go to http://phorge.localhost/diffusion/36/ and see the project tags displayed next to the "Active/Disabled" and "Public/All Users/Custom Policy" tags.
Reviewers: O1 Blessed Committers, mainframe98
Reviewed By: O1 Blessed Committers, mainframe98
Subscribers: avivey, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T15526
Differential Revision: https://we.phorge.it/D26735
Summary:
On small screens, the view policy tag in the page subheader (e.g. "Public", "All Users", "Custom Policy", "Administrators") can get wrapped across three lines.
Avoid that and keep the tag on one line.
Closes T16287
Test Plan:
Look at tags in subheaders on object pages in all three different CSS layouts that Phorge offers, ideally with "long" tags
* http://phorge.localhost/p/user/ (e.g. with a user who also has MFA enabled)
* http://phorge.localhost/diffusion/1/
* http://phorge.localhost/book/flavor/
* http://phorge.localhost/T1 (e.g. with Story Point tags also enabled)
* http://phorge.localhost/D1
* http://phorge.localhost/phame/blog/view/1/
* http://phorge.localhost/w/somepage/
* http://phorge.localhost/book/dev/class/PhorgeI18nTestCase/#method/key (Diviner; the "Inherited" tag uses this CSS)
* http://phorge.localhost/M1
* http://phorge.localhost/F1
* http://phorge.localhost/B1
* http://phorge.localhost/C1
* http://phorge.localhost/uiexample/view/PHUIBoxExample/ ("Fancy Box" example at the bottom)
Reviewers: O1 Blessed Committers, mainframe98
Reviewed By: O1 Blessed Committers, mainframe98
Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T16287
Differential Revision: https://we.phorge.it/D26736
Summary:
This adds CSS to prevent the document view from overlapping to the blogs and drafts boxes in the right column.
Ref T16473
Test Plan:
- Browse to phame home view using a screen width of at least 1792px
- See that now the links to the individual blogs are fully clickable
- See that all other views (Phriction and Phame posts) are unchanged
Reviewers: #blessed_committers, O1 Blessed Committers, aklapper
Reviewed By: #blessed_committers, O1 Blessed Committers, aklapper
Subscribers: aklapper, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T16473
Differential Revision: https://we.phorge.it/D26715
Summary:
Do not allow setting an invalid project color via the `project.edit` Conduit API but validate the value.
Same game as in D26430, D26459.
Closes T16237
Test Plan:
* Run `echo '{"transactions":[{"type":"name","value":"projectWithInvalidColor"},{"type":"color","value":"purpleyellowgreyish"},{"type":"description","value":"project project new new new"}]}' | /var/www/html/phorge/arcanist/bin/arc call-conduit --conduit-uri http://phorge.localhost --conduit-token "cli-xxx" project.edit --`
* Succeed before applying this patch
* Fail after applying this patch:
```
{
"error": "ERR-CONDUIT-CORE",
"errorMessage": "ERR-CONDUIT-CORE: <project.edit> Validation errors:\n - Value for \"project:color\" is invalid: \"purpleyellowgreyish\".",
"response": null
}
```
* Still succeed with a valid name like `{"type":"color","value":"checkered"}`
* Manually set a color in the project using the frontend. It works.
* Change every single other color, like Red, Orange, Yellow, ... Grey, Checkered, they all works
* Set color to Orange. Archive the project. Activate the project. It still works, you still see the original color Orange.
Reviewers: O1 Blessed Committers, valerio.bozzolan
Reviewed By: O1 Blessed Committers, valerio.bozzolan
Subscribers: avivey, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T16323, T16237
Differential Revision: https://we.phorge.it/D26460
Summary:
Do not allow setting an invalid project icon via the `project.edit` Conduit API but validate the value.
Same game as in D26430.
Closes T16322
Test Plan:
* Run `echo '{"transactions":[{"type":"name","value":"projectWithInvalidIcon"},{"type":"icon", "value":"noexxxist"}]}' | /var/www/html/phorge/arcanist/bin/arc call-conduit --conduit-uri http://phorge.localhost --conduit-token "cli-xxx" project.edit --`
* Succeed before applying this patch
* Fail after applying this patch:
```
{
"error": "ERR-CONDUIT-CORE",
"errorMessage": "ERR-CONDUIT-CORE: <project.edit> Validation errors:\n - Value for \"project:icon\" is invalid: \"noexxxist\".",
"response": null
}
```
Reviewers: O1 Blessed Committers, mainframe98
Reviewed By: O1 Blessed Committers, mainframe98
Subscribers: mainframe98, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T16322
Differential Revision: https://we.phorge.it/D26459
Summary:
Do not allow setting an invalid user icon via the `user.edit` Conduit API but validate the value.
This code path is executed because `PhabricatorApplicationTransactionEditor::validateTransaction()` for `case PhabricatorTransactions::TYPE_CUSTOMFIELD` calls `$field->validateApplicationTransactions` and because `PhabricatorUserIconField` is a child class of `PhabricatorCustomField`.
Closes T16307
Test Plan:
* Run `echo '{ "objectIdentifier":"@myusername", "transactions":[{"type":"icon","value":"nonexistingicon"}]}' | /var/www/html/phorge/arcanist/bin/arc call-conduit --conduit-uri http://phorge.localhost/ --conduit-token "cli-mytoken" user.edit --` before and after this, and get a new error after this patch:
```
{
"error": "ERR-CONDUIT-CORE",
"errorMessage": "ERR-CONDUIT-CORE: <user.edit> Validation errors:\n - Value for \"Icon\" is invalid: \"nonexistingicon\".",
"response": null
}
```
* Optionally, check database value of `SELECT u.userName, up.icon FROM phabricator_user.user_profile up JOIN phabricator_user.user u ON up.userPHID = u.phid WHERE u.userName = "myusername";` in the database before and after applying patch and compare what `PhabricatorPeopleIconSet` actually offers
* Run `echo '{ "objectIdentifier":"@myusername", "transactions":[{"type":"icon","value":"spy"}]}' | /var/www/html/phorge/arcanist/bin/arc call-conduit --conduit-uri http://phorge.localhost/ --conduit-token "cli-mytoken" user.edit --` and still successfully change your user icon
* Run `echo '{ "objectIdentifier":"@notmyusername", "transactions":[{"type":"icon","value":"spy"}]}' | /var/www/html/phorge/arcanist/bin/arc call-conduit --conduit-uri http://phorge.localhost/ --conduit-token "cli-mytoken" user.edit --` and still get the expected error that you are not that user
Reviewers: O1 Blessed Committers, valerio.bozzolan
Reviewed By: O1 Blessed Committers, valerio.bozzolan
Subscribers: mainframe98, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T16307
Differential Revision: https://we.phorge.it/D26430
Summary:
Setting null as an array key is deprecated since PHP 8.5 per https://www.php.net/releases/8.5/en.php: "Using null as an array offset or when calling array_key_exists() is now deprecated. Use an empty string instead."
According to https://web.archive.org/web/20171001040455/https://www.php.net/manual/en/language.types.array.php, `Null will be cast to the empty string, i.e. the key null will actually be stored under ""` at least since PHP 7.2, which we require.
Closes T16495
Test Plan: Run `../arcanist/bin/arc unit ./src/infrastructure/env/__tests__/PhabricatorEnvTestCase.php` in PHP 8.5
Reviewers: O1 Blessed Committers, valerio.bozzolan
Reviewed By: O1 Blessed Committers, valerio.bozzolan
Subscribers: mainframe98, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T16495
Differential Revision: https://we.phorge.it/D26748
Summary:
Throw a ConduitException when no objectPHID is passed instead of silently failing when trying to delete a token being `null`.
As a side effect, fix a PHP 8.5 deprecation warning.
Closes T16436
Test Plan: Go to http://phorge.localhost/conduit/method/token.give/ and press "Call Method". Try also after entering a random string in the "tokenPHID" field.
Reviewers: O1 Blessed Committers, mainframe98
Reviewed By: O1 Blessed Committers, mainframe98
Subscribers: mainframe98, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T16436
Differential Revision: https://we.phorge.it/D26647
Summary:
Bump our copy of external mimemailparser library from 8.0.4 to 9.0.1.
See https://github.com/php-mime-mail-parser/php-mime-mail-parser/releases for the upstream changelog.
Closes T16458
Test Plan: tbd
Reviewers: O1 Blessed Committers, mainframe98
Reviewed By: O1 Blessed Committers, mainframe98
Subscribers: mainframe98, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T16458
Differential Revision: https://we.phorge.it/D26685
Summary:
Setting null as an array key is deprecated since PHP 8.5 per https://www.php.net/releases/8.5/en.php: "Using null as an array offset or when calling array_key_exists() is now deprecated. Use an empty string instead."
```
ERROR 8192: Using null as an array offset is deprecated, use an empty string instead at [/var/www/html/phorge/phorge/src/applications/macro/markup/PhabricatorIconRemarkupRule.php:70]
```
Closes T16446
Test Plan: Unknown
Reviewers: O1 Blessed Committers, mainframe98
Reviewed By: O1 Blessed Committers, mainframe98
Subscribers: mainframe98, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T16446
Differential Revision: https://we.phorge.it/D26764
Summary:
Setting null as an array key is deprecated since PHP 8.5 per https://www.php.net/releases/8.5/en.php: "Using null as an array offset or when calling array_key_exists() is now deprecated. Use an empty string instead."
```
ERROR 8192: Using null as an array offset is deprecated, use an empty string instead at [/var/www/html/phorge/phorge/src/applications/project/engine/PhabricatorProjectEditEngine.php:128]
```
Closes T16504
Test Plan:
* PHP 8.5
* Go to an existing parent project
* Select "Subprojects" in the sidebar
* Click "Create Milestone" on the right
Reviewers: O1 Blessed Committers, mainframe98
Reviewed By: O1 Blessed Committers, mainframe98
Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T16504
Differential Revision: https://we.phorge.it/D26765
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/legalpad/xaction/LegalpadDocumentTitleTransaction.php:22]
```
Closes T16505
Test Plan:
* Create a Legalpad at http://phorge.localhost/legalpad/edit/
* Go to http://phorge.localhost/feed/transactions/
Reviewers: O1 Blessed Committers, mainframe98
Reviewed By: O1 Blessed Committers, mainframe98
Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T16505
Differential Revision: https://we.phorge.it/D26766
Summary:
Setting null as an array key is deprecated since PHP 8.5 per https://www.php.net/releases/8.5/en.php: "Using null as an array offset or when calling array_key_exists() is now deprecated. Use an empty string instead."
See the same game nine lines lower.
Closes T16497
Test Plan: Run `./bin/arc unit ./src/applications/differential/__tests__/DifferentialParseRenderTestCase.php` on PHP 8.5
Reviewers: O1 Blessed Committers, mainframe98
Reviewed By: O1 Blessed Committers, mainframe98
Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T16497
Differential Revision: https://we.phorge.it/D26763
Summary:
Link the new "Policies User Guide" added in rPc5e33a500c19 also from the "Understanding Policies" section in the Forms and Projects guides.
Followup to rPc5e33a500c19.
Test Plan: `./bin/diviner generate`
Reviewers: O1 Blessed Committers, mainframe98
Reviewed By: O1 Blessed Committers, mainframe98
Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Differential Revision: https://we.phorge.it/D26762
Summary:
Remove code around some conditions which are always true/false anyway.
Same game as rP1b9fafc7af72.
Test Plan: Read earlier code in each file; run static code analysis.
Reviewers: O1 Blessed Committers, mainframe98
Reviewed By: O1 Blessed Committers, mainframe98
Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Differential Revision: https://we.phorge.it/D26760
Summary: In prep for T15277, write some user docs about the existing Policies - how they work and how to use them.
Test Plan: look at it until blurry.
Reviewers: O1 Blessed Committers, valerio.bozzolan, aklapper
Reviewed By: O1 Blessed Committers, valerio.bozzolan, aklapper
Subscribers: aklapper, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Differential Revision: https://we.phorge.it/D26759
Summary:
Given the absolute CSS position of the global top bar search parent object, there is no reason to truncate search scope names that early.
Change `width: 200px` to `max-width: 260px`.
(I'd also generally like to advertise https://www.w3.org/International/articles/article-text-size.en)
Closes T16369
Test Plan: See steps in T16369; test on different screen widths
Reviewers: O1 Blessed Committers, mainframe98
Reviewed By: O1 Blessed Committers, mainframe98
Subscribers: mainframe98, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T16369
Differential Revision: https://we.phorge.it/D26539
Summary:
Fully modularizing DifferentialDiffTransaction, and then fix T16472 by attaching any binary files uploaded to the diff object.
Refs T16485 T16070.
Test Plan:
Set the default view-policy of new files to something that isn't very public.
Create new diffs using `arc diff` that includes a picture of a small cat. Other kinds of images are out of scope.
- Users that don't have permission to see the revision should not be able to see the file
- Users that have permission to see the revision, should be able to see the file.
- Changing the policies on the created file to "no one" will not be make a difference.
- The file's page will show the diff in the Attachment list.
Also:
- Herald can still block the creation of the diffs.
Reviewers: O1 Blessed Committers, valerio.bozzolan
Reviewed By: O1 Blessed Committers, valerio.bozzolan
Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno, jdelker
Maniphest Tasks: T16485, T16472, T16070
Differential Revision: https://we.phorge.it/D26724
Signed-off-by: Andrei Jiroh Halili <ajhalili2006@andreijiroh.dev>
Summary:
As a sysadmin, I'm much more interested in tasks which have not successfully completed, so allow me to filter Bulk Jobs on status to exclude completed ones.
Closes T16514
Test Plan:
* Go to http://phorge.localhost/applications/view/PhabricatorManiphestApplication/ and allow yourself to "Can Bulk Edit Tasks"
* Create some Bulk Edit Jobs with different statuses (e.g. Completed; or created but not run yet which is called Confirmed)
* Go to http://phorge.localhost/daemon/bulk/query/advanced/, see a new "Status" dropdown
* Set some "Status" values, get filtered results
* Check that this also works on http://phorge.localhost/daemon/bulk/query/authored/ and http://phorge.localhost/daemon/bulk/query/all/
* Click "Save Query", add a name, see new query in the sidebar, click new sidebar entry, get filtered results as expected
Reviewers: O1 Blessed Committers, mainframe98, valerio.bozzolan
Reviewed By: O1 Blessed Committers, mainframe98, valerio.bozzolan
Subscribers: avivey, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T16514
Differential Revision: https://we.phorge.it/D26781
Summary:
The utf8mb4 character set was added to MySQL in version 5.5.3 in 03/2010 per https://web.archive.org/web/20191114070848/https://dev.mysql.com/doc/relnotes/mysql/5.5/en/news-5-5-3.html
It's unclear since when MariaDB exactly supports it, but https://mariadb.com/docs/release-notes/community-server/changelogs/changelogs-mariadb-55-series/mariadb-5560-changelog for MariaDB 5.5.60 from 04/2018 mentions it. For completeness: Some web sources state that MariaDB 10.2.5 was the first version in which utf8mb4 tables can have indexes with type VARCHAR(255).
In any case, Phorge requires MySQL 8.0 and MariaDB 10.5.1 since rP555fb3a8 / rP24666e18, see https://we.phorge.it/book/phorge/article/installation_guide/
Thus there is no sense in still supporting this storage option nowadays.
(For some overall historical context, see https://adamhooper.medium.com/in-mysql-never-use-utf8-use-utf8mb4-11761243e434 )
Refs T16400
Test Plan:
* Run `./bin/storage help`, see no more "--disable-utf8mb4" under "OPTION REFERENCE"
* Grep the source code
Reviewers: O1 Blessed Committers, valerio.bozzolan
Reviewed By: O1 Blessed Committers, valerio.bozzolan
Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T16400
Differential Revision: https://we.phorge.it/D26811
Summary:
Do not recreate the thumbnail profile picture via a file transform when creating a Phorge account via external authentication via GitLab but use the already existing thumbnail file. This saves database space and fixes this crash:
#1062: Duplicate entry 'PHID-FILE-ffps4pzs36kkikrpvgdh-profile' for key 'originalPHID'
Closes T16532
Ref T16527
Ref T16528
Co-authored-by: Andre Klapper
Test Plan:
Prepare GitHub OAuth:
* Log into Github, create a new OAuth App via https://github.com/settings/applications/new
* As an admin, set up GitHub Auth provider via http://phorge.localhost/auth/
* Copy Client ID into "OAuth App ID" and Client Secret into "OAuth App Secret"
* Log out as admin
Then:
* Go to http://phorge.localhost/auth/start/ and click GitHub button
* Enter Username and Password on GitHub website, click "Sign in"
* Enter data on resulting http://phorge.localhost/auth/register/ and click "Register Account"
* Without this patch, get an error `#1062: Duplicate entry 'PHID-FILE-foobar' for key 'originalPHID'`
Also, to be sure:
* Visit your {nav profile > Manage > Edit Settings > External Accounts} and Unlink your GitHub profile (with the "x" icon)
* From the same page {nav Link External Account} to link GitHub again and confirm: it still works
Reviewers: O1 Blessed Committers, avivey, aklapper
Reviewed By: O1 Blessed Committers, avivey, aklapper
Subscribers: avivey, ajhalili2006, #affects_filed_by_subscribed_by_recap_time_squad, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Tags: #auth, #affects_filed_by_subscribed_by_recap_time_squad
Maniphest Tasks: T16527, T16528, T16532
Differential Revision: https://we.phorge.it/D26803
Summary: Each test case `@provides` the same resource. This caused every test to overwrite the others, picking one hash at random based on the order of the files, which depends on implementation.
Test Plan: * Run ./bin/celerity map
Reviewers: aklapper, O1 Blessed Committers, avivey
Reviewed By: O1 Blessed Committers, avivey
Subscribers: avivey, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T16533
Differential Revision: https://we.phorge.it/D26810
Summary:
Add some more consistency between the terms "project", "tag", hashtag, "slug".
And also between "assign to" vs "add related" vs "associated with" vs "tagged with".
This might not be the perfect color for the bikeshed but feels a bit better.
Closes T15546
Closes T15701
Test Plan: Grep the code, go through about 500 results, check in which context the relevant ones are used (to not rename repository tags, for example).
Reviewers: O1 Blessed Committers, mainframe98, valerio.bozzolan
Reviewed By: O1 Blessed Committers, mainframe98, valerio.bozzolan
Subscribers: mainframe98, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T15546, T15701
Differential Revision: https://we.phorge.it/D26773
Summary:
"Thanks" to a recent change designed to keep track of transformed images
(ee4245098b9f4cb996501631d94de07840db2620) it's more evident that
Phorge was creating duplicate PhabricatorFile(s).
These duplicate files - now tracked - were causing this regression:
#1062: Duplicate entry 'PHID-FILE-ffps4pzs36kkikrpvgdh-profile' for key 'originalPHID'
This crash was reproduced in the "Edit Profile Picture" menu, when selecting
your GitHub profile picture.
After this patch, the original image has the "profile transform" generated only once
in your database. So, consequent "Edit Profile Picture" on the same GitHub
image does not pollute your database table 'phabricator_file.file' with duplicates,
and this error is fixed.
See also D26803 with a similar bug by @aklapper, during the early
phase of the GitHub image import.
Closes T16527
Ref T16528
Test Plan:
Prepare GitHub OAuth (curtesy of aklapper):
* Log into github.com create a new OAuth App via https://github.com/settings/applications/new
* As an admin, set up GitHub Auth provider via http://phorge.localhost/auth/
* Copy Client ID into "OAuth App ID" and Client Secret into "OAuth App Secret"
Then:
* visit profile Settings > External Accounts, and connect GitHub
* visit profile Manage > Edit Profile Picture, and select the GitHub image
The error `#1062: Duplicate entry 'PHID-FILE-foobar' for key 'originalPHID'` does not appear.
Check for regressions:
Upload a new image as profile picture: it still works.
Reviewers: O1 Blessed Committers, avivey
Reviewed By: O1 Blessed Committers, avivey
Subscribers: avivey, tobiaswiese, Matthew, aklapper, Cigaryno
Maniphest Tasks: T16528, T16527
Differential Revision: https://we.phorge.it/D26804
Summary:
From time to time we discover that things using editors (PhabricatorApplicationTransactionEditor)
have transactions not marked as "is create".
As workaround, we use to manually call this method on every specific transaction:
PhabricatorApplicationTransaction#setIsCreateTransaction(true);
After this change, manually setting "is create" on every transaction is no longer necessary,
since transactions should be marked as "is create" by simply checking the entity ID.
We can then remove similar unnecessary extra workarounds in Phorge core, and Phorge extensions.
Like this, it's not needed anymore:
aad704d0fce53225f91f36c8133dbeb2d6199a0d
Incidentally, the "is create" check is now faster during object creations, since there is no
need to always traverse the array of transactions anymore to know that.
Closes T16086
Closes T16222
Closes T16085
Closes T16223
Ref T16220
Test Plan:
From the UX, before and after the change:
- create a task: you still see "created this task" in the feed
- update the task again changing title and description: it still works, you see "renamed" and "updated the task description"
- create a repository and visit its history: you still see "created this object"
- edit the name of the same repository: you still see "renamed this repository"
- create a paste: you still see "created this paste"
- rename that paste: you still see "changed the title of this paste"
- create a project: you still see "created this project"
- rename that project: you still see "renamed this project"
- create a calendar event: you still see "created this event"
- rename that calendar event: you still see "renamed this event"
- create a wiki document: you still see "created this document"
- rename that wiki document: you still see "changed the title from"
Run this broken API call to test T16223, before and after the patch:
echo '{
"title":"Created from API maniphest.createtask",
"description":"description",
"priority":"50",
"viewPolicy":"obj.maniphest.author",
"editPolicy":"obj.maniphest.author"
}' | arc call-conduit --conduit-uri http://phorge.localhost maniphest.createtask --
After this patch, you finally see the feed about the custom policy = "Author", so it's more consistent with the frontend.
----
Create a simple task using the recent API:
echo '{"transactions":[
{"type": "title", "value": "Created from API maniphest.edit"},
{"type": "description", "value": "description"}
]}' | arc call-conduit --conduit-uri http://phorge.localhost maniphest.edit --
Still works, still successfully marked as "created" in the feed. No regressions.
Manually update it, no regressions.
----
Create a more complicated task with custom policies using the recent API:
echo '{"transactions":[
{"type": "title", "value": "Created from API maniphest.edit with policies"},
{"type": "description", "value": "description"},
{"type": "priority", "value": "normal"},
{"type": "view", "value": "obj.maniphest.author"},
{"type": "edit", "value": "obj.maniphest.author"}
]}' | arc call-conduit --conduit-uri http://phorge.localhost maniphest.edit --
Still works, still successfully marked as "created" in the feed. Still info about the initial policies. No regressions.
Manually update it, no regressions.
----
Run all unit tests:
arc unit --everything
All green (but another unrelated about remarkup - T15973)
Reviewers: O1 Blessed Committers, avivey
Reviewed By: O1 Blessed Committers, avivey
Subscribers: aklapper, avivey, tobiaswiese, Matthew, Cigaryno
Maniphest Tasks: T16220, T16222, T16086, T16085, T16223
Differential Revision: https://we.phorge.it/D26272
Summary:
`PhabricatorApplicationSearchEngine::buildConduitResponse()` already does some validation for passed `constraints`.
It should do the same for passed `attachments`.
Closes T16525
Test Plan:
* Look at http://phorge.localhost/conduit/method/maniphest.search/#attachments and understand which attachment keys are valid for this endpoint.
* In the `attachments` field, enter nonsense like `{"subscribers":["foo","bar"],"invalidkey":["foo"]}` or `{"foo":"bar"}`, and press "Call Method"
* Get an error message after applying this patch
* In the `attachments` field, enter half-nonsense (at least valid keys) like `{"subscribers":["foo","bar"],"projects":[""]}`, and press "Call Method"
* Get results and no error, as before (as this patch only introduces validation of keys but not of values)
Reviewers: O1 Blessed Committers, valerio.bozzolan
Reviewed By: O1 Blessed Committers, valerio.bozzolan
Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T16525
Differential Revision: https://we.phorge.it/D26796
Summary:
The user intention is to change the question status, so listing and defaulting to the current status makes no sense. Remove the current status from the list of available options.
Also, the sidebar entry names "Close Question" and "Reopen Question" are misleading as the resulting dialog allows changing the question status from Closed from Closed. Replace that with a generic "Change Question Status" menu entry.
Closes T16443
Test Plan: Go to a Ponder Question, look at the second option in the sidebar menu, select it, look at the available list options, change the question status.
Reviewers: O1 Blessed Committers, valerio.bozzolan
Reviewed By: O1 Blessed Committers, valerio.bozzolan
Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T16443
Differential Revision: https://we.phorge.it/D26645
Summary:
Setting null as an array key is deprecated since PHP 8.5 per https://www.php.net/releases/8.5/en.php: "Using null as an array offset or when calling array_key_exists() is now deprecated. Use an empty string instead."
```
ERROR 8192: Using null as an array offset is deprecated, use an empty string instead at [/var/www/html/phorge/phorge/src/applications/nuance/controller/NuanceSourceEditController.php:18]
```
Closes T16531
Test Plan:
* PHP 8.5
* `./bin/config set phabricator.show-prototypes true`
* Go to http://phorge.localhost/nuance/source/edit/form/default/
Reviewers: O1 Blessed Committers, valerio.bozzolan
Reviewed By: O1 Blessed Committers, valerio.bozzolan
Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T16531
Differential Revision: https://we.phorge.it/D26806
Summary:
Setting null as an array key is deprecated since PHP 8.5 per https://www.php.net/releases/8.5/en.php: "Using null as an array offset or when calling array_key_exists() is now deprecated. Use an empty string instead."
```
ERROR 8192: Using null as an array offset is deprecated, use an empty string instead at [/var/www/html/phorge/phorge/src/applications/herald/controller/HeraldRuleController.php:273]
```
Closes T16530
Test Plan: On PHP 8.5, go to http://phorge.localhost/herald/edit/?content_type=HeraldPreCommitRefAdapter&rule_type=object&targetPHID=PHID-PROJ-somevalidprojectphid
Reviewers: O1 Blessed Committers, valerio.bozzolan
Reviewed By: O1 Blessed Committers, valerio.bozzolan
Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T16530
Differential Revision: https://we.phorge.it/D26805
Summary:
Setting null as an array key is deprecated since PHP 8.5 per https://www.php.net/releases/8.5/en.php: "Using null as an array offset or when calling array_key_exists() is now deprecated. Use an empty string instead."
Looked into the phid array to spot a null value; followed up the callstack to find where it comes from and fix the root cause.
```
ERROR 8192: Using null as an array offset is deprecated, use an empty string instead at [/var/www/html/phorge/phorge/src/applications/phid/query/PhabricatorObjectQuery.php:132]
#0 PhabricatorObjectQuery::loadObjectsByPHID(array, array) called at [<phorge>/src/applications/phid/query/PhabricatorObjectQuery.php:73]
[...]
#10 PhabricatorApplicationSearchEngine::buildResponse() called at [<phorge>/src/applications/files/controller/PhabricatorFileListController.php:16]
```
Closes T16529
Test Plan:
* PHP 8.5
* Have some files that recently got automagically created (like user avatars, or maybe also transforms)
* Go to http://phorge.localhost/file/query/all/ and make sure "Upload Source" says "(Show All)"
Reviewers: O1 Blessed Committers, mainframe98
Reviewed By: O1 Blessed Committers, mainframe98
Subscribers: mainframe98, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T16529
Differential Revision: https://we.phorge.it/D26801
Summary:
Those two things are in the same one chart. Thus use consistent naming.
Closes T16176
Test Plan:
* Go to http://phorge.localhost/maniphest/report/burn/ and look at the sidebar and the title of the chart
* Enable the "Facts" application at http://phorge.localhost/applications/view/PhabricatorFactApplication/, go to http://phorge.localhost/project/reports/1/, and look at the title of the chart
Reviewers: O1 Blessed Committers, valerio.bozzolan
Reviewed By: O1 Blessed Committers, valerio.bozzolan
Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T16176
Differential Revision: https://we.phorge.it/D26202
Summary: Setting null as an array key is deprecated since PHP 8.5 per https://www.php.net/releases/8.5/en.php: "Using null as an array offset or when calling array_key_exists() is now deprecated. Use an empty string instead."
Test Plan:
Run static code analysis:
```
/src/applications/repository/daemon/PhabricatorRepositoryPullLocalDaemon.php:269 Possibly invalid array key type int|string|null.
```
Reviewers: O1 Blessed Committers, valerio.bozzolan, mainframe98
Reviewed By: O1 Blessed Committers, mainframe98
Subscribers: mainframe98, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Differential Revision: https://we.phorge.it/D26678
Summary:
Phorge stopped using MyISAM tables long ago.
See for example https://we.phorge.it/Q82 and https://we.phorge.it/T16083
Test Plan: Run `./bin/diviner generate`, read http://phorge.localhost/book/phorge/article/cluster_databases/
Reviewers: O1 Blessed Committers, valerio.bozzolan
Reviewed By: O1 Blessed Committers, valerio.bozzolan
Subscribers: avivey, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Differential Revision: https://we.phorge.it/D26473
Summary: GitHub nowadays allows disabling Pull Requests, and it looks like they are already disabled for projects under the phorgeit organization on GitHub.
Test Plan:
* Read https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/disabling-pull-requests
* Find the Backspace key to delete a sentence in the docs
Reviewers: O1 Blessed Committers, mainframe98
Reviewed By: O1 Blessed Committers, mainframe98
Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Differential Revision: https://we.phorge.it/D26802
Summary: List all method statuses; link to Changelog for convenience.
Test Plan: Run `./bin/diviner generate`; look at http://phorge.localhost/book/phorge/article/conduit_changes/
Reviewers: O1 Blessed Committers, avivey
Reviewed By: O1 Blessed Committers, avivey
Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Differential Revision: https://we.phorge.it/D26800
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/repository/storage/PhabricatorRepository.php:2785]
```
Closes T16524
Test Plan:
1. PHP 8.1 or higher
2. Go to http://phorge.localhost/conduit/method/diffusion.repository.search/
3. In the "Attachments" field, enter `{"metrics": true}`
4. Click "Call Method"
Reviewers: O1 Blessed Committers, mainframe98
Reviewed By: O1 Blessed Committers, mainframe98
Subscribers: mainframe98, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T16524
Differential Revision: https://we.phorge.it/D26795
Summary:
Setting null as an array key is deprecated since PHP 8.5 per https://www.php.net/releases/8.5/en.php: "Using null as an array offset or when calling array_key_exists() is now deprecated. Use an empty string instead."
```
ERROR 8192: Using null as an array offset is deprecated, use an empty string instead at [/var/www/html/phorge/phorge/src/applications/diviner/atomizer/DivinerJavelinAtomizer.php:70]
```
Closes T16526
Test Plan:
* PHP 8.5
* Build Peast
* `./bin/diviner generate --book webroot/rsrc/externals/javelin/docs/javelin.book`
Reviewers: O1 Blessed Committers, mainframe98
Reviewed By: O1 Blessed Committers, mainframe98
Subscribers: mainframe98, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T16526
Differential Revision: https://we.phorge.it/D26797
Summary:
When looking at the Credential Secret you often probably want to copy it.
Highlight the entire string in the text field when clicking into the text field.
Closes T16520
Test Plan:
1. Go to http://phorge.localhost/passphrase/edit/?type=token
2. Set a `Name`, set some `Token`, click "Save"
3. On resulting http://phorge.localhost/K1, click "Show Secret"
4. In the dialog, click "Show Secret"
5. Click into the "Plaintext" field
6. See that Credential Secret value gets selected
Reviewers: O1 Blessed Committers, mainframe98
Reviewed By: O1 Blessed Committers, mainframe98
Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T16520
Differential Revision: https://we.phorge.it/D26791
Summary:
Bring back documentation for Javelin by porting the DivinerJavelinAtomizer class to Phorge.
It has been rewritten to support modern Diviner, and to use Peast, rather than jsast.
This allows it to support modern JavaScript syntax without relying on strange binaries
distributed from ponds in some farcical aquatic ceremony.
Ref T15123
Test Plan:
* Run `./bin/diviner generate --book webroot/rsrc/externals/javelin/docs/javelin.book`
* Look at http://phorge.localhost/book/javelin/ and see class documentation under "Free Radicals"
Reviewers: O1 Blessed Committers, avivey
Reviewed By: O1 Blessed Committers, avivey
Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T15123
Differential Revision: https://we.phorge.it/D26787
Summary:
Similar to how D26785 does this for PhutilPHPParserLibrary.
Requires D26785 in rARC.
Test Plan:
* Remove your local installation of Peast and run support/peast/build-peast.php
* Run again to observe existing file is reused
Reviewers: avivey, O1 Blessed Committers
Reviewed By: avivey, O1 Blessed Committers
Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Differential Revision: https://we.phorge.it/D26786
Summary:
This makes it an entirely PHP-only linter implementation,
similar in setup to the PHPAST linter found in arcanist.
Ref T15123
Test Plan:
* Run `./support/peast/build-peast.php`
* Remove all linters but `javelin` from .arclint
* Run arc lint --everything --never-apply-patches
* Observe (lack of) lint violations
(Optional:)
* Compile javelinsymbols from source using instructions in T15123
* Put it in $PATH
* Observe the futility of your effort because javelinsymbols (or more precise, libfbjs) cannot parse the JS in Phorge
* And even if it could, the lint violations are beligerent and numerous
Reviewers: O1 Blessed Committers, avivey
Reviewed By: O1 Blessed Committers, avivey
Subscribers: avivey, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T15123
Differential Revision: https://we.phorge.it/D26774
Summary:
Allow clicking once to copy a created API token to be used in some external application anyway, instead of having to click into the text field and copy its value.
This is a one-liner change thanks to rP265e44e7.
Closes T16518
Test Plan:
1. `./bin/config set phabricator.show-prototypes true`
2. Install/enable http://phorge.localhost/applications/view/PhabricatorOAuthServerApplication/
3. Go to http://phorge.localhost/oauthserver/ and create an Auth Server
4. Go to http://phorge.localhost/oauthserver/client/view/1
5. Select "Generate Test Token"
6. Click "Authorize Application"
7. See a Copy button next to the "Token" text field; hover over it, click it, paste, etc
Reviewers: O1 Blessed Committers, valerio.bozzolan
Reviewed By: O1 Blessed Committers, valerio.bozzolan
Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T16518
Differential Revision: https://we.phorge.it/D26792
Summary:
We do not set the `audited` default saved query as default (first in the list) when Audit is disabled, so the NUX welcome screen is wrong.
Welcome to Diffusion Commits instead and talk about commits instead in that case.
Followup to rP821708414e.
Closes T16521
Test Plan:
* Disable Audit via http://phorge.localhost/applications/view/PhabricatorAuditApplication/
* Go to http://phorge.localhost/diffusion/commit/?nux=1
Reviewers: O1 Blessed Committers, valerio.bozzolan
Reviewed By: O1 Blessed Committers, valerio.bozzolan
Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T16521
Differential Revision: https://we.phorge.it/D26793
Summary:
When looking at the Access Token you often probably want to copy it. While buttons are one way (that's for a followup patch), clicking into the text field is another user pattern.
Highlight the entire string in the text field when doing so.
Also do not allow writing into that field.
Same game as rP8447af89.
Closes T16517
Test Plan:
1. `./bin/config set phabricator.show-prototypes true`
2. Install/enable http://phorge.localhost/applications/view/PhabricatorOAuthServerApplication/
3. Go to http://phorge.localhost/oauthserver/ and create an Auth Server
4. Go to http://phorge.localhost/oauthserver/client/view/1
5. Select "Generate Test Token"
6. Click "Authorize Application"
7. Click into the "Token" value field, see that the value gets selected
8. Click into the "Token" value field, try to type some letters and see that you cannot
Reviewers: O1 Blessed Committers, valerio.bozzolan
Reviewed By: O1 Blessed Committers, valerio.bozzolan
Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T16517
Differential Revision: https://we.phorge.it/D26789
Summary:
Allow clicking once to copy an OAuth Server Application Secret to be used in some external application anyway, instead of having to click into the text field and copy its value.
Also make clicking into the text field select its value.
Also convert this from an AphrontFormTextAreaControl to an AphrontFormTextControl as this is a single line, and use the standard dialog width, for the sake of consistency.
Closes T16519
Test Plan:
1. `./bin/config set phabricator.show-prototypes true`
2. Install/enable http://phorge.localhost/applications/view/PhabricatorOAuthServerApplication/
3. Go to http://phorge.localhost/oauthserver/ and create an Auth Server
4. Go to http://phorge.localhost/oauthserver/client/view/1
5. Select "Show Application Secret"
6. Click "Show Application Secret"
7. See a Copy button next to the "Token" text field; hover over it, click it, paste, etc
8. Click into the "Token" text field, see that the value gets selected
Reviewers: O1 Blessed Committers, valerio.bozzolan
Reviewed By: O1 Blessed Committers, valerio.bozzolan
Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T16519
Differential Revision: https://we.phorge.it/D26790
Summary: As far as I can tell, the Octicons were only used for a couple of weeks in June 2017, between rP83a89166 and rPcdeba0f85b.
Test Plan: `git log -i -G octicon`
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/D26784
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/legalpad/xaction/LegalpadDocumentTitleTransaction.php:22]
```
Same game as rPf7890322 in which I added the wrong exception to the commit message, sigh.
Closes T16505
Test Plan:
* Create a Legalpad at http://phorge.localhost/legalpad/edit/
* Go to http://phorge.localhost/feed/transactions/
Reviewers: O1 Blessed Committers, mainframe98
Reviewed By: O1 Blessed Committers, mainframe98
Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T16505
Differential Revision: https://we.phorge.it/D26788
Summary:
Setting null as an array key is deprecated since PHP 8.5 per https://www.php.net/releases/8.5/en.php: "Using null as an array offset or when calling array_key_exists() is now deprecated. Use an empty string instead."
```
ERROR 8192: Using null as an array offset is deprecated, use an empty string instead at [/var/www/html/phorge/phorge/src/applications/phid/handle/pool/PhabricatorHandlePool.php:29]
#0 PhabricatorHandlePool::newHandleList(array) called at [<phorge>/src/applications/people/storage/PhabricatorUser.php:973]
#1 PhabricatorUser::loadHandles(array) called at [<phorge>/src/applications/people/storage/PhabricatorUser.php:987]
#2 PhabricatorUser::renderHandle(NULL) called at [<phorge>/src/applications/transactions/storage/PhabricatorModularTransactionType.php:185]
#3 PhabricatorModularTransactionType::renderHandle(NULL) called at [<phorge>/src/applications/transactions/storage/PhabricatorModularTransactionType.php:195]
#4 PhabricatorModularTransactionType::renderOldHandle() called at [<phorge>/src/applications/almanac/xaction/AlmanacInterfaceNetworkTransaction.php:20]
```
Closes T16506
Test Plan:
1. PHP 8.5
2. Go to http://phorge.localhost/almanac/network/edit/ and create some Network
3. Go to http://phorge.localhost/almanac/device/edit/form/default/
4. Enter a name, click "Create Device"
5. On resulting http://phorge.localhost/almanac/device/view/device2/ , click "Add Interface"
6. Select that Network, enter random stuff under "Address", enter a random number under "Port", click "Create Interface"
7. Go to http://phorge.localhost/feed/transactions/
Reviewers: O1 Blessed Committers, mainframe98
Reviewed By: O1 Blessed Committers, mainframe98
Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T16506
Differential Revision: https://we.phorge.it/D26783
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/transactions/xaction/PhabricatorEditEngineNameTransaction.php:17]
```
Closes T16515
Test Plan: Unclear, likely rename some EditEngine (see e.g. http://phorge.localhost/transactions/editengine/) and go to http://phorge.localhost/feed/transactions/ and export data
Reviewers: O1 Blessed Committers, mainframe98
Reviewed By: O1 Blessed Committers, mainframe98
Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T16515
Differential Revision: https://we.phorge.it/D26782
Summary:
Make long referenced object titles (markup like `{D1}` or `{T1}` wrap in a Remarkup context (description section, comment preview, transaction comments) not to become unreadable.
Keep current `white-space: nowrap` for `.phui-tag-view` (introduced in rPce30f8c88bf6541ebbdfa1dd6920658a4cd0255f) for other contexts.
Closes T16077
Test Plan:
* Paste the monogram of an object with a long name in curly brackets in a task description and a task comment on a screen with low viewport width.
* Create a project tag with a long name and associate it to a task, look at that task in a list of Maniphest query search results on a screen with low viewport width.
Reviewers: O1 Blessed Committers, valerio.bozzolan
Reviewed By: O1 Blessed Committers, valerio.bozzolan
Subscribers: keithzg, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T16077
Differential Revision: https://we.phorge.it/D26024
Summary: Closes T16513
Test Plan: Run static code analysis; read the code.
Reviewers: O1 Blessed Committers, mainframe98
Reviewed By: O1 Blessed Committers, mainframe98
Subscribers: mainframe98, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T16513
Differential Revision: https://we.phorge.it/D26777
Summary: Closes T16512
Test Plan: Run static code analysis; look at other setValueFromStorage() implementations in other `PhabricatorCustomField` subclasses.
Reviewers: O1 Blessed Committers, mainframe98
Reviewed By: O1 Blessed Committers, mainframe98
Subscribers: mainframe98, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T16512
Differential Revision: https://we.phorge.it/D26776
Summary:
Setting null as an array key is deprecated since PHP 8.5 per https://www.php.net/releases/8.5/en.php: "Using null as an array offset or when calling array_key_exists() is now deprecated. Use an empty string instead."
```
ERROR 8192: Using null as an array offset is deprecated, use an empty string instead at [/var/www/html/phorge/phorge/src/applications/conpherence/storage/ConpherenceThread.php:276]
```
Closes T16510
Test Plan: A bit unclear. For me: PHP 8.5, have Conpherence application enabled, go to Feed Transactions at http://phorge.localhost/feed/transactions/
Reviewers: O1 Blessed Committers, mainframe98
Reviewed By: O1 Blessed Committers, mainframe98
Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T16510
Differential Revision: https://we.phorge.it/D26775
Summary:
This allows Diviner to support atomizing PHP source files that use
features of newer versions of PHP.
Ref T16289
Test Plan:
* (Optional) Edit source files to use new PHP features (enums, union types)
* Run `./bin/diviner generate --clean`
* Look at the generated documention on http://phorge.localhost/book/dev/ of the file modified
Reviewers: O1 Blessed Committers, aklapper
Reviewed By: O1 Blessed Committers, aklapper
Subscribers: aklapper, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T16289
Differential Revision: https://we.phorge.it/D26755
Summary:
Allow clicking once to copy a created API token to be used in some external application anyway, instead of having to click into the text field and select text and copy it.
Note that
* `.aphront-form-input` hardcodes `margin-left: 20%; margin-right: 20%; width: 60%;`; `AphrontFormTextControl` or `AphrontFormTextAreaControl` operate within these 60%, and fill that via `.aphront-form-input input[type="text"], .aphront-form-input input[type="password"] { width: 100%; }` - this patch reduces those 100% to 85% to create enough space for the Copy Button not to end up in a separate line.
* this CSS is also applied to `.aphront-form-input.has-copy-button textarea` which is currently unused but would be needed to add a Copy button also to `PhabricatorOAuthClientSecretController` and `PassphraseCredentialRevealController`.
* `margin-left: 4px;` is also used by the same button in DiffusionCloneURIView already.
* this also makes existing `errorMessage`s across the codebase more generic if copying ever failed. Less work for translators.
Closes T16197
Test Plan:
* Go to http://phorge.localhost/settings/user/testadmin/page/apitokens/
* Click "Generate Token"
* See a Copy button next to the "API Token" text field; hover over it, click it, paste, etc
* Go back to overview at http://phorge.localhost/settings/user/testadmin/page/apitokens/, click on a token
* Repeat step 3
Reviewers: O1 Blessed Committers, mainframe98
Reviewed By: O1 Blessed Committers, mainframe98
Subscribers: mainframe98, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T16197
Differential Revision: https://we.phorge.it/D26222
Summary:
Linking ancient resolved Maniphest tasks in the class description feels ugly.
People who really want to know more about the history can dig the git log instead.
Test Plan: Go to https://we.phorge.it/book/dev/class/PeopleProfilePictureBeforeDestructionEngineExtension/ and look at the class description.
Reviewers: O1 Blessed Committers, valerio.bozzolan
Reviewed By: O1 Blessed Committers, valerio.bozzolan
Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T16074
Differential Revision: https://we.phorge.it/D26770
Summary: Fix celerity map. Not sure how we managed, I thought we have a unit test for this nowadays?
Test Plan: Run `./bin/celerity map` on git master, see a difference
Reviewers: O1 Blessed Committers, avivey
Reviewed By: O1 Blessed Committers, avivey
Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Differential Revision: https://we.phorge.it/D26771
Summary:
In Diffusion repositories, project tags associated with the repository are only shown on the "Manage > Edit Basic Information" page. (?)
Also display them in the repositories main page, alongside the existing tags (Status, Visibility).
Note that a project tag does not line-wrap, so a long project name can move the "Pattern Search" field out of the viewport on smaller screen widths due to T16287 and `.phui-tag-view {white-space: nowrap;}`.
Closes T15526
Test Plan:
1. Create a Diffusion repository; create some project tags
2. Go to http://phorge.localhost/diffusion/36/manage/ and select "Edit Basic Information"
3. Under "Tags", add several project tags, and "Save Changes"
4. Go to http://phorge.localhost/diffusion/36/ and see the project tags displayed next to the "Active/Disabled" and "Public/All Users/Custom Policy" tags.
Reviewers: O1 Blessed Committers, mainframe98
Reviewed By: O1 Blessed Committers, mainframe98
Subscribers: avivey, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T15526
Differential Revision: https://we.phorge.it/D26735
Summary:
On small screens, the view policy tag in the page subheader (e.g. "Public", "All Users", "Custom Policy", "Administrators") can get wrapped across three lines.
Avoid that and keep the tag on one line.
Closes T16287
Test Plan:
Look at tags in subheaders on object pages in all three different CSS layouts that Phorge offers, ideally with "long" tags
* http://phorge.localhost/p/user/ (e.g. with a user who also has MFA enabled)
* http://phorge.localhost/diffusion/1/
* http://phorge.localhost/book/flavor/
* http://phorge.localhost/T1 (e.g. with Story Point tags also enabled)
* http://phorge.localhost/D1
* http://phorge.localhost/phame/blog/view/1/
* http://phorge.localhost/w/somepage/
* http://phorge.localhost/book/dev/class/PhorgeI18nTestCase/#method/key (Diviner; the "Inherited" tag uses this CSS)
* http://phorge.localhost/M1
* http://phorge.localhost/F1
* http://phorge.localhost/B1
* http://phorge.localhost/C1
* http://phorge.localhost/uiexample/view/PHUIBoxExample/ ("Fancy Box" example at the bottom)
Reviewers: O1 Blessed Committers, mainframe98
Reviewed By: O1 Blessed Committers, mainframe98
Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T16287
Differential Revision: https://we.phorge.it/D26736
Summary:
This adds CSS to prevent the document view from overlapping to the blogs and drafts boxes in the right column.
Ref T16473
Test Plan:
- Browse to phame home view using a screen width of at least 1792px
- See that now the links to the individual blogs are fully clickable
- See that all other views (Phriction and Phame posts) are unchanged
Reviewers: #blessed_committers, O1 Blessed Committers, aklapper
Reviewed By: #blessed_committers, O1 Blessed Committers, aklapper
Subscribers: aklapper, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T16473
Differential Revision: https://we.phorge.it/D26715
Summary:
Do not allow setting an invalid project color via the `project.edit` Conduit API but validate the value.
Same game as in D26430, D26459.
Closes T16237
Test Plan:
* Run `echo '{"transactions":[{"type":"name","value":"projectWithInvalidColor"},{"type":"color","value":"purpleyellowgreyish"},{"type":"description","value":"project project new new new"}]}' | /var/www/html/phorge/arcanist/bin/arc call-conduit --conduit-uri http://phorge.localhost --conduit-token "cli-xxx" project.edit --`
* Succeed before applying this patch
* Fail after applying this patch:
```
{
"error": "ERR-CONDUIT-CORE",
"errorMessage": "ERR-CONDUIT-CORE: <project.edit> Validation errors:\n - Value for \"project:color\" is invalid: \"purpleyellowgreyish\".",
"response": null
}
```
* Still succeed with a valid name like `{"type":"color","value":"checkered"}`
* Manually set a color in the project using the frontend. It works.
* Change every single other color, like Red, Orange, Yellow, ... Grey, Checkered, they all works
* Set color to Orange. Archive the project. Activate the project. It still works, you still see the original color Orange.
Reviewers: O1 Blessed Committers, valerio.bozzolan
Reviewed By: O1 Blessed Committers, valerio.bozzolan
Subscribers: avivey, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T16323, T16237
Differential Revision: https://we.phorge.it/D26460
Summary:
Do not allow setting an invalid project icon via the `project.edit` Conduit API but validate the value.
Same game as in D26430.
Closes T16322
Test Plan:
* Run `echo '{"transactions":[{"type":"name","value":"projectWithInvalidIcon"},{"type":"icon", "value":"noexxxist"}]}' | /var/www/html/phorge/arcanist/bin/arc call-conduit --conduit-uri http://phorge.localhost --conduit-token "cli-xxx" project.edit --`
* Succeed before applying this patch
* Fail after applying this patch:
```
{
"error": "ERR-CONDUIT-CORE",
"errorMessage": "ERR-CONDUIT-CORE: <project.edit> Validation errors:\n - Value for \"project:icon\" is invalid: \"noexxxist\".",
"response": null
}
```
Reviewers: O1 Blessed Committers, mainframe98
Reviewed By: O1 Blessed Committers, mainframe98
Subscribers: mainframe98, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T16322
Differential Revision: https://we.phorge.it/D26459
Summary:
Do not allow setting an invalid user icon via the `user.edit` Conduit API but validate the value.
This code path is executed because `PhabricatorApplicationTransactionEditor::validateTransaction()` for `case PhabricatorTransactions::TYPE_CUSTOMFIELD` calls `$field->validateApplicationTransactions` and because `PhabricatorUserIconField` is a child class of `PhabricatorCustomField`.
Closes T16307
Test Plan:
* Run `echo '{ "objectIdentifier":"@myusername", "transactions":[{"type":"icon","value":"nonexistingicon"}]}' | /var/www/html/phorge/arcanist/bin/arc call-conduit --conduit-uri http://phorge.localhost/ --conduit-token "cli-mytoken" user.edit --` before and after this, and get a new error after this patch:
```
{
"error": "ERR-CONDUIT-CORE",
"errorMessage": "ERR-CONDUIT-CORE: <user.edit> Validation errors:\n - Value for \"Icon\" is invalid: \"nonexistingicon\".",
"response": null
}
```
* Optionally, check database value of `SELECT u.userName, up.icon FROM phabricator_user.user_profile up JOIN phabricator_user.user u ON up.userPHID = u.phid WHERE u.userName = "myusername";` in the database before and after applying patch and compare what `PhabricatorPeopleIconSet` actually offers
* Run `echo '{ "objectIdentifier":"@myusername", "transactions":[{"type":"icon","value":"spy"}]}' | /var/www/html/phorge/arcanist/bin/arc call-conduit --conduit-uri http://phorge.localhost/ --conduit-token "cli-mytoken" user.edit --` and still successfully change your user icon
* Run `echo '{ "objectIdentifier":"@notmyusername", "transactions":[{"type":"icon","value":"spy"}]}' | /var/www/html/phorge/arcanist/bin/arc call-conduit --conduit-uri http://phorge.localhost/ --conduit-token "cli-mytoken" user.edit --` and still get the expected error that you are not that user
Reviewers: O1 Blessed Committers, valerio.bozzolan
Reviewed By: O1 Blessed Committers, valerio.bozzolan
Subscribers: mainframe98, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T16307
Differential Revision: https://we.phorge.it/D26430
Summary:
Setting null as an array key is deprecated since PHP 8.5 per https://www.php.net/releases/8.5/en.php: "Using null as an array offset or when calling array_key_exists() is now deprecated. Use an empty string instead."
According to https://web.archive.org/web/20171001040455/https://www.php.net/manual/en/language.types.array.php, `Null will be cast to the empty string, i.e. the key null will actually be stored under ""` at least since PHP 7.2, which we require.
Closes T16495
Test Plan: Run `../arcanist/bin/arc unit ./src/infrastructure/env/__tests__/PhabricatorEnvTestCase.php` in PHP 8.5
Reviewers: O1 Blessed Committers, valerio.bozzolan
Reviewed By: O1 Blessed Committers, valerio.bozzolan
Subscribers: mainframe98, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T16495
Differential Revision: https://we.phorge.it/D26748
Summary:
Throw a ConduitException when no objectPHID is passed instead of silently failing when trying to delete a token being `null`.
As a side effect, fix a PHP 8.5 deprecation warning.
Closes T16436
Test Plan: Go to http://phorge.localhost/conduit/method/token.give/ and press "Call Method". Try also after entering a random string in the "tokenPHID" field.
Reviewers: O1 Blessed Committers, mainframe98
Reviewed By: O1 Blessed Committers, mainframe98
Subscribers: mainframe98, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T16436
Differential Revision: https://we.phorge.it/D26647
Summary:
Bump our copy of external mimemailparser library from 8.0.4 to 9.0.1.
See https://github.com/php-mime-mail-parser/php-mime-mail-parser/releases for the upstream changelog.
Closes T16458
Test Plan: tbd
Reviewers: O1 Blessed Committers, mainframe98
Reviewed By: O1 Blessed Committers, mainframe98
Subscribers: mainframe98, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T16458
Differential Revision: https://we.phorge.it/D26685
Summary:
Setting null as an array key is deprecated since PHP 8.5 per https://www.php.net/releases/8.5/en.php: "Using null as an array offset or when calling array_key_exists() is now deprecated. Use an empty string instead."
```
ERROR 8192: Using null as an array offset is deprecated, use an empty string instead at [/var/www/html/phorge/phorge/src/applications/macro/markup/PhabricatorIconRemarkupRule.php:70]
```
Closes T16446
Test Plan: Unknown
Reviewers: O1 Blessed Committers, mainframe98
Reviewed By: O1 Blessed Committers, mainframe98
Subscribers: mainframe98, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T16446
Differential Revision: https://we.phorge.it/D26764
Summary:
Setting null as an array key is deprecated since PHP 8.5 per https://www.php.net/releases/8.5/en.php: "Using null as an array offset or when calling array_key_exists() is now deprecated. Use an empty string instead."
```
ERROR 8192: Using null as an array offset is deprecated, use an empty string instead at [/var/www/html/phorge/phorge/src/applications/project/engine/PhabricatorProjectEditEngine.php:128]
```
Closes T16504
Test Plan:
* PHP 8.5
* Go to an existing parent project
* Select "Subprojects" in the sidebar
* Click "Create Milestone" on the right
Reviewers: O1 Blessed Committers, mainframe98
Reviewed By: O1 Blessed Committers, mainframe98
Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T16504
Differential Revision: https://we.phorge.it/D26765
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/legalpad/xaction/LegalpadDocumentTitleTransaction.php:22]
```
Closes T16505
Test Plan:
* Create a Legalpad at http://phorge.localhost/legalpad/edit/
* Go to http://phorge.localhost/feed/transactions/
Reviewers: O1 Blessed Committers, mainframe98
Reviewed By: O1 Blessed Committers, mainframe98
Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T16505
Differential Revision: https://we.phorge.it/D26766
Summary:
Setting null as an array key is deprecated since PHP 8.5 per https://www.php.net/releases/8.5/en.php: "Using null as an array offset or when calling array_key_exists() is now deprecated. Use an empty string instead."
See the same game nine lines lower.
Closes T16497
Test Plan: Run `./bin/arc unit ./src/applications/differential/__tests__/DifferentialParseRenderTestCase.php` on PHP 8.5
Reviewers: O1 Blessed Committers, mainframe98
Reviewed By: O1 Blessed Committers, mainframe98
Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T16497
Differential Revision: https://we.phorge.it/D26763
Summary:
Link the new "Policies User Guide" added in rPc5e33a500c19 also from the "Understanding Policies" section in the Forms and Projects guides.
Followup to rPc5e33a500c19.
Test Plan: `./bin/diviner generate`
Reviewers: O1 Blessed Committers, mainframe98
Reviewed By: O1 Blessed Committers, mainframe98
Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Differential Revision: https://we.phorge.it/D26762
Summary:
Remove code around some conditions which are always true/false anyway.
Same game as rP1b9fafc7af72.
Test Plan: Read earlier code in each file; run static code analysis.
Reviewers: O1 Blessed Committers, mainframe98
Reviewed By: O1 Blessed Committers, mainframe98
Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Differential Revision: https://we.phorge.it/D26760
Summary: In prep for T15277, write some user docs about the existing Policies - how they work and how to use them.
Test Plan: look at it until blurry.
Reviewers: O1 Blessed Committers, valerio.bozzolan, aklapper
Reviewed By: O1 Blessed Committers, valerio.bozzolan, aklapper
Subscribers: aklapper, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Differential Revision: https://we.phorge.it/D26759
Summary:
Given the absolute CSS position of the global top bar search parent object, there is no reason to truncate search scope names that early.
Change `width: 200px` to `max-width: 260px`.
(I'd also generally like to advertise https://www.w3.org/International/articles/article-text-size.en)
Closes T16369
Test Plan: See steps in T16369; test on different screen widths
Reviewers: O1 Blessed Committers, mainframe98
Reviewed By: O1 Blessed Committers, mainframe98
Subscribers: mainframe98, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T16369
Differential Revision: https://we.phorge.it/D26539
Summary:
Fully modularizing DifferentialDiffTransaction, and then fix T16472 by attaching any binary files uploaded to the diff object.
Refs T16485 T16070.
Test Plan:
Set the default view-policy of new files to something that isn't very public.
Create new diffs using `arc diff` that includes a picture of a small cat. Other kinds of images are out of scope.
- Users that don't have permission to see the revision should not be able to see the file
- Users that have permission to see the revision, should be able to see the file.
- Changing the policies on the created file to "no one" will not be make a difference.
- The file's page will show the diff in the Attachment list.
Also:
- Herald can still block the creation of the diffs.
Reviewers: O1 Blessed Committers, valerio.bozzolan
Reviewed By: O1 Blessed Committers, valerio.bozzolan
Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno, jdelker
Maniphest Tasks: T16485, T16472, T16070
Differential Revision: https://we.phorge.it/D26724