Comments (7)
You're the first person to have asked for a non-Composer based autoloading mechanism so at present there isn't a solution—
Sent from my iPhone
On Mon, May 19, 2014 at 4:15 PM, Colorfully.Me [email protected]
wrote:
Hi, thanks for this great library!
How one can/should autoload this lib when cloning it as a sub-module via git? Have searched the code base but did not found any autoload function to invoke when not using composer as dependency manager for instance.
Reply to this email directly or view it on GitHub:
#96
from oauth2-client.
Hum, was about to write/add one PSR-0 autoloader myself but inspecting the classes closely now I see that there is a hard coded hidden dependency to guzzle too :(
I think this dep. should be reflected into the Requirements section of the README.md.
And adding autoload ability will help people cloning this repo work on it too.
from oauth2-client.
ColorfullyMe: I cannot find a reason why you would not use composer when you require this project or any other composable package. This requires composer.phar which provides the autoloader you are looking for. Even if you were to write your own autoloader as you suggest it would be a requirement of your autoloader to install dependencies.
Trying to use packages like stand alone libraries given today's package manager-centric development belies a lack of understanding of what a package manager is for.
Your idea for PSR-0 shows you're 3.5 years behind in your knowledge of PHP development. This package has moved forward and is PSR-4 compliant. I've heard it said on more than one occasion that skills as a developer are only good for 3 years and yours have expired.
from oauth2-client.
@ColorfullyMe I'm sorry but I don't have the time to write a one off autoloader that considers also autoloading Guzzle.
For the record I don't support @TomHAnderson's unnecessary rudeness regarding your skills as a developer.
from oauth2-client.
@TomHAnderson PSR is a specification for defining a coding standard for PHP. There's five versions of it: PSR-0, PSR-1, PSR-2, PSR-3 and PSR-4 each addressing a specific aspect of coding. PSR describes a specification for autoloading classes from file paths. It is fully interoperable, and can be used in addition to any other autoloading specification, including PSR-0. In other words the numbers does not matter this much...When it comes just to auto load classes from files placed in specific folder structure you can use any of those and there is no need to implement space shuttle to just go to the bar at the next street corner.
Dependency management is indeed feature that everybody should treasure and I'm not a exception.
from oauth2-client.
@alexbilbie Thank You!
I relay believe that the src/Provider/AbstractProvider.php(and maybe others) should be re-factored. This will/should elevate things further by decoupling the project from its dependency to Guzzle.
Also from testing point of view this will be much better:
public function __construct($options = array(), GuzzleClient GC)
{
foreach ($options as $option => $value) {
if (isset($this->{$option})) {
$this->{$option} = $value;
}
}
$this->setHttpClient(new GC);
}
Because it allows mocks by using constructor dependency injection.
Good work i wish You!
from oauth2-client.
I will not tolerate this sort of idiocy.
@ColorfullyMe thank you for asking us about how this works. It is a fair question, and many packages out there do offer support for autoloading without just assuming you have Composer installed. We sadly have not had anyone ask us before, and do ourselves happen to use Composer, so we have not built in support for this.
I am sorry that @TomHAnderson decided to come in here and shout about how his way is the one and only true way. He has done this before and its always fucking obnoxious when he does. He is a very smart developer who needs to grow up a little and accept that there are quite a few ways to skin a cat.
@TomHAnderson You've made some great contributions. Please don't ruin that by being an obnoxious jackass all over our GitHub repos.
from oauth2-client.
Related Issues (20)
- Deprecated function: Return type HOT 1
- Oauth2 refresh problems HOT 1
- AccessToken setTimeNow is useless function
- PHP Combability issue
- Security issue HOT 1
- Basic example improvements HOT 1
- Basic example improvements (2)
- Allow any psr-18 http client (instead of requiring guzzle) HOT 1
- Security vulnerabilities in specific guzzlehttp/guzzle versions
- Error fetching OAuth credentials: "Missing required parameter [code_verifier]."
- Logout HOT 2
- Suggestion - a very small code change would implement rate limiting
- Add original oauth error to IdentityProviderException
- Issue with generating and validating the same token.
- ID Token for access token possible? HOT 1
- New stable release? HOT 6
- pkce no longer appears in src/Provider/AbstractProvider.php HOT 4
- Create multipart/form-data requests? HOT 1
- Support for PHP 8.2? HOT 1
- PKCE: Unset oauth2pkceCode from session after login?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from oauth2-client.