-
Notifications
You must be signed in to change notification settings - Fork 439
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor(namespaces): renamed \Null to \NoEffect for future comp… #1252
base: master
Are you sure you want to change the base?
Conversation
…atibility with new PHP versions 'null' is a reserved keyword as of PHP version 7.0 and should not be used to name a class, interface or trait or as part of a namespace (T_NAMESPACE)
Thanks! I am a bit skeptical about the new name: NullTransporter. Any other ideas ? |
Enqueue\DevNull or Enqueue\Void? Just some other options came to my mind, but I'll think about it and we'll figure out a better name than NullTransporter. :) |
|
Enqueue\Empty or Enqueue\Blank or maybe Enqueue\NoEffect? I'd vote for the last one, seems accurate and probably won't be reserved in the future. |
…lity with new PHP versions 'null' is a reserved keyword as of PHP version 7.0 and should not be used to name a class, interface or trait or as part of a namespace (T_NAMESPACE)
Enqueue, EnqueueBundle and SimpleClient could be search for uses of null too. |
NoEffect is ok for me. |
'null' is a reserved keyword as of PHP version 7.0 and should not be used to name a class, interface or trait or as part of a namespace (T_NAMESPACE)
@makasim since enqueue's, amqp-ext's and a lot other packages' unit tests require I'm new to open-source and tagging, is there a way to have a version that ^0.10 won't pull down, but we can explicitly provide it (for example: Is there a more elegant way to do this? |
Update this repository and this repository only. This is called a mono-repository, that is automatically split by a script into sub-repositories. In other words, this repository is the source of truth for the small ones. This approach is used to ensure that all packages at the current version are compatible with one another. A similar approach you can observe for example in Symfony, where there exists a single, main repository, which contains all packages and their tests, including cross-package tests. |
@Steveb-p got it, this repository only, but what am I missing? How would I let for example pkg/enqueue 's unit test know about the new namespaces if the stable version of pkg/null still uses Enqueue\Null namespace? I'm seeking advice, it's an interesting problem and I'm learning along the way. 🙂 |
Everything was good with the initial changes, except for a typo. That's the primary reason the tests are failing - autoloader registers namespace incorrectly. Beside that, we should consider the impact of changes namespace will have on the reliant packages. Technically, we're making a backward compatibility break here, because anything that relied on specific class name will break. I could propose using a At least that's what I had to do in my workplace when doing a major namespace change once (well, it was similar, but the end result was equivalent). |
You can introduce a new package That wont be a BC break because if someone wants to use null package it is still there. Thoughts? |
That's better actually, in this context. You're 💯 right. |
Excellent. I'll do it tomorrow. |
feat(noeffect): new package introduced called Enqueue\NoEffect which is used in other enqueue packages as well from now
Please check the noeffect's README. My changes might not be the right ones, just replaced some links that will probably exist and added NoEffect in between Null and Transport. 🙂 |
Any news guys? What's the process of reviewing this PR? When shall we expect it to go forward? (the company I'm working for is switching to 8.0 soon, that's one of the reasons I've made the change request) |
…atibility with new PHP versions
'null' is a reserved keyword as of PHP version 7.0 and should not be used to name a class, interface or trait or as part of a namespace (T_NAMESPACE)