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

[Maintenance] Optional pdf generator #367

Merged
merged 15 commits into from
Apr 27, 2022

Conversation

Rafikooo
Copy link
Contributor

@Rafikooo Rafikooo commented Apr 20, 2022

Q A
Branch? 1.2
Bug fix? no
New feature? yes

To not force users to install the wkhtmltopdf binary we introduced a configuration that allows disabling PDF generation.

# config/packages/sylius_refund.yaml
sylius_refund:
    pdf_generator:
        enabled: false

Turned on:
image

Turned off:
image

Turned on:
image

Turned off:
image

Turned on:
image

Turned off:
image

And same on the customer account page

@Rafikooo Rafikooo added Enhancement Minor issues and PRs improving the current solutions (optimizations, typo fixes, etc.). Maintenance Configurations, READMEs, releases, etc. labels Apr 20, 2022
@Rafikooo Rafikooo requested a review from a team as a code owner April 20, 2022 23:37
@AdamKasp
Copy link
Contributor

And you need to check send and resend too., CreditMemoEmailSender also creates the pdf and if I see it correct you don't cover this case

@Rafikooo Rafikooo changed the title [WIP] Optional pdf generator [Maintenance] Optional pdf generator Apr 21, 2022
Copy link
Member

@GSadee GSadee left a comment

Choose a reason for hiding this comment

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

It would be nice to add a test for checking if everything will be ok when the flag is disabled and there is no wkhtmltopdf binary defined

src/Action/Shop/DownloadCreditMemoAction.php Outdated Show resolved Hide resolved
src/Resources/config/app/config.yml Outdated Show resolved Hide resolved
src/Resources/views/Order/Shop/_downloadButton.html.twig Outdated Show resolved Hide resolved
src/Sender/CreditMemoEmailSender.php Outdated Show resolved Hide resolved
src/Sender/CreditMemoEmailSender.php Outdated Show resolved Hide resolved
@Rafikooo Rafikooo force-pushed the optional-pdf-generator branch 7 times, most recently from f2f9f6c to 43f4779 Compare April 25, 2022 12:55
@GSadee GSadee changed the base branch from master to 1.2 April 26, 2022 08:26
@GSadee GSadee force-pushed the optional-pdf-generator branch 2 times, most recently from 817be96 to 047117b Compare April 26, 2022 09:57
@GSadee GSadee added the Feature New feature proposals. label Apr 26, 2022
@AdamKasp AdamKasp merged commit 31e5753 into Sylius:1.2 Apr 27, 2022
@AdamKasp
Copy link
Contributor

AdamKasp commented Apr 27, 2022

Thanks, Rafał & Grzegorz! 🎉

lchrusciel added a commit that referenced this pull request Apr 27, 2022
…bled to the main workflow (GSadee)

This PR was merged into the 1.2 branch.

Discussion
----------

| Q               | A
| --------------- | -----
| Branch?         | 1.2
| Bug fix?        | no
| New feature?    | no
| Related tickets | after #367


Commits
-------

86dcb02 [GitHub Actions] Include build with PDF generation disabled to the ma…
752056f [GitHub Actions] Merge steps for disabling PDF generation into one
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Minor issues and PRs improving the current solutions (optimizations, typo fixes, etc.). Feature New feature proposals. Maintenance Configurations, READMEs, releases, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants