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

No fallback to Shopware6.5 path style for shopware-cli project ci command #425

Open
ioanok opened this issue Oct 24, 2024 · 1 comment
Open
Labels
question Further information is requested

Comments

@ioanok
Copy link

ioanok commented Oct 24, 2024

PHP Version

8.2

Shopware Version

6.5

Plugin Version

0.4.55

Actual behaviour

When using shopware-cli project ci with Shopware 6.5, especially with B2B Suite? It seems to be rebuilding the storefront files every time, even though they already come with the extension.
This is because shopware-cli is looking for a shopware 6.6 style path

sw6.6 path: vendor/store.shopware.com/swagb2bplatform/src/Resources/app/storefront/dist/storefront/js/swag-b2b-platform/swag-b2b-platform.js
sw6.5 path: vendor/store.shopware.com/swagb2bplatform/src/Resources/app/storefront/dist/storefront/js/swag-b2b-platform.js

Because the path does not match, the tool builds the assets of swagb2bplatform, and the result overrides the original minified JS file. This new file is broken and can not be used; you will get an error like in the screenshot.

For shopware-cli project storefront-build there is a fallback for sw 6.5 path-style, but nothing for shopware-cli project ci

jsFile := filepath.Join("js", kebabCased+DotJs)

if newLayout {
	jsFile = filepath.Join("js", kebabCased, kebabCased+DotJs)
}

The logic which has no fallback when you run shopware-cli project ci
https://github.com/FriendsOfShopware/shopware-cli/blob/main/extension/asset_platform.go#L437

Expected behaviour

  • shopware-cli project ci should have a fallback to Shopware 6.5 path style
  • the new builder file should not break, and should run as expected

Steps to Reproduce?

build with shopware-cli project ci a demo shopware project which has B2B Suite plugin installed

@shyim
Copy link
Member

shyim commented Oct 26, 2024

I just remembered the always build storefront is expected so in 6.5. Because the build JS files are not stable and may break at any time.

Shopware 6.6 introduced isolated JS builds, so each plugin is compiled alone without external dependencies.

@shyim shyim added the question Further information is requested label Oct 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants