Skip to content

fix: consider time zone during migration of orders#9

Open
Dennis Garding (DennisGarding) wants to merge 19 commits into
trunkfrom
14186/time-zone-diff
Open

fix: consider time zone during migration of orders#9
Dennis Garding (DennisGarding) wants to merge 19 commits into
trunkfrom
14186/time-zone-diff

Conversation

@DennisGarding
Copy link
Copy Markdown
Contributor

@DennisGarding Dennis Garding (DennisGarding) commented Apr 24, 2026

This PR is necessary to complete the issue: shopware/shopware#14186

See PR: shopware/SwagMigrationAssistant#186

Comment thread Service/OrderService.php Outdated
Comment thread Repository/OrderRepository.php Outdated
Comment thread Repository/OrderRepository.php Outdated
@larskemper Lars Kemper (larskemper) marked this pull request as draft April 28, 2026 13:00
@MalteJanz
Copy link
Copy Markdown
Contributor

See PR: shopware/SwagMigrationAssistant#184

That linked PR was closed without any comment, can you add a comment to it and point to the correct Assistant PR here? I guess it should be this one shopware/SwagMigrationAssistant#186 ?

Also are these draft PRs "ready for review" or do you just want a quick review on the broader architecture / solution and a proper review later? Would be nice if you could write a comment if you request review on draft PRs what your expectations are or put it out of draft mode for a full review.

@DennisGarding Dennis Garding (DennisGarding) marked this pull request as ready for review May 8, 2026 06:28
Copy link
Copy Markdown
Contributor

@MalteJanz Malte Janz (MalteJanz) left a comment

Choose a reason for hiding this comment

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

As already said in the other PR, this solution likely is not feasible unless you find a clean way to support it in the Assistant:
shopware/SwagMigrationAssistant#186 (review)

public function indexAction()
{
$dbConfig = $this->container->getParameter('shopware.db');
\assert(\is_array($dbConfig));
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

\assert might not run in every environment (can be disabled in php.ini), also it shouldn't be used for user facing errors and we don't use it anywhere else in the MigrationConnector.

This should be a proper exception instead

$dbConfig = $this->container->getParameter('shopware.db');
\assert(\is_array($dbConfig));

$timezone = $dbConfig['timezone'];
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What if the array key does not exists?

Suggested change
$timezone = $dbConfig['timezone'];
$timezone = $dbConfig['timezone'] ?? '';

*Not sure which old PHP versions we need to support here, you might have to double check the minimum SW5 version this plugins supports and the minimum PHP version of that, if we can use ??

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

Successfully merging this pull request may close these issues.

5 participants