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

Using beanstalk_console as dependency #118

Closed
SamMousa opened this issue Feb 22, 2016 · 2 comments
Closed

Using beanstalk_console as dependency #118

SamMousa opened this issue Feb 22, 2016 · 2 comments

Comments

@SamMousa
Copy link

When using beanstalk console as a dependency (via composer require) the way the config file is included breaks "other" configuration.

Instead if the configuration gets merged it will work as expected:

if (isset($GLOBALS['config'])) {
    $GLOBALS['config'] = array_merge_recursive([
        /**
         * List of servers available for all users
         */
        'servers' => array(/* 'Local Beanstalkd' => 'beanstalk://localhost:11300', ... */),
        /**
         * Saved samples jobs are kept in this file, must be writable
         */
        'storage' => dirname(__FILE__) . DIRECTORY_SEPARATOR . 'storage.json',
        /**
         * Optional Basic Authentication
         */
        'auth' => array(
            'enabled' => false,
            'username' => 'admin',
            'password' => 'password',
        ),
        /**
         * Version number
         */
        'version' => '1.7.4',
    ], $GLOBALS['config'])
}
@mkopinsky
Copy link

Just curious, what is the use case for using beanstalk_console as a dependency rather than as a standalone app?

@SamMousa
Copy link
Author

SamMousa commented Feb 9, 2018

Dev depencency, or part of a dev tooling app ; that was my original intention I think...
Feel free to close this, it's no longer relevant for me and no one else ran into the 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