aboutsummaryrefslogtreecommitdiff
path: root/app/Models/Search.php
AgeCommit message (Collapse)Author
2024-04-10PHP 8.3 #[\Override] (#6273)Gravatar Alexandre Alapetite
* PHP 8.3 #[\Override] https://php.watch/versions/8.3/override-attr With PHPStan `checkMissingOverrideMethodAttribute` https://phpstan.org/config-reference#checkmissingoverridemethodattribute And modified the call to phpstan-next on the model of https://github.com/FreshRSS/Extensions/pull/228 (more robust than the find method, which gave some strange errors) * Update extension example accordingly
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-10-30Require PHP 7.4+ (#5720)Gravatar Alexandre Alapetite
* Require PHP 7.4+ https://github.com/FreshRSS/FreshRSS/discussions/5474 * Update Docker oldest Alpine 3.13 with PHP 7.4.26 * Add missing packets to Docker oldest * Update to typed properties https://php.net/migration74.new-features#migration74.new-features.core.typed-properties * More types
2023-09-05Fix parenthesis escaping bug (#5633)Gravatar Alexandre Alapetite
fix https://github.com/FreshRSS/FreshRSS/issues/5632 In the SQL search, parentheses should not be escaped. Escaped parenthesis in the SQL search were tolerated by PostgreSQL but not by SQLite.
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-05-30phpstan-9 for Share.php (#5431)Gravatar Luc SANCHEZ
* phpstan 9 for Search.php phpstan 9 for Share.php * phpstan-9 for Search.php * Better consistency for search results --------- Co-authored-by: Luc <sanchezluc+freshrss@gmail.com> Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2023-05-11A few additional PHPStan rules (#5388)Gravatar Alexandre Alapetite
A subset of https://github.com/phpstan/phpstan-strict-rules
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-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-14PHPStan Level 6 FreshRSS_Search FreshRSS_Entry (#5292)Gravatar Alexandre Alapetite
* PHPStan Level 6 FreshRSS_Search FreshRSS_Entry * Minor fix * Type fix * Apply suggestions from code review Co-authored-by: Luc SANCHEZ <4697568+ColonelMoutarde@users.noreply.github.com> * Minor types syntax Compatibility Intelephense --------- Co-authored-by: Luc SANCHEZ <4697568+ColonelMoutarde@users.noreply.github.com>
2022-03-21Fix some search expressions (#4277)Gravatar Alexandre Alapetite
* Fix some search expressions * Fix decoding bug when using quotes to search free text containing some spaces such as `"ab cd"` * Fix use of `-` wrongly triggering a negative search in e.g. `ab-cd` * Fix edge cases * A couple of tests
2022-01-06Fix several PHP8.1 warnings (#4123)Gravatar Alexandre Alapetite
* Fix several PHP8.1 warnings Taking advantage of https://github.com/FreshRSS/FreshRSS/pull/4121 * Couple oh type hints missing * Compatibility PHP 7 * Fix variadic PHPDocs syntax
2021-12-31Add PHPStan (#4021)Gravatar Alexandre Alapetite
* Add PHPStan #fix https://github.com/FreshRSS/FreshRSS/issues/4016 https://phpstan.org/ ```sh composer run-script phpstan ``` * More fixes * Fix global variables * Add .phtml * Fix merge https://github.com/FreshRSS/FreshRSS/pull/4090 * Fix more warnings * Fix view errors and enable in CI * ReturnTypeWillChange * Dynamic view type * Fix Minz static/self bug
2021-12-31Search on article IDs (#4058)Gravatar Alexandre Alapetite
* Search on article IDs Partial implementation of https://github.com/FreshRSS/FreshRSS/issues/4053
2021-07-24Search labels (#3709)Gravatar Alexandre Alapetite
* Search labels #fix https://github.com/FreshRSS/FreshRSS/issues/3704 * Documentation * Allow list without quotes * Allow boolean AND searches * Allow searching any label * fix labels alias
2021-02-27Remove + conversion in search except for tags (#3489)Gravatar Alexis Degrugillier
Before, every + sign was converted to a space to allow to search for spaces. But the documentation stated that to search for space one has to enclose the string in quotes. This has a confusing behavior when searching for a string containing a + sign. Now, the + conversion is kept only for the tag search since it's the only one documented that way. See #3454
2020-04-17Filter by multiple feed IDs (#2892)Gravatar Alexandre Alapetite
Add the possibility to filter by feed ID like `f:123 more-search` or multiple feed IDs, like `f:123,234,345 more-search` or an exclusion like `!f:456,789 more-search`
2020-04-01Implement negation for searching by date intervals (#2869)Gravatar Alexandre Alapetite
* Implement negation for searching by date intervals #fix https://github.com/FreshRSS/FreshRSS/issues/2866 Allow searching for e.g. `!date:P1W` to exlude all articles newer than one week. More generally, allows exclusion on some date intervals. * Fix OR
2018-11-11Tweaks for Vienna RSS (#2093)Gravatar Alexandre Alapetite
* Tweaks for Vienna RSS https://github.com/FreshRSS/FreshRSS/issues/2091 https://github.com/ViennaRSS/vienna-rss/issues/1197 * Fix get feed by URL * Fix get item ids returning starred elements * API add item ids by feed URL * Add API filter `it` https://feedhq.readthedocs.io/en/latest/api/reference.html#stream-items-ids * API add `nt=` filter + refactoring * No ; prefix for author https://github.com/FreshRSS/FreshRSS/issues/2091#issuecomment-435562495 * Add id long form prefix and accept short id form https://github.com/FreshRSS/FreshRSS/issues/2091#issuecomment-435631259 * Fix quote problem https://github.com/FreshRSS/FreshRSS/issues/2091#issuecomment-435683930 * Isolate bug fix for News+ https://github.com/FreshRSS/FreshRSS/issues/2091#issuecomment-435687041 * Rework encoding conventions https://github.com/FreshRSS/FreshRSS/issues/2091#issuecomment-437441834 * Unicode escaping alternative Alternative approach to encode XML special characters and other problematic characters into their Unicode fullwidth version when we cannot use HTML-encoding because clients disagree wether they should HTML-decode or not. https://github.com/FreshRSS/FreshRSS/issues/2091#issuecomment-436059559
2018-09-16Improve authors (#2025)Gravatar Alexandre Alapetite
* Links for authors and multiple authors Favour ';' as a separator instead of ',' to better cope with multi-author scientific articles. Follow-up of https://github.com/FreshRSS/FreshRSS/pull/1997 , https://github.com/FreshRSS/FreshRSS/issues/1968, https://github.com/FreshRSS/FreshRSS/pull/2023 * Change i18n authors * Update layout * Unicode-compatible search Example for `author:Loïc` * author <em> styling * Final details * Minor spacing
2018-09-15Tags split improvement (#2023)Gravatar Alexandre Alapetite
* Tags split improvement Some feeds use a single category with comma-separated tags. Better handling of tags containing a space * Handle spaces in searches with + Can now search in tags containing spaces * Fix searches with spaces for title and author
2017-04-02Search allow double quotesGravatar Alexandre Alapetite
`author:"some name"`
2017-04-01Negative searchesGravatar Alexandre Alapetite
https://github.com/FreshRSS/FreshRSS/issues/1381 Possibility to exclude authors, titles, tags, urls, words by prefixing them by ! or - (like Google Search): * !intitle:unwanted * -intitle:unwanted * -author:unwanted * -#unwanted * -unwanted And one can use many of each and combine them with positive searches
2017-04-01Improve search: intitle, author, inurlGravatar Alexandre Alapetite
Allow multiple values of intitle: , author:, inurl: Note: Tests for UserQueryTest are broken due to https://github.com/sebastianbergmann/phpunit/wiki/Release-Announcement-for-PHPUnit-4.0.0#backwards-compatibility-issues
2015-04-22Split the search into valuesGravatar Alexis Degrugillier
Before, the search was a single value. Now it is splited in chuncks when separated by spaces. Except if they are enclosed by single quotes or double quotes. For some reasons, the unit tests are working for both single and double quotes but the search box isn't. It is working only with single quotes. We need to investigate the reason of this behavior. See #823
2015-02-21Add a default string representationGravatar Alexis Degrugillier
In some part of the code, the search is displayed as is and crash since there is no way to display the search object as a string.
2015-02-21Add search default raw valueGravatar Alexis Degrugillier
Before, the default value was undefined. Now it always has a value even when no value is provided.
2015-02-21Add required libraryGravatar Alexis Degrugillier
The lib_date.php library was missing in the Search object file. It is required to make date conversion in that object.
2015-02-12Refactor the code to make less unnecessaty callsGravatar Alexis Degrugillier
There were multiple calls made to the cleaning method that were unnecessary since it is useful only on the last call. It allows to simplify code by returning values ealier.
2015-02-11Remove code generated by netbeansGravatar Alexis Degrugillier
2015-02-11Extract the search code from the contextGravatar Alexis Degrugillier
I figured that the code for the search could be extracted from the context to have separation of concern. It supports multiple keywords. It suports also multiple tag keywords.