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

Allow manual install #34

Merged
merged 5 commits into from
May 14, 2015
Merged

Allow manual install #34

merged 5 commits into from
May 14, 2015

Conversation

orlitzky
Copy link
Contributor

Relying on Composer for the installation is causing us one big problem: the library can't be installed via our distribution's package manager. If you don't use Composer for the install, then Recaptcha doesn't work out-of-the-box: none of the class includes are in the files that use them. (This also crashes the test suite.)

The least-intrusive way to fix this (I could also have re-added the require statements?) was to supply a simple autoloader along with the library. This allows users to include the src/autoload.php even without Composer present on the target machine. Distributions can package src/autoload.php normally since it doesn't have to be generated on-the-fly. Finally, the test suite can bootstrap using it -- so now the test suite will run from a clean checkout.

@googlebot
Copy link
Collaborator

Thanks for your pull request.

It looks like this may be your first contribution to a Google open source project, in which case you'll need to sign a Contributor License Agreement (CLA) at https://cla.developers.google.com/.

If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address. Check the information on your CLA or see this help article on setting the email on your git commits.

Once you've done that, please reply here to let us know. If you signed the CLA as a corporation, please let us know the company's name.

@orlitzky
Copy link
Contributor Author

CLA is signed.

@googlebot
Copy link
Collaborator

CLAs look good, thanks!

@rowan-m
Copy link
Contributor

rowan-m commented Mar 27, 2015

Thanks @orlitzky I'll take a look at this over the weekend.

@orlitzky
Copy link
Contributor Author

Thanks, I'm not married to this particular implementation, but I didn't want to show up empty-handed =)

If you'd prefer to do it some other way I can always rewrite and send another PR.

@Aeliot-Tm Aeliot-Tm mentioned this pull request Apr 7, 2015
*/

spl_autoload_register(function ($class) {
/* All of the classes have names like "ReCaptcha\Foo", so we need
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Restrict this to only autoload the ReCaptcha namespace. So, just early out of the function for anything else.

@rowan-m
Copy link
Contributor

rowan-m commented Apr 7, 2015

Thanks again, @orlitzky and sorry for taking a while to jump back on this. I've made some comments. If you're happy to do the changes that would be cool, otherwise I'll drop an implementation in sometime in the next few days.

@Rikk Rikk mentioned this pull request Apr 24, 2015
rowan-m added a commit that referenced this pull request May 14, 2015
@rowan-m rowan-m merged commit 86dee1b into google:master May 14, 2015
@orlitzky orlitzky deleted the manual-install branch May 18, 2015 00:50
@orlitzky
Copy link
Contributor Author

Thank you for merging this! I should be able to package the next release for inclusion in Gentoo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants