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

Multiple signature default configuration #108

Open
louisboulagnon opened this issue Feb 14, 2021 · 1 comment
Open

Multiple signature default configuration #108

louisboulagnon opened this issue Feb 14, 2021 · 1 comment

Comments

@louisboulagnon
Copy link

louisboulagnon commented Feb 14, 2021

Describe the bug
When several signature zones are defined in the config, only the first one is extracted in the DocusignBundle\DependencyInjection\Configuration.php

To Reproduce
Install and configuret the bundle, setting 2 signature zones

Expected behavior
See all configured signatures in the processed configuration

Screenshots

Screenshot of an xdebug breakpoint in DocusignExtension.php line 63, right after $config = $this->processConfiguration($configuration, $configs)

Screenshot from 2021-02-14 13-27-14

Additional context
I am by no means a configuration expert, so I am not sure how and what the change could impact and that's why I prefer posting an issue rather than a pull request directly, but I'm guessing there is something to fix in the Configuration.php file, around the line 121:123.
A fix I found was simply changing the line 123 from:
->then(static function ($v) { return ['default' => [$v[0]]]; }) to ->then(static function ($v) { return ['default' => $v]; })

@louisboulagnon
Copy link
Author

I also discovered that configuring the docusign.yaml differently works without changing the code

    signatures:
        # this is an array of positions, you can have multiple signatures locations per pages
        default:
            -
                page: 1 # Default
                x_position: 200 # Top left corner in pixels
                y_position: 400 # Top left corner in pixels
            -
                page: 2 # Default
                x_position: 200 # Top left corner in pixels
                y_position: 400 # Top left corner in pixels

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

1 participant