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

Internal classes #1082

Open
aivchen opened this issue Jan 16, 2024 · 3 comments
Open

Internal classes #1082

aivchen opened this issue Jan 16, 2024 · 3 comments

Comments

@aivchen
Copy link
Contributor

aivchen commented Jan 16, 2024

I have an idea.
We can mark all classes which should not used by users as @internal (https://docs.phpdoc.org/2.9/references/phpdoc/tags/internal.html) and make a new patch release.

After that, we will be able to change them as we want without fear of violating B/C.

What do you think?

But I'll need you help here as I don't know which classes must remain "public".

@dantleech
Copy link
Member

dantleech commented Jan 19, 2024

tbh, all concrete classes can be @internal AFAIK so those can be final. in theory extension points should use interfaces, anything that can be tagged in the dependency injection container are a public API. e.g. ProgressLogger

e.g.

final public const TAG_ENV_PROVIDER = 'runner.environment_provider';
final public const TAG_EXECUTOR = 'runner.benchmark_executor';
final public const TAG_PROGRESS_LOGGER = 'runner.progress_logger';

the ProviderInterface is collected by the TAG_ENV_PROVIDER so it's an extension point and needs to be public.

@aivchen
Copy link
Contributor Author

aivchen commented Jan 19, 2024

Ok, and all classes used in interfaces must be public I assume.
For example, Information is used in ProviderInterface so we keep Information public, right (but we can mark as internal all its methods except __constructor)?

@dantleech
Copy link
Member

Yes, you're right 👍

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

No branches or pull requests

2 participants