Skip to content

Commit

Permalink
Extracted the FileUploadNormalizer service (#346)
Browse files Browse the repository at this point in the history
  • Loading branch information
Toflar authored Jul 3, 2024
1 parent c208842 commit 86388e4
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 474 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"require": {
"php": "^8.1",
"composer-plugin-api": "^2.0",
"codefog/contao-haste": "^5.0",
"codefog/contao-haste": "^5.2",
"contao/core-bundle": "^4.13.17 || ^5.1.1",
"doctrine/dbal": "^3.4",
"doctrine/orm": "^2.19",
Expand Down
2 changes: 1 addition & 1 deletion config/listeners.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

namespace Symfony\Component\DependencyInjection\Loader\Configurator;

use Codefog\HasteBundle\FileUploadNormalizer;
use Codefog\HasteBundle\Formatter;
use Symfony\Contracts\Translation\TranslatorInterface;
use Terminal42\NotificationCenterBundle\Backend\AutoSuggester;
Expand All @@ -29,7 +30,6 @@
use Terminal42\NotificationCenterBundle\NotificationCenter;
use Terminal42\NotificationCenterBundle\NotificationType\NotificationTypeRegistry;
use Terminal42\NotificationCenterBundle\Token\Definition\Factory\TokenDefinitionFactoryInterface;
use Terminal42\NotificationCenterBundle\Util\FileUploadNormalizer;

return static function (ContainerConfigurator $container): void {
$services = $container->services();
Expand Down
9 changes: 0 additions & 9 deletions config/services.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
use Terminal42\NotificationCenterBundle\Token\Definition\Factory\ChainTokenDefinitionFactory;
use Terminal42\NotificationCenterBundle\Token\Definition\Factory\CoreTokenDefinitionFactory;
use Terminal42\NotificationCenterBundle\Token\Definition\Factory\TokenDefinitionFactoryInterface;
use Terminal42\NotificationCenterBundle\Util\FileUploadNormalizer;

return static function (ContainerConfigurator $container): void {
$services = $container->services();
Expand Down Expand Up @@ -79,12 +78,4 @@
service('translation.locale_switcher')->nullOnInvalid(),
])
;

$services->set(FileUploadNormalizer::class)
->args([
param('kernel.project_dir'),
service('mime_types'),
service('contao.filesystem.virtual.files'),
])
;
};
2 changes: 1 addition & 1 deletion src/EventListener/ProcessFormDataListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@

namespace Terminal42\NotificationCenterBundle\EventListener;

use Codefog\HasteBundle\FileUploadNormalizer;
use Contao\CoreBundle\DependencyInjection\Attribute\AsHook;
use Contao\Form;
use Contao\StringUtil;
use Terminal42\NotificationCenterBundle\BulkyItem\FileItem;
use Terminal42\NotificationCenterBundle\NotificationCenter;
use Terminal42\NotificationCenterBundle\Parcel\Stamp\BulkyItemsStamp;
use Terminal42\NotificationCenterBundle\Util\FileUploadNormalizer;

#[AsHook('processFormData')]
class ProcessFormDataListener
Expand Down
198 changes: 0 additions & 198 deletions src/Util/FileUploadNormalizer.php

This file was deleted.

Loading

0 comments on commit 86388e4

Please sign in to comment.