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

Add --gdpr-expressions-file option #34

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

beuss
Copy link
Contributor

@beuss beuss commented Jan 25, 2019

Similar to replacements-file

@bomoko
Copy link
Contributor

bomoko commented Mar 30, 2019

@beuss - this actually gets to one of the reasons these have taken so long to get to - I wasn't entirely sure we wanted to support both the replacements and the expressions, but having your head in this too is useful.
Do you think having both is actually useful?
Maybe this should be an issue we can discuss generally before we pull this in.

@beuss
Copy link
Contributor Author

beuss commented Mar 30, 2019

I have to admit that I've been surprised when starting to use the tool by the split of the two concepts. IMHO since you use JSON for configuration bits, you can have a single structure with either a "replacement" or an "expression" as attribute.
If you look at eg. beuss@16c91cd I added more options to replacements.
I think there should be only one config file and we determine if it's a replacement or expression for each column by looking at "expression" or "formatter" entry.

@@ -202,6 +204,15 @@ protected function execute(InputInterface $input, OutputInterface $output)
}
}

if (!empty($dumpSettings['gdpr-expressions-file'])) {
$dumpSettings['gdpr-expressions'] = json_decode(file_get_contents($dumpSettings['gdpr-expressions-file']),

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider splitting the lines like this

            $dumpSettings['gdpr-expressions'] = json_decode(
                file_get_contents($dumpSettings['gdpr-expressions-file']),
                true
            )

It will make it easier to read

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 this pull request may close these issues.

3 participants