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

fix export command wrong file path use project dir instead of root dir #61

Merged
merged 2 commits into from
Jan 5, 2024

Conversation

kayaArvatis
Copy link
Contributor

Currently %kernel.root_dir% is used as path for exporting files with the command sw:importexport:export which causes saving the files to the wrong path: vendor/shopware/shopware. With this change %kernel.project_dir% is used as export path.

Tested Environment:

  • PHP 8.0.30
  • DB: 10.3.39-MariaDB
  • Shopware with Composer: 5.7.16

@kayaArvatis
Copy link
Contributor Author

@mitelg %kernel.project_dir% seems wrong in the docker container that is used for testing, the path should be /shopware but is /shopware/custom/plugins/SwagImportExport.

This Problem may only occur on composer based installations.

@mitelg
Copy link
Contributor

mitelg commented Dec 28, 2023

hey @kayaArvatis

sorry for the late response, I was on vacation 🎄
first: thanks for your contribution 👍

to fix the test, you also need to adjust the helper trait for the command tests: https://github.com/shopware5/SwagImportExport/blob/main/Tests/Helper/CommandTestCaseTrait.php#L64
otherwise your change looks good

@mitelg mitelg self-requested a review December 28, 2023 07:38
@kayaArvatis
Copy link
Contributor Author

Hi @mitelg

I have fixed the tests seems now ok :)

@mitelg mitelg removed the Incomplete label Jan 5, 2024
@mitelg mitelg merged commit f344a57 into shopware5:main Jan 5, 2024
5 checks passed
@mitelg
Copy link
Contributor

mitelg commented Jan 5, 2024

thanks for your contribution @kayaArvatis 👍🎉💙

I just released version 4.1.4 with your fix

@mitelg mitelg added the Accepted label Jan 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants