-
-
Notifications
You must be signed in to change notification settings - Fork 66
Breaking backwards compatibility
Armando Lüscher edited this page May 8, 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.
Before
- Namespace:
NPM\TelegramBotManager
- Packagist:
noplanman/telegram-bot-manager
After
- Namespace:
TelegramBot\TelegramBotManager
- Packagist:
php-telegram-bot/telegram-bot-manager
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',
],
];