Skip to content

Commit e7a5f0e

Browse files
committed
Version 1.6.0, PTB 0.70.*, remove logging, various code tweaks.
1 parent a8bd4cc commit e7a5f0e

12 files changed

+1268
-639
lines changed

.scrutinizer.yml

Lines changed: 2 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
build:
2+
environment:
3+
php: 7.3.0
24
nodes:
35
analysis:
46
tests:
@@ -8,28 +10,3 @@ build:
810
filter:
911
paths:
1012
- src/
11-
12-
checks:
13-
php:
14-
check_method_contracts:
15-
verify_interface_like_constraints: true
16-
verify_documented_constraints: true
17-
verify_parent_constraints: true
18-
fix_doc_comments: true
19-
fix_identation_4spaces: true
20-
fix_line_ending: true
21-
fix_linefeed: true
22-
fix_php_opening_tag: true
23-
fix_use_statements:
24-
remove_unused: true
25-
preserve_multiple: false
26-
preserve_blanklines: true
27-
order_alphabetically: true
28-
more_specific_types_in_doc_comments: true
29-
no_goto: true
30-
param_doc_comment_if_not_inferrable: true
31-
parameter_doc_comments: true
32-
remove_extra_empty_lines: true
33-
return_doc_comment_if_not_inferrable: true
34-
return_doc_comments: true
35-
simplify_boolean_return: true

.travis.yml

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,23 @@
1-
sudo: required
1+
dist: bionic
22
language: php
33

44
addons:
5-
mariadb: 10.1
5+
mariadb: 10.2
66

77
cache:
88
directories:
99
- vendor
1010
- $HOME/.composer/cache
1111

12-
matrix:
13-
include:
14-
- php: 7.3
15-
- php: 7.2
16-
- php: 7.1
17-
env: COVERAGE=1
18-
- php: 7.1
19-
env: DEPS=low
20-
- php: nightly
21-
- php: hhvm
12+
php:
13+
- 7.3
14+
- 7.4
15+
- 8.0snapshot
16+
- nightly
17+
18+
jobs:
2219
allow_failures:
2320
- php: nightly
24-
- php: hhvm
2521
fast_finish: true
2622

2723
notifications:
@@ -36,12 +32,11 @@ git:
3632
depth: 1
3733

3834
install:
39-
- if [ "$DEPS" == "low" ]; then travis_retry composer update --prefer-source --prefer-lowest --prefer-stable --no-interaction; fi
40-
- if [ "$DEPS" != "low" ]; then travis_retry composer install --prefer-source --no-interaction; fi
35+
- travis_retry composer install --prefer-dist --no-interaction
4136

4237
before_script:
4338
- mysql -u root -e 'create database telegrambot; use telegrambot; source ./vendor/longman/telegram-bot/structure.sql;'
44-
- if [[ "$COVERAGE" == "1" ]] && [[ "$TRAVIS_PULL_REQUEST" == "false" ]]; then CODECOV="1"; fi
39+
- if [[ "$TRAVIS_PHP_VERSION" == "7.3" ]] && [[ "$TRAVIS_PULL_REQUEST" == "false" ]]; then CODECOV="1"; fi
4540

4641
script:
4742
- composer check-code

CHANGELOG.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,18 @@ Exclamation symbols (:exclamation:) note something of importance e.g. breaking c
1414
### Fixed
1515
### Security
1616

17+
## [1.6.0] - 2020-12-26
18+
### Notes
19+
- [:ledger: View file changes][1.6.0]
20+
### Changed
21+
- Upgraded dependencies and bumped core to version 0.70.*.
22+
- Upgrade code to PHP 7.3.
23+
- Update Travis-CI and Scrutinizer configs.
24+
### Removed
25+
- [:exclamation:][1.6.0-bc-remove-botmanager-initlogging] Remove `BotManager::initLogging()` method and require separate logging initialisation with `TelegramLog::initialize`.
26+
### Security
27+
- Minimum PHP 7.3, allow PHP 8.0.
28+
1729
## [1.5.0] - 2019-07-29
1830
### Notes
1931
- [:ledger: View file changes][1.5.0]
@@ -54,7 +66,7 @@ Exclamation symbols (:exclamation:) note something of importance e.g. breaking c
5466
### Notes
5567
- [:ledger: View file changes][1.2.2]
5668
### Added
57-
- Linked version numbers in changelog for easy verification of code changes.
69+
- Linked version numbers in changelog for easy verification of code changes.
5870
### Changed
5971
- Upgraded dependencies and bumped core to version 0.48.0.
6072

@@ -187,10 +199,12 @@ Exclamation symbols (:exclamation:) note something of importance e.g. breaking c
187199

188200
[Tidelift]: https://tidelift.com/subscription/pkg/packagist-php-telegram-bot-telegram-bot-manager?utm_source=packagist-php-telegram-bot-telegram-bot-manager&utm_medium=referral&utm_campaign=changelog
189201

