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

[Develop Branch] Config not loaded from app/config/ and is instead loaded from vendor folder #8

Open
arenowebdev opened this issue Aug 23, 2014 · 13 comments

Comments

@arenowebdev
Copy link

Pretty sure it has to do with this line in RocketeerSlack.php:20

<?php
namespace Rocketeer\Plugins\Slack;

use Crummy\Phlack\Phlack;
use Illuminate\Container\Container;
use Rocketeer\Plugins\AbstractNotifier;
use Rocketeer\Plugins\Notifier;

class RocketeerSlack extends AbstractNotifier
{
    /**
     * Setup the plugin
     *
     * @param Container $app
     */
    public function __construct(Container $app)
    {
        parent::__construct($app);

        $this->configurationFolder = __DIR__.'/../config'; // <-- This points to the vendor folder...
    }
@Anahkiasen
Copy link
Member

That's normal, that path is used and passed to ServiceProvider::config which then registers the config in the right path.

@arenowebdev
Copy link
Author

Hmmm. I'm not seeing that behavior. I have published the slack config to app/config/packages/anahkiasen/rocketeer-slack/config.php and input my username, room and token. When I run I get an error that it was unable to hit http://.slack.{...} which appears to be that it isn't getting the username from that file. The only way I was able to get it to work was to put the same config in the vendor folder...

Will get bash history in a few...

@Anahkiasen
Copy link
Member

You need to publish rocketeer/rocketeer-slack. No matter who's the original vendor of a Rocketeer plugin, its configuration is merged under the rocketeer/ vendor, that should work.

@arenowebdev
Copy link
Author

When I say publish, I mean I used $ php artisan config:publish anahkiasen/rocketeer-slack as outlined in the README. I will move it after lunch and see if that works and report back.

@Anahkiasen
Copy link
Member

Hm yes that's incorrect, it should be rocketeer/rocketeer-slack. Both work because both will technically be registered but the latter is the one Rocketeer will use.

@arenowebdev
Copy link
Author

After a composer update to get your recent changes:

$ php artisan config:publish rocketeer/rocketeer-slack

 [InvalidArgumentException]  
 Configuration not found.

config:publish [--path[="..."]] [--force] package

@Anahkiasen
Copy link
Member

Hm weird let me check

@Anahkiasen
Copy link
Member

Ok no my bad it is the other way around, it should be anahkiasen/rocketeer-slack, but there is a bug in Rocketeer 2 that doesn't read the right entry. What I was talking about was something I tried to do a while back and that ended up backfiring on me. Let me push a fix to R2 and I'll notify you to test again

@arenowebdev
Copy link
Author

You are literally the man. :P Thanks so much! By chance will you be at ZendCon so I can buy you a beer?

@Anahkiasen
Copy link
Member

I'm afraid not, I'll be at Laracon EU though :d

@spiroski
Copy link

spiroski commented Sep 3, 2014

Hello. I think I'm having the same issue:

I get:

[Guzzle\Http\Exception\CurlException]
  [curl] 6: Could not resolve host: .slack.com [url] https://.slack.com/services/hook
  s/incoming-webhook?token=

After some investigation I found out that it's not reading the configuration file under app/config/anahklasen/rocketeer-slack/ but is reading the default one in the vender folder.

@alisamii
Copy link

alisamii commented Sep 4, 2014

Salut @Anahkiasen,

Peux-tu répondre a mon colleague @deemeetar car cette fonctionnalité est indispensable pour nous.

Merci,

Ali

@Anahkiasen
Copy link
Member

The configuration needs to be at config/rocketeers/rocketerer-slack. Usually moving the folder is done by the plugin installer when you call artisan deploy:plugin-install anahkiasen/rocketeer-slack

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

4 participants