-
Notifications
You must be signed in to change notification settings - Fork 203
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
Added script for fixing var_dir issues for images #2995
base: 6.13
Are you sure you want to change the base?
Added script for fixing var_dir issues for images #2995
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
Outdated
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unused now? ;)
This is port of legacy script that fixes images
var_dir
issues.This PR is 6.13 version of #2638