Skip to content

Configure default plugins #17

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

Closed
Nyholm opened this issue Jan 6, 2016 · 1 comment · Fixed by #37
Closed

Configure default plugins #17

Nyholm opened this issue Jan 6, 2016 · 1 comment · Fixed by #37

Comments

@Nyholm
Copy link
Member

Nyholm commented Jan 6, 2016

There are some plugins in php-http/plugins that got dependencies. We should allow the user to configure those plugins.

httplug: 
  plugins: 
    cache:
      service: 'acme.cache'
      config: 
        respect_headers: true
    logger:
      formatter: 'acme.formatter'

Reference: #16 (comment)

@dbu
Copy link
Collaborator

dbu commented Jan 6, 2016

agree. we can use the ->canBeEnabled() construct in configuration to know for each plugin whether it should be loaded. as soon as any other option is configured, enabled becomes true automatically. the DI extension would pass parameters (retry limit, redirect limit, cache service and so on) and remove plugins that are disabled from the container.

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 a pull request may close this issue.

2 participants