WIP - #1048: Better namespace
| ? | ! |
|---|---|
| Type | improvement |
| BC Break | yes |
| Fixed issues | #1048 |
Summary
As mentioned in the opened issue/feature request this PR is aimed to align the project namespace to the actual project name for consistency.
I couldn't run the DB integration tests because I don't have a proper local setup but I noticed travisci will take are of that.
I hope it helps.
Hi @debo
Thanks for the PR. As mentioned in the issue, this is a huge BC break and all code examples in the issues that have the namespace in them will become invalid. Also it would make sense to move the packagist namespace at the same time, to only have one big switch.
@akalongman @jacklul @php-telegram-bot/developers What's your views on merging this change?
I think its ok, but it should be included in a major 1.x.x release.
Yes, I appreciate is a breaking one and it requires a major, I just wanted to help in the meantime. I’m going to update the examples and the docs where required because I didn’t think about those. Marking this as WIP in the meantime then.
I started updating the rest of the code to reflect this change.
https://github.com/php-telegram-bot/ansible-role-php-telegram-bot/pull/1 https://github.com/php-telegram-bot/example-bot/pull/38 https://github.com/php-telegram-bot/laravel/pull/22 https://github.com/php-telegram-bot/support-bot/pull/37 https://github.com/php-telegram-bot/telegram-bot-manager/pull/56
Builds are failing because I can't really update the lock files because that will require you people to update packagist but I'm sure we can coordinate on that.
Please let me know how to proceed now, thanks and I hope it helps.
Thanks @debo
Basically, we "just" need to get the main changes in that are required to release v1.
To name a few: #232 #817 #826 #831
No problem, I'll have a look at those in the next days maybe and try to help you out with those too.
@debo Looks like the tests are failing because the namespaces of the test files need to be updated too.
@noplanman which is already the case if you look at the PR... also, unless I'm overlooking something this
Class 'Longman\TelegramBot\Tests\Unit\TestCase' not found in /home/travis/build/php-telegram-bot/core/tests/unit/Entities/EntityTest.php:23
Doesn't even exists, the EntityTest.php file I mean.
@debo Looks like your branch wasn't rebased / updated correctly, so I've merged develop in and fixed the problematic namespace declaration 👍
That's weird... it was freshly forked and rebase from upstream is one of the first thing I do as part of my workflow. Glad we sorted this out. I'm going to have a look at the build for the bot manager which is failing as well.