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

EZEE-3350: Added support to save additional data in ezImage FT #137

Merged
merged 6 commits into from
Dec 4, 2020

Conversation

ViniTou
Copy link
Contributor

@ViniTou ViniTou commented Nov 18, 2020

Question Answer
JIRA issue EZEE-3350
Type feature
Target eZ Platform version v3.3
BC breaks no
Doc needed yes/no

As a part of image editor story, ezimage type must be able to save additional information with some related parameters. This opened up possibility to make it more versatile (and easier to maintain).

Checklist:

  • Provided PR description.
  • Tested the solution manually.
  • Provided automated test coverage.
  • Checked that target branch is set correctly (master for features, the oldest supported for bugs).
  • Ran PHP CS Fixer for new PHP code (use $ composer fix-cs).
  • Asked for a review (ping @ezsystems/php-dev-team).

@ViniTou ViniTou requested a review from alongosz December 1, 2020 16:18
Comment on lines +95 to +105
<<< XML
<?xml version="1.0" encoding="utf-8"?>
<ezimage serial_number="1" is_valid="1" filename="ibexa_fav.png"
suffix="png" basename="ibexa_fav" dirpath="{$dir}" url="{$pathToImg}"
original_filename="ibexa_fav.png" mime_type="image/png" width="100"
height="200" alternative_text="test" alias_key="1293033771" timestamp="{timestampToReplace}">
<original attribute_id="1" attribute_version="1" attribute_language="eng-GB"/>
<information Height="200" Width="100" IsColor="1"/>
<additional_data><attribute key="focalPointX">50</attribute><attribute key="focalPointY">100</attribute><attribute key="author">John Smith</attribute></additional_data>
</ezimage>
XML,
Copy link
Contributor

Choose a reason for hiding this comment

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

https://wiki.php.net/rfc/flexible_heredoc_nowdoc_syntaxes

You can indent this, since we have PHP 7.3+ as dependency.

Copy link
Contributor Author

@ViniTou ViniTou Dec 2, 2020

Choose a reason for hiding this comment

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

I also thought we can do this, but it seems that indenting XMLs causes issues with linters as XML must start with declaration and not empty spaces.

@sonarcloud
Copy link

sonarcloud bot commented Dec 2, 2020

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 2 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

Copy link

@tomaszszopinski tomaszszopinski left a comment

Choose a reason for hiding this comment

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

QA approved on Ibexa DXP 3.3.0-dev with diff.

@ViniTou ViniTou added the Ready for MERGE To be set by author or maintainer label Dec 4, 2020
@adamwojs adamwojs merged commit af04642 into master Dec 4, 2020
@adamwojs adamwojs deleted the ezee-3350-store-image-data branch December 4, 2020 11:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
QA approved Ready for MERGE To be set by author or maintainer
Development

Successfully merging this pull request may close these issues.

5 participants