Skip to content

Feature/moved settings to shopware backend - #4

Open
markus-uderhardt wants to merge 12 commits into
developfrom
feature/moved-settings-to-shopware-backend
Open

Feature/moved settings to shopware backend#4
markus-uderhardt wants to merge 12 commits into
developfrom
feature/moved-settings-to-shopware-backend

Conversation

@markus-uderhardt

Copy link
Copy Markdown
Contributor

No description provided.

@markus-uderhardt markus-uderhardt self-assigned this Jul 7, 2026
@markus-uderhardt
markus-uderhardt force-pushed the feature/moved-settings-to-shopware-backend branch from cf2c0d4 to 1eb8a12 Compare July 7, 2026 06:38
Comment on lines +40 to +41
$providerName = $this->resolveDefaultProviderName();
assert(is_string($providerName));

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Das ist komisch, da resolveDefaultProviderName NULL zurückgeben kann und danach prüfst du auf is_string.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Ist angepasst

Comment thread src/Core/System/Snippet/TranslationProviderResolver.php Outdated
Comment thread src/Core/System/Snippet/TranslationProviderResolver.php Outdated

if (!$this->hasProvider($salesChannelId)) {
throw new RuntimeException(\sprintf('No provider for salesChannel "%s" not found.', $salesChannelId));
if (!$this->hasSalesChannelProvider($salesChannelId)) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Da bin ich mir nicht sicher. Letztlich soll er hier prüfen ob es einen Default oder SalesChannel spezifischen Provider gibt.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Dafür gibt es ja die getProvider Funktion. Hier in dem Fall soll er doch gezielt nach dem SalesChannel gucken.

$providerName = $this->resolveSalesChannelProviderName($salesChannelId);
assert(is_string($providerName), 'Provider map value must be string');

return $this->providers[$salesChannelId] = $this->providerCollection->get($providerName);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Auch hier muss mit ??= gearbeitet werden, oder wir sparen uns $providers da wir mit dem providerName in providerCollection suchen können.
Dann kann die class auch readonly werden

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Hab ich so angepasst, dass wir uns $provider sparen und aus der Collection raus arbeiten

Comment thread src/Resolver/ConfigurationResolver.php Outdated

public function getSalesChannelProviderOverride(string $salesChannelId): ?string
{
$config = $this->systemConfigService->getDomain(self::PLUGIN_CONFIG_PREFIX, $salesChannelId, false);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Warum getDomain? Sollte es nicht getString sein?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Habe ich angepasst.

Comment thread src/ShopwareTranslationBridgeConfig.php Outdated
Comment on lines +9 to +13
public const string DOMAIN = 'ShopwareTranslationBridge.config';

public const string KEY_DEFAULT_PROVIDER = self::DOMAIN . '.defaultProvider';

public const string KEY_RESPECT_TRANSLATION_FILES = self::DOMAIN . '.respectTranslationFiles';

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Das solltest du in ConfigurationResolver belassen.

@markus-uderhardt markus-uderhardt Jul 27, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Ist bereits erledigt. Die Datei ist nur noch nicht aufgeräumt gewesen, da ich aus einem andere Projekt heraus gearbeitet habe, und der Change nicht übernommen wurde. Die Datei ist nun korrekt aufgeräumt

Comment thread src/Resolver/ConfigurationResolver.php Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants