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

configuration with symfony 4.1 #50

Open
schneidr opened this issue Sep 17, 2018 · 1 comment
Open

configuration with symfony 4.1 #50

schneidr opened this issue Sep 17, 2018 · 1 comment

Comments

@schneidr
Copy link

schneidr commented Sep 17, 2018

I'm trying to configure the bundle with symfony 4.1.

After installing the bundle all I get on my site (previously authenticated with the regular Symfony\Component\Ldap\Ldap component) is an exception with:

Your configuration must have at least one domain.

Generating the config does not work:

$ php bin/console ldaptools:generate:config
  There are no commands defined in the "ldaptools:generate" namespace.

  Did you mean this?
      doctrine:generate

I manually created a config.yml in the config directory of my application, but it seems it is ignored.

When I try to debug the configuration the bundle is listed:

$ php bin/console config:dump-reference
Available registered bundles with their extension alias if available
====================================================================

 ---------------------------- ------------------------
  Bundle name                  Extension alias
 ---------------------------- ------------------------
  [...]
  LdapToolsBundle              ldap_tools
  [...]

But when I try to get more information about it's configuration, as described here all I get is:

$ php bin/console config:dump-reference  LdapToolsBundle

In AbstractConfigCommand.php line 108:

  The extension with alias "ldap_tools" does not have its getConfiguration()
  method setup

This is my first project with the symfony framework. I know a lot has changed with version 4, has the configuration management changed so much that the bundle doesn't work with it yet, or do I just have to place the configuration file in the proper place?

@lernhart
Copy link

Had the same problem with Symfony 4.1 and got around the problem as described:

Add the command as a service in config/services.yaml:

app.command.my_command:
    class: LdapTools\Bundle\LdapToolsBundle\Command\ConfigCommand
    tags:
        - { name: console.command }

The command will run, but it won't automatically generate the config for LdapToolsBundle.

You will need to create config/packages/ldap_tools.yaml on your own.
You can either put the result of the command above inside the config, or write down your config manually.

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

2 participants