'BadRequestError' => __DIR__ . '/includes/exception/BadRequestError.php',
'BadTitleError' => __DIR__ . '/includes/exception/BadTitleError.php',
'BagOStuff' => __DIR__ . '/includes/libs/objectcache/BagOStuff.php',
- 'BaseDump' => __DIR__ . '/maintenance/backupPrefetch.inc',
+ 'BaseDump' => __DIR__ . '/includes/export/BaseDump.php',
'BaseTemplate' => __DIR__ . '/includes/skins/BaseTemplate.php',
'BashkirUppercaseCollation' => __DIR__ . '/includes/collation/BashkirUppercaseCollation.php',
'BatchRowIterator' => __DIR__ . '/includes/utils/BatchRowIterator.php',
'MessageContent' => __DIR__ . '/includes/content/MessageContent.php',
'MessageLocalizer' => __DIR__ . '/languages/MessageLocalizer.php',
'MessageSpecifier' => __DIR__ . '/includes/libs/MessageSpecifier.php',
+ 'MigrateArchiveText' => __DIR__ . '/maintenance/migrateArchiveText.php',
'MigrateComments' => __DIR__ . '/maintenance/migrateComments.php',
'MigrateFileRepoLayout' => __DIR__ . '/maintenance/migrateFileRepoLayout.php',
'MigrateUserGroup' => __DIR__ . '/maintenance/migrateUserGroup.php',
'NewFilesPager' => __DIR__ . '/includes/specials/pagers/NewFilesPager.php',
'NewPagesPager' => __DIR__ . '/includes/specials/pagers/NewPagesPager.php',
'NewUsersLogFormatter' => __DIR__ . '/includes/logging/NewUsersLogFormatter.php',
+ 'NoWriteWatchedItemStore' => __DIR__ . '/includes/watcheditem/NoWriteWatchedItemStore.php',
'NolinesImageGallery' => __DIR__ . '/includes/gallery/NolinesImageGallery.php',
'NorthernSamiUppercaseCollation' => __DIR__ . '/includes/collation/NorthernSamiUppercaseCollation.php',
'NotRecursiveIterator' => __DIR__ . '/includes/libs/iterators/NotRecursiveIterator.php',
"description": "Group which this module should be loaded together with"
},
"deprecated": {
- "type": ["object", "boolean"],
- "description": "Whether the module is deprecated and usage is discouraged. Either a boolean or an object with key message can be used to customise deprecation message."
+ "type": ["object", "string", "boolean"],
+ "description": "Whether the module is deprecated and usage is discouraged. Either a boolean, or a string or an object with key message can be used to customise deprecation message."
},
"position": {
"type": "string",
"description": "Group with which this module should be loaded"
},
"deprecated": {
- "type": ["object", "boolean"],
- "description": "Whether the module is deprecated and usage is discouraged. Either a boolean or an object with key message can be used to customise deprecation message."
+ "type": ["object", "string", "boolean"],
+ "description": "Whether the module is deprecated and usage is discouraged. Either a boolean, or a string or an object with key message can be used to customise deprecation message."
},
"position": {
"type": "string",
&$opts: Options to use for the query
&$join: Join conditions
-'WikiPageDeletionUpdates': manipulate the list of DataUpdates to be applied when
+'WikiPageDeletionUpdates': manipulate the list of DeferrableUpdates to be applied when
a page is deleted. Called in WikiPage::getDeletionUpdates(). Note that updates
specific to a content model should be provided by the respective Content's
getDeletionUpdates() method.
$page: the WikiPage
-$content: the Content to generate updates for (or null, if the Content could not be loaded
-due to an error)
-&$updates: the array of DataUpdate objects. Hook function may want to add to it.
+$content: the Content to generate updates for, or null in case the page revision could not be
+ loaded. The delete will succeed despite this.
+&$updates: the array of objects that implement DeferrableUpdate. Hook function may want to add to
+ it.
'WikiPageFactory': Override WikiPage class used for a title
$title: Title of the page
*/
$wgReadOnly = null;
+/**
+ * Set this to true to put the wiki watchlists into read-only mode.
+ * @var bool
+ * @since 1.31
+ */
+$wgReadOnlyWatchedItemStore = false;
+
/**
* If this lock file exists (size > 0), the wiki will be forced into read-only mode.
* Its contents will be shown to users as part of the read-only warning
const RESTART_ON_ERROR = 1;
public function __construct( $numProcs, $flags = 0 ) {
- if ( PHP_SAPI != 'cli' ) {
+ if ( !wfIsCLI() ) {
throw new MWException( "ForkController cannot be used from the web." );
}
$this->procsToStart = $numProcs;
return defined( 'HHVM_VERSION' );
}
+/**
+ * Check if we are running from the commandline
+ *
+ * @since 1.31
+ * @return bool
+ */
+function wfIsCLI() {
+ return PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg';
+}
+
/**
* Tries to get the system directory for temporary files. First
* $wgTmpDirectory is checked, and then the TMPDIR, TMP, and TEMP
$ifWritesSince = null, $wiki = false, $cluster = false, $timeout = null
) {
if ( $timeout === null ) {
- $timeout = ( PHP_SAPI === 'cli' ) ? 86400 : 10;
+ $timeout = wfIsCLI() ? 86400 : 10;
}
if ( $cluster === '*' ) {
$services->getReadOnlyMode()
);
$store->setStatsdDataFactory( $services->getStatsdDataFactory() );
+
+ if ( $services->getMainConfig()->get( 'ReadOnlyWatchedItemStore' ) ) {
+ $store = new NoWriteWatchedItemStore( $store );
+ }
+
return $store;
},
return false;
}
+ if ( in_array( 'error', $blobFlags ) ) {
+ // Error row, return false
+ return false;
+ }
+
if ( in_array( 'gzip', $blobFlags ) ) {
# Deal with optional compression of archived pages.
# This can be done periodically via maintenance/compressOld.php, and
* Add warnings and errors from a StatusValue object to the result
* @param string|null $modulePath
* @param StatusValue $status
- * @param string[] $types 'warning' and/or 'error'
+ * @param string[]|string $types 'warning' and/or 'error'
*/
public function addMessagesFromStatus(
$modulePath, StatusValue $status, $types = [ 'warning', 'error' ]
"apihelp-emailuser-param-text": "Texto.",
"apihelp-emailuser-param-ccme": "Enviar-me uma cópia desta mensagem.",
"apihelp-emailuser-example-email": "Enviar uma mensagem de correio ao utilizador <kbd>WikiSysop</kbd> com o texto <kbd>Content</kbd>.",
- "apihelp-expandtemplates-summary": "Expande todas as predefinições incluídas num texto em notação wiki.",
+ "apihelp-expandtemplates-summary": "Expande todas as predefinições existentes num texto wiki.",
"apihelp-expandtemplates-param-title": "Título da página.",
- "apihelp-expandtemplates-param-text": "Texto em notação wiki a converter.",
+ "apihelp-expandtemplates-param-text": "Texto wiki a converter.",
"apihelp-expandtemplates-param-revid": "Identificador da revisão, para <code><nowiki>{{REVISIONID}}</nowiki></code> e variáveis semelhantes.",
- "apihelp-expandtemplates-param-prop": "As informações que devem ser obtidas:\n\nNote que se não for selecionado nenhum valor, o resultado irá conter texto em notação wiki mas a saída estará num formato obsoleto.",
- "apihelp-expandtemplates-paramvalue-prop-wikitext": "O texto em notação wiki expandido.",
- "apihelp-expandtemplates-paramvalue-prop-categories": "Quaisquer categorias existentes na entrada que não estão representadas no texto em notação wiki de saída.",
- "apihelp-expandtemplates-paramvalue-prop-properties": "Propriedades da página, definidas por palavras mágicas expandidas, no texto em notação wiki.",
+ "apihelp-expandtemplates-param-prop": "As informações que devem ser obtidas:\n\nNote que, se não for selecionado nenhum valor, o resultado irá conter o texto wiki mas a saída estará num formato obsoleto.",
+ "apihelp-expandtemplates-paramvalue-prop-wikitext": "O texto wiki expandido.",
+ "apihelp-expandtemplates-paramvalue-prop-categories": "Quaisquer categorias existentes na entrada que não estão representadas no texto wiki de saída.",
+ "apihelp-expandtemplates-paramvalue-prop-properties": "Propriedades da página, definidas por palavras mágicas expandidas, no texto wiki.",
"apihelp-expandtemplates-paramvalue-prop-volatile": "Indica se o resultado é volátil e não deve ser reutilizado noutra parte da página.",
"apihelp-expandtemplates-paramvalue-prop-ttl": "O período máximo a partir do qual os armazenamentos do resultado na cache devem ser invalidados.",
"apihelp-expandtemplates-paramvalue-prop-modules": "Quaisquer módulos ResourceLoader que as funções do analisador sintático solicitaram que fossem adicionados ao resultado de saída. Um dos valores <kbd>jsconfigvars</kbd> ou <kbd>encodedjsconfigvars</kbd> tem de ser solicitado em conjunto com o valor <kbd>modules</kbd>.",
"apihelp-expandtemplates-paramvalue-prop-parsetree": "A árvore de análise sintática em XML do texto de entrada.",
"apihelp-expandtemplates-param-includecomments": "Indica se devem ser incluídos comentários HTML no resultado.",
"apihelp-expandtemplates-param-generatexml": "Gerar a árvore de análise sintática em XML (substituído por $1prop=parsetree).",
- "apihelp-expandtemplates-example-simple": "Expandir o texto em notação wiki <kbd><nowiki>{{Project:Sandbox}}</nowiki></kbd>.",
+ "apihelp-expandtemplates-example-simple": "Expandir o texto wiki <kbd><nowiki>{{Project:Sandbox}}</nowiki></kbd>.",
"apihelp-feedcontributions-summary": "Devolve um ''feed'' das contribuições do utilizador.",
"apihelp-feedcontributions-param-feedformat": "O formato do ''feed''.",
"apihelp-feedcontributions-param-user": "Os utilizadores dos quais serão obtidas as contribuições.",
"apihelp-parse-param-redirects": "Se <var>$1page</var> ou <var>$1pageid</var> estiverem definidos para um redirecionamento, resolvê-lo.",
"apihelp-parse-param-oldid": "Analisar o conteúdo desta revisão. Tem precedência sobre <var>$1page</var> e <var>$1pageid</var>.",
"apihelp-parse-param-prop": "As informações que devem ser obtidas:",
- "apihelp-parse-paramvalue-prop-text": "Fornece o texto analisado, de um texto com notação wiki.",
+ "apihelp-parse-paramvalue-prop-text": "Fornece o texto analisado resultante do texto wiki.",
"apihelp-parse-paramvalue-prop-langlinks": "Fornece as hiperligações interlínguas do texto wiki analisado.",
"apihelp-parse-paramvalue-prop-categories": "Fornece as categorias do texto wiki analisado.",
"apihelp-parse-paramvalue-prop-categorieshtml": "Fornece a versão HTML das categorias.",
"apihelp-parse-paramvalue-prop-encodedjsconfigvars": "Fornece as variáveis de configuração JavaScript específicas da página, no formato de uma ''string'' JSON.",
"apihelp-parse-paramvalue-prop-indicators": "Fornece o HTML dos indicadores de estado de página que são usados na página.",
"apihelp-parse-paramvalue-prop-iwlinks": "Fornece as hiperligações interwikis do texto wiki analisado.",
- "apihelp-parse-paramvalue-prop-wikitext": "Fornece o texto original com notação wiki que foi analisado.",
+ "apihelp-parse-paramvalue-prop-wikitext": "Fornece o texto wiki original que foi analisado.",
"apihelp-parse-paramvalue-prop-properties": "Fornece várias propriedades definidas no texto analisado.",
"apihelp-parse-paramvalue-prop-limitreportdata": "Fornece o relatório de limites de forma estruturada. Não fornece dados quando <var>$1disablelimitreport</var> está definido.",
"apihelp-parse-paramvalue-prop-limitreporthtml": "Fornece a versão HTML do relatório de limites. Não fornece dados quando <var>$1disablelimitreport</var> está definido.",
"apihelp-parse-param-contentformat": "O formato da seriação de conteúdo, usado para o texto de entrada. Só é válido quando usado com $1text.",
"apihelp-parse-param-contentmodel": "Modelo de conteúdo do texto de entrada. Se omitido, $1title tem de ser especificado e o valor por omissão será o modelo do título especificado. Só é válido quando usado com $1text.",
"apihelp-parse-example-page": "Fazer a análise sintática de uma página.",
- "apihelp-parse-example-text": "Fazer a análise sintática do texto com notação wiki.",
- "apihelp-parse-example-texttitle": "Fazer a análise sintática do texto com notação wiki, especificando o título da página.",
+ "apihelp-parse-example-text": "Fazer a análise sintática do texto wiki.",
+ "apihelp-parse-example-texttitle": "Fazer a análise sintática do texto wiki, especificando o título da página.",
"apihelp-parse-example-summary": "Fazer a análise sintática de um resumo.",
"apihelp-patrol-summary": "Patrulhar uma página ou revisão.",
"apihelp-patrol-param-rcid": "Identificador da mudança recente a patrulhar.",
"apihelp-query+allmessages-summary": "Devolver as mensagens deste ''site''.",
"apihelp-query+allmessages-param-messages": "Mensagens a serem produzidas no resultado. <kbd>*</kbd> (o valor por omissão) significa todas as mensagens.",
"apihelp-query+allmessages-param-prop": "As propriedades a serem obtidas:",
- "apihelp-query+allmessages-param-enableparser": "Definir, para ativar o analisador sintático e pré-processar o texto da mensagem com notação wiki (substituir palavras mágicas, processar predefinições, etc.).",
+ "apihelp-query+allmessages-param-enableparser": "Definir para ativar o analisador sintático; irá pré-processar o texto wiki da mensagem (substituir palavras mágicas, processar predefinições, etc.).",
"apihelp-query+allmessages-param-nocontent": "Se definido, não incluir o conteúdo das mensagens no resultado de saída.",
"apihelp-query+allmessages-param-includelocal": "Incluir também as mensagens locais, isto é, mensagens que não existem no software mas existem como uma página no espaço nominal {{ns:MediaWiki}}.\nIsto lista todas as páginas do espaço nominal {{ns:MediaWiki}}, portanto, também irá listar aquelas que não são verdadeiramente mensagens, como [[MediaWiki:Common.js|Common.js]].",
"apihelp-query+allmessages-param-args": "Os argumentos a serem substituídos na mensagem.",
<?php
-use Wikimedia\Rdbms\Database;
+use Wikimedia\Rdbms\IDatabase;
use Wikimedia\Rdbms\LoadBalancer;
/**
* @param int $id Which connection to use
* @param array $groups Query groups
*
- * @return Database
+ * @return IDatabase
*/
protected function getConnection( $id, $groups = [] ) {
$loadBalancer = wfGetLB( $this->wiki );
*
* @since 1.21
*
- * @param Database $db The database connection to release.
+ * @param IDatabase $db The database connection to release.
*/
- protected function releaseConnection( Database $db ) {
+ protected function releaseConnection( IDatabase $db ) {
if ( $this->wiki !== false ) {
$loadBalancer = $this->getLoadBalancer();
$loadBalancer->reuseConnection( $db );
$record['extra']['wiki'] = wfWikiID();
$record['extra']['mwversion'] = $wgVersion;
$record['extra']['reqId'] = \WebRequest::getRequestId();
- if ( PHP_SAPI === 'cli' && isset( $_SERVER['argv'] ) ) {
+ if ( wfIsCLI() && isset( $_SERVER['argv'] ) ) {
$record['extra']['cli_argv'] = implode( ' ', $_SERVER['argv'] );
}
return $record;
self::handleException( $e );
// Make sure we don't claim success on exit for CLI scripts (T177414)
- if ( PHP_SAPI === 'cli' ) {
+ if ( wfIsCLI() ) {
register_shutdown_function(
function () {
exit( 255 );
--- /dev/null
+<?php
+/**
+ * Helper class for the --prefetch option of dumpTextPass.php
+ *
+ * Copyright © 2005 Brion Vibber <brion@pobox.com>
+ * https://www.mediawiki.org/
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Maintenance
+ */
+
+/**
+ * Readahead helper for making large MediaWiki data dumps;
+ * reads in a previous XML dump to sequentially prefetch text
+ * records already normalized and decompressed.
+ *
+ * This can save load on the external database servers, hopefully.
+ *
+ * Assumes that dumps will be recorded in the canonical order:
+ * - ascending by page_id
+ * - ascending by rev_id within each page
+ * - text contents are immutable and should not change once
+ * recorded, so the previous dump is a reliable source
+ *
+ * @ingroup Maintenance
+ */
+class BaseDump {
+ /** @var XMLReader */
+ protected $reader = null;
+ protected $atEnd = false;
+ protected $atPageEnd = false;
+ protected $lastPage = 0;
+ protected $lastRev = 0;
+ protected $infiles = null;
+
+ public function __construct( $infile ) {
+ $this->infiles = explode( ';', $infile );
+ $this->reader = new XMLReader();
+ $infile = array_shift( $this->infiles );
+ if ( defined( 'LIBXML_PARSEHUGE' ) ) {
+ $this->reader->open( $infile, null, LIBXML_PARSEHUGE );
+ } else {
+ $this->reader->open( $infile );
+ }
+ }
+
+ /**
+ * Attempts to fetch the text of a particular page revision
+ * from the dump stream. May return null if the page is
+ * unavailable.
+ *
+ * @param int $page ID number of page to read
+ * @param int $rev ID number of revision to read
+ * @return string|null
+ */
+ function prefetch( $page, $rev ) {
+ $page = intval( $page );
+ $rev = intval( $rev );
+ while ( $this->lastPage < $page && !$this->atEnd ) {
+ $this->debug( "BaseDump::prefetch at page $this->lastPage, looking for $page" );
+ $this->nextPage();
+ }
+ if ( $this->lastPage > $page || $this->atEnd ) {
+ $this->debug( "BaseDump::prefetch already past page $page "
+ . "looking for rev $rev [$this->lastPage, $this->lastRev]" );
+
+ return null;
+ }
+ while ( $this->lastRev < $rev && !$this->atEnd && !$this->atPageEnd ) {
+ $this->debug( "BaseDump::prefetch at page $this->lastPage, rev $this->lastRev, "
+ . "looking for $page, $rev" );
+ $this->nextRev();
+ }
+ if ( $this->lastRev == $rev && !$this->atEnd ) {
+ $this->debug( "BaseDump::prefetch hit on $page, $rev [$this->lastPage, $this->lastRev]" );
+
+ return $this->nextText();
+ } else {
+ $this->debug( "BaseDump::prefetch already past rev $rev on page $page "
+ . "[$this->lastPage, $this->lastRev]" );
+
+ return null;
+ }
+ }
+
+ function debug( $str ) {
+ wfDebug( $str . "\n" );
+ // global $dumper;
+ // $dumper->progress( $str );
+ }
+
+ /**
+ * @access private
+ */
+ function nextPage() {
+ if ( $this->skipTo( 'page', 'mediawiki' ) ) {
+ if ( $this->skipTo( 'id' ) ) {
+ $this->lastPage = intval( $this->nodeContents() );
+ $this->lastRev = 0;
+ $this->atPageEnd = false;
+ }
+ } else {
+ $this->close();
+ if ( count( $this->infiles ) ) {
+ $infile = array_shift( $this->infiles );
+ $this->reader->open( $infile );
+ $this->atEnd = false;
+ }
+ }
+ }
+
+ /**
+ * @access private
+ */
+ function nextRev() {
+ if ( $this->skipTo( 'revision' ) ) {
+ if ( $this->skipTo( 'id' ) ) {
+ $this->lastRev = intval( $this->nodeContents() );
+ }
+ } else {
+ $this->atPageEnd = true;
+ }
+ }
+
+ /**
+ * @access private
+ * @return string
+ */
+ function nextText() {
+ $this->skipTo( 'text' );
+
+ return strval( $this->nodeContents() );
+ }
+
+ /**
+ * @access private
+ * @param string $name
+ * @param string $parent
+ * @return bool|null
+ */
+ function skipTo( $name, $parent = 'page' ) {
+ if ( $this->atEnd ) {
+ return false;
+ }
+ while ( $this->reader->read() ) {
+ if ( $this->reader->nodeType == XMLReader::ELEMENT
+ && $this->reader->name == $name
+ ) {
+ return true;
+ }
+ if ( $this->reader->nodeType == XMLReader::END_ELEMENT
+ && $this->reader->name == $parent
+ ) {
+ $this->debug( "BaseDump::skipTo found </$parent> searching for <$name>" );
+
+ return false;
+ }
+ }
+
+ return $this->close();
+ }
+
+ /**
+ * Shouldn't something like this be built-in to XMLReader?
+ * Fetches text contents of the current element, assuming
+ * no sub-elements or such scary things.
+ *
+ * @return string
+ * @access private
+ */
+ function nodeContents() {
+ if ( $this->atEnd ) {
+ return null;
+ }
+ if ( $this->reader->isEmptyElement ) {
+ return "";
+ }
+ $buffer = "";
+ while ( $this->reader->read() ) {
+ switch ( $this->reader->nodeType ) {
+ case XMLReader::TEXT:
+ // case XMLReader::WHITESPACE:
+ case XMLReader::SIGNIFICANT_WHITESPACE:
+ $buffer .= $this->reader->value;
+ break;
+ case XMLReader::END_ELEMENT:
+ return $buffer;
+ }
+ }
+
+ return $this->close();
+ }
+
+ /**
+ * @access private
+ * @return null
+ */
+ function close() {
+ $this->reader->close();
+ $this->atEnd = true;
+
+ return null;
+ }
+}
}
}
+ /**
+ * Migrate ar_text to modern storage
+ * @since 1.31
+ */
+ protected function migrateArchiveText() {
+ $this->output( "Migrating archive ar_text to modern storage.\n" );
+ $task = $this->maintenance->runChild( 'MigrateArchiveText', 'migrateArchiveText.php' );
+ $task->execute();
+ $this->output( "done.\n" );
+ }
+
}
[ 'addTable', 'content', 'patch-content.sql' ],
[ 'addTable', 'slot_roles', 'patch-slot_roles.sql' ],
[ 'addTable', 'content_models', 'patch-content_models.sql' ],
+ [ 'migrateArchiveText' ],
];
}
[ 'addTable', 'content', 'patch-content.sql' ],
[ 'addTable', 'slot_roles', 'patch-slot_roles.sql' ],
[ 'addTable', 'content_models', 'patch-content_models.sql' ],
+ [ 'migrateArchiveText' ],
];
}
[ 'addTable', 'content', 'patch-content.sql' ],
[ 'addTable', 'slot_roles', 'patch-slot_roles.sql' ],
[ 'addTable', 'content_models', 'patch-content_models.sql' ],
+ [ 'migrateArchiveText' ],
// KEEP THIS AT THE BOTTOM!!
[ 'doRebuildDuplicateFunction' ],
[ 'addTable', 'content', 'patch-content-table.sql' ],
[ 'addTable', 'content_models', 'patch-content_models-table.sql' ],
[ 'addTable', 'slot_roles', 'patch-slot_roles-table.sql' ],
+ [ 'migrateArchiveText' ],
];
}
[ 'addTable', 'content', 'patch-content.sql' ],
[ 'addTable', 'content_models', 'patch-content_models.sql' ],
[ 'addTable', 'slots', 'patch-slots.sql' ],
- [ 'addTable', 'slot_roles', 'patch-slot_roles.sql' ]
+ [ 'addTable', 'slot_roles', 'patch-slot_roles.sql' ],
+ [ 'migrateArchiveText' ],
];
}
'%2F' => '/', // Unencode slashes
'%3A' => ':', // Unencode colons
'%3D' => '=', // Unencode equals signs
+ '%0A' => ' ', // Change newlines to spaces
+ '%0D' => ' ', // Change carriage returns to spaces
+ '%09' => ' ', // Change tabs to spaces
] );
+ // Consolidate runs of multiple spaces in a row
+ $encoded = preg_replace( '/ {2,}/', ' ', $encoded );
+ // Remove leading and trailing spaces
+ $encoded = preg_replace( '/^ | $/', '', $encoded );
$uri = 'data:' . $type . ',' . $encoded;
if ( !$ie8Compat || strlen( $uri ) < self::DATA_URI_SIZE_LIMIT ) {
return $uri;
$this->domain = isset( $config['domain'] ) ? $config['domain'] : 'global';
if ( isset( $config['lockTTL'] ) ) {
$this->lockTTL = max( 5, $config['lockTTL'] );
- } elseif ( PHP_SAPI === 'cli' ) {
+ } elseif ( PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg' ) {
$this->lockTTL = 3600;
} else {
$met = ini_get( 'max_execution_time' ); // this is 0 in CLI mode
$p['variables'] = isset( $p['variables'] ) ? $p['variables'] : [];
$p['tablePrefix'] = isset( $p['tablePrefix'] ) ? $p['tablePrefix'] : '';
$p['schema'] = isset( $p['schema'] ) ? $p['schema'] : '';
- $p['cliMode'] = isset( $p['cliMode'] ) ? $p['cliMode'] : ( PHP_SAPI === 'cli' );
+ $p['cliMode'] = isset( $p['cliMode'] )
+ ? $p['cliMode']
+ : ( PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg' );
$p['agent'] = isset( $p['agent'] ) ? $p['agent'] : '';
if ( !isset( $p['connLogger'] ) ) {
$p['connLogger'] = new \Psr\Log\NullLogger();
$this->host = isset( $params['hostname'] )
? $params['hostname']
: ( gethostname() ?: 'unknown' );
- $this->cliMode = isset( $params['cliMode'] ) ? $params['cliMode'] : PHP_SAPI === 'cli';
+ $this->cliMode = isset( $params['cliMode'] )
+ ? $params['cliMode']
+ : ( PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg' );
$this->agent = isset( $params['agent'] ) ? $params['agent'] : '';
if ( isset( $params['chronologyProtector'] ) ) {
}
$inSample = mt_rand( 0, $params['sampling'] - 1 ) === 0;
- if ( PHP_SAPI === 'cli' || !$inSample ) {
+ // wfIsCLI() is not available yet
+ if ( PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg' || !$inSample ) {
$params['class'] = 'ProfilerStub';
}
);
$contentType = $this->collector->getContentType();
- if ( PHP_SAPI === 'cli' ) {
+ if ( wfIsCLI() ) {
print "<!--\n{$out}\n-->\n";
} elseif ( $contentType === 'text/html' ) {
$visible = isset( $this->params['visible'] ) ?
use MediaWiki\Linker\LinkRenderer;
use MediaWiki\Linker\LinkTarget;
use MediaWiki\MediaWikiServices;
+use Wikimedia\Rdbms\DBReadOnlyError;
/**
* Provides the UI through which users can perform editing
* Remove all titles from a user's watchlist
*/
private function clearWatchlist() {
+ if ( $this->getConfig()->get( 'ReadOnlyWatchedItemStore' ) ) {
+ throw new DBReadOnlyError( null, 'The watchlist is currently readonly.' );
+ }
+
$dbw = wfGetDB( DB_MASTER );
$dbw->delete(
'watchlist',
// Use APC/eAccelerator/xcache if requested, available, and not in CLI mode;
// Counter values would not survive accross script instances in CLI mode.
$cache = null;
- if ( ( $flags & self::QUICK_VOLATILE ) && PHP_SAPI !== 'cli' ) {
+ if ( ( $flags & self::QUICK_VOLATILE ) && !wfIsCLI() ) {
$cache = MediaWikiServices::getInstance()->getLocalServerObjectCache();
}
if ( $cache ) {
--- /dev/null
+<?php
+/**
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Watchlist
+ */
+use MediaWiki\Linker\LinkTarget;
+use Wikimedia\Rdbms\DBReadOnlyError;
+
+/**
+ * @internal
+ * @since 1.31
+ */
+class NoWriteWatchedItemStore implements WatchedItemStoreInterface {
+
+ /**
+ * @var WatchedItemStoreInterface
+ */
+ private $actualStore;
+
+ /**
+ * Initialy set WatchedItemStore that will be used in cases where writing is not needed.
+ * @param WatchedItemStoreInterface $actualStore
+ */
+ public function __construct( WatchedItemStoreInterface $actualStore ) {
+ $this->actualStore = $actualStore;
+ }
+
+ public function countWatchedItems( User $user ) {
+ return $this->actualStore->countWatchedItems( $user );
+ }
+
+ public function countWatchers( LinkTarget $target ) {
+ return $this->actualStore->countWatchers( $target );
+ }
+
+ public function countVisitingWatchers( LinkTarget $target, $threshold ) {
+ return $this->actualStore->countVisitingWatchers( $target, $threshold );
+ }
+
+ public function countWatchersMultiple( array $targets, array $options = [] ) {
+ return $this->actualStore->countVisitingWatchersMultiple( $targets, $options );
+ }
+
+ public function countVisitingWatchersMultiple(
+ array $targetsWithVisitThresholds,
+ $minimumWatchers = null
+ ) {
+ return $this->actualStore->countVisitingWatchersMultiple(
+ $targetsWithVisitThresholds,
+ $minimumWatchers
+ );
+ }
+
+ public function getWatchedItem( User $user, LinkTarget $target ) {
+ return $this->actualStore->getWatchedItem( $user, $target );
+ }
+
+ public function loadWatchedItem( User $user, LinkTarget $target ) {
+ return $this->actualStore->loadWatchedItem( $user, $target );
+ }
+
+ public function getWatchedItemsForUser( User $user, array $options = [] ) {
+ return $this->actualStore->getWatchedItemsForUser( $user, $options );
+ }
+
+ public function isWatched( User $user, LinkTarget $target ) {
+ return $this->actualStore->isWatched( $user, $target );
+ }
+
+ public function getNotificationTimestampsBatch( User $user, array $targets ) {
+ return $this->actualStore->getNotificationTimestampsBatch( $user, $targets );
+ }
+
+ public function countUnreadNotifications( User $user, $unreadLimit = null ) {
+ return $this->actualStore->countUnreadNotifications( $user, $unreadLimit );
+ }
+
+ public function duplicateAllAssociatedEntries( LinkTarget $oldTarget, LinkTarget $newTarget ) {
+ throw new DBReadOnlyError( null, 'The watchlist is currently readonly.' );
+ }
+
+ public function duplicateEntry( LinkTarget $oldTarget, LinkTarget $newTarget ) {
+ throw new DBReadOnlyError( null, 'The watchlist is currently readonly.' );
+ }
+
+ public function addWatch( User $user, LinkTarget $target ) {
+ throw new DBReadOnlyError( null, 'The watchlist is currently readonly.' );
+ }
+
+ public function addWatchBatchForUser( User $user, array $targets ) {
+ throw new DBReadOnlyError( null, 'The watchlist is currently readonly.' );
+ }
+
+ public function removeWatch( User $user, LinkTarget $target ) {
+ throw new DBReadOnlyError( null, 'The watchlist is currently readonly.' );
+ }
+
+ public function setNotificationTimestampsForUser(
+ User $user,
+ $timestamp,
+ array $targets = []
+ ) {
+ throw new DBReadOnlyError( null, 'The watchlist is currently readonly.' );
+ }
+
+ public function updateNotificationTimestamp( User $editor, LinkTarget $target, $timestamp ) {
+ throw new DBReadOnlyError( null, 'The watchlist is currently readonly.' );
+ }
+
+ public function resetNotificationTimestamp(
+ User $user,
+ Title $title,
+ $force = '',
+ $oldid = 0
+ ) {
+ throw new DBReadOnlyError( null, 'The watchlist is currently readonly.' );
+ }
+
+}
"userrights-no-interwiki": "Вы ня маеце дазволу зьмяняць правы ўдзельнікаў іншых вікаў.",
"userrights-nodatabase": "Базы зьвестак $1 не існуе альбо яна не зьяўляецца лякальнай.",
"userrights-changeable-col": "Групы, якія вы можаце зьмяняць",
- "userrights-unchangeable-col": "Ð\93Ñ\80Ñ\83пÑ\8b, Ñ\8fкÑ\96Ñ\8f Ð\92Ñ\8b нÑ\8f можаÑ\86е мяняць",
+ "userrights-unchangeable-col": "Ð\93Ñ\80Ñ\83пÑ\8b, Ñ\8fкÑ\96Ñ\8f вÑ\8b нÑ\8f можаÑ\86е зÑ\8cмяняць",
"userrights-expiry-current": "Сканчаецца $1",
"userrights-expiry-none": "Бестэрмінова",
"userrights-expiry": "Сканчаецца:",
"rcfilters-activefilters": "Актыўныя фільтры",
"rcfilters-advancedfilters": "Пашыраныя фільтры",
"rcfilters-limit-title": "Паказаць вынікаў",
- "rcfilters-limit-and-date-label": "$1 {{PLURAL:$1|зьмены|зьмены|зьменаў}}, $2",
+ "rcfilters-limit-and-date-label": "$1 {{PLURAL:$1|зьмена|зьмены|зьменаў}}, $2",
"rcfilters-date-popup-title": "Пэрыяд часу для пошуку",
"rcfilters-days-title": "Апошнія дні",
"rcfilters-hours-title": "Апошнія гадзіны",
"log-action-filter-block-unblock": "Отблокиране",
"log-action-filter-contentmodel-change": "Промяна на модела на съдържанието",
"log-action-filter-delete-delete": "Изтриване на страница",
+ "log-action-filter-delete-delete_redir": "Замяна на пренасочване",
"log-action-filter-delete-restore": "Възстановяване на страница",
+ "log-action-filter-delete-event": "Изтриване на дневник",
+ "log-action-filter-delete-revision": "Изтриване на версия",
+ "log-action-filter-import-interwiki": "Transwiki внасяне",
+ "log-action-filter-import-upload": "Внасяне чрез качване на XML",
"log-action-filter-managetags-create": "Създаване на етикет",
"log-action-filter-managetags-delete": "Премахване на етикет",
"log-action-filter-managetags-activate": "Активиране на етикет",
"rcfilters-activefilters": "Siloù oberiant",
"rcfilters-advancedfilters": "Siloù araokaet",
"rcfilters-limit-title": "Kemmoù da vezañ diskouezet",
+ "rcfilters-limit-and-date-label": "$1 {{PLURAL:$1|kemm|kemmoù}}, $2",
"rcfilters-days-title": "Deizioù paseet",
"rcfilters-hours-title": "Eurioù paseet",
"rcfilters-days-show-days": "($1 {{PLURAL:$1|deiz}})",
"rcfilters-filter-lastrevision-description": "Kemm diwezhañ graet ouzh ur bajenn.",
"rcfilters-filter-previousrevision-label": "Stummoù koshoc'h",
"rcfilters-filter-previousrevision-description": "An holl gemmoù nemet ar c'hemm diwezhañ graet ouzh ur bajenn.",
+ "rcfilters-filter-showlinkedto-label": "Diskouez ar c'hemmoù war ar bajennoù liammet",
+ "rcfilters-target-page-placeholder": "Skrivañ anv ar bajenn (pe rummad)",
"rcnotefrom": "Setu aze {{PLURAL:$5|ar c'hemm|ar c'hemmoù}} c'hoarvezet abaoe an <strong>$3, $4</strong> (<strong>$1</strong> d'ar muiañ).",
"rclistfromreset": "adderaouekaat dibab an deiziad",
"rclistfrom": "Diskouez ar c'hemmoù diwezhañ abaoe an/ar $3 $2",
"suppress": "Supressió",
"querypage-disabled": "Aquesta pàgina especial està desactivada per a no perjudicar el rendiment.",
"apihelp": "Ajuda de l'API",
- "apihelp-no-such-module": "No s'ha trobat el mòdul \"$1\".",
+ "apihelp-no-such-module": "No s’ha trobat el mòdul «$1».",
"apisandbox": "Pàgina de proves de l'API",
"apisandbox-jsonly": "Es necessita JavaScript per utilitzar l'espai de proves API.",
"apisandbox-api-disabled": "L'API està desactivada en aquest lloc.",
"rcfilters-activefilters": "Active filters",
"rcfilters-advancedfilters": "Advanced filters",
"rcfilters-limit-title": "Results to show",
- "rcfilters-limit-and-date-label": "{{PLURAL:$1|change|$1 changes}}, $2",
+ "rcfilters-limit-and-date-label": "$1 {{PLURAL:$1|change|changes}}, $2",
"rcfilters-date-popup-title": "Time period to search",
"rcfilters-days-title": "Recent days",
"rcfilters-hours-title": "Recent hours",
"suppress": "Forigu",
"querypage-disabled": "Tiu ĉi speciala paĝo estas malfunkciigita pro rendimentaj kialoj.",
"apihelp": "Helpo pri API",
- "apihelp-no-such-module": "Modulo \"$1\" ne estis trovita.",
+ "apihelp-no-such-module": "La modjulo „$1” ne estis trovita.",
"apisandbox": "API testejo",
"apisandbox-jsonly": "JavaScript estas postulita por uzi la API provejon.",
"apisandbox-api-disabled": "API estas malŝalta en ĉi tiu retejo.",
"rcfilters-activefilters": "Filtros activos",
"rcfilters-advancedfilters": "Filtros avanzados",
"rcfilters-limit-title": "Resultados que mostrar",
- "rcfilters-limit-and-date-label": "{{PLURAL:$1|cambio|$1 cambios}}, $2",
+ "rcfilters-limit-and-date-label": "$1 {{PLURAL:$1|cambio|cambios}}, $2",
"rcfilters-date-popup-title": "Período de tiempo en que buscar",
"rcfilters-days-title": "Días recientes",
"rcfilters-hours-title": "Horas recientes",
"suppress": "Supresor",
"querypage-disabled": "Esta página especial está deshabilitada por motivos de rendimiento.",
"apihelp": "Ayuda de la API",
- "apihelp-no-such-module": "No se encontró el módulo \"$1\".",
+ "apihelp-no-such-module": "No se encontró el módulo «$1».",
"apisandbox": "Zona de pruebas de la API",
"apisandbox-jsonly": "Se requiere JavaScript para utilizar la zona de pruebas de API.",
"apisandbox-api-disabled": "La API está desactivada en este sitio.",
"rcfilters-filter-showlinkedfrom-option-label": "<strong>Páxinas ligadas desde</strong> a páxina seleccionada",
"rcfilters-filter-showlinkedto-label": "Amosar os cambios en páxinas que ligan con",
"rcfilters-filter-showlinkedto-option-label": "<strong>Páxinas que ligan</strong> para a páxina seleccionada",
- "rcfilters-target-page-placeholder": "Insire un nome de páxina",
+ "rcfilters-target-page-placeholder": "Insire un nome de páxina (ou categoría)",
"rcnotefrom": "A continuación {{PLURAL:$5|móstrase o cambio feito|móstranse os cambios feitos}} desde o <strong>$3</strong> ás <strong>$4</strong> (móstranse <strong>$1</strong> como máximo).",
"rclistfromreset": "Reinicializar a selección da data",
"rclistfrom": "Mostrar os cambios novos desde o $3 ás $2",
"version-poweredby-others": "outros",
"version-poweredby-translators": "os tradutores de translatewiki.net",
"version-credits-summary": "Queremos recoñecer as seguintes persoas polas súas achegas a [[Special:Version|MediaWiki]].",
- "version-license-info": "MediaWiki é software libre; pode redistribuílo e/ou modificalo segundo os termos da licenza pública xeral GNU publicada pola Free Software Foundation; versión 2 ou (na súa escolla) calquera outra posterior.\n\nMediaWiki distribúese coa esperanza de que poida ser útil, pero SEN GARANTÍA NINGUNHA; nin sequera a garantía implícita de COMERCIALIZACIÓN ou ADECUACIÓN A UNHA FINALIDADE ESPECÍFICA. Olle a licenza pública xeral GNU para obter máis detalles.\n\nDebería recibir [{{SERVER}}{{SCRIPTPATH}}/COPYING unha copia da licenza pública xeral GNU] xunto ao programa; se non é así, escriba á Free Software Foundation, Inc., rúa Franklin, número 51, quinto andar, Boston, Massachusetts, 02110-1301, Estados Unidos de América ou [//www.gnu.org/licenses/old-licenses/gpl-2.0.html lea a licenza en liña].",
+ "version-license-info": "MediaWiki é software libre; pode redistribuílo e/ou modificalo segundo os termos da licenza pública xeral GNU publicada pola Free Software Foundation; versión 2 ou (na súa escolla) calquera outra posterior.\n\nMediaWiki distribúese coa esperanza de que poida ser útil, pero <em>SEN GARANTÍA NINGUNHA</em>; nin sequera a garantía implícita de <strong>COMERCIALIZACIÓN</strong> ou <strong>ADECUACIÓN A UNHA FINALIDADE ESPECÍFICA</strong>. Olle a licenza pública xeral GNU para obter máis detalles.\n\nDebería recibir [{{SERVER}}{{SCRIPTPATH}}/COPYING unha copia da licenza pública xeral GNU] xunto ao programa; se non é así, escriba á Free Software Foundation, Inc., rúa Franklin, número 51, quinto andar, Boston, Massachusetts, 02110-1301, Estados Unidos de América ou [//www.gnu.org/licenses/old-licenses/gpl-2.0.html lea a licenza en liña].",
"version-software": "Software instalado",
"version-software-product": "Produto",
"version-software-version": "Versión",
"Arifpedia",
"Uchup19",
"Archd",
- "Empu"
+ "Empu",
+ "Dodolzk"
]
},
"tog-underline": "Garis bawahi pranala:",
"timezoneregion-indian": "Samudera Hindia",
"timezoneregion-pacific": "Samudera Pasifik",
"allowemail": "Izinkan pengguna lain mengirim surel kepada saya",
+ "email-allow-new-users-label": "Izinkan email dari pengguna baru",
"email-blacklist-label": "Cegah para pengguna ini mengirim saya surel:",
"prefs-searchoptions": "Cari",
"prefs-namespaces": "Ruang nama",
"right-siteadmin": "Mengunci dan membuka kunci basis data",
"right-override-export-depth": "Ekspor halaman termasuk halaman-halaman terkait hingga kedalaman 5",
"right-sendemail": "Mengirim surel ke pengguna lain",
+ "right-sendemail-new-users": "Kirim email ke pengguna yang tidak melakukan login",
"right-managechangetags": "Buat dan matikan [[Special:Tags|tag]]",
"right-applychangetags": "Terapkan [[Special:Tags|tags]] bersamaan dengan perubahan pengguna",
"right-changetags": "Tambah dan hapus [[Special:Tags|tag]] arbitrari pada revisi masing-masing dan entri log",
"recentchanges-noresult": "Tidak ada perubahan dalam rentang waktu ini yang cocok dengan kriteria.",
"recentchanges-timeout": "Waktu pencarian ini telah habis. Anda mungkin ingin mencoba parameter pencarian lain.",
"recentchanges-network": "Selama terjadi kesalahan teknis, tidak ada hasil yang bisa dimuat. Silakan coba untuk menyegarkan kembali halaman.",
+ "recentchanges-notargetpage": "Masukkan nama halaman di atas untuk melihat perubahan yang terkait dengan halaman itu.",
"recentchanges-feed-description": "Temukan perubahan terbaru dalam wiki di umpan ini.",
"recentchanges-label-newpage": "Suntingan ini membuat halaman baru",
"recentchanges-label-minor": "Ini adalah suntingan kecil",
"rcfilters-group-results-by-page": "Kelompokkan hasil menurut halaman",
"rcfilters-activefilters": "Filter aktif",
"rcfilters-advancedfilters": "Penyaringan lebih lanjut",
- "rcfilters-limit-title": "Perubahan untuk ditampilkan",
+ "rcfilters-limit-title": "Hasil untuk ditampilkan",
+ "rcfilters-date-popup-title": "Periode waktu untuk dicari",
"rcfilters-days-title": "Hari-hari terakhir",
"rcfilters-hours-title": "Jam-jam terakhir",
"rcfilters-days-show-days": "$1 {{PLURAL:$1|hari|hari}}",
"rcfilters-watchlist-showupdated": "Perubahan di halaman-halaman yang belum Anda kunjungi sejak perubahan terjadi ditampilkan dalam <strong>huruf terbal</strong>, dan tanda titik tebal di daftar.",
"rcfilters-preference-label": "Sembunyikan versi terkini dari Perubahan Terbaru",
"rcfilters-preference-help": "Kembalikan perubahan antarmuka 2017 dan semua peralatan yang ditambahkan sejak saat itu.",
+ "rcfilters-filter-showlinkedfrom-label": "Tampilkan perubahan pada halaman yang ditautkan dari",
"rcfilters-target-page-placeholder": "Masukkan nama halaman",
"rcnotefrom": "Di bawah ini adalah {{PLURAL:$5|perubahan}} sejak <strong>$3, $4</strong> (ditampilkan sampai <strong>$1</strong> perubahan).",
"rclistfromreset": "Atur ulang pilihan tanggal",
"rcfilters-activefilters": "Filtri attivi",
"rcfilters-advancedfilters": "Filtri avanzati",
"rcfilters-limit-title": "Risultati da mostrare",
- "rcfilters-limit-and-date-label": "{{PLURAL:$1|modifica|$1 modifiche}}, $2",
+ "rcfilters-limit-and-date-label": "$1 {{PLURAL:$1|modifica|modifiche}}, $2",
"rcfilters-date-popup-title": "Periodo di tempo per la ricerca",
"rcfilters-days-title": "Giorni recenti",
"rcfilters-hours-title": "Ore recenti",
"rcfilters-activefilters": "사용 중인 필터",
"rcfilters-advancedfilters": "고급 필터",
"rcfilters-limit-title": "표시할 결과 수",
- "rcfilters-limit-and-date-label": "{{PLURAL:$1|변경사항|변경사항 $1개}}, $2",
+ "rcfilters-limit-and-date-label": "{{PLURAL:$1|변경사항}} $1개, $2",
"rcfilters-date-popup-title": "검색 시한",
"rcfilters-days-title": "최근 날",
"rcfilters-hours-title": "최근 시간",
"rcfilters-activefilters": "Actieve filters",
"rcfilters-advancedfilters": "Geavanceerde filters",
"rcfilters-limit-title": "Resultaten om te tonen",
- "rcfilters-limit-and-date-label": "{{PLURAL:$1|wijziging|$1 wijzigingen}}, $2",
+ "rcfilters-limit-and-date-label": "$1 {{PLURAL:$1|wijziging|wijzigingen}}, $2",
"rcfilters-date-popup-title": "Tijdsperiode om te doorzoeken",
"rcfilters-days-title": "Afgelopen dagen",
"rcfilters-hours-title": "Afgelopen uren",
"movenologintext": "U moet [[Special:UserLogin|aangemeld]] zijn om een pagina te hernoemen.",
"movenotallowed": "U hebt geen rechten om pagina's te hernoemen.",
"movenotallowedfile": "U hebt geen rechten om bestanden te hernoemen.",
- "cant-move-user-page": "U hebt geen rechten om gebruikerspagina's te hernoemen (met uitzondering van subpagina's).",
- "cant-move-to-user-page": "U hebt geen rechten om een pagina naar een gebruikerspagina te hernoemen. Hernoemen naar een subpagina is wel mogelijk.",
+ "cant-move-user-page": "U hebt geen rechten om gebruikerspagina's te hernoemen (met uitzondering van deelpagina's).",
+ "cant-move-to-user-page": "U hebt geen rechten om een pagina naar een gebruikerspagina te hernoemen. Hernoemen naar een deelpagina is wel mogelijk.",
"cant-move-category-page": "U hebt geen rechten om categoriepagina's te hernoemen.",
"cant-move-to-category-page": "U hebt geen rechten om een pagina naar een categoriepagina te hernoemen.",
"cant-move-subpages": "U hebt geen rechten om deelpagina's te hernoemen.",
"undelete-cantedit": "U kunt deze pagina niet terug plaatsen omdat u niet het recht hebt om deze pagina te bewerken.",
"undelete-cantcreate": "U kunt deze pagina niet terugplaatsen omdat er geen bestaande pagina met deze naam is en u geen toestemming hebt om deze pagina aan te maken.",
"pagedata-title": "Pagina data",
- "pagedata-text": "Deze pagina biedt een data-interface voor pagina's. Geef een paginatitel op door deze in de URL op te nemen, op de manier van een subpagina.\n* De inhoud wordt afgestemd op de door de client meegestuurde Accept Header. Dit betekent dat de gegevens voor de pagina worden aangeboden in het voorkeursformaat van uw client.",
+ "pagedata-text": "Deze pagina biedt een data-interface voor pagina's. Geef een paginatitel op door deze in de URL op te nemen, op de manier van een deelpagina.\n* De inhoud wordt afgestemd op de door de client meegestuurde Accept Header. Dit betekent dat de gegevens voor de pagina worden aangeboden in het voorkeursformaat van uw client.",
"pagedata-not-acceptable": "Er is geen overeenkomende indeling gevonden. Ondersteunde MIME-typen: $1",
"pagedata-bad-title": "Ongeldige titel: $1."
}
"cant-move-subpages": "Não tem permissão para mover subpáginas.",
"namespace-nosubpages": "O espaço nominal \"$1\" não permite subpáginas.",
"newtitle": "Novo título:",
- "move-watch": "Vigiar esta página",
+ "move-watch": "Vigiar a página original e a nova",
"movepagebtn": "Mover página",
- "pagemovedsub": "Página movida com sucesso",
+ "pagemovedsub": "Página movida",
"movepage-moved": "<strong>\"$1\" foi movida para \"$2\"</strong>",
"movepage-moved-redirect": "Foi criado um redirecionamento.",
"movepage-moved-noredirect": "A criação de um redirecionamento foi suprimida.",
- "articleexists": "Uma página com este nome já existe, ou o nome que escolheu é inválido.\nEscolha outro nome, por favor.",
+ "articleexists": "Ou já existe uma página com este nome ou o nome que escolheu é inválido.\nEscolha outro nome, por favor.",
"cantmove-titleprotected": "Não pode mover uma página para esse destino, porque o novo título foi protegido para evitar a sua criação",
"movetalk": "Mover também a página de discussão associada",
"move-subpages": "Mover subpáginas (até $1)",
"Turbojet",
"Stephanecbisson",
"Matrafox",
- "Cybernenea11"
+ "Cybernenea11",
+ "Andreyyshore"
]
},
"tog-underline": "Sublinierea legăturilor:",
"timezoneregion-indian": "Oceanul Indian",
"timezoneregion-pacific": "Oceanul Pacific",
"allowemail": "Acceptă e-mail de la alți utilizatori",
+ "email-allow-new-users-label": "Acceptă e-mail de la utilizatorii noi",
+ "email-blacklist-label": "Respinge e-mail de la acești utilizatori:",
"prefs-searchoptions": "Căutare",
"prefs-namespaces": "Spații de nume",
"default": "standard",
"tag-list-wrapper": "([[Special:Tags|{{PLURAL:$1|1=Метка|Метки}}]]: $2)",
"tag-mw-contentmodelchange": "изменение модели содержимого",
"tag-mw-contentmodelchange-description": "Правки, которые [https://www.mediawiki.org/wiki/Special:MyLanguage/Help:ChangeContentModel изменяют модель содержимого] страницы",
- "tag-mw-new-redirect": "Ð\9dовое перенаправление",
+ "tag-mw-new-redirect": "новое перенаправление",
"tag-mw-new-redirect-description": "Правки, которые создают новое перенаправление или изменяют страницу на перенаправление",
"tag-mw-removed-redirect": "удалённое перенаправление",
"tag-mw-removed-redirect-description": "Правки, которые изменяют существующее перенаправление на не-перенаправление",
"right-bigdelete": "ڊگھيون سوانح رکندڙ صفحا ڊاهيو",
"right-browsearchive": "ڊاٺل صفحا ڳوليو",
"right-undelete": "ڪو صفحو اڻڊاهيو",
+ "right-suppressionlog": "خانگي لاگ ڏسو",
"right-unblockself": "ڪنهن تان بندش ختم ڪريو",
"right-editinterface": "واپرائيندڙ باهمرُو کي سنواريو",
"right-viewmywatchlist": "پنهنجي نظر ۾ فھرست ڏسو",
"rcfilters-other-review-tools": "نظرثانيءَ جا ٻيا اوزار",
"rcfilters-activefilters": "سرگرم ڇاڻيون",
"rcfilters-advancedfilters": "متقدم ڇاڻيون",
- "rcfilters-limit-and-date-label": "{{PLURAL:$1|تبديلي|$1 تبديليون}}، $2",
+ "rcfilters-limit-and-date-label": "$1 {{PLURAL:$1|تبديلي|$1 تبديليون}}، $2",
"rcfilters-days-title": "ھاڻوڪا ڏينھن",
"rcfilters-days-show-days": "$1 {{PLURAL:$1|ڏينھُن|ڏينھَن}}",
"rcfilters-highlighted-filters-list": "نمايان-ٿيل:$1",
"exif-objectname": "مختصر عنوان",
"exif-headline": "سرخي",
"exif-source": "ذريعو",
+ "exif-contact": "رابطي جي معلومات",
"exif-writer": "لکندڙ",
"exif-languagecode": "ٻولي",
"exif-disclaimer": "غيرجوابدارينامو",
$this->fatalError( $err, intval( $die ) );
}
$this->outputChanneled( false );
- if ( PHP_SAPI == 'cli' ) {
+ if ( PHP_SAPI == 'cli' || PHP_SAPI == 'phpdbg' ) {
fwrite( STDERR, $err . "\n" );
} else {
print $err;
global $IP, $wgCommandLineMode, $wgRequestTime;
# Abort if called from a web server
- if ( PHP_SAPI !== 'cli' ) {
+ # wfIsCLI() is not available yet
+ if ( PHP_SAPI !== 'cli' && PHP_SAPI !== 'phpdbg' ) {
$this->fatalError( 'This script must be run from the command line' );
}
+++ /dev/null
-<?php
-/**
- * Helper class for the --prefetch option of dumpTextPass.php
- *
- * Copyright © 2005 Brion Vibber <brion@pobox.com>
- * https://www.mediawiki.org/
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- * @file
- * @ingroup Maintenance
- */
-
-/**
- * Readahead helper for making large MediaWiki data dumps;
- * reads in a previous XML dump to sequentially prefetch text
- * records already normalized and decompressed.
- *
- * This can save load on the external database servers, hopefully.
- *
- * Assumes that dumps will be recorded in the canonical order:
- * - ascending by page_id
- * - ascending by rev_id within each page
- * - text contents are immutable and should not change once
- * recorded, so the previous dump is a reliable source
- *
- * @ingroup Maintenance
- */
-class BaseDump {
- /** @var XMLReader */
- protected $reader = null;
- protected $atEnd = false;
- protected $atPageEnd = false;
- protected $lastPage = 0;
- protected $lastRev = 0;
- protected $infiles = null;
-
- public function __construct( $infile ) {
- $this->infiles = explode( ';', $infile );
- $this->reader = new XMLReader();
- $infile = array_shift( $this->infiles );
- if ( defined( 'LIBXML_PARSEHUGE' ) ) {
- $this->reader->open( $infile, null, LIBXML_PARSEHUGE );
- } else {
- $this->reader->open( $infile );
- }
- }
-
- /**
- * Attempts to fetch the text of a particular page revision
- * from the dump stream. May return null if the page is
- * unavailable.
- *
- * @param int $page ID number of page to read
- * @param int $rev ID number of revision to read
- * @return string|null
- */
- function prefetch( $page, $rev ) {
- $page = intval( $page );
- $rev = intval( $rev );
- while ( $this->lastPage < $page && !$this->atEnd ) {
- $this->debug( "BaseDump::prefetch at page $this->lastPage, looking for $page" );
- $this->nextPage();
- }
- if ( $this->lastPage > $page || $this->atEnd ) {
- $this->debug( "BaseDump::prefetch already past page $page "
- . "looking for rev $rev [$this->lastPage, $this->lastRev]" );
-
- return null;
- }
- while ( $this->lastRev < $rev && !$this->atEnd && !$this->atPageEnd ) {
- $this->debug( "BaseDump::prefetch at page $this->lastPage, rev $this->lastRev, "
- . "looking for $page, $rev" );
- $this->nextRev();
- }
- if ( $this->lastRev == $rev && !$this->atEnd ) {
- $this->debug( "BaseDump::prefetch hit on $page, $rev [$this->lastPage, $this->lastRev]" );
-
- return $this->nextText();
- } else {
- $this->debug( "BaseDump::prefetch already past rev $rev on page $page "
- . "[$this->lastPage, $this->lastRev]" );
-
- return null;
- }
- }
-
- function debug( $str ) {
- wfDebug( $str . "\n" );
- // global $dumper;
- // $dumper->progress( $str );
- }
-
- /**
- * @access private
- */
- function nextPage() {
- if ( $this->skipTo( 'page', 'mediawiki' ) ) {
- if ( $this->skipTo( 'id' ) ) {
- $this->lastPage = intval( $this->nodeContents() );
- $this->lastRev = 0;
- $this->atPageEnd = false;
- }
- } else {
- $this->close();
- if ( count( $this->infiles ) ) {
- $infile = array_shift( $this->infiles );
- $this->reader->open( $infile );
- $this->atEnd = false;
- }
- }
- }
-
- /**
- * @access private
- */
- function nextRev() {
- if ( $this->skipTo( 'revision' ) ) {
- if ( $this->skipTo( 'id' ) ) {
- $this->lastRev = intval( $this->nodeContents() );
- }
- } else {
- $this->atPageEnd = true;
- }
- }
-
- /**
- * @access private
- * @return string
- */
- function nextText() {
- $this->skipTo( 'text' );
-
- return strval( $this->nodeContents() );
- }
-
- /**
- * @access private
- * @param string $name
- * @param string $parent
- * @return bool|null
- */
- function skipTo( $name, $parent = 'page' ) {
- if ( $this->atEnd ) {
- return false;
- }
- while ( $this->reader->read() ) {
- if ( $this->reader->nodeType == XMLReader::ELEMENT
- && $this->reader->name == $name
- ) {
- return true;
- }
- if ( $this->reader->nodeType == XMLReader::END_ELEMENT
- && $this->reader->name == $parent
- ) {
- $this->debug( "BaseDump::skipTo found </$parent> searching for <$name>" );
-
- return false;
- }
- }
-
- return $this->close();
- }
-
- /**
- * Shouldn't something like this be built-in to XMLReader?
- * Fetches text contents of the current element, assuming
- * no sub-elements or such scary things.
- *
- * @return string
- * @access private
- */
- function nodeContents() {
- if ( $this->atEnd ) {
- return null;
- }
- if ( $this->reader->isEmptyElement ) {
- return "";
- }
- $buffer = "";
- while ( $this->reader->read() ) {
- switch ( $this->reader->nodeType ) {
- case XMLReader::TEXT:
- // case XMLReader::WHITESPACE:
- case XMLReader::SIGNIFICANT_WHITESPACE:
- $buffer .= $this->reader->value;
- break;
- case XMLReader::END_ELEMENT:
- return $buffer;
- }
- }
-
- return $this->close();
- }
-
- /**
- * @access private
- * @return null
- */
- function close() {
- $this->reader->close();
- $this->atEnd = true;
-
- return null;
- }
-}
}
function processOptions() {
- global $IP;
-
parent::processOptions();
if ( $this->hasOption( 'buffersize' ) ) {
}
if ( $this->hasOption( 'prefetch' ) ) {
- require_once "$IP/maintenance/backupPrefetch.inc";
$url = $this->processFileOpt( $this->getOption( 'prefetch' ) );
$this->prefetch = new BaseDump( $url );
}
<?php
-if ( PHP_SAPI != 'cli' ) {
+if ( PHP_SAPI != 'cli' && PHP_SAPI != 'phpdbg' ) {
die( "This script can only be run from the command line.\n" );
}
--- /dev/null
+<?php
+/**
+ * Migrate archive.ar_text and ar_flags to modern storage
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Maintenance
+ */
+
+require_once __DIR__ . '/Maintenance.php';
+
+/**
+ * Maintenance script that migrates archive.ar_text and ar_flags to modern storage
+ *
+ * @ingroup Maintenance
+ * @since 1.31
+ */
+class MigrateArchiveText extends LoggedUpdateMaintenance {
+ public function __construct() {
+ parent::__construct();
+ $this->addDescription(
+ 'Migrates comments from pre-1.5 ar_text and ar_flags columns to modern storage'
+ );
+ $this->addOption(
+ 'replace-missing',
+ "For rows with missing or unloadable data, throw away whatever is there and\n"
+ . "mark them as \"error\" in the database."
+ );
+ }
+
+ /**
+ * Sets whether a run of this maintenance script has the force parameter set
+ * @param bool $forced
+ */
+ public function setForce( $forced = true ) {
+ $this->mOptions['force'] = $forced;
+ }
+
+ protected function getUpdateKey() {
+ return __CLASS__;
+ }
+
+ protected function doDBUpdates() {
+ global $wgDefaultExternalStore;
+
+ $replaceMissing = $this->hasOption( 'replace-missing' );
+ $batchSize = $this->getBatchSize();
+
+ $dbr = $this->getDB( DB_REPLICA, [ 'vslow' ] );
+ $dbw = $this->getDB( DB_MASTER );
+ if ( !$dbr->fieldExists( 'archive', 'ar_text', __METHOD__ ) ||
+ !$dbw->fieldExists( 'archive', 'ar_text', __METHOD__ )
+ ) {
+ $this->output( "No ar_text field, so nothing to migrate.\n" );
+ return true;
+ }
+
+ $this->output( "Migrating ar_text to modern storage...\n" );
+ $last = 0;
+ $count = 0;
+ $errors = 0;
+ while ( true ) {
+ $res = $dbr->select(
+ 'archive',
+ [ 'ar_id', 'ar_text', 'ar_flags' ],
+ [
+ 'ar_text_id' => null,
+ "ar_id > $last",
+ ],
+ __METHOD__,
+ [ 'LIMIT' => $batchSize, 'ORDER BY' => [ 'ar_id' ] ]
+ );
+ $numRows = $res->numRows();
+
+ foreach ( $res as $row ) {
+ $last = $row->ar_id;
+
+ // Recompress the text (and store in external storage, if
+ // applicable) if it's not already in external storage.
+ if ( !in_array( 'external', explode( ',', $row->ar_flags ), true ) ) {
+ $data = Revision::getRevisionText( $row, 'ar_' );
+ if ( $data !== false ) {
+ $flags = Revision::compressRevisionText( $data );
+
+ if ( $wgDefaultExternalStore ) {
+ $data = ExternalStore::insertToDefault( $data );
+ if ( !$data ) {
+ throw new MWException( "Unable to store text to external storage" );
+ }
+ if ( $flags ) {
+ $flags .= ',';
+ }
+ $flags .= 'external';
+ }
+ } elseif ( $replaceMissing ) {
+ $this->error( "Replacing missing data for row ar_id=$row->ar_id" );
+ $data = 'Missing data in migrateArchiveText.php on ' . date( 'c' );
+ $flags = 'error';
+ } else {
+ $this->error( "No data for row ar_id=$row->ar_id" );
+ $errors++;
+ continue;
+ }
+ } else {
+ $flags = $row->ar_flags;
+ $data = $row->ar_text;
+ }
+
+ $this->beginTransaction( $dbw, __METHOD__ );
+ $dbw->insert(
+ 'text',
+ [ 'old_text' => $data, 'old_flags' => $flags ],
+ __METHOD__
+ );
+ $id = $dbw->insertId();
+ $dbw->update(
+ 'archive',
+ [ 'ar_text_id' => $id, 'ar_text' => '', 'ar_flags' => '' ],
+ [ 'ar_id' => $row->ar_id, 'ar_text_id' => null ],
+ __METHOD__
+ );
+ $count += $dbw->affectedRows();
+ $this->commitTransaction( $dbw, __METHOD__ );
+ }
+
+ if ( $numRows < $batchSize ) {
+ // We must have reached the end
+ break;
+ }
+
+ $this->output( "... $last\n" );
+ // $this->commitTransaction() already waited for slaves, no need to re-wait here.
+ }
+
+ $this->output( "Completed ar_text migration, $count rows updated, $errors missing data.\n" );
+ if ( $errors ) {
+ $this->output( "Run with --replace-missing to overwrite missing data with an error message.\n" );
+ }
+
+ return $errors === 0;
+ }
+}
+
+$maintClass = "MigrateArchiveText";
+require_once RUN_MAINTENANCE_IF_MAIN;
*/
// Warning: Converting this to a Maintenance script may reduce performance.
-if ( PHP_SAPI != 'cli' ) {
+if ( PHP_SAPI != 'cli' && PHP_SAPI != 'phpdbg' ) {
die( "This filter can only be run from the command line.\n" );
}
'mediawiki.action.history.styles' => [
'styles' => 'resources/src/mediawiki.action/mediawiki.action.history.styles.css',
],
- // using this module is deprecated, for diff styles use mediawiki.diff.styles instead
- 'mediawiki.action.history.diff' => [
- 'styles' => [
- 'resources/src/mediawiki/mediawiki.diff.styles.css',
- 'resources/src/mediawiki/mediawiki.diff.styles.print.css' => [
- 'media' => 'print'
- ],
- ],
- 'targets' => [ 'desktop', 'mobile' ],
- ],
'mediawiki.action.view.dblClickEdit' => [
'scripts' => 'resources/src/mediawiki.action/mediawiki.action.view.dblClickEdit.js',
'dependencies' => [
value = mw.widgets.TitleInputWidget.parent.prototype.cleanUpValue.call( this, value );
return $.trimByteLength( this.value, value, this.maxLength, function ( value ) {
- var title = widget.getTitle( value );
+ var title = widget.getMWTitle( value );
return title ? title.getMain() : value;
} ).newVal;
};
* @param {string} [value] Value to get a title for
* @return {mw.Title|null} Title object, or null if value is invalid
*/
- mw.widgets.TitleWidget.prototype.getTitle = function ( value ) {
+ mw.widgets.TitleWidget.prototype.getMWTitle = function ( value ) {
var title = value !== undefined ? value : this.getQueryValue(),
// mw.Title doesn't handle null well
titleObj = mw.Title.newFromText( title, this.namespace !== null ? this.namespace : undefined );
* @return {boolean} The query is valid
*/
mw.widgets.TitleWidget.prototype.isQueryValid = function () {
- return this.validateTitle ? !!this.getTitle() : true;
+ return this.validateTitle ? !!this.getMWTitle() : true;
};
}( jQuery, mediaWiki ) );
[
'maintenance/7zip.inc',
'maintenance/backup.inc',
- 'maintenance/backupPrefetch.inc',
'maintenance/cleanupTable.inc',
'maintenance/CodeCleanerGlobalsPass.inc',
'maintenance/commandLine.inc',
--- /dev/null
+[
+ {
+ "name": "leafo/lessphp",
+ "version": "v0.5.0",
+ "version_normalized": "0.5.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/leafo/lessphp.git",
+ "reference": "0f5a7f5545d2bcf4e9fad9a228c8ad89cc9aa283"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/leafo/lessphp/zipball/0f5a7f5545d2bcf4e9fad9a228c8ad89cc9aa283",
+ "reference": "0f5a7f5545d2bcf4e9fad9a228c8ad89cc9aa283",
+ "shasum": ""
+ },
+ "time": "2014-11-24T18:39:20+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "0.4.x-dev"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "classmap": [
+ "lessc.inc.php"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT",
+ "GPL-3.0"
+ ],
+ "authors": [
+ {
+ "name": "Leaf Corcoran",
+ "email": "leafot@gmail.com",
+ "homepage": "http://leafo.net"
+ }
+ ],
+ "description": "lessphp is a compiler for LESS written in PHP.",
+ "homepage": "http://leafo.net/lessphp/"
+ },
+ {
+ "name": "psr/log",
+ "version": "1.0.0",
+ "version_normalized": "1.0.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/php-fig/log.git",
+ "reference": "fe0936ee26643249e916849d48e3a51d5f5e278b"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/php-fig/log/zipball/fe0936ee26643249e916849d48e3a51d5f5e278b",
+ "reference": "fe0936ee26643249e916849d48e3a51d5f5e278b",
+ "shasum": ""
+ },
+ "time": "2012-12-21T11:40:51+00:00",
+ "type": "library",
+ "installation-source": "dist",
+ "autoload": {
+ "psr-0": {
+ "Psr\\Log\\": ""
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "PHP-FIG",
+ "homepage": "http://www.php-fig.org/"
+ }
+ ],
+ "description": "Common interface for logging libraries",
+ "keywords": [
+ "log",
+ "psr",
+ "psr-3"
+ ]
+ },
+ {
+ "name": "cssjanus/cssjanus",
+ "version": "v1.1.1",
+ "version_normalized": "1.1.1.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/cssjanus/php-cssjanus.git",
+ "reference": "62a9c32e6e140de09082b40a6e99d868ad14d4e0"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/cssjanus/php-cssjanus/zipball/62a9c32e6e140de09082b40a6e99d868ad14d4e0",
+ "reference": "62a9c32e6e140de09082b40a6e99d868ad14d4e0",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.3"
+ },
+ "require-dev": {
+ "jakub-onderka/php-parallel-lint": "0.8.*",
+ "phpunit/phpunit": "3.7.*",
+ "squizlabs/php_codesniffer": "1.*"
+ },
+ "time": "2014-11-14T20:00:50+00:00",
+ "type": "library",
+ "installation-source": "dist",
+ "autoload": {
+ "psr-0": {
+ "": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "Apache-2.0"
+ ],
+ "description": "Convert CSS stylesheets between left-to-right and right-to-left."
+ },
+ {
+ "name": "cdb/cdb",
+ "version": "1.0.0",
+ "version_normalized": "1.0.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/wikimedia/cdb.git",
+ "reference": "918601ea3d31b8c37312e9c0e54446aa8bfb3425"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/wikimedia/cdb/zipball/918601ea3d31b8c37312e9c0e54446aa8bfb3425",
+ "reference": "918601ea3d31b8c37312e9c0e54446aa8bfb3425",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.2"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "*"
+ },
+ "time": "2014-11-12T19:03:26+00:00",
+ "type": "library",
+ "installation-source": "dist",
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "GPLv2"
+ ],
+ "authors": [
+ {
+ "name": "Tim Starling",
+ "email": "tstarling@wikimedia.org"
+ },
+ {
+ "name": "Chad Horohoe",
+ "email": "chad@wikimedia.org"
+ }
+ ],
+ "description": "Constant Database (CDB) wrapper library for PHP. Provides pure-PHP fallback when dba_* functions are absent.",
+ "homepage": "https://www.mediawiki.org/wiki/CDB",
+ "abandoned": "wikimedia/cdb"
+ },
+ {
+ "name": "sebastian/version",
+ "version": "2.0.1",
+ "version_normalized": "2.0.1.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/version.git",
+ "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/99732be0ddb3361e16ad77b68ba41efc8e979019",
+ "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.6"
+ },
+ "time": "2016-10-03T07:35:21+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.0.x-dev"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de",
+ "role": "lead"
+ }
+ ],
+ "description": "Library that helps with managing the version number of Git-hosted PHP projects",
+ "homepage": "https://github.com/sebastianbergmann/version"
+ },
+ {
+ "name": "sebastian/resource-operations",
+ "version": "1.0.0",
+ "version_normalized": "1.0.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/resource-operations.git",
+ "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/ce990bb21759f94aeafd30209e8cfcdfa8bc3f52",
+ "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.6.0"
+ },
+ "time": "2015-07-28T20:34:47+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0.x-dev"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de"
+ }
+ ],
+ "description": "Provides a list of PHP built-in functions that operate on resources",
+ "homepage": "https://www.github.com/sebastianbergmann/resource-operations"
+ },
+ {
+ "name": "sebastian/recursion-context",
+ "version": "3.0.0",
+ "version_normalized": "3.0.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/recursion-context.git",
+ "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8",
+ "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^6.0"
+ },
+ "time": "2017-03-03T06:23:57+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "3.0.x-dev"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Jeff Welch",
+ "email": "whatthejeff@gmail.com"
+ },
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de"
+ },
+ {
+ "name": "Adam Harvey",
+ "email": "aharvey@php.net"
+ }
+ ],
+ "description": "Provides functionality to recursively process PHP variables",
+ "homepage": "http://www.github.com/sebastianbergmann/recursion-context"
+ },
+ {
+ "name": "sebastian/object-reflector",
+ "version": "1.1.1",
+ "version_normalized": "1.1.1.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/object-reflector.git",
+ "reference": "773f97c67f28de00d397be301821b06708fca0be"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/773f97c67f28de00d397be301821b06708fca0be",
+ "reference": "773f97c67f28de00d397be301821b06708fca0be",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^6.0"
+ },
+ "time": "2017-03-29T09:07:27+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.1-dev"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de"
+ }
+ ],
+ "description": "Allows reflection of object attributes, including inherited and non-public ones",
+ "homepage": "https://github.com/sebastianbergmann/object-reflector/"
+ },
+ {
+ "name": "sebastian/object-enumerator",
+ "version": "3.0.3",
+ "version_normalized": "3.0.3.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/object-enumerator.git",
+ "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/7cfd9e65d11ffb5af41198476395774d4c8a84c5",
+ "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.0",
+ "sebastian/object-reflector": "^1.1.1",
+ "sebastian/recursion-context": "^3.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^6.0"
+ },
+ "time": "2017-08-03T12:35:26+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "3.0.x-dev"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de"
+ }
+ ],
+ "description": "Traverses array structures and object graphs to enumerate all referenced objects",
+ "homepage": "https://github.com/sebastianbergmann/object-enumerator/"
+ },
+ {
+ "name": "sebastian/global-state",
+ "version": "2.0.0",
+ "version_normalized": "2.0.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/global-state.git",
+ "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4",
+ "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^6.0"
+ },
+ "suggest": {
+ "ext-uopz": "*"
+ },
+ "time": "2017-04-27T15:39:26+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.0-dev"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de"
+ }
+ ],
+ "description": "Snapshotting of global state",
+ "homepage": "http://www.github.com/sebastianbergmann/global-state",
+ "keywords": [
+ "global state"
+ ]
+ },
+ {
+ "name": "sebastian/exporter",
+ "version": "3.1.0",
+ "version_normalized": "3.1.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/exporter.git",
+ "reference": "234199f4528de6d12aaa58b612e98f7d36adb937"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/234199f4528de6d12aaa58b612e98f7d36adb937",
+ "reference": "234199f4528de6d12aaa58b612e98f7d36adb937",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.0",
+ "sebastian/recursion-context": "^3.0"
+ },
+ "require-dev": {
+ "ext-mbstring": "*",
+ "phpunit/phpunit": "^6.0"
+ },
+ "time": "2017-04-03T13:19:02+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "3.1.x-dev"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Jeff Welch",
+ "email": "whatthejeff@gmail.com"
+ },
+ {
+ "name": "Volker Dusch",
+ "email": "github@wallbash.com"
+ },
+ {
+ "name": "Bernhard Schussek",
+ "email": "bschussek@2bepublished.at"
+ },
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de"
+ },
+ {
+ "name": "Adam Harvey",
+ "email": "aharvey@php.net"
+ }
+ ],
+ "description": "Provides the functionality to export PHP variables for visualization",
+ "homepage": "http://www.github.com/sebastianbergmann/exporter",
+ "keywords": [
+ "export",
+ "exporter"
+ ]
+ },
+ {
+ "name": "sebastian/environment",
+ "version": "3.1.0",
+ "version_normalized": "3.1.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/environment.git",
+ "reference": "cd0871b3975fb7fc44d11314fd1ee20925fce4f5"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/cd0871b3975fb7fc44d11314fd1ee20925fce4f5",
+ "reference": "cd0871b3975fb7fc44d11314fd1ee20925fce4f5",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^6.1"
+ },
+ "time": "2017-07-01T08:51:00+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "3.1.x-dev"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de"
+ }
+ ],
+ "description": "Provides functionality to handle HHVM/PHP environments",
+ "homepage": "http://www.github.com/sebastianbergmann/environment",
+ "keywords": [
+ "Xdebug",
+ "environment",
+ "hhvm"
+ ]
+ },
+ {
+ "name": "sebastian/diff",
+ "version": "2.0.1",
+ "version_normalized": "2.0.1.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/diff.git",
+ "reference": "347c1d8b49c5c3ee30c7040ea6fc446790e6bddd"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/347c1d8b49c5c3ee30c7040ea6fc446790e6bddd",
+ "reference": "347c1d8b49c5c3ee30c7040ea6fc446790e6bddd",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^6.2"
+ },
+ "time": "2017-08-03T08:09:46+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.0-dev"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Kore Nordmann",
+ "email": "mail@kore-nordmann.de"
+ },
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de"
+ }
+ ],
+ "description": "Diff implementation",
+ "homepage": "https://github.com/sebastianbergmann/diff",
+ "keywords": [
+ "diff"
+ ]
+ },
+ {
+ "name": "sebastian/comparator",
+ "version": "2.1.1",
+ "version_normalized": "2.1.1.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/comparator.git",
+ "reference": "b11c729f95109b56a0fe9650c6a63a0fcd8c439f"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/b11c729f95109b56a0fe9650c6a63a0fcd8c439f",
+ "reference": "b11c729f95109b56a0fe9650c6a63a0fcd8c439f",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.0",
+ "sebastian/diff": "^2.0",
+ "sebastian/exporter": "^3.1"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^6.4"
+ },
+ "time": "2017-12-22T14:50:35+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.1.x-dev"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Jeff Welch",
+ "email": "whatthejeff@gmail.com"
+ },
+ {
+ "name": "Volker Dusch",
+ "email": "github@wallbash.com"
+ },
+ {
+ "name": "Bernhard Schussek",
+ "email": "bschussek@2bepublished.at"
+ },
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de"
+ }
+ ],
+ "description": "Provides the functionality to compare PHP values for equality",
+ "homepage": "https://github.com/sebastianbergmann/comparator",
+ "keywords": [
+ "comparator",
+ "compare",
+ "equality"
+ ]
+ },
+ {
+ "name": "doctrine/instantiator",
+ "version": "1.1.0",
+ "version_normalized": "1.1.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/doctrine/instantiator.git",
+ "reference": "185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/doctrine/instantiator/zipball/185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda",
+ "reference": "185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.1"
+ },
+ "require-dev": {
+ "athletic/athletic": "~0.1.8",
+ "ext-pdo": "*",
+ "ext-phar": "*",
+ "phpunit/phpunit": "^6.2.3",
+ "squizlabs/php_codesniffer": "^3.0.2"
+ },
+ "time": "2017-07-22T11:58:36+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.2.x-dev"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Marco Pivetta",
+ "email": "ocramius@gmail.com",
+ "homepage": "http://ocramius.github.com/"
+ }
+ ],
+ "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors",
+ "homepage": "https://github.com/doctrine/instantiator",
+ "keywords": [
+ "constructor",
+ "instantiate"
+ ]
+ },
+ {
+ "name": "phpunit/php-text-template",
+ "version": "1.2.1",
+ "version_normalized": "1.2.1.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/php-text-template.git",
+ "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686",
+ "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.3"
+ },
+ "time": "2015-06-21T13:50:34+00:00",
+ "type": "library",
+ "installation-source": "dist",
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de",
+ "role": "lead"
+ }
+ ],
+ "description": "Simple template engine.",
+ "homepage": "https://github.com/sebastianbergmann/php-text-template/",
+ "keywords": [
+ "template"
+ ]
+ },
+ {
+ "name": "phpunit/phpunit-mock-objects",
+ "version": "5.0.6",
+ "version_normalized": "5.0.6.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git",
+ "reference": "33fd41a76e746b8fa96d00b49a23dadfa8334cdf"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/33fd41a76e746b8fa96d00b49a23dadfa8334cdf",
+ "reference": "33fd41a76e746b8fa96d00b49a23dadfa8334cdf",
+ "shasum": ""
+ },
+ "require": {
+ "doctrine/instantiator": "^1.0.5",
+ "php": "^7.0",
+ "phpunit/php-text-template": "^1.2.1",
+ "sebastian/exporter": "^3.1"
+ },
+ "conflict": {
+ "phpunit/phpunit": "<6.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^6.5"
+ },
+ "suggest": {
+ "ext-soap": "*"
+ },
+ "time": "2018-01-06T05:45:45+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "5.0.x-dev"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de",
+ "role": "lead"
+ }
+ ],
+ "description": "Mock Object library for PHPUnit",
+ "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/",
+ "keywords": [
+ "mock",
+ "xunit"
+ ]
+ },
+ {
+ "name": "phpunit/php-timer",
+ "version": "1.0.9",
+ "version_normalized": "1.0.9.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/php-timer.git",
+ "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3dcf38ca72b158baf0bc245e9184d3fdffa9c46f",
+ "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^5.3.3 || ^7.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0"
+ },
+ "time": "2017-02-26T11:10:40+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0-dev"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sb@sebastian-bergmann.de",
+ "role": "lead"
+ }
+ ],
+ "description": "Utility class for timing",
+ "homepage": "https://github.com/sebastianbergmann/php-timer/",
+ "keywords": [
+ "timer"
+ ]
+ },
+ {
+ "name": "phpunit/php-file-iterator",
+ "version": "1.4.5",
+ "version_normalized": "1.4.5.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/php-file-iterator.git",
+ "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/730b01bc3e867237eaac355e06a36b85dd93a8b4",
+ "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.3"
+ },
+ "time": "2017-11-27T13:52:08+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.4.x-dev"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sb@sebastian-bergmann.de",
+ "role": "lead"
+ }
+ ],
+ "description": "FilterIterator implementation that filters files based on a list of suffixes.",
+ "homepage": "https://github.com/sebastianbergmann/php-file-iterator/",
+ "keywords": [
+ "filesystem",
+ "iterator"
+ ]
+ },
+ {
+ "name": "theseer/tokenizer",
+ "version": "1.1.0",
+ "version_normalized": "1.1.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/theseer/tokenizer.git",
+ "reference": "cb2f008f3f05af2893a87208fe6a6c4985483f8b"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/theseer/tokenizer/zipball/cb2f008f3f05af2893a87208fe6a6c4985483f8b",
+ "reference": "cb2f008f3f05af2893a87208fe6a6c4985483f8b",
+ "shasum": ""
+ },
+ "require": {
+ "ext-dom": "*",
+ "ext-tokenizer": "*",
+ "ext-xmlwriter": "*",
+ "php": "^7.0"
+ },
+ "time": "2017-04-07T12:08:54+00:00",
+ "type": "library",
+ "installation-source": "dist",
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Arne Blankerts",
+ "email": "arne@blankerts.de",
+ "role": "Developer"
+ }
+ ],
+ "description": "A small library for converting tokenized PHP source code into XML and potentially other formats"
+ },
+ {
+ "name": "sebastian/code-unit-reverse-lookup",
+ "version": "1.0.1",
+ "version_normalized": "1.0.1.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git",
+ "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/4419fcdb5eabb9caa61a27c7a1db532a6b55dd18",
+ "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^5.6 || ^7.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^5.7 || ^6.0"
+ },
+ "time": "2017-03-04T06:30:41+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0.x-dev"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de"
+ }
+ ],
+ "description": "Looks up which function or method a line of code belongs to",
+ "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/"
+ },
+ {
+ "name": "phpunit/php-token-stream",
+ "version": "2.0.2",
+ "version_normalized": "2.0.2.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/php-token-stream.git",
+ "reference": "791198a2c6254db10131eecfe8c06670700904db"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/791198a2c6254db10131eecfe8c06670700904db",
+ "reference": "791198a2c6254db10131eecfe8c06670700904db",
+ "shasum": ""
+ },
+ "require": {
+ "ext-tokenizer": "*",
+ "php": "^7.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^6.2.4"
+ },
+ "time": "2017-11-27T05:48:46+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.0-dev"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de"
+ }
+ ],
+ "description": "Wrapper around PHP's tokenizer extension.",
+ "homepage": "https://github.com/sebastianbergmann/php-token-stream/",
+ "keywords": [
+ "tokenizer"
+ ]
+ },
+ {
+ "name": "phpunit/php-code-coverage",
+ "version": "5.3.0",
+ "version_normalized": "5.3.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/php-code-coverage.git",
+ "reference": "661f34d0bd3f1a7225ef491a70a020ad23a057a1"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/661f34d0bd3f1a7225ef491a70a020ad23a057a1",
+ "reference": "661f34d0bd3f1a7225ef491a70a020ad23a057a1",
+ "shasum": ""
+ },
+ "require": {
+ "ext-dom": "*",
+ "ext-xmlwriter": "*",
+ "php": "^7.0",
+ "phpunit/php-file-iterator": "^1.4.2",
+ "phpunit/php-text-template": "^1.2.1",
+ "phpunit/php-token-stream": "^2.0.1",
+ "sebastian/code-unit-reverse-lookup": "^1.0.1",
+ "sebastian/environment": "^3.0",
+ "sebastian/version": "^2.0.1",
+ "theseer/tokenizer": "^1.1"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^6.0"
+ },
+ "suggest": {
+ "ext-xdebug": "^2.5.5"
+ },
+ "time": "2017-12-06T09:29:45+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "5.3.x-dev"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de",
+ "role": "lead"
+ }
+ ],
+ "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.",
+ "homepage": "https://github.com/sebastianbergmann/php-code-coverage",
+ "keywords": [
+ "coverage",
+ "testing",
+ "xunit"
+ ]
+ },
+ {
+ "name": "webmozart/assert",
+ "version": "1.2.0",
+ "version_normalized": "1.2.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/webmozart/assert.git",
+ "reference": "2db61e59ff05fe5126d152bd0655c9ea113e550f"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/webmozart/assert/zipball/2db61e59ff05fe5126d152bd0655c9ea113e550f",
+ "reference": "2db61e59ff05fe5126d152bd0655c9ea113e550f",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^5.3.3 || ^7.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^4.6",
+ "sebastian/version": "^1.0.1"
+ },
+ "time": "2016-11-23T20:04:58+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.3-dev"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "Webmozart\\Assert\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Bernhard Schussek",
+ "email": "bschussek@gmail.com"
+ }
+ ],
+ "description": "Assertions to validate method input/output with nice error messages.",
+ "keywords": [
+ "assert",
+ "check",
+ "validate"
+ ]
+ },
+ {
+ "name": "phpdocumentor/reflection-common",
+ "version": "1.0.1",
+ "version_normalized": "1.0.1.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/phpDocumentor/ReflectionCommon.git",
+ "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6",
+ "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.5"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^4.6"
+ },
+ "time": "2017-09-11T18:02:19+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0.x-dev"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "phpDocumentor\\Reflection\\": [
+ "src"
+ ]
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Jaap van Otterdijk",
+ "email": "opensource@ijaap.nl"
+ }
+ ],
+ "description": "Common reflection classes used by phpdocumentor to reflect the code structure",
+ "homepage": "http://www.phpdoc.org",
+ "keywords": [
+ "FQSEN",
+ "phpDocumentor",
+ "phpdoc",
+ "reflection",
+ "static analysis"
+ ]
+ },
+ {
+ "name": "phpdocumentor/type-resolver",
+ "version": "0.4.0",
+ "version_normalized": "0.4.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/phpDocumentor/TypeResolver.git",
+ "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/9c977708995954784726e25d0cd1dddf4e65b0f7",
+ "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^5.5 || ^7.0",
+ "phpdocumentor/reflection-common": "^1.0"
+ },
+ "require-dev": {
+ "mockery/mockery": "^0.9.4",
+ "phpunit/phpunit": "^5.2||^4.8.24"
+ },
+ "time": "2017-07-14T14:27:02+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0.x-dev"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "phpDocumentor\\Reflection\\": [
+ "src/"
+ ]
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Mike van Riel",
+ "email": "me@mikevanriel.com"
+ }
+ ]
+ },
+ {
+ "name": "phpdocumentor/reflection-docblock",
+ "version": "4.2.0",
+ "version_normalized": "4.2.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git",
+ "reference": "66465776cfc249844bde6d117abff1d22e06c2da"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/66465776cfc249844bde6d117abff1d22e06c2da",
+ "reference": "66465776cfc249844bde6d117abff1d22e06c2da",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.0",
+ "phpdocumentor/reflection-common": "^1.0.0",
+ "phpdocumentor/type-resolver": "^0.4.0",
+ "webmozart/assert": "^1.0"
+ },
+ "require-dev": {
+ "doctrine/instantiator": "~1.0.5",
+ "mockery/mockery": "^1.0",
+ "phpunit/phpunit": "^6.4"
+ },
+ "time": "2017-11-27T17:38:31+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "4.x-dev"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "phpDocumentor\\Reflection\\": [
+ "src/"
+ ]
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Mike van Riel",
+ "email": "me@mikevanriel.com"
+ }
+ ],
+ "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock."
+ },
+ {
+ "name": "phpspec/prophecy",
+ "version": "1.7.3",
+ "version_normalized": "1.7.3.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/phpspec/prophecy.git",
+ "reference": "e4ed002c67da8eceb0eb8ddb8b3847bb53c5c2bf"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/phpspec/prophecy/zipball/e4ed002c67da8eceb0eb8ddb8b3847bb53c5c2bf",
+ "reference": "e4ed002c67da8eceb0eb8ddb8b3847bb53c5c2bf",
+ "shasum": ""
+ },
+ "require": {
+ "doctrine/instantiator": "^1.0.2",
+ "php": "^5.3|^7.0",
+ "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0",
+ "sebastian/comparator": "^1.1|^2.0",
+ "sebastian/recursion-context": "^1.0|^2.0|^3.0"
+ },
+ "require-dev": {
+ "phpspec/phpspec": "^2.5|^3.2",
+ "phpunit/phpunit": "^4.8.35 || ^5.7"
+ },
+ "time": "2017-11-24T13:59:53+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.7.x-dev"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "psr-0": {
+ "Prophecy\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Konstantin Kudryashov",
+ "email": "ever.zet@gmail.com",
+ "homepage": "http://everzet.com"
+ },
+ {
+ "name": "Marcello Duarte",
+ "email": "marcello.duarte@gmail.com"
+ }
+ ],
+ "description": "Highly opinionated mocking framework for PHP 5.3+",
+ "homepage": "https://github.com/phpspec/prophecy",
+ "keywords": [
+ "Double",
+ "Dummy",
+ "fake",
+ "mock",
+ "spy",
+ "stub"
+ ]
+ },
+ {
+ "name": "phar-io/version",
+ "version": "1.0.1",
+ "version_normalized": "1.0.1.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/phar-io/version.git",
+ "reference": "a70c0ced4be299a63d32fa96d9281d03e94041df"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/phar-io/version/zipball/a70c0ced4be299a63d32fa96d9281d03e94041df",
+ "reference": "a70c0ced4be299a63d32fa96d9281d03e94041df",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^5.6 || ^7.0"
+ },
+ "time": "2017-03-05T17:38:23+00:00",
+ "type": "library",
+ "installation-source": "dist",
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Arne Blankerts",
+ "email": "arne@blankerts.de",
+ "role": "Developer"
+ },
+ {
+ "name": "Sebastian Heuer",
+ "email": "sebastian@phpeople.de",
+ "role": "Developer"
+ },
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de",
+ "role": "Developer"
+ }
+ ],
+ "description": "Library for handling version information and constraints"
+ },
+ {
+ "name": "phar-io/manifest",
+ "version": "1.0.1",
+ "version_normalized": "1.0.1.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/phar-io/manifest.git",
+ "reference": "2df402786ab5368a0169091f61a7c1e0eb6852d0"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/phar-io/manifest/zipball/2df402786ab5368a0169091f61a7c1e0eb6852d0",
+ "reference": "2df402786ab5368a0169091f61a7c1e0eb6852d0",
+ "shasum": ""
+ },
+ "require": {
+ "ext-dom": "*",
+ "ext-phar": "*",
+ "phar-io/version": "^1.0.1",
+ "php": "^5.6 || ^7.0"
+ },
+ "time": "2017-03-05T18:14:27+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0.x-dev"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Arne Blankerts",
+ "email": "arne@blankerts.de",
+ "role": "Developer"
+ },
+ {
+ "name": "Sebastian Heuer",
+ "email": "sebastian@phpeople.de",
+ "role": "Developer"
+ },
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de",
+ "role": "Developer"
+ }
+ ],
+ "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)"
+ },
+ {
+ "name": "myclabs/deep-copy",
+ "version": "1.7.0",
+ "version_normalized": "1.7.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/myclabs/DeepCopy.git",
+ "reference": "3b8a3a99ba1f6a3952ac2747d989303cbd6b7a3e"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/3b8a3a99ba1f6a3952ac2747d989303cbd6b7a3e",
+ "reference": "3b8a3a99ba1f6a3952ac2747d989303cbd6b7a3e",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^5.6 || ^7.0"
+ },
+ "require-dev": {
+ "doctrine/collections": "^1.0",
+ "doctrine/common": "^2.6",
+ "phpunit/phpunit": "^4.1"
+ },
+ "time": "2017-10-19T19:58:43+00:00",
+ "type": "library",
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "DeepCopy\\": "src/DeepCopy/"
+ },
+ "files": [
+ "src/DeepCopy/deep_copy.php"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "description": "Create deep copies (clones) of your objects",
+ "keywords": [
+ "clone",
+ "copy",
+ "duplicate",
+ "object",
+ "object graph"
+ ]
+ },
+ {
+ "name": "phpunit/phpunit",
+ "version": "6.5.5",
+ "version_normalized": "6.5.5.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/phpunit.git",
+ "reference": "83d27937a310f2984fd575686138597147bdc7df"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/83d27937a310f2984fd575686138597147bdc7df",
+ "reference": "83d27937a310f2984fd575686138597147bdc7df",
+ "shasum": ""
+ },
+ "require": {
+ "ext-dom": "*",
+ "ext-json": "*",
+ "ext-libxml": "*",
+ "ext-mbstring": "*",
+ "ext-xml": "*",
+ "myclabs/deep-copy": "^1.6.1",
+ "phar-io/manifest": "^1.0.1",
+ "phar-io/version": "^1.0",
+ "php": "^7.0",
+ "phpspec/prophecy": "^1.7",
+ "phpunit/php-code-coverage": "^5.3",
+ "phpunit/php-file-iterator": "^1.4.3",
+ "phpunit/php-text-template": "^1.2.1",
+ "phpunit/php-timer": "^1.0.9",
+ "phpunit/phpunit-mock-objects": "^5.0.5",
+ "sebastian/comparator": "^2.1",
+ "sebastian/diff": "^2.0",
+ "sebastian/environment": "^3.1",
+ "sebastian/exporter": "^3.1",
+ "sebastian/global-state": "^2.0",
+ "sebastian/object-enumerator": "^3.0.3",
+ "sebastian/resource-operations": "^1.0",
+ "sebastian/version": "^2.0.1"
+ },
+ "conflict": {
+ "phpdocumentor/reflection-docblock": "3.0.2",
+ "phpunit/dbunit": "<3.0"
+ },
+ "require-dev": {
+ "ext-pdo": "*"
+ },
+ "suggest": {
+ "ext-xdebug": "*",
+ "phpunit/php-invoker": "^1.1"
+ },
+ "time": "2017-12-17T06:31:19+00:00",
+ "bin": [
+ "phpunit"
+ ],
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "6.5.x-dev"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de",
+ "role": "lead"
+ }
+ ],
+ "description": "The PHP Unit Testing framework.",
+ "homepage": "https://phpunit.de/",
+ "keywords": [
+ "phpunit",
+ "testing",
+ "xunit"
+ ]
+ }
+]
// data: URIs for red.gif, green.gif, circle.svg
$red = 'data:image/gif;base64,R0lGODlhAQABAIAAAP8AADAAACwAAAAAAQABAAACAkQBADs=';
$green = 'data:image/gif;base64,R0lGODlhAQABAIAAAACAADAAACwAAAAAAQABAAACAkQBADs=';
- $svg = 'data:image/svg+xml,%3C%3Fxml version=%221.0%22 encoding=%22UTF-8%22%3F%3E%0A'
+ $svg = 'data:image/svg+xml,%3C%3Fxml version=%221.0%22 encoding=%22UTF-8%22%3F%3E '
. '%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%228%22 height='
- . '%228%22%3E%0A%09%3Ccircle cx=%224%22 cy=%224%22 r=%222%22/%3E%0A%3C/svg%3E%0A';
+ . '%228%22%3E %3Ccircle cx=%224%22 cy=%224%22 r=%222%22/%3E %3C/svg%3E';
// phpcs:disable Generic.Files.LineLength
return [
--- /dev/null
+<?php
+
+class ComposerInstalledTest extends MediaWikiTestCase {
+
+ private $installed;
+
+ public function setUp() {
+ parent::setUp();
+ global $IP;
+ $this->installed = "$IP/tests/phpunit/data/composer/installed.json";
+ }
+
+ /**
+ * @covers ComposerInstalled::__construct
+ * @covers ComposerInstalled::getInstalledDependencies
+ */
+ public function testGetInstalledDependencies() {
+ $installed = new ComposerInstalled( $this->installed );
+ $this->assertArrayEquals( [
+ 'leafo/lessphp' => [
+ 'version' => '0.5.0',
+ 'type' => 'library',
+ 'licenses' => [ 'MIT', 'GPL-3.0' ],
+ 'authors' => [
+ [
+ 'name' => 'Leaf Corcoran',
+ 'email' => 'leafot@gmail.com',
+ 'homepage' => 'http://leafo.net',
+ ],
+ ],
+ 'description' => 'lessphp is a compiler for LESS written in PHP.',
+ ],
+ 'psr/log' => [
+ 'version' => '1.0.0',
+ 'type' => 'library',
+ 'licenses' => [ 'MIT' ],
+ 'authors' => [
+ [
+ 'name' => 'PHP-FIG',
+ 'homepage' => 'http://www.php-fig.org/',
+ ],
+ ],
+ 'description' => 'Common interface for logging libraries',
+ ],
+ 'cssjanus/cssjanus' => [
+ 'version' => '1.1.1',
+ 'type' => 'library',
+ 'licenses' => [ 'Apache-2.0' ],
+ 'authors' => [
+ ],
+ 'description' => 'Convert CSS stylesheets between left-to-right ' .
+ 'and right-to-left.',
+ ],
+ 'cdb/cdb' => [
+ 'version' => '1.0.0',
+ 'type' => 'library',
+ 'licenses' => [ 'GPLv2' ],
+ 'authors' => [
+ [
+ 'name' => 'Tim Starling',
+ 'email' => 'tstarling@wikimedia.org',
+ ],
+ [
+ 'name' => 'Chad Horohoe',
+ 'email' => 'chad@wikimedia.org',
+ ],
+ ],
+ 'description' => 'Constant Database (CDB) wrapper library for PHP. ' .
+ 'Provides pure-PHP fallback when dba_* functions are absent.',
+ ],
+ 'sebastian/version' => [
+ 'version' => '2.0.1',
+ 'type' => 'library',
+ 'licenses' => [ 'BSD-3-Clause' ],
+ 'authors' => [
+ [
+ 'name' => 'Sebastian Bergmann',
+ 'email' => 'sebastian@phpunit.de',
+ 'role' => 'lead',
+ ],
+ ],
+ 'description' => 'Library that helps with managing the version ' .
+ 'number of Git-hosted PHP projects',
+ ],
+ 'sebastian/resource-operations' => [
+ 'version' => '1.0.0',
+ 'type' => 'library',
+ 'licenses' => [ 'BSD-3-Clause' ],
+ 'authors' => [
+ [
+ 'name' => 'Sebastian Bergmann',
+ 'email' => 'sebastian@phpunit.de',
+ ],
+ ],
+ 'description' => 'Provides a list of PHP built-in functions that ' .
+ 'operate on resources',
+ ],
+ 'sebastian/recursion-context' => [
+ 'version' => '3.0.0',
+ 'type' => 'library',
+ 'licenses' => [ 'BSD-3-Clause' ],
+ 'authors' => [
+ [
+ 'name' => 'Jeff Welch',
+ 'email' => 'whatthejeff@gmail.com',
+ ],
+ [
+ 'name' => 'Sebastian Bergmann',
+ 'email' => 'sebastian@phpunit.de',
+ ],
+ [
+ 'name' => 'Adam Harvey',
+ 'email' => 'aharvey@php.net',
+ ],
+ ],
+ 'description' => 'Provides functionality to recursively process PHP ' .
+ 'variables',
+ ],
+ 'sebastian/object-reflector' => [
+ 'version' => '1.1.1',
+ 'type' => 'library',
+ 'licenses' => [ 'BSD-3-Clause' ],
+ 'authors' => [
+ [
+ 'name' => 'Sebastian Bergmann',
+ 'email' => 'sebastian@phpunit.de',
+ ],
+ ],
+ 'description' => 'Allows reflection of object attributes, including ' .
+ 'inherited and non-public ones',
+ ],
+ 'sebastian/object-enumerator' => [
+ 'version' => '3.0.3',
+ 'type' => 'library',
+ 'licenses' => [ 'BSD-3-Clause' ],
+ 'authors' => [
+ [
+ 'name' => 'Sebastian Bergmann',
+ 'email' => 'sebastian@phpunit.de',
+ ],
+ ],
+ 'description' => 'Traverses array structures and object graphs ' .
+ 'to enumerate all referenced objects',
+ ],
+ 'sebastian/global-state' => [
+ 'version' => '2.0.0',
+ 'type' => 'library',
+ 'licenses' => [ 'BSD-3-Clause' ],
+ 'authors' => [
+ [
+ 'name' => 'Sebastian Bergmann',
+ 'email' => 'sebastian@phpunit.de',
+ ],
+ ],
+ 'description' => 'Snapshotting of global state',
+ ],
+ 'sebastian/exporter' => [
+ 'version' => '3.1.0',
+ 'type' => 'library',
+ 'licenses' => [ 'BSD-3-Clause' ],
+ 'authors' => [
+ [
+ 'name' => 'Jeff Welch',
+ 'email' => 'whatthejeff@gmail.com',
+ ],
+ [
+ 'name' => 'Volker Dusch',
+ 'email' => 'github@wallbash.com',
+ ],
+ [
+ 'name' => 'Bernhard Schussek',
+ 'email' => 'bschussek@2bepublished.at',
+ ],
+ [
+ 'name' => 'Sebastian Bergmann',
+ 'email' => 'sebastian@phpunit.de',
+ ],
+ [
+ 'name' => 'Adam Harvey',
+ 'email' => 'aharvey@php.net',
+ ],
+ ],
+ 'description' => 'Provides the functionality to export PHP ' .
+ 'variables for visualization',
+ ],
+ 'sebastian/environment' => [
+ 'version' => '3.1.0',
+ 'type' => 'library',
+ 'licenses' => [ 'BSD-3-Clause' ],
+ 'authors' => [
+ [
+ 'name' => 'Sebastian Bergmann',
+ 'email' => 'sebastian@phpunit.de',
+ ],
+ ],
+ 'description' => 'Provides functionality to handle HHVM/PHP ' .
+ 'environments',
+ ],
+ 'sebastian/diff' => [
+ 'version' => '2.0.1',
+ 'type' => 'library',
+ 'licenses' => [ 'BSD-3-Clause' ],
+ 'authors' => [
+ [
+ 'name' => 'Kore Nordmann',
+ 'email' => 'mail@kore-nordmann.de',
+ ],
+ [
+ 'name' => 'Sebastian Bergmann',
+ 'email' => 'sebastian@phpunit.de',
+ ],
+ ],
+ 'description' => 'Diff implementation',
+ ],
+ 'sebastian/comparator' => [
+ 'version' => '2.1.1',
+ 'type' => 'library',
+ 'licenses' => [ 'BSD-3-Clause' ],
+ 'authors' => [
+ [
+ 'name' => 'Jeff Welch',
+ 'email' => 'whatthejeff@gmail.com',
+ ],
+ [
+ 'name' => 'Volker Dusch',
+ 'email' => 'github@wallbash.com',
+ ],
+ [
+ 'name' => 'Bernhard Schussek',
+ 'email' => 'bschussek@2bepublished.at',
+ ],
+ [
+ 'name' => 'Sebastian Bergmann',
+ 'email' => 'sebastian@phpunit.de',
+ ],
+ ],
+ 'description' => 'Provides the functionality to compare PHP ' .
+ 'values for equality',
+ ],
+ 'doctrine/instantiator' => [
+ 'version' => '1.1.0',
+ 'type' => 'library',
+ 'licenses' => [ 'MIT' ],
+ 'authors' => [
+ [
+ 'name' => 'Marco Pivetta',
+ 'email' => 'ocramius@gmail.com',
+ 'homepage' => 'http://ocramius.github.com/',
+ ],
+ ],
+ 'description' => 'A small, lightweight utility to instantiate ' .
+ 'objects in PHP without invoking their constructors',
+ ],
+ 'phpunit/php-text-template' => [
+ 'version' => '1.2.1',
+ 'type' => 'library',
+ 'licenses' => [ 'BSD-3-Clause' ],
+ 'authors' => [
+ [
+ 'name' => 'Sebastian Bergmann',
+ 'email' => 'sebastian@phpunit.de',
+ 'role' => 'lead',
+ ],
+ ],
+ 'description' => 'Simple template engine.',
+ ],
+ 'phpunit/phpunit-mock-objects' => [
+ 'version' => '5.0.6',
+ 'type' => 'library',
+ 'licenses' => [ 'BSD-3-Clause' ],
+ 'authors' => [
+ [
+ 'name' => 'Sebastian Bergmann',
+ 'email' => 'sebastian@phpunit.de',
+ 'role' => 'lead',
+ ],
+ ],
+ 'description' => 'Mock Object library for PHPUnit',
+ ],
+ 'phpunit/php-timer' => [
+ 'version' => '1.0.9',
+ 'type' => 'library',
+ 'licenses' => [ 'BSD-3-Clause' ],
+ 'authors' => [
+ [
+ 'name' => 'Sebastian Bergmann',
+ 'email' => 'sb@sebastian-bergmann.de',
+ 'role' => 'lead',
+ ],
+ ],
+ 'description' => 'Utility class for timing',
+ ],
+ 'phpunit/php-file-iterator' => [
+ 'version' => '1.4.5',
+ 'type' => 'library',
+ 'licenses' => [ 'BSD-3-Clause' ],
+ 'authors' => [
+ [
+ 'name' => 'Sebastian Bergmann',
+ 'email' => 'sb@sebastian-bergmann.de',
+ 'role' => 'lead',
+ ],
+ ],
+ 'description' => 'FilterIterator implementation that filters ' .
+ 'files based on a list of suffixes.',
+ ],
+ 'theseer/tokenizer' => [
+ 'version' => '1.1.0',
+ 'type' => 'library',
+ 'licenses' => [ 'BSD-3-Clause' ],
+ 'authors' => [
+ [
+ 'name' => 'Arne Blankerts',
+ 'email' => 'arne@blankerts.de',
+ 'role' => 'Developer',
+ ],
+ ],
+ 'description' => 'A small library for converting tokenized PHP ' .
+ 'source code into XML and potentially other formats',
+ ],
+ 'sebastian/code-unit-reverse-lookup' => [
+ 'version' => '1.0.1',
+ 'type' => 'library',
+ 'licenses' => [ 'BSD-3-Clause' ],
+ 'authors' => [
+ [
+ 'name' => 'Sebastian Bergmann',
+ 'email' => 'sebastian@phpunit.de',
+ ],
+ ],
+ 'description' => 'Looks up which function or method a line of ' .
+ 'code belongs to',
+ ],
+ 'phpunit/php-token-stream' => [
+ 'version' => '2.0.2',
+ 'type' => 'library',
+ 'licenses' => [ 'BSD-3-Clause' ],
+ 'authors' => [
+ [
+ 'name' => 'Sebastian Bergmann',
+ 'email' => 'sebastian@phpunit.de',
+ ],
+ ],
+ 'description' => 'Wrapper around PHP\'s tokenizer extension.',
+ ],
+ 'phpunit/php-code-coverage' => [
+ 'version' => '5.3.0',
+ 'type' => 'library',
+ 'licenses' => [ 'BSD-3-Clause' ],
+ 'authors' => [
+ [
+ 'name' => 'Sebastian Bergmann',
+ 'email' => 'sebastian@phpunit.de',
+ 'role' => 'lead',
+ ],
+ ],
+ 'description' => 'Library that provides collection, processing, ' .
+ 'and rendering functionality for PHP code coverage information.',
+ ],
+ 'webmozart/assert' => [
+ 'version' => '1.2.0',
+ 'type' => 'library',
+ 'licenses' => [ 'MIT' ],
+ 'authors' => [
+ [
+ 'name' => 'Bernhard Schussek',
+ 'email' => 'bschussek@gmail.com',
+ ],
+ ],
+ 'description' => 'Assertions to validate method input/output with ' .
+ 'nice error messages.',
+ ],
+ 'phpdocumentor/reflection-common' => [
+ 'version' => '1.0.1',
+ 'type' => 'library',
+ 'licenses' => [ 'MIT' ],
+ 'authors' => [
+ [
+ 'name' => 'Jaap van Otterdijk',
+ 'email' => 'opensource@ijaap.nl',
+ ],
+ ],
+ 'description' => 'Common reflection classes used by phpdocumentor to ' .
+ 'reflect the code structure',
+ ],
+ 'phpdocumentor/type-resolver' => [
+ 'version' => '0.4.0',
+ 'type' => 'library',
+ 'licenses' => [ 'MIT' ],
+ 'authors' => [
+ [
+ 'name' => 'Mike van Riel',
+ 'email' => 'me@mikevanriel.com',
+ ],
+ ],
+ 'description' => '',
+ ],
+ 'phpdocumentor/reflection-docblock' => [
+ 'version' => '4.2.0',
+ 'type' => 'library',
+ 'licenses' => [ 'MIT' ],
+ 'authors' => [
+ [
+ 'name' => 'Mike van Riel',
+ 'email' => 'me@mikevanriel.com',
+ ],
+ ],
+ 'description' => 'With this component, a library can provide support for ' .
+ 'annotations via DocBlocks or otherwise retrieve information that ' .
+ 'is embedded in a DocBlock.',
+ ],
+ 'phpspec/prophecy' => [
+ 'version' => '1.7.3',
+ 'type' => 'library',
+ 'licenses' => [ 'MIT' ],
+ 'authors' => [
+ [
+ 'name' => 'Konstantin Kudryashov',
+ 'email' => 'ever.zet@gmail.com',
+ 'homepage' => 'http://everzet.com',
+ ],
+ [
+ 'name' => 'Marcello Duarte',
+ 'email' => 'marcello.duarte@gmail.com',
+ ],
+ ],
+ 'description' => 'Highly opinionated mocking framework for PHP 5.3+',
+ ],
+ 'phar-io/version' => [
+ 'version' => '1.0.1',
+ 'type' => 'library',
+ 'licenses' => [ 'BSD-3-Clause' ],
+ 'authors' => [
+ [
+ 'name' => 'Arne Blankerts',
+ 'email' => 'arne@blankerts.de',
+ 'role' => 'Developer',
+ ],
+ [
+ 'name' => 'Sebastian Heuer',
+ 'email' => 'sebastian@phpeople.de',
+ 'role' => 'Developer',
+ ],
+ [
+ 'name' => 'Sebastian Bergmann',
+ 'email' => 'sebastian@phpunit.de',
+ 'role' => 'Developer',
+ ],
+ ],
+ 'description' => 'Library for handling version information and constraints',
+ ],
+ 'phar-io/manifest' => [
+ 'version' => '1.0.1',
+ 'type' => 'library',
+ 'licenses' => [ 'BSD-3-Clause' ],
+ 'authors' => [
+ [
+ 'name' => 'Arne Blankerts',
+ 'email' => 'arne@blankerts.de',
+ 'role' => 'Developer',
+ ],
+ [
+ 'name' => 'Sebastian Heuer',
+ 'email' => 'sebastian@phpeople.de',
+ 'role' => 'Developer',
+ ],
+ [
+ 'name' => 'Sebastian Bergmann',
+ 'email' => 'sebastian@phpunit.de',
+ 'role' => 'Developer',
+ ],
+ ],
+ 'description' => 'Component for reading phar.io manifest ' .
+ 'information from a PHP Archive (PHAR)',
+ ],
+ 'myclabs/deep-copy' => [
+ 'version' => '1.7.0',
+ 'type' => 'library',
+ 'licenses' => [ 'MIT' ],
+ 'authors' => [
+ ],
+ 'description' => 'Create deep copies (clones) of your objects',
+ ],
+ 'phpunit/phpunit' => [
+ 'version' => '6.5.5',
+ 'type' => 'library',
+ 'licenses' => [ 'BSD-3-Clause' ],
+ 'authors' => [
+ [
+ 'name' => 'Sebastian Bergmann',
+ 'email' => 'sebastian@phpunit.de',
+ 'role' => 'lead',
+ ],
+ ],
+ 'description' => 'The PHP Unit Testing framework.',
+ ],
+ ], $installed->getInstalledDependencies(), false, true );
+ }
+}
--- /dev/null
+<?php
+
+/**
+ * @author Addshore
+ *
+ * @covers NoWriteWatchedItemStore
+ */
+class NoWriteWatchedItemStoreUnitTest extends MediaWikiTestCase {
+
+ public function testAddWatch() {
+ /** @var WatchedItemStoreInterface|PHPUnit_Framework_MockObject_MockObject $innerService */
+ $innerService = $this->getMockForAbstractClass( WatchedItemStoreInterface::class );
+ $innerService->expects( $this->never() )->method( 'addWatch' );
+ $noWriteService = new NoWriteWatchedItemStore( $innerService );
+
+ $this->setExpectedException( DBReadOnlyError::class );
+ $noWriteService->addWatch( $this->getTestSysop()->getUser(), new TitleValue( 0, 'Foo' ) );
+ }
+
+ public function testAddWatchBatchForUser() {
+ /** @var WatchedItemStoreInterface|PHPUnit_Framework_MockObject_MockObject $innerService */
+ $innerService = $this->getMockForAbstractClass( WatchedItemStoreInterface::class );
+ $innerService->expects( $this->never() )->method( 'addWatchBatchForUser' );
+ $noWriteService = new NoWriteWatchedItemStore( $innerService );
+
+ $this->setExpectedException( DBReadOnlyError::class );
+ $noWriteService->addWatchBatchForUser( $this->getTestSysop()->getUser(), [] );
+ }
+
+ public function testRemoveWatch() {
+ /** @var WatchedItemStoreInterface|PHPUnit_Framework_MockObject_MockObject $innerService */
+ $innerService = $this->getMockForAbstractClass( WatchedItemStoreInterface::class );
+ $innerService->expects( $this->never() )->method( 'removeWatch' );
+ $noWriteService = new NoWriteWatchedItemStore( $innerService );
+
+ $this->setExpectedException( DBReadOnlyError::class );
+ $noWriteService->removeWatch( $this->getTestSysop()->getUser(), new TitleValue( 0, 'Foo' ) );
+ }
+
+ public function testSetNotificationTimestampsForUser() {
+ /** @var WatchedItemStoreInterface|PHPUnit_Framework_MockObject_MockObject $innerService */
+ $innerService = $this->getMockForAbstractClass( WatchedItemStoreInterface::class );
+ $innerService->expects( $this->never() )->method( 'setNotificationTimestampsForUser' );
+ $noWriteService = new NoWriteWatchedItemStore( $innerService );
+
+ $this->setExpectedException( DBReadOnlyError::class );
+ $noWriteService->setNotificationTimestampsForUser(
+ $this->getTestSysop()->getUser(),
+ 'timestamp',
+ []
+ );
+ }
+
+ public function testUpdateNotificationTimestamp() {
+ /** @var WatchedItemStoreInterface|PHPUnit_Framework_MockObject_MockObject $innerService */
+ $innerService = $this->getMockForAbstractClass( WatchedItemStoreInterface::class );
+ $innerService->expects( $this->never() )->method( 'updateNotificationTimestamp' );
+ $noWriteService = new NoWriteWatchedItemStore( $innerService );
+
+ $this->setExpectedException( DBReadOnlyError::class );
+ $noWriteService->updateNotificationTimestamp(
+ $this->getTestSysop()->getUser(),
+ new TitleValue( 0, 'Foo' ),
+ 'timestamp'
+ );
+ }
+
+ public function testResetNotificationTimestamp() {
+ /** @var WatchedItemStoreInterface|PHPUnit_Framework_MockObject_MockObject $innerService */
+ $innerService = $this->getMockForAbstractClass( WatchedItemStoreInterface::class );
+ $innerService->expects( $this->never() )->method( 'resetNotificationTimestamp' );
+ $noWriteService = new NoWriteWatchedItemStore( $innerService );
+
+ $this->setExpectedException( DBReadOnlyError::class );
+ $noWriteService->resetNotificationTimestamp(
+ $this->getTestSysop()->getUser(),
+ Title::newFromText( 'Foo' )
+ );
+ }
+
+ public function testCountWatchedItems() {
+ /** @var WatchedItemStoreInterface|PHPUnit_Framework_MockObject_MockObject $innerService */
+ $innerService = $this->getMockForAbstractClass( WatchedItemStoreInterface::class );
+ $innerService->expects( $this->once() )->method( 'countWatchedItems' )->willReturn( __METHOD__ );
+ $noWriteService = new NoWriteWatchedItemStore( $innerService );
+
+ $return = $noWriteService->countWatchedItems(
+ $this->getTestSysop()->getUser()
+ );
+ $this->assertEquals( __METHOD__, $return );
+ }
+
+ public function testCountWatchers() {
+ /** @var WatchedItemStoreInterface|PHPUnit_Framework_MockObject_MockObject $innerService */
+ $innerService = $this->getMockForAbstractClass( WatchedItemStoreInterface::class );
+ $innerService->expects( $this->once() )->method( 'countWatchers' )->willReturn( __METHOD__ );
+ $noWriteService = new NoWriteWatchedItemStore( $innerService );
+
+ $return = $noWriteService->countWatchers(
+ new TitleValue( 0, 'Foo' )
+ );
+ $this->assertEquals( __METHOD__, $return );
+ }
+
+ public function testCountVisitingWatchers() {
+ /** @var WatchedItemStoreInterface|PHPUnit_Framework_MockObject_MockObject $innerService */
+ $innerService = $this->getMockForAbstractClass( WatchedItemStoreInterface::class );
+ $innerService->expects( $this->once() )
+ ->method( 'countVisitingWatchers' )
+ ->willReturn( __METHOD__ );
+ $noWriteService = new NoWriteWatchedItemStore( $innerService );
+
+ $return = $noWriteService->countVisitingWatchers(
+ new TitleValue( 0, 'Foo' ),
+ 9
+ );
+ $this->assertEquals( __METHOD__, $return );
+ }
+
+ public function testCountWatchersMultiple() {
+ /** @var WatchedItemStoreInterface|PHPUnit_Framework_MockObject_MockObject $innerService */
+ $innerService = $this->getMockForAbstractClass( WatchedItemStoreInterface::class );
+ $innerService->expects( $this->once() )
+ ->method( 'countVisitingWatchersMultiple' )
+ ->willReturn( __METHOD__ );
+ $noWriteService = new NoWriteWatchedItemStore( $innerService );
+
+ $return = $noWriteService->countWatchersMultiple(
+ [ new TitleValue( 0, 'Foo' ) ],
+ []
+ );
+ $this->assertEquals( __METHOD__, $return );
+ }
+
+ public function testCountVisitingWatchersMultiple() {
+ /** @var WatchedItemStoreInterface|PHPUnit_Framework_MockObject_MockObject $innerService */
+ $innerService = $this->getMockForAbstractClass( WatchedItemStoreInterface::class );
+ $innerService->expects( $this->once() )
+ ->method( 'countVisitingWatchersMultiple' )
+ ->willReturn( __METHOD__ );
+ $noWriteService = new NoWriteWatchedItemStore( $innerService );
+
+ $return = $noWriteService->countVisitingWatchersMultiple(
+ [ [ new TitleValue( 0, 'Foo' ), 99 ] ],
+ 11
+ );
+ $this->assertEquals( __METHOD__, $return );
+ }
+
+ public function testGetWatchedItem() {
+ /** @var WatchedItemStoreInterface|PHPUnit_Framework_MockObject_MockObject $innerService */
+ $innerService = $this->getMockForAbstractClass( WatchedItemStoreInterface::class );
+ $innerService->expects( $this->once() )->method( 'getWatchedItem' )->willReturn( __METHOD__ );
+ $noWriteService = new NoWriteWatchedItemStore( $innerService );
+
+ $return = $noWriteService->getWatchedItem(
+ $this->getTestSysop()->getUser(),
+ new TitleValue( 0, 'Foo' )
+ );
+ $this->assertEquals( __METHOD__, $return );
+ }
+
+ public function testLoadWatchedItem() {
+ /** @var WatchedItemStoreInterface|PHPUnit_Framework_MockObject_MockObject $innerService */
+ $innerService = $this->getMockForAbstractClass( WatchedItemStoreInterface::class );
+ $innerService->expects( $this->once() )->method( 'loadWatchedItem' )->willReturn( __METHOD__ );
+ $noWriteService = new NoWriteWatchedItemStore( $innerService );
+
+ $return = $noWriteService->loadWatchedItem(
+ $this->getTestSysop()->getUser(),
+ new TitleValue( 0, 'Foo' )
+ );
+ $this->assertEquals( __METHOD__, $return );
+ }
+
+ public function testGetWatchedItemsForUser() {
+ /** @var WatchedItemStoreInterface|PHPUnit_Framework_MockObject_MockObject $innerService */
+ $innerService = $this->getMockForAbstractClass( WatchedItemStoreInterface::class );
+ $innerService->expects( $this->once() )
+ ->method( 'getWatchedItemsForUser' )
+ ->willReturn( __METHOD__ );
+ $noWriteService = new NoWriteWatchedItemStore( $innerService );
+
+ $return = $noWriteService->getWatchedItemsForUser(
+ $this->getTestSysop()->getUser(),
+ []
+ );
+ $this->assertEquals( __METHOD__, $return );
+ }
+
+ public function testIsWatched() {
+ /** @var WatchedItemStoreInterface|PHPUnit_Framework_MockObject_MockObject $innerService */
+ $innerService = $this->getMockForAbstractClass( WatchedItemStoreInterface::class );
+ $innerService->expects( $this->once() )->method( 'isWatched' )->willReturn( __METHOD__ );
+ $noWriteService = new NoWriteWatchedItemStore( $innerService );
+
+ $return = $noWriteService->isWatched(
+ $this->getTestSysop()->getUser(),
+ new TitleValue( 0, 'Foo' )
+ );
+ $this->assertEquals( __METHOD__, $return );
+ }
+
+ public function testGetNotificationTimestampsBatch() {
+ /** @var WatchedItemStoreInterface|PHPUnit_Framework_MockObject_MockObject $innerService */
+ $innerService = $this->getMockForAbstractClass( WatchedItemStoreInterface::class );
+ $innerService->expects( $this->once() )
+ ->method( 'getNotificationTimestampsBatch' )
+ ->willReturn( __METHOD__ );
+ $noWriteService = new NoWriteWatchedItemStore( $innerService );
+
+ $return = $noWriteService->getNotificationTimestampsBatch(
+ $this->getTestSysop()->getUser(),
+ [ new TitleValue( 0, 'Foo' ) ]
+ );
+ $this->assertEquals( __METHOD__, $return );
+ }
+
+ public function testCountUnreadNotifications() {
+ /** @var WatchedItemStoreInterface|PHPUnit_Framework_MockObject_MockObject $innerService */
+ $innerService = $this->getMockForAbstractClass( WatchedItemStoreInterface::class );
+ $innerService->expects( $this->once() )
+ ->method( 'countUnreadNotifications' )
+ ->willReturn( __METHOD__ );
+ $noWriteService = new NoWriteWatchedItemStore( $innerService );
+
+ $return = $noWriteService->countUnreadNotifications(
+ $this->getTestSysop()->getUser(),
+ 88
+ );
+ $this->assertEquals( __METHOD__, $return );
+ }
+
+ public function testDuplicateAllAssociatedEntries() {
+ /** @var WatchedItemStoreInterface|PHPUnit_Framework_MockObject_MockObject $innerService */
+ $innerService = $this->getMockForAbstractClass( WatchedItemStoreInterface::class );
+ $noWriteService = new NoWriteWatchedItemStore( $innerService );
+
+ $this->setExpectedException( DBReadOnlyError::class );
+ $noWriteService->duplicateAllAssociatedEntries(
+ new TitleValue( 0, 'Foo' ),
+ new TitleValue( 0, 'Bar' )
+ );
+ }
+
+}
<?php
-require_once __DIR__ . "/../../../maintenance/backupPrefetch.inc";
-
/**
* Tests for BaseDump
*