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

Fully ignore invalid lines #571

Conversation

heiglandreas
Copy link
Contributor

Previously when OPTION_IGNORE_INVALID_LINES was set any invalid content of a property was ignored.

With this change now also invalid properties themselves are ignored.

This will help importing feeds that contain broken multi-line contents where newlines are not propperly escaped and therefore parts of the multiline content show up as property themselves. Without this addition the import will then break and not import anything at all. With this change added an import will now succeed when invalid lines shall be ignored.

Without the option set everything will behave as before.

@codecov
Copy link

codecov bot commented Apr 29, 2022

Codecov Report

Merging #571 (69e49df) into master (0f625de) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##             master     #571   +/-   ##
=========================================
  Coverage     98.34%   98.34%           
- Complexity     1891     1892    +1     
=========================================
  Files            71       71           
  Lines          4534     4536    +2     
=========================================
+ Hits           4459     4461    +2     
  Misses           75       75           
Impacted Files Coverage Δ
lib/Parser/MimeDir.php 99.56% <100.00%> (+<0.01%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@heiglandreas heiglandreas force-pushed the ignoreInvalidIcalendarLinesWhenOptionIsSet branch 6 times, most recently from 2cf5f06 to 758ba35 Compare May 3, 2022 06:37
@staabm staabm requested a review from evert May 5, 2022 05:38
lib/Parser/MimeDir.php Outdated Show resolved Hide resolved
@phil-davis
Copy link
Contributor

@heiglandreas I am doing some work in this repo, so I have time to look over the pending PRs.
GitHub is reporting conflicts in MimeDirTest.php - please rebase and resolve the conflicts, and either fix the X-APPLE-SRTUCTURED-LOCATION typo or let me know if it is intentional.

@phil-davis phil-davis self-assigned this Aug 17, 2022
Previously when OPTION_IGNORE_INVALID_LINES was set any invalid content
of a property was ignored.

With this change now also invalid properties themselves are ignored.

This will help importing feeds that contain broken multi-line contents
where newlines are not propperly escaped and therefore parts of the
multiline content show up as property themselves. Without this addition
the import will then break and not import anything at all. With this
change added an import will now succeed when invalid lines shall be
ignored.

Without the option set everything will behave as before.
@phil-davis phil-davis force-pushed the ignoreInvalidIcalendarLinesWhenOptionIsSet branch from 758ba35 to 69e49df Compare August 17, 2022 12:49
@phil-davis
Copy link
Contributor

@heiglandreas I am allowed to push to your branch - so I have rebased and fixed the typo.

@heiglandreas
Copy link
Contributor Author

Thanks!

@phil-davis phil-davis merged commit 7dbeb90 into sabre-io:master Aug 17, 2022
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.

None yet

2 participants