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

Tag dependency injection classes as internal #483

Merged
merged 1 commit into from
Dec 5, 2024

Conversation

greg0ire
Copy link
Member

@greg0ire greg0ire commented Dec 4, 2024

They are not meant to be used directly by project code.

This is prompted by #480 (comment)

maybe more

src
├── Command
│   └── LoadDataFixturesDoctrineCommand.php
├── DependencyInjection
│   ├── CompilerPass
│   │   ├── FixturesCompilerPass.php
│   │   └── PurgerFactoryCompilerPass.php
│   └── DoctrineFixturesExtension.php
├── DoctrineFixturesBundle.php
├── FixtureGroupInterface.php
├── Fixture.php
├── Loader
│   └── SymfonyFixturesLoader.php
├── ORMFixtureInterface.php
└── Purger
    ├── ORMPurgerFactory.php
    └── PurgerFactory.php

Maybe the command and the bundle? Or maybe not… I'm not sure where to draw the line. I will also mention that yesterday, I saw this issue raised by somebody who uses a compiler pass in their own code.

I'm targeting 4.0.x, because even if adding @internal is maybe not really a breaking change, once a class is tagged as internal, it would suddenly make it OK to make it final.

They are not meant to be used directly by project code.
Copy link
Member

@SenseException SenseException left a comment

Choose a reason for hiding this comment

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

I see compiler passes mostly as internal by nature. Same with extension or configuration class. I'm not a fan of stunts where these get overwritten/repurposed in one or another way.

@greg0ire greg0ire added this to the 4.0.0 milestone Dec 5, 2024
@greg0ire greg0ire merged commit 920e483 into doctrine:4.0.x Dec 5, 2024
11 checks passed
@greg0ire greg0ire deleted the internal branch December 5, 2024 06:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants