Skip to content
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

Add support for writing new IPTC segments for jpeg format and new XMP segments for PNG and GIF images formats #1570

Merged
merged 20 commits into from
Jul 22, 2020

Conversation

Nazar65
Copy link
Member

@Nazar65 Nazar65 commented Jul 7, 2020

Description (*)

Aded ability to write IPTC data to the file that not containt IPTC segment
Refactored integration tests

Fixed Issues (if relevant)

  1. Fixes Write XMP metadata to a file that does not contain XMP metadata #1554: Write XMP metadata to a file that does not contain XMP metadata
  2. Fixes Add support of GIF XMP writing to MediaGalleryMetadat module implementation #1552: 1552: Add support of GIF XMP writing to MediaGalleryMetadat module implementation

Manual testing scenarios (*)

n/a

@Nazar65
Copy link
Member Author

Nazar65 commented Jul 7, 2020

@magento run all tests

@Nazar65
Copy link
Member Author

Nazar65 commented Jul 7, 2020

@magento run all tests

@Nazar65
Copy link
Member Author

Nazar65 commented Jul 8, 2020

@magento run all tests

@Nazar65
Copy link
Member Author

Nazar65 commented Jul 8, 2020

@magento run all tests

1 similar comment
@Nazar65
Copy link
Member Author

Nazar65 commented Jul 8, 2020

@magento run all tests

@Nazar65
Copy link
Member Author

Nazar65 commented Jul 8, 2020

@magento run all tests

@Nazar65 Nazar65 changed the title Write IPTC metadata to a file that does not contain IPTC metadata [WIP] Add support for writing new IPTC segments for jpeg format and new XMP segments for PNG and GIF images formats Jul 8, 2020
@Nazar65
Copy link
Member Author

Nazar65 commented Jul 8, 2020

@magento run all tests

{
if (is_callable('iptcembed')) {
$iptcData = iptcparse($segment->getData());
if (is_callable('iptcembed') && is_callable('iptcparse')) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's throw an exception if functions are not callable

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

@Nazar65
Copy link
Member Author

Nazar65 commented Jul 20, 2020

@magento run all tests

@Nazar65 Nazar65 changed the title [WIP] Add support for writing new IPTC segments for jpeg format and new XMP segments for PNG and GIF images formats Add support for writing new IPTC segments for jpeg format and new XMP segments for PNG and GIF images formats Jul 20, 2020
@Nazar65
Copy link
Member Author

Nazar65 commented Jul 20, 2020

@magento run all tests

@Nazar65
Copy link
Member Author

Nazar65 commented Jul 20, 2020

@magento run all tests

@Nazar65
Copy link
Member Author

Nazar65 commented Jul 20, 2020

@magento run all tests

@Nazar65
Copy link
Member Author

Nazar65 commented Jul 21, 2020

@magento run all tests

1 similar comment
@Nazar65
Copy link
Member Author

Nazar65 commented Jul 21, 2020

@magento run all tests

@sivaschenko
Copy link
Member

There is a fatal error in integration tests:

phpunit.xml:

<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/9.1/phpunit.xsd" colors="true" columns="max" beStrictAboutTestsThatDoNotTestAnything="false" bootstrap="./framework/bootstrap.php" stderr="true" testSuiteLoaderClass="Magento\TestFramework\SuiteLoader" testSuiteLoaderFile="framework/Magento/TestFramework/SuiteLoader.php">
    <script>(function(){var t=[],e=!0;window.addEventListener("onelogin.markSubmitCandidates",(function(n){t.forEach((function(t){t.setAttribute&&t.setAttribute("data-ol-has-click-handler","")})),t=[],e=!1,window.dispatchEvent(new CustomEvent("onelogin.submitCandidatesMarked"))}),{once:!0}),EventTarget.prototype.ol_originalAddEventListener=EventTarget.prototype.addEventListener,EventTarget.prototype.addEventListener=function(n,o){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.ol_originalAddEventListener(n,o,r),e&&"click"===n&&t.push(this)}})("")</script>
    <testsuites>
        <testsuite name="Magento Integration Tests ce 11-5">
            <file>testsuite/Magento/IntegrationTest.php</file>
        </testsuite>
        <testsuite name="Magento Integration Tests Real Suite">
            <file>testsuite/Magento/Framework/Console/CliTest.php</file>
            <file>testsuite/Magento/Framework/Css/PreProcessor/Adapter/CssInlinerTest.php</file>
            <file>testsuite/Magento/Framework/Css/PreProcessor/File/Collector/AggregatedTest.php</file>
            <file>testsuite/Magento/Framework/DB/Adapter/InterfaceTest.php</file>
            <file>testsuite/Magento/Framework/DB/Adapter/Pdo/MysqlTest.php</file>
            <file>testsuite/Magento/Framework/DB/DataConverter/DataConverterTest.php</file>
            <file>testsuite/Magento/Framework/DB/HelperTest.php</file>
            <file>testsuite/Magento/Framework/DB/TransactionTest.php</file>
            <file>testsuite/Magento/Framework/Data/Argument/Interpreter/BaseStringUtilsTest.php</file>
            <file>testsuite/Magento/Framework/Data/Argument/Interpreter/StringUtilsTest.php</file>
            <file>testsuite/Magento/Framework/Data/Form/Element/DateTest.php</file>
            <file>testsuite/Magento/Framework/Data/Form/Element/FieldsetTest.php</file>
            <file>testsuite/Magento/Framework/Data/Form/Element/ImageTest.php</file>
            <file>testsuite/Magento/Framework/Data/Wysiwyg/NormalizerTest.php</file>
        </testsuite>
    </testsuites>
    <filter>
        <whitelist>
            <directory suffix=".php">../../../app/code/*</directory>
            <directory suffix=".php">../../../lib/internal/Magento</directory>
            <directory suffix=".php">../../../update/app/code</directory>
            <exclude>
                <directory>../../../app/code/*/*/Test</directory>
                <directory>../../../lib/internal/*/*/Test</directory>
                <directory>../../../lib/internal/*/*/*/Test</directory>
                <directory>../../../setup/src/*/*/Test</directory>
                <directory>../../../update/app/code/*/*/Test</directory>
            </exclude>
        </whitelist>
    </filter>
    <php>
        <includePath>.</includePath>
        <includePath>testsuite</includePath>
        <ini name="date.timezone" value="America/Los_Angeles"/>
        <ini name="xdebug.max_nesting_level" value="200"/>
        <const name="TESTS_INSTALL_CONFIG_FILE" value="etc/install-config-mysql.php"/>
        <const name="TESTS_GLOBAL_CONFIG_FILE" value="etc/config-global.php"/>
        <const name="TESTS_GLOBAL_CONFIG_DIR" value="../../../app/etc"/>
        <const name="TESTS_CLEANUP" value="enabled"/>
        <const name="TESTS_MEM_LEAK_LIMIT" value=""/>
        <const name="TESTS_EXTRA_VERBOSE_LOG" value="1"/>
        <const name="TESTS_MAGENTO_MODE" value="developer"/>
        <const name="TESTS_ERROR_LOG_LISTENER_LEVEL" value="-1"/>
        <const name="TESTS_PARALLEL_THREAD" value=""/>
        <const name="TESTS_PARALLEL_RUN" value="1"/>
        <const name="USE_OVERRIDE_CONFIG" value="enabled"/>
    </php>
    <listeners>
        <listener class="Yandex\Allure\Adapter\AllureAdapter">
            <arguments>
                <string>var/allure-results</string>
                <!--  XML files output directory  -->
                <boolean>true</boolean>
                <!--  Whether to delete previous results on rerun  -->
                <array>
                    <!--  A list of custom annotations to ignore (optional)  -->
                    <element key="codingStandardsIgnoreStart">
                        <string>codingStandardsIgnoreStart</string>
                    </element>
                    <element key="codingStandardsIgnoreEnd">
                        <string>codingStandardsIgnoreEnd</string>
                    </element>
                    <element key="expectedExceptionMessageRegExp">
                        <string>expectedExceptionMessageRegExp</string>
                    </element>
                    <element key="magentoAdminConfigFixture">
                        <string>magentoAdminConfigFixture</string>
                    </element>
                    <element key="magentoAppArea">
                        <string>magentoAppArea</string>
                    </element>
                    <element key="magentoAppIsolation">
                        <string>magentoAppIsolation</string>
                    </element>
                    <element key="magentoCache">
                        <string>magentoCache</string>
                    </element>
                    <element key="magentoComponentsDir">
                        <string>magentoComponentsDir</string>
                    </element>
                    <element key="magentoConfigFixture">
                        <string>magentoConfigFixture</string>
                    </element>
                    <element key="magentoDataFixture">
                        <string>magentoDataFixture</string>
                    </element>
                    <element key="magentoDataFixtureBeforeTransaction">
                        <string>magentoDataFixtureBeforeTransaction</string>
                    </element>
                    <element key="magentoDbIsolation">
                        <string>magentoDbIsolation</string>
                    </element>
                    <element key="magentoIndexerDimensionMode">
                        <string>magentoIndexerDimensionMode</string>
                    </element>
                </array>
            </arguments>
        </listener>
        <!-- Run other listeners after AllureAdapter so it initializes properly -->
        <listener class="Magento\TestFramework\Event\PhpUnit"/>
        <listener class="Magento\TestFramework\ErrorLog\Listener"/>
    </listeners>
</phpunit>

Error:

10:18:21 [Integration-11-ce] .PHP Fatal error:  Uncaught InvalidArgumentException: Invalid scope type 'stores' in /var/www/html/lib/internal/Magento/Framework/App/ScopeResolverPool.php:40
10:18:21 [Integration-11-ce] Stack trace:
10:18:21 [Integration-11-ce] #0 /var/www/html/lib/internal/Magento/Framework/App/Config/ScopeCodeResolver.php(48): Magento\Framework\App\ScopeResolverPool->get()
10:18:21 [Integration-11-ce] #1 /var/www/html/dev/tests/integration/framework/Magento/TestFramework/App/Config.php(80): Magento\Framework\App\Config\ScopeCodeResolver->resolve()
10:18:21 [Integration-11-ce] #2 /var/www/html/dev/tests/integration/framework/Magento/TestFramework/App/MutableScopeConfig.php(50): Magento\TestFramework\App\Config->setValue()
10:18:21 [Integration-11-ce] #3 /var/www/html/dev/tests/integration/framework/Magento/TestFramework/Annotation/ConfigFixture.php(118): Magento\TestFramework\App\MutableScopeConfig->setValue()
10:18:21 [Integration-11-ce] #4 /var/www/html/dev/tests/integration/framework/Magento/TestFramework/Annotation/ConfigFixture.php(95): Magento\TestFramework\Annotation\ConfigFixture->setScopeConfigValue()
10:18:21 [Integration-11-ce] #5 /var/www/html/dev/tests/integration/framework/Magento/TestFramework/Annotation/ConfigFixture.php(186 in /var/www/html/lib/internal/Magento/Framework/App/ScopeResolverPool.php on line 40

@Nazar65
Copy link
Member Author

Nazar65 commented Jul 21, 2020

@magento run all tests

@sivaschenko sivaschenko merged commit eed0caa into magento:2.0-develop Jul 22, 2020
@ghost
Copy link

ghost commented Jul 22, 2020

Hi @Nazar65, thank you for your contribution!
Please, complete Contribution Survey, it will take less than a minute.
Your feedback will help us to improve contribution process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants