Skip to content

rename attribute to SkipDatabaseRollback#341

Merged
dmaicher merged 1 commit into
masterfrom
rename_attr
Jan 18, 2026
Merged

rename attribute to SkipDatabaseRollback#341
dmaicher merged 1 commit into
masterfrom
rename_attr

Conversation

@dmaicher
Copy link
Copy Markdown
Owner

Follow up for #339 to rename the attribute.

Its a BC break but I doubt the attribute was adopted already.

@VincentLanglet
Copy link
Copy Markdown

I'll answer here then.

I do understand why you name it SkipStaticDatabaseConnection

  • It's related to the fact you're using a static driver
  • It's related to some option like enable_static_connection

But I feel like a classic developer using DAMA won't know the implementation details (related to the Static part). Personally I just resumed myself DAMA as "it wraps tests in a transaction and rollback it".

So, some ideas:

  • Something transaction like SkipDatabaseTransaction
  • Something bundle related like SkipDAMA

Also, looking at https://github.com/dmaicher/doctrine-test-bundle#debugging, and the method
\DAMA\DoctrineTestBundle\Doctrine\DBAL\StaticDriver::commit();

I thought at first that maybe #[CommitDatabaseTransaction] was a good name. But looking at your implementation, you're really skipping the whole transaction process and not just doing one commit at the end.

I asked IA some suggestions if it helps you in your choice

#[WithoutTransaction]
#[NoTransaction]
#[SkipTransaction]
#[DisableRollback]
#[WithoutDatabaseIsolation]
#[SkipDatabaseRollback]
#[DisableTransactionWrapping]
#[RealDatabaseConnection]
#[PersistDatabaseChanges]
#[CommitDatabaseChanges]
#[WithRealConnection]

@dmaicher
Copy link
Copy Markdown
Owner Author

I agree that the current name is too implementation specific 👍

I like SkipDatabaseRollback the most.

@dmaicher dmaicher changed the title rename attribute to SkipDatabaseTransaction rename attribute to SkipDatabaseRollback Jan 18, 2026
@dmaicher dmaicher merged commit 490cdc0 into master Jan 18, 2026
7 checks passed
@dmaicher dmaicher deleted the rename_attr branch January 18, 2026 12:00
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