Skip to content

Commit

Permalink
[Maintenance] Deprecate soon to be completely unused file manager
Browse files Browse the repository at this point in the history
  • Loading branch information
NoResponseMate committed Feb 4, 2024
1 parent 297ac88 commit 18599b4
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 1 deletion.
5 changes: 5 additions & 0 deletions UPGRADE-1.5.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,8 @@
1. Passing `$creditMemoPdfFileGenerator` and `$fileManager` to the constructor of
`Sylius\RefundPlugin\Sender\CreditMemoEmailSender` as the first and third
arguments respectively has been deprecated and will be prohibited in 2.0.

2. The `Sylius\RefundPlugin\File\FileManagerInterface` interface,
`Sylius\RefundPlugin\File\TemporaryFileManager` class and
service with id `Sylius\RefundPlugin\File\TemporaryFileManager`
have all been deprecated and will be removed in 2.0. There is no replacement.
3 changes: 3 additions & 0 deletions src/File/FileManagerInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@

namespace Sylius\RefundPlugin\File;

/**
* @deprecated since 1.5, to be removed in 2.0
*/
interface FileManagerInterface
{
public function createWithContent(string $fileName, string $content): void;
Expand Down
3 changes: 3 additions & 0 deletions src/File/TemporaryFileManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@

namespace Sylius\RefundPlugin\File;

/**
* @deprecated since 1.5, to be removed in 2.0
*/
final class TemporaryFileManager implements FileManagerInterface
{
private string $baseDirectory;
Expand Down
4 changes: 3 additions & 1 deletion src/Resources/config/services.xml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,9 @@
<deprecated package="sylius/refund-plugin" version="1.0">The "%alias_id%" service alias is deprecated and will be removed in RefundPlugin 2.0, use Sylius\RefundPlugin\Sender\CreditMemoEmailSenderInterface instead.</deprecated>
</service>

<service id="Sylius\RefundPlugin\File\TemporaryFileManager" />
<service id="Sylius\RefundPlugin\File\TemporaryFileManager">
<deprecated package="sylius/refund-plugin" version="1.5">The "%service_id%" service is deprecated and will be removed in RefundPlugin 2.0, there is no replacement.</deprecated>
</service>

<service id="Sylius\RefundPlugin\ResponseBuilder\CreditMemoFileResponseBuilderInterface" class="Sylius\RefundPlugin\ResponseBuilder\CreditMemoFileResponseBuilder" />
<service id="Sylius\RefundPlugin\ResponseBuilder\CreditMemoFileResponseBuilder" alias="Sylius\RefundPlugin\ResponseBuilder\CreditMemoFileResponseBuilderInterface">
Expand Down

0 comments on commit 18599b4

Please sign in to comment.