Skip to content

Breaking backwards compatibility

Armando Lüscher edited this page May 5, 2017 · 3 revisions

This library is still under heavy development, so some changes will break backwards compatibility (BC). We try to keep breaking changes to a minimum, but also try to create the best solution for any given situation.

Here is a list of BC breaking changes in each version.

Parameter structure changed

The structure of the parameter array passed to the BotManager constructor has changed. Best compare the before and after versions to see what's different.

Before: Most parameters were only 1 level deep:

$params = [
    'webhook'         => 'https://example.com/manager.php',
    'certificate'     => __DIR__ . '/server.crt',
    'max_connections' => 20,
    'download_path'   => __DIR__ . '/Download',
    'upload_path'     => __DIR__ . '/Upload',    
];

Now: Parameters are grouped more logically.

$params = [
    'webhook' => [
        'url'             => 'https://example.com/manager.php',
        'certificate'     => __DIR__ . '/server.crt',
        'max_connections' => 20,
    ],
    'paths'   => [
        'download' => __DIR__ . '/Download',
        'upload'   => __DIR__ . '/Upload',
    ],
];
Clone this wiki locally