Added script for fixing var_dir issues for images#2995
Added script for fixing var_dir issues for images#2995mateuszbieniek wants to merge 19 commits intoezsystems:6.13from
Conversation
eZ/Bundle/EzPublishMigrationBundle/Command/LegacyStorage/FixImagesVarDirCommand.php
Outdated
Show resolved
Hide resolved
eZ/Bundle/EzPublishMigrationBundle/Command/LegacyStorage/FixImagesVarDirCommand.php
Outdated
Show resolved
Hide resolved
eZ/Bundle/EzPublishMigrationBundle/Resources/config/services.yml
Outdated
Show resolved
Hide resolved
eZ/Publish/Core/FieldType/Image/ImageStorage/Gateway/LegacyStorage.php
Outdated
Show resolved
Hide resolved
eZ/Bundle/EzPublishMigrationBundle/Command/LegacyStorage/FixImagesVarDirCommand.php
Outdated
Show resolved
Hide resolved
eZ/Publish/Core/FieldType/Image/ImageStorage/Gateway/LegacyStorage.php
Outdated
Show resolved
Hide resolved
…agesVarDirCommand.php Co-Authored-By: Konrad Oboza <34310128+konradoboza@users.noreply.github.com>
…agesVarDirCommand.php Co-Authored-By: Konrad Oboza <34310128+konradoboza@users.noreply.github.com>
Co-Authored-By: Konrad Oboza <34310128+konradoboza@users.noreply.github.com>
Co-Authored-By: Konrad Oboza <34310128+konradoboza@users.noreply.github.com>
…agesVarDirCommand.php Co-Authored-By: Konrad Oboza <34310128+konradoboza@users.noreply.github.com>
…rage.php Co-Authored-By: Konrad Oboza <34310128+konradoboza@users.noreply.github.com>
…rage.php Co-Authored-By: Konrad Oboza <34310128+konradoboza@users.noreply.github.com>
eZ/Bundle/EzPublishMigrationBundle/Command/LegacyStorage/FixImagesVarDirCommand.php
Outdated
Show resolved
Hide resolved
eZ/Bundle/EzPublishMigrationBundle/Command/LegacyStorage/FixImagesVarDirCommand.php
Show resolved
Hide resolved
eZ/Publish/Core/FieldType/Image/ImageStorage/Gateway/DoctrineStorage.php
Show resolved
Hide resolved
eZ/Publish/Core/FieldType/Image/ImageStorage/Gateway/DoctrineStorage.php
Show resolved
Hide resolved
eZ/Publish/Core/FieldType/Image/ImageStorage/Gateway/DoctrineStorage.php
Show resolved
Hide resolved
alongosz
left a comment
There was a problem hiding this comment.
I have a very general question. What is the expected usage of this command? Is it often, rare but can occur many times in the future or just one case during migration from eZ Publish?
Asking for two reasons. The first one is that EzPublishMigrationBundle has been dropped for eZ Platform 3.0, so you might get a surprise on a merge up.
The second reason is that if this is for regular maintenance, we need some integration test coverage (meaning those executed on real databases in integration suite). I could allow doing integration on gateway directly (usually it's on API), but we need to figure out the best place for such tests as this hasn't been done yet. TBH to ensure stability, most of this code (minus console output and I/O operation should be extracted to a separate service).
Why? Because when refactoring internal operations of Storage or even extracting Storage, I will for sure forget to test new methods.
But if this is just for one time migration then please disregard ;)
Anyway:
eZ/Bundle/EzPublishMigrationBundle/Command/LegacyStorage/FixImagesVarDirCommand.php
Outdated
Show resolved
Hide resolved
eZ/Bundle/EzPublishMigrationBundle/Command/LegacyStorage/FixImagesVarDirCommand.php
Outdated
Show resolved
Hide resolved
eZ/Bundle/EzPublishMigrationBundle/Command/LegacyStorage/FixImagesVarDirCommand.php
Outdated
Show resolved
Hide resolved
eZ/Bundle/EzPublishMigrationBundle/Command/LegacyStorage/FixImagesVarDirCommand.php
Outdated
Show resolved
Hide resolved
| * @param InputInterface $input | ||
| * @param OutputInterface $output |
There was a problem hiding this comment.
CS
| * @param InputInterface $input | |
| * @param OutputInterface $output |
eZ/Publish/Core/FieldType/Image/ImageStorage/Gateway/DoctrineStorage.php
Show resolved
Hide resolved
eZ/Publish/Core/FieldType/Image/ImageStorage/Gateway/DoctrineStorage.php
Show resolved
Hide resolved
eZ/Publish/Core/FieldType/Image/ImageStorage/Gateway/DoctrineStorage.php
Outdated
Show resolved
Hide resolved
eZ/Publish/Core/FieldType/Image/ImageStorage/Gateway/DoctrineStorage.php
Show resolved
Hide resolved
| /** | ||
| * Returns the number of recorded references outside of the given $path. | ||
| * | ||
| * @param string $uri File IO uri (not legacy) | ||
| * | ||
| * @return int | ||
| */ |
There was a problem hiding this comment.
CS: Please skip the doc, if the doc exists on parent (no inheritdoc needed also)
Co-Authored-By: Andrew Longosz <alongosz@users.noreply.github.com>
…agesVarDirCommand.php Co-Authored-By: Andrew Longosz <alongosz@users.noreply.github.com>
…agesVarDirCommand.php Co-Authored-By: Andrew Longosz <alongosz@users.noreply.github.com>
…agesVarDirCommand.php Co-Authored-By: Andrew Longosz <alongosz@users.noreply.github.com>
…torage.php Co-Authored-By: Konrad Oboza <34310128+konradoboza@users.noreply.github.com>
…shMigrationExtension.php Co-Authored-By: Andrew Longosz <alongosz@users.noreply.github.com>
…torage.php Co-Authored-By: Konrad Oboza <34310128+konradoboza@users.noreply.github.com>
…abase.php Co-Authored-By: Andrew Longosz <alongosz@users.noreply.github.com>
| /** | ||
| * @var \eZ\Publish\Core\Persistence\Database\DatabaseHandler | ||
| */ | ||
| private $db; |
This is port of legacy script that fixes images
var_dirissues.This PR is 6.13 version of #2638