From afafdc2602cfca5fb9f3882141b3da3cf873338a Mon Sep 17 00:00:00 2001 From: Guillaume Sainthillier Date: Mon, 20 Jan 2025 13:16:43 +0100 Subject: [PATCH] fix typo --- .github/ISSUE_TEMPLATE/Support_Question.md | 2 +- docs/downloads/serving_files_with_a_controller.md | 2 +- docs/events/howto/remove_files_asynchronously.md | 2 +- docs/form/vich_file_type.md | 4 ++-- docs/form/vich_image_type.md | 6 +++--- docs/known_issues.md | 2 +- docs/namers.md | 4 ++-- src/Metadata/Driver/AnnotationDriver.php | 4 ++-- src/Naming/ConfigurableDirectoryNamer.php | 2 +- src/Naming/CurrentDateTimeDirectoryNamer.php | 2 +- src/Naming/HashNamer.php | 4 ++-- src/Naming/PropertyDirectoryNamer.php | 2 +- src/Naming/SlugNamer.php | 4 ++-- src/Naming/SmartUniqueNamer.php | 2 +- src/Naming/SubdirDirectoryNamer.php | 2 +- src/Storage/GaufretteStorage.php | 2 +- tests/Storage/GaufretteStorageTest.php | 2 +- 17 files changed, 24 insertions(+), 24 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/Support_Question.md b/.github/ISSUE_TEMPLATE/Support_Question.md index a5576ea6..b0657365 100644 --- a/.github/ISSUE_TEMPLATE/Support_Question.md +++ b/.github/ISSUE_TEMPLATE/Support_Question.md @@ -15,7 +15,7 @@ about: Have a problem that you can't figure out? 🤔 diff --git a/docs/downloads/serving_files_with_a_controller.md b/docs/downloads/serving_files_with_a_controller.md index 524ed0b6..a7e666f2 100644 --- a/docs/downloads/serving_files_with_a_controller.md +++ b/docs/downloads/serving_files_with_a_controller.md @@ -30,7 +30,7 @@ class AcmeController extends AbstractController Instead of forcing the file to be downloaded by you browser, you can set it as an **inline** content. Depending on the capabilities of the browser, the file should be displayed inside the browser. -You can use it to keep the file non publicly accessible (with access checks for exemple) but still +You can use it to keep the file non publicly accessible (with access checks for example) but still displayable inside HTML (for images) or directly previewable (like PDFs). Set the `forceDownload` argument to `false` to disable the forced download behaviour. diff --git a/docs/events/howto/remove_files_asynchronously.md b/docs/events/howto/remove_files_asynchronously.md index 4caebc7c..89ebd688 100644 --- a/docs/events/howto/remove_files_asynchronously.md +++ b/docs/events/howto/remove_files_asynchronously.md @@ -60,7 +60,7 @@ class RemoveProductImageMessageHandler implements MessageHandlerInterface } ``` -Create a event subscriber that will cancel the remove request and dispatch a remove message. +Create an event subscriber that will cancel the remove request and dispatch a remove message. ```php add('genericFile', VichImageType::class, [ **type**: `bool`, `string`, `callable` **default**: `true` -If set to `true`, download uri will automatically resolved using storage. +If set to `true`, download uri will automatically be resolved using storage. Can be string @@ -155,7 +155,7 @@ $builder->add('genericFile', VichImageType::class, [ **type**: `string` **default**: `null` -If set, image will automatically transformed using [LiipImagineBundle](https://github.com/liip/LiipImagineBundle/). +If set, image will automatically be transformed using [LiipImagineBundle](https://github.com/liip/LiipImagineBundle/). Example diff --git a/docs/known_issues.md b/docs/known_issues.md index ef3d4969..1baa7981 100644 --- a/docs/known_issues.md +++ b/docs/known_issues.md @@ -103,7 +103,7 @@ method above must take an instance of `File` as when this class is hydrated by D bundle will automatically inject an instance of `File` there. However, if you were to change the image path to a new image in that instance of `File` and attempted a `flush()` nothing would happen, instead inject a new instance of `UploadedFile` with the new path to your new -image to sucessfully trigger the upload. +image to successfully trigger the upload. **N.B.** : UploadedFile objects have a [*test* mode](https://github.com/symfony/symfony/blob/6.1/src/Symfony/Component/HttpFoundation/File/UploadedFile.php#L63) diff --git a/docs/namers.md b/docs/namers.md index 768b207e..34f34006 100644 --- a/docs/namers.md +++ b/docs/namers.md @@ -62,7 +62,7 @@ applying a transliteration. Using this namer, "a Strange name.jpg" will be uploa "a-strange-name-0eb3db03971550eb3b0371.jpg". **SlugNamer** will only transliterate uploaded file. Then, it will search if such name already exists and, if so, -will append a progresive number (to ensure uniqueness). This is useful when you want to keep your names as closer +will append a progressive number (to ensure uniqueness). This is useful when you want to keep your names as closer as possible to original ones, but is also limited to simple situations (i.e. when you're using a single mapped entity). To use it, you just have to specify the service for the `namer` configuration option of your mapping: @@ -162,7 +162,7 @@ vich_uploader: created in the `Y/m/d` format. It is possible to configure the datetime format used to create directories. For details of datetime formats see . You should also pass to this namer an option declaring a property where uploading datetime is stored in your object. -Such property will be accessed via ProperyAccessor, so it can be a public property or a getter method. +Such property will be accessed via PropertyAccessor, so it can be a public property or a getter method. For example, if your object has a `getUploadTimestamp(): \DateTimeInterface` method, you can pass `date_time_property: uploadTimestamp` to namer. diff --git a/src/Metadata/Driver/AnnotationDriver.php b/src/Metadata/Driver/AnnotationDriver.php index 94d9adba..722a6eff 100644 --- a/src/Metadata/Driver/AnnotationDriver.php +++ b/src/Metadata/Driver/AnnotationDriver.php @@ -74,8 +74,8 @@ public function getAllClassNames(): array $classes = []; $metadata = []; - foreach ($this->managerRegistryList as $managerRegisty) { - $managers = $managerRegisty->getManagers(); + foreach ($this->managerRegistryList as $managerRegistry) { + $managers = $managerRegistry->getManagers(); foreach ($managers as $manager) { $metadata[] = $manager->getMetadataFactory()->getAllMetadata(); } diff --git a/src/Naming/ConfigurableDirectoryNamer.php b/src/Naming/ConfigurableDirectoryNamer.php index 5b972111..46a5359b 100644 --- a/src/Naming/ConfigurableDirectoryNamer.php +++ b/src/Naming/ConfigurableDirectoryNamer.php @@ -5,7 +5,7 @@ use Vich\UploaderBundle\Mapping\PropertyMapping; /** - * Directory namer which can create subfolder which path is given in the directory namer's options. + * Directory namer that can create subfolder which path is given in the directory namer's options. */ class ConfigurableDirectoryNamer implements DirectoryNamerInterface, ConfigurableInterface { diff --git a/src/Naming/CurrentDateTimeDirectoryNamer.php b/src/Naming/CurrentDateTimeDirectoryNamer.php index e8ff9ced..722b3acd 100644 --- a/src/Naming/CurrentDateTimeDirectoryNamer.php +++ b/src/Naming/CurrentDateTimeDirectoryNamer.php @@ -7,7 +7,7 @@ use Vich\UploaderBundle\Util\PropertyPathUtils; /** - * Directory namer wich can create subfolder depends on current datetime. + * Directory namer that can create subfolder depends on current datetime. * * @author Vyacheslav Startsev */ diff --git a/src/Naming/HashNamer.php b/src/Naming/HashNamer.php index 8211abf4..fa28c479 100644 --- a/src/Naming/HashNamer.php +++ b/src/Naming/HashNamer.php @@ -5,7 +5,7 @@ use Vich\UploaderBundle\Mapping\PropertyMapping; /** - * Namer wich uses hash function from random string for generating names. + * Namer that uses hash function from random string for generating names. * * @author Konstantin Myakshin */ @@ -21,7 +21,7 @@ class HashNamer implements NamerInterface, ConfigurableInterface /** * @param array $options Options for this namer. The following options are accepted: - * - algorithm: wich hash algorithm to use. + * - algorithm: which hash algorithm to use. * - length: limit file name length */ public function configure(array $options): void diff --git a/src/Naming/PropertyDirectoryNamer.php b/src/Naming/PropertyDirectoryNamer.php index 139613c7..7b0619fc 100644 --- a/src/Naming/PropertyDirectoryNamer.php +++ b/src/Naming/PropertyDirectoryNamer.php @@ -10,7 +10,7 @@ use Vich\UploaderBundle\Util\Transliterator; /** - * Directory namer which can create subfolder depends on property. + * Directory namer that can create subfolder depends on property. * * @author Raynald Coupé */ diff --git a/src/Naming/SlugNamer.php b/src/Naming/SlugNamer.php index 12d90618..e9fb5006 100644 --- a/src/Naming/SlugNamer.php +++ b/src/Naming/SlugNamer.php @@ -6,7 +6,7 @@ use Vich\UploaderBundle\Util\Transliterator; /** - * This namer uses a slug to keep original name when possibile. + * This namer uses a slug to keep original name when possible. * * @author Massimiliano Arione */ @@ -29,7 +29,7 @@ public function name(object $object, PropertyMapping $mapping): string ? \sprintf('%s.%s', $basename, $extension) : $basename; - // check if there another object with same slug + // check if there is another object with same slug $num = 0; while (true) { $otherObject = $this->service->{$this->method}($slug); diff --git a/src/Naming/SmartUniqueNamer.php b/src/Naming/SmartUniqueNamer.php index 2d4a1097..330ef834 100644 --- a/src/Naming/SmartUniqueNamer.php +++ b/src/Naming/SmartUniqueNamer.php @@ -6,7 +6,7 @@ use Vich\UploaderBundle\Util\Transliterator; /** - * This namer makes filename unique by appending a uniqid. + * This namer makes filename unique by appending a uniqueid. * Also, filename is made web-friendly by transliteration. * * @author Massimiliano Arione diff --git a/src/Naming/SubdirDirectoryNamer.php b/src/Naming/SubdirDirectoryNamer.php index 36c02678..944f9cc0 100644 --- a/src/Naming/SubdirDirectoryNamer.php +++ b/src/Naming/SubdirDirectoryNamer.php @@ -5,7 +5,7 @@ use Vich\UploaderBundle\Mapping\PropertyMapping; /** - * Directory namer wich can create subfolder depends on generated filename. + * Directory namer that can create subfolder depends on generated filename. * * @author Konstantin Myakshin */ diff --git a/src/Storage/GaufretteStorage.php b/src/Storage/GaufretteStorage.php index 849b1da6..7bea9199 100644 --- a/src/Storage/GaufretteStorage.php +++ b/src/Storage/GaufretteStorage.php @@ -20,7 +20,7 @@ final class GaufretteStorage extends AbstractStorage * Constructs a new instance of FileSystemStorage. * * @param PropertyMappingFactory $factory The factory - * @param FilesystemMapInterface $filesystemMap Gaufrete filesystem factory + * @param FilesystemMapInterface $filesystemMap Gaufrette filesystem factory * @param string $protocol Gaufrette stream wrapper protocol */ public function __construct(PropertyMappingFactory $factory, protected FilesystemMapInterface $filesystemMap, protected string $protocol = 'gaufrette') diff --git a/tests/Storage/GaufretteStorageTest.php b/tests/Storage/GaufretteStorageTest.php index 3b34a19a..90f5114d 100644 --- a/tests/Storage/GaufretteStorageTest.php +++ b/tests/Storage/GaufretteStorageTest.php @@ -168,7 +168,7 @@ public function testThatRemoveMethodDoesDeleteFile(): void } /** - * Test that FileNotFound exception is catched. + * Test that FileNotFound exception is caught. */ public function testRemoveNotFoundFile(): void {