[ This is still work in progress. Creating a stub with some information flled in. Will remove the WIP tag once it is all filled out. ]
###Project Information
* Name of tool/project: Parsoid-PHP
* Project home page: https://www.mediawiki.org/wiki/Parsing/Notes/Moving_Parsoid_Into_Core and https://www.mediawiki.org/wiki/Parsoid
* Name of team requesting review: Parsing
* Primary contact: Subbu Sastry
* Target date for deployment: Early September 2019
* Link to code repository / patchset: https://gerrit.wikimedia.org/r/q/project:mediawiki%252Fservices%252Fparsoid
###Description of the tool/project
I will just point to https://www.mediawiki.org/wiki/Parsoid for now. I can follow up with any additional info as required.
But, specifically, the context for this is that we are porting Parsoid to PHP which will be integrated into core as a composer library and will run in-process on REST API (see T221738 ) requests made to MediaWiki. We want to deploy this in July/August.
Parsoid/JS (currently deployed on the Wikimedia cluster) is not exposed directly to the internet. All requests to it go through RESTBase exposed REST API for wikis (Ex: https://en.wikipedia.org/api/rest_v1/ ). But, with the Parsoid/PHP offering which will be integrated into core, we can similarly deploy to an internal cluster that is not directly accessible on the internet and disable it on the app cluster and elsewhere where the MediaWiki API is exposed to the internet.
###Description of how the tool will be used at WMF
This will replace Parsoid/JS which is used by VisualEditor, Flow, ContentTranslation, Android App, Kiwix. Eventually, this will serve all page view and edit views.
###Dependencies
//List dependencies, or upstream projects that this project relies on.//
The composer.json file in the repository is the authoritative source for this
###Has this project been reviewed before?
Not that I know of
###Working test environment
//Please link or describe setup process for setting up a test environment.//
**Parser Tests**
`php bin/parserTests.php` runs tests in all but the selser mode across all test files (< 5K tests and finishes in ~45 secs on my laptop).
`php bin/parserTests.php --wt2html --wt2wt --html2wt --html2html --selser auto` runs tests in the specified modes across all test files (~26K tests and takes ~5m on my laptop)
Add the `--quiet` option to suppress verbose output.
By the end of day Aug 9, we will probably have >99% tests green.
**PHP Unit Tests:**
`composer php-test` will run phpcs, phpunit, and phan jobs.
For both of these above scenarios, you don't need a working MediaWiki installation. You can run this standalone. But, to hit the Parsoid REST API, you will need to run in integrated mode. ( **Instructions to be updated** )
###Post-deployment
//Name of team responsible for tool/project after deployment and primary contact.//