Skip to content
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

php-http-client is another project and needs sub-package name #1018

Open
centurianii opened this issue Nov 16, 2020 · 3 comments
Open

php-http-client is another project and needs sub-package name #1018

centurianii opened this issue Nov 16, 2020 · 3 comments
Labels
status: help wanted requesting help from the community type: community enhancement feature request not on Twilio's roadmap

Comments

@centurianii
Copy link

centurianii commented Nov 16, 2020

php-http-client is at 3.13.0 version currently and as is a different project with it's own versioning I think the next is confusing:

use SendGrid\Client;

which implies a direct relation with the current library.

I think a better solution is to create a sub-namespace like:

use SendGrid\Http\Client;

that makes psr4 autoloading much easier as now you can point the package loader to any folder you like and put there the project's files:

http-client
     |_ Exception
     |         |_ InvalidRequest.php
     |_ Client.php
     |_ Response.php

I experiment this now in a sub-folder using my own autoloading function.

@centurianii
Copy link
Author

...another thing is that the next 3 files do not have a namespace:

namespace SendGrid;
BaseSendGridClientInterface.php
SendGrid.php
TwilioEmail.php

@centurianii
Copy link
Author

...also starkbank library can easily be converted to psr4: just rename the files/directories, delete elipticcurve.php and you are done:

ecdsa.php -> Ecdsa.php
privatekey.php -> PrivateKey.php
publickey.php -> PublicKey.php
signature.php -> Signature.php
utils -> Utils
file.php -> File.php

@thinkingserious
Copy link
Contributor

Hello @centurianii,

Thank you for this feedback! This issue has been added to our internal backlog to be prioritized. Pull requests and +1s on the issue summary will help it move up the backlog.

With best regards,

Elmer

@thinkingserious thinkingserious added status: help wanted requesting help from the community type: community enhancement feature request not on Twilio's roadmap labels Nov 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: help wanted requesting help from the community type: community enhancement feature request not on Twilio's roadmap
Projects
None yet
Development

No branches or pull requests

2 participants