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

.gitignore on Strategy #23

Open
davidsteinsland opened this issue Jul 29, 2013 · 5 comments
Open

.gitignore on Strategy #23

davidsteinsland opened this issue Jul 29, 2013 · 5 comments

Comments

@davidsteinsland
Copy link

Why on earth? If I pull down the repo, I can't add submodules to the Strategy/ folder because of the .gitignore file.

Also, is it possible to add the Google Strategy as a submodule instead, as you have done with Vendor? It would really simplify build process..

Thanks!

@uzyn
Copy link
Owner

uzyn commented Jul 29, 2013

You can still place files in Strategy/ despite of the .gitignore. You're not supposed to have nested git repos anyway.

Do try loading of opauth, cakephp-opauth and google strategy via Composer. That would be much simpler.

@davidsteinsland
Copy link
Author

No, it wouldn't. When doing so using Composer, CakePHP complains that it cannot find the strategies. of course, because the strategies are not placed within Cakephp-opauth/Strategy. So If I add a custom installer path:

"Plugin/Opauth/Strategy/Google": ["opauth/google"],
"Plugin/Opauth/Strategy/OpenID": ["opauth/openid"],

then this should solve the problem. But not when .gitignore is effectively ignoring all files

@davidsteinsland
Copy link
Author

Also:
Installing CakePHP-opauth with opauth-google and opauth-openid, with no other requirements or configuration, I end up the following structure:

- Plugin
 + Opauth
    + Strategy
       - empty directory
- vendor
 + opauth
   + opauth
   + google
   + openid

If I set vendor-dir to Plugin, the same structure appears, only that the folders in vendor is now in Plugin.
In conclusion, Strategies are not placed under Opauth as your documentation states. Please fix this issue, as it makes it a pain to maintain a proper composer.json file.

@uzyn
Copy link
Owner

uzyn commented Sep 15, 2013

When loading via Composer, the strategies do not have to be in strategy_dir as Composer's autoloader automatically handles it.

All you have to do is simply:

"require": {
    "uzyn/cakephp-opauth": "1.*",
    "opauth/facebook": "*",
    "opauth/twitter": "*"
}

(There's not even a need to require opauth/opauth, but no harm if you explicitly require it)

And to load, you simple have to add this line to your app's bootstrap.php:

<?php
CakePlugin::load('Opauth', array('routes' => true, 'bootstrap' => true));

@angelxmoreno
Copy link

if this resolves your issue @davidsteinsland please let us know to close this issue

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

No branches or pull requests

3 participants