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

Laminas\I18n\Translator is a soft dependency #55

Open
nusphere opened this issue Dec 17, 2023 · 4 comments
Open

Laminas\I18n\Translator is a soft dependency #55

nusphere opened this issue Dec 17, 2023 · 4 comments
Milestone

Comments

@nusphere
Copy link

Bug Report

When doing an class_implements for Laminas\Router\Http\TranslatorAwareTreeRouteStack

Error: Interface "Laminas\I18n\Translator\TranslatorAwareInterface" not found

Q A
Version(s) 3.12.0

Summary

Current behavior

How to reproduce

require this package
try class_implements for Laminas\Router\Http\TranslatorAwareTreeRouteStack (interface doesnt matter)
error occues

Expected behavior

Interface should exists by adding a depencency to this package

@nusphere nusphere added the Bug Something isn't working label Dec 17, 2023
@Xerkus Xerkus added Invalid This doesn't seem right and removed Bug Something isn't working labels Dec 17, 2023
@Xerkus
Copy link
Member

Xerkus commented Dec 17, 2023

This is an optional dependency. It won't be added as direct requirement.

You got same answer in laminas/laminas-validator#220

We no longer allow optional dependencies to be added, however they would remain optional until they removed by a next major release.

@Xerkus Xerkus closed this as not planned Won't fix, can't repro, duplicate, stale Dec 17, 2023
@nusphere
Copy link
Author

nusphere commented Dec 17, 2023

This error still exists.

That doesn't mean that this bug needs to be fixed immediately. But in fact it is an error that is documented here.

@Ocramius
Copy link
Member

Disagree: while optional dependencies are indeed problematic, they are not bugs per-se, and rather require manual intervention.

Analyzing vendor/ code out of context is still a mistake, since you may even get random test assets in there, so be careful about your assumptions: this is NOT a bug.

They are a concept of the past: we got rid of them from new code, but there's no easy way around this.

The usage of such code with optional dependencies requires additional steps that are not "out of the box", and that is OK-ish, especially when compared with introducing BC breaks.

@Xerkus Xerkus reopened this Dec 17, 2023
@Xerkus Xerkus added Enhancement and removed Invalid This doesn't seem right labels Dec 17, 2023
@Xerkus Xerkus added this to the 4.0.0 milestone Dec 17, 2023
@Xerkus
Copy link
Member

Xerkus commented Dec 17, 2023

I will reopen it as an improvement to track for next major.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants