2022-04-05
Meeting notes for {E2}
Attendees:
- Action item check-in
- @avivey Set up a table of the Phorge applications, organizing the effort to being rebranding (Completed)
- @speck Update the strategy for how we're going to approach the rebrand so others can contribute (Completed)
- @avivey Communicate our strategy with the upstream (Completed)
- @speck Update meeting notes, organize into Phriction pages (Completed)
- @Matthew Set up new recurring meeting (Completed)
- High priority task: Rebranding
- T15077: Rebrand: Tracking task
- No diffs yet.
- Problem: A ton of work...
- Wikimedia has a translation importer/exporter tool that could perhaps help here. https://phabricator.wikimedia.org/source/phabricator-translations/
- Diviner: Perhaps we can add a banner stating that Phorge is derived from Phabricator to our public-facing documentation. This might buy some time for us to complete the rebrand.
- Dan wants to investigate Rector to see if it will make rebrand easier. Handed as an action item.
- Spammers
- Automated deployment from our own git repo?
- https://phabricator.wikimedia.org/source/phabricator-ava/ - Useful, potential to migrate into upstream at a future date.
- It's a really good idea to limit users before they're part of Trusted Contributors
- Another useful tool is Askimet: https://github.com/aag/mwakismet - Perhaps we can integrate that into the Phorge code with a configuration option?
- T15084: Discussion: Maniphest vs Ponder for user support might also perhaps help. We should lock down most everything to Trusted Contributors on this install, except perhaps Ponder.
- Better moderation tools also help
- Unbundling of Administrator tools might be useful? WMF does that.
- We could use Projects for that - WMF does that. This gives more granular control but is something we would need to code.
- How do we support open source better? Phabricator is designed closed-source first, but open-source projects have adopted it. Open-Source support is a high priority.
Action Items
- @Matthew Discuss banner on T15012: Update Diviner documentation to reference Phorge
- @Matthew Create task and discussion around integrating Askimet.
- @20after4 - Lock down what we can on this install, make notes on what we can't install.
- @20after4 - Create a banner for the frontpage to show people how to contribute (Link to ponder, info on trusted contributors)
- @dcog Investigate Rector: https://getrector.org/
- Last Author
- Matthew
- Last Edited
- May 3 2022, 19:33
Event Timeline
Referencing a comment from the earlier document:
https://we.phorge.it/w/planning_meetings/april_5%2C_2022/#224
This is regarding initial findings on Rector
Installation:
mkdir rector-test && cd rector-test git clone https://github.com/phacility/arcanist.git git clone https://github.com/phacility/phabricator.git composer require rector/rector --dev
Create rector.php in same directory. Example:
<?php declare(strict_types=1); use Rector\Core\Configuration\Option; use Rector\Renaming\Rector\FuncCall\RenameFunctionRector; use Rector\Renaming\Rector\Name\RenameClassRector; use Rector\Renaming\Rector\String_\RenameStringRector; //use Rector\Set\ValueObject\LevelSetList; use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator; return static function (ContainerConfigurator $containerConfigurator): void { $parameters = $containerConfigurator->parameters(); $parameters->set(Option::PATHS, [ __DIR__ . '/arcanist', __DIR__ . '/phabricator', ]); // Define what rule sets will be applied //$containerConfigurator->import(LevelSetList::UP_TO_PHP_81); // Configure services / rectors $services = $containerConfigurator->services(); $services->set(RenameStringRector::class) ->configure([ 'Phabricator' => 'Phorge', ]); $services->set(RenameClassRector::class) ->configure([ 'PhabricatorHandleQuery' => 'PlatformHandleQuery', 'PhabricatorAuthSSHKeyQuery' => 'PlatformAuthSSHKeyQuery', 'PhabricatorPolicyInterface' => 'PlatformPolicyInterface' ]); $services->set(RenameFunctionRector::class) ->configure([ 'phabricator_date' => 'platform_date', 'phabricator_time' => 'platform_time', 'phabricator_read_config_file' => 'platform_read_config_file', 'phabricator_startup' => 'platform_startup', ]); };
Do a dry run:
vendor/bin/rector process --dry-run
Wait a while, watching as your CPU weeps and moans in agony (make sure to save other files first in case it comes to a halt for a few minutes). If it can handle it eventually, you'll see a large amount of output like this:
Also got a lot of these errors:
[ERROR] Could not process "phabricator/src/view/page/PhabricatorStandardPageView.php" file, due to: "PHPStan\BetterReflection\Reflection\ReflectionClass "AphrontResponseProducerInterface" could not be found in the located source". On line: 26
I think this is because it's not seeing the connection between the arcanist and phabricator directories. Fairly certain I saw somewhere that there's a way to have it autoload or look in other directories, so there's still more digging to do on setting up the rector.php file.. hopefully the way those two directories interact is supported in Rector