Merge pull request #40505 from nextcloud/chore/noid/remove-opis-closure

chore(3rdparty): remove opis/closure
This commit is contained in:
Côme Chilliet 2023-09-25 11:03:10 +02:00 committed by GitHub
commit bbfa9d1440
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 2 additions and 10 deletions

@ -1 +1 @@
Subproject commit ed6ea207de9e7649d5f7321497a27f5612d6e100
Subproject commit a983a316487c666d6602923f0c067e32299501ba

View file

@ -24,11 +24,10 @@ namespace OC\Command;
use OC\BackgroundJob\QueuedJob;
use Laravel\SerializableClosure\SerializableClosure as LaravelClosure;
use Opis\Closure\SerializableClosure as OpisClosure;
class ClosureJob extends QueuedJob {
protected function run($serializedCallable) {
$callable = unserialize($serializedCallable, [LaravelClosure::class, OpisClosure::class]);
$callable = unserialize($serializedCallable, [LaravelClosure::class]);
$callable = $callable->getClosure();
if (is_callable($callable)) {
$callable();

View file

@ -47,11 +47,4 @@ class CronBusTest extends AsyncBusTest {
$job->execute($this->jobList);
}
}
public function testClosureFromPreviousVersion() {
$serializedClosure = 'C:32:"Opis\\Closure\\SerializableClosure":217:{a:5:{s:3:"use";a:0:{}s:8:"function";s:64:"function () {\\Test\\Command\\AsyncBusTest::$lastCommand = \'opis\';}";s:5:"scope";s:24:"Test\\Command\\CronBusTest";s:4:"this";N;s:4:"self";s:32:"0000000027dcfe2f00000000407fa805";}}';
$this->jobList->add('OC\Command\ClosureJob', $serializedClosure);
$this->runJobs();
$this->assertEquals('opis', AsyncBusTest::$lastCommand);
}
}