chore(3rdparty): remove opis/closure

- We are using laravel/serializable-closure for a while now.
- The package was there for compatibility reasons but does not play nice with PHP 8.1.

Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
pull/40505/head
Daniel Kesselberg 9 months ago committed by Daniel
parent 7fecdf6129
commit 97a024f035

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

@ -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();

@ -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);
}
}

Loading…
Cancel
Save