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

no issue - configuration changes and old names deprecation #191

Merged
merged 1 commit into from
Nov 20, 2024

Conversation

pounard
Copy link
Member

@pounard pounard commented Nov 14, 2024

Variant of #162

  • adds a new Configuration object,
  • merges both standalone and symfony bundle configuration objects,
  • rationalize yaml configuration, makes it much easier to understand,
  • allow specific configuration of pretty much everything on a per connection basis.

@pounard pounard force-pushed the 2.0-configuration-improvements-proto branch 6 times, most recently from d0b8056 to a252b57 Compare November 15, 2024 14:53
Copy link
Member

@SimonMellerin SimonMellerin left a comment

Choose a reason for hiding this comment

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

Seems good to me thanks 👍

src/Bridge/Standalone/Bootstrap.php Outdated Show resolved Hide resolved
config/db_tools.standalone.sample.yaml Outdated Show resolved Hide resolved
config/db_tools.standalone.sample.yaml Outdated Show resolved Hide resolved
config/packages/db_tools.yaml Outdated Show resolved Hide resolved
@SimonMellerin
Copy link
Member

Just may be you can update sample config file to put at the top of the file config that users will want to edit the most.

Like connections and anonymization, like all other have default values.

But, not sure about that, I let you choose if this is a good idea or not !

@pounard pounard force-pushed the 2.0-configuration-improvements-proto branch from a252b57 to 025a7d2 Compare November 15, 2024 16:58
@pounard pounard force-pushed the 2.0-configuration-improvements-proto branch 3 times, most recently from 028a896 to d741b85 Compare November 20, 2024 09:22
@pounard pounard force-pushed the 2.0-configuration-improvements-proto branch from d741b85 to 4b63321 Compare November 20, 2024 09:40
config/db_tools.standalone.sample.yaml Outdated Show resolved Hide resolved
config/db_tools.standalone.sample.yaml Show resolved Hide resolved
config/db_tools.standalone.sample.yaml Outdated Show resolved Hide resolved
# configuration into multiple files, you can directly write it here.
# If you do not wish to split the configuration into tables, you can
# write all your table configuration directly here.
# Keys are connection names, values must follow the structure of the
Copy link
Member

Choose a reason for hiding this comment

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

if there's only one connection, what's its name ?

does the 'connection' stage needed ? if not, may be you can omit this part and just redirect to the doc for a multiconnection setup

config/packages/db_tools.yaml Show resolved Hide resolved
config/packages/db_tools.yaml Outdated Show resolved Hide resolved
@SimonMellerin
Copy link
Member

SimonMellerin commented Nov 20, 2024

May be for the standalone version, we can simplify the anonymization declaration like this:

    my_table: 
        my_email_column: email
        my_age_column: 
            anonymizer: integer
            options: {delta: 15}
    my_table_2:
        my_firstname_column: firstname

# Or with a yaml 
anonymization: ./db_tools.anonymization.yaml

# Or multiconneciton 
anonymization: 
    connection_one: 
        my_table: 
            my_email_column: email
            my_age_column: 
                anonymizer: integer
                options: {delta: 15}
        my_table_2:
            my_firstname_column: firstname
    connection_two: 
        my_table: 
            my_email_column: email
            my_age_column: 
                anonymizer: integer
                options: {delta: 15}
        my_table_2:
            my_firstname_column: firstname

# Or multiconneciton yaml
anonymization: 
    connection_one: ./db_tools.anonymization.connection_one.yaml
    connection_two: ./db_tools.anonymization.connection_one.yaml

Seems easier to understand and to use

@pounard pounard force-pushed the 2.0-configuration-improvements-proto branch 2 times, most recently from 6a91a2f to 7b05108 Compare November 20, 2024 16:30
@pounard pounard force-pushed the 2.0-configuration-improvements-proto branch from 7b05108 to 79efa91 Compare November 20, 2024 16:48
@pounard pounard marked this pull request as ready for review November 20, 2024 18:25
@pounard pounard merged commit 12a3c53 into main Nov 20, 2024
21 of 28 checks passed
@pounard pounard deleted the 2.0-configuration-improvements-proto branch November 20, 2024 18:25
@pounard
Copy link
Member Author

pounard commented Nov 20, 2024

Failure was a random MySQL float error, I merged anyway.

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.

2 participants