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

Introduce 4.0 compatibility #68

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

Conversation

omares
Copy link

@omares omares commented Nov 20, 2020

As I would like to revive this extension, this PR introduces compatibility with Akeneo 4.0.

This PR is intentionally a draft as there are a few todos that require feedback and in general, I would like to know if I am on the right track.

In the current state, the extension is installable, a new attribute of type "Text Collection" can be created and used. Interaction with the attribute is working (adding/deleting/sorting) and changes are persisted.

Open todos:

  • need feedback Filtering: The attribute is selectable in the filters but the filter itself is not working. It seems that the attribute is not stored in elastic search, looking at the response of a direct request, the values key is empty.
  • need feedback Is the pim_extended_attribute_type.denormalizer.flat.text_collection class still needed?
  • need feedback Are there any open to-dos for PIMEE (workflows)?
  • can do Remove commented code
  • can do Fix tests
  • can do Update Readme

Copy link
Contributor

@mmetayer mmetayer left a comment

Choose a reason for hiding this comment

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

Good start! Some comments:

  • you'd better use git move to move files, it would be easier to track which files were simply moved and which ones were actually created/deleted
  • please remove all commented use statements, it will improve readability
  • please do not commit permission changes, the file permissions should be 644, except for executable ones
  • And more importantly, please update the tests 🙂

@@ -13,5 +12,5 @@ final class ExtendedAttributeTypes
{
const TEXT_COLLECTION = 'pim_catalog_text_collection';

const BACKEND_TYPE_TEXT_COLLECTION = 'textCollection';
const BACKEND_TYPE_TEXT_COLLECTION = 'text_collection';
Copy link
Contributor

Choose a reason for hiding this comment

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

Why did you change the backend type?

Comment on lines +72 to +73
'wildcard' => [
$attributePath => '*' . $value . '*',
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure a wildcard query will work with an array field

{
public function createWithoutCheckingData(Attribute $attribute, ?string $channelCode, ?string $localeCode, $data): ValueInterface
{
sort($data);
Copy link
Contributor

Choose a reason for hiding this comment

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

why do you want to sort the data here?

@mmetayer
Copy link
Contributor

I'll try to answer your need feedback questions today

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

Successfully merging this pull request may close these issues.

2 participants