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

allowing all .twig files (for including xml files to) #2513

Closed
wants to merge 1 commit into from

Conversation

christopherPix
Copy link
Contributor

1. Why is this change necessary?

Because you cant modify for example the Sitemap.xml.twig file (so i cant make a custom Sitemap-Generator with Multilanguage functions...)

2. What does this change do, exactly?

allowing ALL files to template changes which ends with .twig (so this will also work for robot.txt for example)

3. Describe each step to reproduce the issue or behaviour.

try to extend the Sitemap.xml.twig and you will see the Template changes will not be recognized by Shopware

4. Please link to the relevant issues (if any).

(no issue created)

5. Checklist

  • I have written tests and verified that they fail without my change
  • I have created a changelog file with all necessary information about my changes
  • I have written or adjusted the documentation according to my changes
  • This change has comments for package types, values, functions, and non-obvious lines of code
  • I have read the contribution requirements and fulfil them.

@CLAassistant
Copy link

CLAassistant commented Jun 1, 2022

CLA assistant check
All committers have signed the CLA.

@github-actions
Copy link

github-actions bot commented Jun 1, 2022

Warnings
⚠️ The Pull Request doesn't contain any changelog file

@codecov
Copy link

codecov bot commented Jun 1, 2022

Codecov Report

Merging #2513 (7b7462c) into trunk (108e2a9) will increase coverage by 0.01%.
The diff coverage is n/a.

❗ Current head 7b7462c differs from pull request most recent head cfa2f31. Consider uploading reports for the commit cfa2f31 to get more accurate results

@@            Coverage Diff             @@
##            trunk    #2513      +/-   ##
==========================================
+ Coverage   64.99%   65.00%   +0.01%     
==========================================
  Files        3976     3976              
  Lines       82241    82246       +5     
==========================================
+ Hits        53451    53465      +14     
+ Misses      28790    28781       -9     
Impacted Files Coverage Δ
src/Core/Framework/App/Template/TemplateLoader.php 93.75% <ø> (ø)
...Content/Media/Subscriber/MediaLoadedSubscriber.php 94.44% <0.00%> (-5.56%) ⬇️
src/Core/Checkout/Cart/PriceDefinitionFactory.php 40.00% <0.00%> (-4.45%) ⬇️
...re/Framework/Api/Response/Type/JsonFactoryBase.php 28.57% <0.00%> (-2.20%) ⬇️
...torefront/Framework/Twig/TemplateDataExtension.php 95.91% <0.00%> (-2.05%) ⬇️
...yer/CheapestPrice/CheapestPriceAccessorBuilder.php 76.00% <0.00%> (-1.56%) ⬇️
...tent/ContactForm/SalesChannel/ContactFormRoute.php 95.58% <0.00%> (-1.43%) ⬇️
...nistration/Controller/AdministrationController.php 58.41% <0.00%> (-0.59%) ⬇️
...Core/Migration/V6_3/Migration1572193798TaxRule.php 100.00% <0.00%> (ø)
...out/Promotion/Cart/PromotionDeliveryCalculator.php 82.63% <0.00%> (+0.59%) ⬆️
... and 4 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 108e2a9...cfa2f31. Read the comment docs.

@keulinho
Copy link
Contributor

keulinho commented Jun 2, 2022

Hey @christopherPix thanks for your contribution! 🎉 💙

In order to be able to merge your PR please sign the Contributor License Agreement with the email address you used as the comitter address of your changes.

Additionally please adapt the \Shopware\Core\Framework\Test\App\Template\TemplateLoaderTest::testGetTemplatePathsForApp test case and for example a xml.twig file to the fixture app and assert the template loader will find that file too.

@shopwareBot
Copy link

Hello,

thank you for creating this pull request.
I have opened an issue on our Issue Tracker for you. See the issue link: https://issues.shopware.com/issues/NEXT-21959

Please use this issue to track the state of your pull request.

@NiklasLimberg
Copy link
Contributor

Hi, @christopherPix thanks for your contribution

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.

None yet

8 participants