202+
[1.6.0-bc-remove-botmanager-initlogging]: https://github.com/php-telegram-bot/telegram-bot-manager/wiki/Breaking-backwards-compatibility#remove-botmanagerinitlogging "Remove BotManager::initLogging()"
190203
[1.0.0-bc-move]: https://github.com/php-telegram-bot/telegram-bot-manager/wiki/Breaking-backwards-compatibility#namespace-and-package-name-changed "Namespace and package name changed"
191204
[0.44.0-bc-parameter-structure]: https://github.com/php-telegram-bot/telegram-bot-manager/wiki/Breaking-backwards-compatibility#parameter-structure-changed "Parameter structure changed"
192205

193206
[Unreleased]: https://github.com/php-telegram-bot/telegram-bot-manager/compare/master...develop
207+
[1.6.0]: https://github.com/php-telegram-bot/telegram-bot-manager/compare/1.5.0...1.6.0
194208
[1.5.0]: https://github.com/php-telegram-bot/telegram-bot-manager/compare/1.4.0...1.5.0
195209
[1.4.0]: https://github.com/php-telegram-bot/telegram-bot-manager/compare/1.3.0...1.4.0
196210
[1.3.0]: https://github.com/php-telegram-bot/telegram-bot-manager/compare/1.2.2...1.3.0

README.md

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Installation and usage is pretty straight forward:
2424
Either run this command in your command line:
2525

2626
```bash
27-
composer require php-telegram-bot/telegram-bot-manager:^1.4
27+
composer require php-telegram-bot/telegram-bot-manager:^1.6
2828
```
2929

3030
**or**
@@ -33,7 +33,7 @@ For existing Composer projects, edit your project's `composer.json` file to requ
3333

3434
```yaml
3535
"require": {
36-
"php-telegram-bot/telegram-bot-manager": "^1.4"
36+
"php-telegram-bot/telegram-bot-manager": "^1.6"
3737
}
3838
```
3939
and then run `composer update`
@@ -46,12 +46,12 @@ It is possible however, to override the core version that this library requires:
4646

4747
```yaml
4848
"require": {
49-
"php-telegram-bot/telegram-bot-manager": "^1.4",
50-
"longman/telegram-bot": "dev-develop as 0.59"
49+
"php-telegram-bot/telegram-bot-manager": "^1.6",
50+
"longman/telegram-bot": "dev-develop as 0.70"
5151
}
5252
```
5353

54-
This example will pull the develop version of the core library, making it appear to be version 0.57, which then satisfies the requirement.
54+
This example will pull the develop version of the core library, making it appear to be version 0.70, which then satisfies the requirement.
5555

5656
### Performing actions
5757

@@ -176,7 +176,7 @@ $bot = new BotManager([
176176

177177
Apart from the necessary API key, the bot can be easily configured using extra parameters.
178178

179-
Set the webhook? Enable admins? Add custom command paths? Set up logging?
179+
Set the webhook? Enable admins? Add custom command paths?
180180

181181
**All no problem!**
182182

@@ -224,16 +224,6 @@ $bot = new BotManager([
224224
'1.1.1.1-2.2.2.2', // range
225225
],
226226

227-
// (array) Paths where the log files should be put.
228-
'logging' => [
229-
// (string) Log file for all incoming update requests.
230-
'update' => __DIR__ . '/php-telegram-bot-update.log',
231-
// (string) Log file for debug purposes.
232-
'debug' => __DIR__ . '/php-telegram-bot-debug.log',
233-
// (string) Log file for all errors.
234-
'error' => __DIR__ . '/php-telegram-bot-error.log',
235-
],
236-
237227
// (array) All options that have to do with the limiter.
238228
'limiter' => [
239229
// (bool) Enable or disable the limiter functionality.
@@ -292,7 +282,6 @@ $bot = new BotManager([
292282
'maintenance' => [
293283
'/db_cleanup',
294284
'/db_repair',
295-
'/log_rotate',
296285
'/message_admins Maintenance completed',
297286
],
298287
],

composer.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@
1818
}
1919
],
2020
"require": {
21-
"php": "^7.1",
22-
"longman/telegram-bot": "^0.59",
21+
"php": "^7.3|^8.0",
22+
"longman/telegram-bot": "^0.70",
2323
"longman/ip-tools": "^1.2",
2424
"psr/log": "^1.1"
2525
},
2626
"require-dev": {
27-
"jakub-onderka/php-parallel-lint": "^1.0",
28-
"phpunit/phpunit": "^7.5|^8.2",
29-
"squizlabs/php_codesniffer": "^3.4"
27+
"php-parallel-lint/php-parallel-lint": "^1.2",
28+
"phpunit/phpunit": "^9.3",
29+
"squizlabs/php_codesniffer": "^3.5"
3030
},
3131
"autoload": {
3232
"psr-4": {
@@ -41,7 +41,7 @@
4141
"scripts": {
4242
"check-code": [
4343
"vendor/bin/parallel-lint . --exclude vendor",
44-
"vendor/bin/phpcs -snp src/ tests/"
44+
"vendor/bin/phpcs"
4545
],
4646
"test": [
4747
"vendor/bin/phpunit --exclude-group live"

0 commit comments

Comments
 (0)