wiki.techinc.nl/tests/phpunit/includes/import
Umherirrender 771219475e import: Add a syntax check for xml imports
Detect bad xml before starting import to avoid errors on long running
transaction or half-state pages after rollback on error

This is not about validation of the xaml against export.xsd

- Just read the given source by XMLReader to check if everything is fine
  with the syntax of the xml, like unclosed tags etc.
- The xml check is part of doImport, because that is already wrappred
  in a try/catch and has exception handling in caller code
- No i18n for the technial exception as handled by other code as well,
  also the message by libxml would be en always
- Added a seek function to ImportSource, the interface is not tagged as
  @stable, so no release notes or backward compatibility
- Moved the XMLReader::open into own function to reuse it, because the
  reader has to be reopen after the validation, store the reference to
  the source in new class property for the reopen
- Use AtEase to suppress warnings from read of invalid xml (php #64230)

Bug: T277766
Change-Id: Iea70e6c42526cb1efc787b335abe19f59abf4786
2023-01-19 23:32:24 +01:00
..
ImportableOldRevisionImporterTest.php Remove WikiRevision::downloadSource 2022-11-04 09:24:15 -04:00
ImportExportTest.php tests: Use MW_VERSION instead of deprecated $wgVersion 2023-01-05 05:20:00 -05:00
ImportFailureTest.php import: Add a syntax check for xml imports 2023-01-19 23:32:24 +01:00
ImportLinkCacheIntegrationTest.php
ImportTest.php Migrate usage of setMwGlobals() to overrideConfigValue(s) 2022-08-01 06:16:22 +01:00