Update instapaper import - #8558
Conversation
|
Just noticed the check failing. Will take a look. |
50b27da to
79b783a
Compare
yguedidi
left a comment
There was a problem hiding this comment.
great catches and work! thanks for your contribution!
few comments from me.
and I think after the removal of the bugfix from this PR, it can be a single clean commit
| // Store user ID to reattach user entity after em->clear() | ||
| $this->userId = $this->user->getId(); |
There was a problem hiding this comment.
I'd say this fix deserves its own PR to fix it in all impacted importers :)
There was a problem hiding this comment.
BTW, I think a cleaner and more global fix would be to update \Wallabag\Import\AbstractImport::parseEntries to not clear everything but to manually detach the entries and associated tags.
this way, the user is never cleared
There was a problem hiding this comment.
and as a fix, maybe the dedicated PR should target 2.6? we will handle the forward port when merging 2.6 in master
| $this->tagsAssigner | ||
| ->expects($this->exactly(3)) | ||
| ->method('assignTagsToEntry') | ||
| ->withConsecutive( |
There was a problem hiding this comment.
better not introduce a usage of withConsecutive as it's deprecated in PHPUnit
|
@rootshellz should your PR fix the issue that I've opened here in september #8468 ? |
|
Hello @rootshellz, would you be able to take a look at the feedback and update your PR? |
This PR updates the Instapaper importer to support the newer CSV export format while keeping full backward compatibility with the existing 4-column format.
Instapaper now exports CSVs with 6 columns:
URL,Title,Selection,FolderURL,Title,Selection,Folder,Timestamp,TagsTagsis a JSON array (e.g.["programming","go","security"]).This PR:
Tagscolumn and assigns those tags to the entry.Folderinto a tag, except when it is one of the status folders (Unread,Archive,Starred).Timestampcolumn (Unix epoch) to setEntry::createdAtwhen available, preserving the original Instapaper creation time.em->clear()and reattaches theUserentity viagetReference()inparseEntry(), ensuringfindByUrlAndUserId()always has a valid user and avoiding issues when the user entity has been detached.instapaper-export-new.csv) to cover the new export format and tag assignment behavior.No BC breaks: existing Instapaper exports in the old 4-column format continue to work as before.