core icon indicating copy to clipboard operation
core copied to clipboard

WIP - #1048: Better namespace

Open debo opened this issue 5 years ago • 10 comments

? !
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.

debo avatar Apr 15 '20 21:04 debo

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?

noplanman avatar Apr 18 '20 00:04 noplanman

I think its ok, but it should be included in a major 1.x.x release.

akalongman avatar Apr 18 '20 00:04 akalongman

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.

debo avatar Apr 18 '20 14:04 debo

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.

debo avatar May 16 '20 19:05 debo

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

noplanman avatar May 17 '20 19:05 noplanman

No problem, I'll have a look at those in the next days maybe and try to help you out with those too.

debo avatar May 17 '20 19:05 debo

@debo Looks like the tests are failing because the namespaces of the test files need to be updated too.

noplanman avatar May 23 '20 11:05 noplanman

@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 avatar May 24 '20 13:05 debo

@debo Looks like your branch wasn't rebased / updated correctly, so I've merged develop in and fixed the problematic namespace declaration 👍

noplanman avatar May 24 '20 15:05 noplanman

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.

debo avatar May 24 '20 15:05 debo