aboutsummaryrefslogtreecommitdiff
path: root/app/Models/FeedDAO.php
AgeCommit message (Collapse)Author
2024-05-12Fix SQLite imports produced before FreshRSS 1.20.0 (#6450)Gravatar Alexandre Alapetite
fix https://github.com/FreshRSS/FreshRSS/issues/6088
2024-02-26New feature: shareable user query (#6052)Gravatar Alexandre Alapetite
* New feature: shareable user query Share the output of a user query by RSS / HTML / OPML with other people through unique URLs. Replaces the global admin token, which was the only option (but unsafe) to share RSS outputs with other people. Also add a new HTML output for people without an RSS reader. fix https://github.com/FreshRSS/FreshRSS/issues/3066#issuecomment-648977890 fix https://github.com/FreshRSS/FreshRSS/issues/3178#issuecomment-769435504 * Remove unused method * Fix token saving * Implement HTML view * Update i18n for master token * Revert i18n get_favorite * Fix missing i18n for user queries from before this PR * Remove irrelevant tests * Add link to RSS version * Fix getGet * Fix getState * Fix getSearch * Alternative getSearch * Default getOrder * Explicit default state * Fix test * Add OPML sharing * Remove many redundant SQL queries from original implementation of user queries * Fix article tags * Use default user settings * Prepare public search * Fixes * Allow user search on article tags * Implement user search * Revert filter bug * Revert wrong SQL left outer join change * Implement checkboxes * Safe check of OPML * Fix label * Remove RSS button to favour new sharing method That sharing button was using a global admin token * First version of HTTP 304 * Disallow some recusrivity fix https://github.com/FreshRSS/FreshRSS/issues/6086 * Draft of nav * Minor httpConditional * Add support for offset for pagination * Fix offset pagination * Fix explicit order ASC * Add documentation * Help links i18n * Note about deprecated master token * Typo * Doc about format
2024-01-15PHPStan prepare exceptions (#6037)Gravatar Alexandre Alapetite
Take advantage of https://phpstan.org/blog/bring-your-exceptions-under-control Minimum changes to pass `tooWideThrowType` and `implicitThrows`. Revert some mistakes from: https://github.com/FreshRSS/FreshRSS/pull/5504 Preparation needed before new PRs of the same type: https://github.com/FreshRSS/FreshRSS/pull/5962 Fix several wrong PHPDocs and catches: > Method ... has ...Exception in PHPDoc @throws tag but it's not thrown. > Dead catch - ...Exception is never thrown in the try block.
2023-12-18Pass PHPStan level 8 (#5946)Gravatar Alexandre Alapetite
* Pass PHPStan level 8 And prepare for PHPStan level 9 https://phpstan.org/user-guide/rule-levels * Revert wrong replace in comment * Fix PHPStan level 8 * Update PHPStan and other dev dependencies * Remove obsolete comment * noVariableVariables and towards bleedingEdge https://github.com/phpstan/phpstan-strict-rules https://phpstan.org/blog/what-is-bleeding-edge * More bleedingEdge * A bit more PHPStan level 9 * More PHPStan level 9 * Prepare for booleansInConditions Ignore int and null * Revert wrong line * More fixes * Fix keep_max_n_unread * Stricter attribute functions * Stricter callHooks and more PHPStan level 9 * More typing * A tiny more
2023-12-15Add filter actions (auto mark read) at category and global levels (#5942)Gravatar Alexandre Alapetite
* Add filter actions (auto mark read) at category level fix https://github.com/FreshRSS/FreshRSS/issues/3497 * Add filter actions (auto mark read) at global level fix https://github.com/FreshRSS/FreshRSS/issues/2788 * Fix feed category ID * Minor comment
2023-12-03Rework keepmax (#5905)Gravatar Alexandre Alapetite
* Rework keepmax fix https://github.com/FreshRSS/FreshRSS/issues/5702 fix https://github.com/FreshRSS/FreshRSS/issues/5870 * More WIP * Minor progress * Progress * Beta * Improved debug message * Revert noCommit * Fix variable reset * Remove debug syslogs
2023-11-18Fix PHP 7 compatibility strict_types (#5893)Gravatar Alexandre Alapetite
* Fix PHP 7 compatibility https://github.com/FreshRSS/FreshRSS/discussions/5892 * Multiple PHP 7 fixes * PHPStan
2023-11-16Use strict_types (#5830)Gravatar Luc SANCHEZ
* Little's optimisations and booleans in conditions * Apply strict type * Apply strict type * Apply strict type * Fix multiple bugs with PHP 8.2 and 8.3 * Many declares missing, more errors fixed * Apply strict type * Another approach * Stronger typing for Minz_Session * Fix case of SQLite --------- Co-authored-by: Luc <sanchezluc+freshrss@gmail.com> Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2023-11-07Compatibility PHP 8.2 for running automated tests (#5826)Gravatar Alexandre Alapetite
https://php.net/pdo.errorinfo has slightly changed signature
2023-10-31Rework SQL field length (#5788)Gravatar Alexandre Alapetite
* SQL auto-update field length Follow-up of https://github.com/FreshRSS/FreshRSS/pull/5756 Only for PostgreSQL and MySQL / MariaDB. Not possible for SQLite * Account for MySQL 65535 Partial revert of https://github.com/FreshRSS/FreshRSS/pull/5756 > The maximum row size for the used table type, not counting BLOBs, is 65535. This includes storage overhead.
2023-10-30SQL increase length of VARCHAR fields (#5756)Gravatar Alexandre Alapetite
* SQL increase length of VARCHAR fields Increase length of all fields, keeping the limits for: * Unique indexes on UTF-8: 191 bytes for MySQL; * Unique indexes on ASCII: 767 bytes for MySQL; * Max URL for external tools: 32768 characters; * Max VARCHAR: 65535 bytes for MySQL; Follow-up of https://github.com/FreshRSS/FreshRSS/pull/5038 Fix https://github.com/FreshRSS/FreshRSS/issues/4986 * Fix length test
2023-09-12SQL: clean old auto-updates (#5649)Gravatar Alexandre Alapetite
Should help with some DB lock issues. Complete https://github.com/FreshRSS/FreshRSS/pull/3558 after https://github.com/FreshRSS/FreshRSS/pull/5625 already cherry-picked from it. * Removed auto-update of MySQL GUID case sensitivity https://github.com/FreshRSS/FreshRSS/pull/2078 * Contributed to a DB lock in https://github.com/FreshRSS/FreshRSS/issues/5008 Also removed the following non-problematic auto-updates, simply because they were older than the above ones * Auto-create custom labels (1.12.0) https://github.com/FreshRSS/FreshRSS/pull/2027 * Auto-add JSON column for feeds (1.11.0) https://github.com/FreshRSS/FreshRSS/pull/1838 * Auto-create temporary tables (1.7.0) https://github.com/FreshRSS/FreshRSS/pull/1470
2023-09-06Remove obsolete TTL migration code (#5625)Gravatar Alexandre Alapetite
Remove `updateTTL` function used to help migration to 5+ year-old FreshRSS 1.10 and FreshRSS 0.7.3 https://github.com/FreshRSS/FreshRSS/pull/1750 This function contributed to locking the database https://github.com/FreshRSS/FreshRSS/pull/5574 Subset of https://github.com/FreshRSS/FreshRSS/pull/3558
2023-07-07Chore/processing of depreciations and updating code to php72 minimum (#5504)Gravatar Luc SANCHEZ
* processing of depreciations and updating of code to php7.2 minimum * Autoformat many strange array indenting And revert a few unwanted changes --------- Co-authored-by: Luc <sanchezluc+freshrss@gmail.com> Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2023-06-16Refactor lastSeen and markReadAsGone (#5470)Gravatar Alexandre Alapetite
* Refactor lastSeen and markReadAsGone Make the logic a bit more robust and explicit * Remove forgotten SQL param * Add test inTransaction * More robust transaction * Add a debug log * Add max timestamp to markAsReadUponGone * Reduce number of debug lines * typing * Better detection of when feed is empty * More explicit case for push
2023-05-13PHPStan Level 7 for Share userController logs_pagination (#5393)Gravatar Alexandre Alapetite
2023-05-11A few additional PHPStan rules (#5388)Gravatar Alexandre Alapetite
A subset of https://github.com/phpstan/phpstan-strict-rules
2023-05-04SQL attributes native unicode (#5371)Gravatar Alexandre Alapetite
Save our attributes for entries, feeds, and tags as native Unicode instead of JSON escape sequences such as `\u00f8` which are difficult to work with.
2023-05-02PHPStan Level 7 complete DAOs (#5354)Gravatar Alexandre Alapetite
* PHPStan Level 7 complete DAOs * Finalise PHPStan Level 7 for CategoryDAO * PHPStan Level 7 for Context and Search * Apply suggestions from code review Co-authored-by: Luc SANCHEZ <4697568+ColonelMoutarde@users.noreply.github.com>
2023-04-28PHPStan Level 7 for more DAO PDO (#5328)Gravatar Alexandre Alapetite
* PHPStan Level 7 for more DAO PDO With new function to address common type and check problems * A bit more * PHPStan Level 7 for FreshRSS_Entry
2023-04-23PHPStan Level 7 for ten more files (#5327)Gravatar Alexandre Alapetite
* PHPStan Level 7 for nine more files * Minor syntax * One more
2023-04-20Improve markAsReadUponGone (#5315)Gravatar Alexandre Alapetite
* Improve markAsReadUponGone Fix case when the uptream feed has zero article, then old articles would never be automatically marked as read with the "mark as read when gone" policy, which was only based on the timestamp of new articles from the uptream feed. * Fix typo * Simplify request Needs to be re-tested with SQLite + MySQL * While waiting to check syntax on all database types * Fix multiple errors In the case of WebSub, and in the case of invalid GUIDs
2023-04-17More consistent use of iterable type (#5308)Gravatar Alexandre Alapetite
For `yield`
2023-04-17Complete PHPStan Level 6 (#5305)Gravatar Alexandre Alapetite
* Complete PHPStan Level 6 Fix https://github.com/FreshRSS/FreshRSS/issues/4112 And initiate PHPStan Level 7 * PHPStan Level 6 for tests * Use phpstan/phpstan-phpunit * Update to PHPStan version 1.10 * Fix mixed bug * Fix mixed return bug * Fix paginator bug * Fix FreshRSS_UserConfiguration * A couple more Minz_Configuration bug fixes * A few trivial PHPStan Level 7 fixes * A few more simple PHPStan Level 7 * More files passing PHPStan Level 7 Add interface to replace removed class from https://github.com/FreshRSS/FreshRSS/pull/5251 * A few more PHPStan Level 7 preparations * A few last details
2023-04-15PHPStan level 6 for remaining DAO classes (#5299)Gravatar Alexandre Alapetite
* PHPStan level 6 FreshRSS_CategoryDAO Follow-up of https://github.com/FreshRSS/FreshRSS/pull/5298 Contributes to https://github.com/FreshRSS/FreshRSS/issues/4112 * PHPStan Level 6 for FeedDAO and a bit more * PHPStan Level 6 for tagDAO
2023-04-15PHPstan level 6 for Category.php (#5298)Gravatar Luc SANCHEZ
* PHPstan level 6 for Category.php * Fix a few things * Minor fixes * A few more fixes --------- Co-authored-by: Luc <sanchezluc+freshrss@gmail.com> Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2023-03-31PHPStan level 6 for all PDO and Exception classes (#5239)Gravatar Alexandre Alapetite
* PHPStan level 6 for all PDO and Exception classes Contributes to https://github.com/FreshRSS/FreshRSS/issues/4112 * Fix type * Now also our remaining own librairies * Motivation for a few more files * A few more DAO classes * Last interface
2023-03-22Remove FreshRSS_Searchable for better types (#5212)Gravatar Alexandre Alapetite
* Remove FreshRSS_Searchable for better types The interface was not used, and it was preventing more precise types for the different `searchById()` methods, as they each have different input and output types. * Fix type
2023-03-04Safer updateCachedValues (#5158)Gravatar Alexandre Alapetite
#fix https://github.com/FreshRSS/FreshRSS/issues/5156
2023-01-26Increase max feed URL length and drop unicity (#5038)Gravatar Alexandre Alapetite
* Increase max feed URL length and drop unicity #fix https://github.com/FreshRSS/FreshRSS/issues/4338 Drop the unicity constraint on our feed URL. In practice, this did not add much value as identical feeds could have different URLs. And it generated several problems, for instance during renaming or automatic redirections such as from HTTP to HTTPS, with collisions for which we dot not have any elegant handling. I have kept a high limit of 32768 because cURL does not seem to have any limit except memory, which might lead to memory problems. This is the highest server-side value reported by https://www.sistrix.com/ask-sistrix/technical-seo/site-structure/url-length-how-long-can-a-url-be * Same for Web site URL For consistency
2022-10-09Fix OPML import special (#4708)Gravatar Alexandre Alapetite
#fix https://github.com/FreshRSS/FreshRSS/issues/4704 From https://github.com/FreshRSS/FreshRSS/pull/4407
2022-09-19Fix transaction rollbacks during auto-update (#4622)Gravatar Alexandre Alapetite
#fix https://github.com/FreshRSS/FreshRSS/issues/4600 We first need to commit the SQL transaction before being able to auto-update. Avoid error such as: > 25P02: 7 ERROR: current transaction is aborted, commands ignored until end of transaction block
2022-09-09Workaround invalid OPMLs (#4591)Gravatar Alexandre Alapetite
* Workaround invalid OPMLs #fix https://github.com/FreshRSS/FreshRSS/issues/4590 Accept OPML files lacking text attributes * Tolerate missing head element
2022-08-08Refactor entry-to-GReader API format (#4490)Gravatar Alexandre Alapetite
* Refactor entry to GReader API format Some code was copied in two locations and not completely uniform. Cleaning of related variables and functions (e.g. better types for entries and categories as objects vs. as IDs). Usecase: I need to call the same GReader-compatible serialization from an extension * Fixed some edge cases * Keep summary instead of content `summary` and `content` seems to be used interchangeably in the Google Reader API. We have been using `summary` for our client API and `content` in our export/import, so stick to that.
2022-07-04Dynamic OPML (#4407)Gravatar Alexandre Alapetite
* Dynamic OPML draft #fix https://github.com/FreshRSS/FreshRSS/issues/4191 * Export dynamic OPML http://opml.org/spec2.opml#1629043127000 * Restart with simpler approach * Minor revert * Export dynamic OPML also for single feeds * Special category type for importing dynamic OPML * Parameter for excludeMutedFeeds * Details * More draft * i18n * Fix update * Draft manual import working * Working manual refresh * Draft automatic update * Working Web refresh + fixes * Import/export dynamic OPML settings * Annoying numerous lines in SQL logs * Fix minor JavaScript error * Fix auto adding new columns * Add require * Add missing 🗲 * Missing space * Disable adding new feeds to dynamic categories * Link from import * i18n typo * Improve theme icon function * Fix pink-dark
2022-06-25New option to automatically mark as read gone articles (#4426)Gravatar Alexandre Alapetite
* New option to automatically mark as read gone articles Option to automatically and immediately mark as read entries / articles that are no longer provided in their upstream RSS / ATOM / XPath feed * Reduce SQL queries Optimisation: Perform cache update only once
2022-06-19Update all test dependencies (#4419)Gravatar Alexandre Alapetite
* Update all test dependencies * Remove old false-positive * Minor update lock files * Increase PHPStan memory for Fedora https://github.com/FreshRSS/FreshRSS/pull/4400#issuecomment-1159514197 * Require PHP8+ for tests Due to small changes of signature in `ob_implicit_flush` and `simplexml_load_string`, cf. https://github.com/FreshRSS/FreshRSS/pull/4123 * Missing lint in CSS files
2022-05-12OPML export/import of some proprietary FreshRSS attributes (#4342)Gravatar Alexandre Alapetite
* OPML export/import of some proprietary FreshRSS attributes #fix https://github.com/FreshRSS/FreshRSS/issues/4077 And one of the TODOs of https://github.com/FreshRSS/FreshRSS/pull/4220 XPath options, CSS Selector, and action filters * Bump library patch version * OPML namespace + documentation * Add example
2022-02-28Implement Web scraping "HTML + XPath" (#4220)Gravatar Alexandre Alapetite
* More PHP type hints for Fever Follow-up of https://github.com/FreshRSS/FreshRSS/pull/4201 Related to https://github.com/FreshRSS/FreshRSS/issues/4200 * Detail * Draft * Progress * More draft * Fix thumbnail PHP type hint https://github.com/FreshRSS/FreshRSS/issues/4215 * More types * A bit more * Refactor FreshRSS_Entry::fromArray * Progress * Starts to work * Categories * Fonctional * Layout update * Fix relative URLs * Cache system * Forgotten files * Remove a debug line * Automatic form validation of XPath expressions * data-leave-validation * Fix reload action * Simpler examples * Fix column type for PostgreSQL * Enforce HTTP encoding * Readme * Fix get full content * target="_blank" * gitignore * htmlspecialchars_utf8 * Implement HTML <base> And fix/revert `xml:base` support in SimplePie https://github.com/simplepie/simplepie/commit/e49c578817aa504d8d05cd7f33857aeda9d41908 * SimplePie upstream PR merged https://github.com/simplepie/simplepie/pull/723
2022-02-06Fix Fever 32 bit ID issue + more PHP type hints (#4201)Gravatar Alexandre Alapetite
* Fix Fever 32 bit ID issue + more PHP type hints #fix https://github.com/FreshRSS/FreshRSS/issues/4200 Follow up and fix regression from https://github.com/FreshRSS/FreshRSS/pull/4110 * More PHP type hints with PHPStan * Fix pull problem * Avoid more nulls
2022-01-08Use typographic quotes (#4133)Gravatar Alexandre Alapetite
* Use typographic quotes * A few fixes * Fix * Fix not saved * Implement feedback * Detail * Revert spoken English fixes Left for a future dedicated discussion * More reverts * Final reverts * Final minor
2022-01-05[CI] PHPCS: check for opening brace on same line (#4122)Gravatar Frans de Jonge
* [CI] PHPCS: check for opening brace on same line * make fix-all * Minor comments Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2021-12-02Fix some PHPstan errors (#4019)Gravatar Alexandre Alapetite
Fix some wrong variables found by https://github.com/FreshRSS/FreshRSS/issues/4016
2021-09-19Improved feed action filters (#3303)Gravatar Alexandre Alapetite
* Re-order some feed options * Option to auto mark as read existing titles * Option to keep at max n unread articles per feed
2021-03-26Suport standard HTTP 410 Gone (#3561)Gravatar Alexandre Alapetite
When a feed returns an HTTP 410 Gone, mute the corresponding feed, i.e. stop refreshing it. Example of such feed, Les Décodeurs (Libération) https://rss.liberation.fr/rss/100893/
2021-02-28Travis: Enforce phpcs line length + whitespace (#3488)Gravatar Alexandre Alapetite
* Update Travis line length * Also check whitespace in CSS files * Fix line length ext.php * More syntax, string templates * Fix exclude-pattern * Test JS files as well
2020-10-11Fix sanitize feed description (#3222)Gravatar Alexandre Alapetite
* Fix sanitize feed description #fix https://github.com/FreshRSS/FreshRSS/issues/3221 * Simplification
2020-08-05Change feed order in a category (#3131)Gravatar Alexis Degrugillier
Before, the sorting was not human readable. Lower-cased feed names were displayed after upper-cased feed names. Now, the sorting is human readable. The sorting is done without taking into account the name case. See #3128
2020-05-21Fix fetch preview (#2993)Gravatar Alexandre Alapetite
* Fix fetch preview #fix https://github.com/FreshRSS/FreshRSS/issues/2923 In MariaDB / MySQL, we cannot start a new query if we have not consumed the previous buffered query fully. * Fix for reload * Typo in comment
2020-04-01API return proper newestItemTimestampUsec (#2854)Gravatar Alexandre Alapetite
* API return proper newestItemTimestampUsec #fix https://github.com/FreshRSS/FreshRSS/issues/2853 * Minor naming * Add newestItemTimestampUsec for labels * Do not use t.name after all