crunzphp / crunz

A PHP-based job scheduler
MIT License
177 stars 16 forks source link

Deprecate passing non-list array to \Crunz\Schedule::run second parameter #15

Closed PabloKowalczyk closed 2 years ago

PabloKowalczyk commented 2 years ago

Description
As discussed in https://github.com/crunzphp/crunz/issues/14 passing non-list array in second parameters breaks ProcessUtil and is not supported by new versions of symfony/process.

Example Non-list param:

<?php

use Crunz\Schedule;

$schedule = new Schedule();
$paramsTest = $schedule->run(
    PHP_BINARY,
    [
        '-v',
        '--ini' => false,
    ]
);

List of strings in param:

<?php

use Crunz\Schedule;

$schedule = new Schedule();
$paramsTest = $schedule->run(
    PHP_BINARY,
    [
        '-v',
        '--ini',
        '0',
    ]
);
PabloKowalczyk commented 2 years ago

Fixed by https://github.com/crunzphp/crunz/pull/24