-
Notifications
You must be signed in to change notification settings - Fork 9
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
Minor observations from review #118
Conversation
src/Infrastructure/Aggregate/PreconditionsTree/ActiveDirIsReady.php
Outdated
Show resolved
Hide resolved
re
Don't we get other errors from other 3 party libraries that show through to our UI that aren't translatable? Or is standard practice in most of the dependencies to translatable errors? |
Not when they show in the UI (that I know of). For exceptions, log messages - yes. |
Thanks for your review, @larowlan! 🙂️
|
One other approach for translation is to have a TranslationInterface or similar that gets passed around and you call $translator->translate($the_message) with a default pass through implementation, that way something downstream could provide its own. Could be a factory for generating it with e.g. a configurable class name. |
I suggest opening a separate issue in which to further discuss message translation. |
Let's do, @effulgentsia. I've created #123 accordingly. Now we can finish discussing the smaller matters here. |
Thanks @larowlan! Merging. |
I did a review of this for possible future inclusion in Drupal core.
Here's some things I saw that were easier to fix than describe.
func_get_args()
Here's some observations I have from a reviewing the code
PhpFileSyncer
doesn't use the$callback
argumentPhpFileSyncer
andAbstractPath::normalize
reference making use of new features insymfony/filesystem
5.4 'once symfony 4 support is no longer needed'. As far as I can tell, the minimum version is nowsymfony/filesystem:6
so is there more file-path handling code that can be deferred to the filesystem component now?Filesystem::remove
doesn't seem to use the$callback
argument, and isfinal
, so if someone wanted to make use of that, how would they without re-implementing the whole class - should it do something with$callback
?Host::isWindows
should be static, and the interface can be removed as well as any dependency injection. This could then be used inPathFactory
too.