Skip to content
This repository has been archived by the owner on Mar 20, 2024. It is now read-only.

Double slashes in branch names trigger Symfony DI exception on Jenkins #322

Open
SvenRtbg opened this issue Apr 24, 2018 · 0 comments
Open

Comments

@SvenRtbg
Copy link

Our branches use slashes for separation, and Jenkins escaped the slash inside the environment variables BUILD_TAG, JOB_NAME and JOB_BASE_NAME with the sequence %2f. That works with behat if only ONE slash is in the branch name, but Symfony DI will bail out with an exception if we use TWO slashes.

The Selenium2Factory fetches the first two environment variables and puts them into a DI Definition class. Symfony DI sees %variable% inside the string and tries to expand this, but fails because such a variable has not been defined.

With a branch name of test/with/slashes the error produced is

[Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException]
You have requested a non-existent parameter "2fwith".

Our software does not use any Symfony otherwise, this is only related to "behat/mink-extension" version 2.3.1.

(Duplicated as a comment first in #272 (comment))

Symfony DI accepts percent signs in strings and will not try to evaluate them as variables if they are escaped by doubling the percent sign. (See https://github.com/symfony/symfony-standard/issues/1084 for a related issue with a password string).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant