Skip to content

Feature/moved settings to shopware backend - #4

Open
markus-uderhardt wants to merge 18 commits into
release/shopware-config-reworkfrom
feature/moved-settings-to-shopware-backend
Open

Feature/moved settings to shopware backend#4
markus-uderhardt wants to merge 18 commits into
release/shopware-config-reworkfrom
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
Comment thread src/ShopwareTranslationBridgeConfig.php Outdated
Comment thread src/Resolver/ConfigurationResolver.php Outdated
@markus-uderhardt
markus-uderhardt marked this pull request as draft August 4, 2026 06:47
@markus-uderhardt
markus-uderhardt marked this pull request as ready for review August 4, 2026 14:06
@Scarbous
Scarbous requested a review from sd-lueckel August 4, 2026 14:09
@markus-uderhardt
markus-uderhardt changed the base branch from develop to release/shopware-config-rework August 5, 2026 12:56
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