Allow callback functions for creating jobs
authorLucas Werkmeister <lucas.werkmeister@wikimedia.de>
Thu, 4 May 2017 16:00:28 +0000 (18:00 +0200)
committerLucas Werkmeister <lucas.werkmeister@wikimedia.de>
Tue, 9 May 2017 17:26:13 +0000 (19:26 +0200)
commita57252a1f521344e53e8776c34f925f522f512f3
tree55e6faf7e1c9aa741417ec7afbd1f03dea0e7e3c
parenta559a5e406f40016fd9ec466598668d8adfc398c
Allow callback functions for creating jobs

$wgJobClasses can now specify a factory function for creating a job,
instead of a class to be instantiated directly. This makes it possible
to inject services in a job constructor, and register a factory function
that calls the constructor with default services.

This follows Ieb85493a7765 and Ia2107dc5af78, which introduced factory
functions for API modules and special pages.

Change-Id: I0461e59da2a8fa6681e3b1fcdfc38bfed7f3ac32
RELEASE-NOTES-1.30
docs/extension.schema.v1.json
docs/extension.schema.v2.json
includes/DefaultSettings.php
includes/jobqueue/Job.php
tests/phpunit/includes/jobqueue/JobTest.php