Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate non string parameters #24

Merged
3 changes: 3 additions & 0 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@
'spacing' => 'one',
],
'single_line_throw' => false,
'php_unit_test_case_static_method_calls' => [
'call_type' => 'self',
],
])
->setRiskyAllowed(true)
->setFinder(
Expand Down
16 changes: 16 additions & 0 deletions UPGRADE.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
# Upgrading from v3.2 to v3.3

## Pass only string parameters to `\Crunz\Schedule::run`

Convert this:
```php
$schedule = new Schedule();
$schedule->run('php', ['-v' => true, 2]);
```

into this:
```php
$schedule = new Schedule();
$schedule->run('php', ['-v' => '1', '2']);
```

# Upgrading from v1.12 to v2.0

## Stop using `mail` transport for mailer
Expand Down
4 changes: 4 additions & 0 deletions bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

require_once __DIR__ . '/vendor/autoload.php';

if (!\defined('IS_WINDOWS')) {
\define('IS_WINDOWS', PHP_OS_FAMILY === "Windows");
}

// Disable deprecation helper
$envFlags = new \Crunz\EnvFlags\EnvFlags();
$envFlags->disableDeprecationHandler();
Expand Down
2 changes: 1 addition & 1 deletion composer-install.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
$dependenciesEnv = $_SERVER['argv'][2] ?? '';
$defaultComposerFlags = $_SERVER['argv'][3] ?? '';
$composerFilePath = __DIR__ . DIRECTORY_SEPARATOR . 'composer.json';
$ignoredPackages = ['symfony/error-handler'];
$ignoredPackages = ['symfony/error-handler', 'symfony/phpunit-bridge'];
$changeVersion = static function (
array $packages
) use (
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"phpstan/phpstan-strict-rules": "^1.2",
"phpunit/phpunit": "^9.5.5",
"symfony/error-handler": "^4.4.30 || ^5.4 || ^6.0",
"symfony/phpunit-bridge": "^4.4.30 || ^5.4.0 || ^6.0"
"symfony/phpunit-bridge": "^5.4.0 || ^6.0"
},
"minimum-stability": "dev",
"prefer-stable": true,
Expand Down
Loading