1667 Commits

Author SHA1 Message Date
supahgreg
5755b7af12
Correct some print helper functions. 2026-03-17 10:17:55 +00:00
Chih-Hsuan Yen
35b3f78366
Fix for phpstan and drop unneeded type casts (#265)
In backend.php, phpstan infers the type of $method as
"non-empty-string" after this part:

	if (!$method)
		$method = 'index';
	else
		$method = strtolower($method);

On the other hand, codes in clean() turns "non-empty-string" into a
string that might be empty, so the return type is not always the same
as the param type.
2026-02-28 16:07:00 -06:00
Chih-Hsuan Yen
ce82888045
Improve typing for clean() (#264) 2026-02-27 16:21:44 -06:00
supahgreg
dab918a426
Switch links from the GitHub project wiki to 'tt-rss.org'. 2025-11-19 02:06:54 +00:00
supahgreg
5bec70065a
Assorted array-related (or nearby) tweaks.
Move away from 'array_push', simplify various things (e.g. eliminate low value intermediate vars), etc.
2025-11-01 23:47:00 +00:00
supahgreg
a8320ab9cf
Use first-class callable syntax.
Also tweak 'clean()' a bit in the process.

https://wiki.php.net/rfc/first_class_callable_syntax
2025-10-23 16:59:27 +00:00
supahgreg
b1d289441a
Rector rule 'RandomFunctionRector'.
https://getrector.com/rule-detail/random-function-rector
2025-10-18 14:16:15 +00:00
supahgreg
fbac26467b
Various Rector rules for files that got missed previously.
Rules applied:
* ListToArrayDestructRector
* LongArrayToShortArrayRector
* ClassOnObjectRector
* ClassOnThisVariableObjectRector
* RemoveUnusedVariableInCatchRector
2025-10-18 02:05:57 +00:00
supahgreg
1da5a6ef1e
Rector rule 'TernaryToElvisRector'.
https://getrector.com/rule-detail/ternary-to-elvis-rector
2025-10-18 01:45:21 +00:00
supahgreg
6cf8f11b2b
Rector rule 'RemoveUnusedVariableInCatchRector'.
https://getrector.com/rule-detail/remove-unused-variable-in-catch-rector
2025-10-18 01:37:11 +00:00
supahgreg
8480b14746
Rector rule 'LongArrayToShortArrayRector'.
https://getrector.com/rule-detail/long-array-to-short-array-rector
2025-10-18 01:24:59 +00:00
supahgreg
e1f34c982c
Stop using 'set_include_path', remove related PHPStan exclude. 2025-10-17 03:29:51 +00:00
supahgreg
a7d5566aa9
Switch links to the 'tt-rss' GitHub organization. 2025-10-06 19:02:28 +00:00
supahgreg
ec367b23f4
Switch from 'tt-rss-web-static' links to wiki links. 2025-10-05 20:18:56 +00:00
supahgreg
5e99eb41ec Remove references to, and integrations with, 'tt-rss.org'. 2025-10-03 21:00:43 +00:00
Andrew Dolgov
8eb340c3ca
make default light/dark themes configurable, add support for main application and login form 2025-08-01 17:22:21 +03:00
Andrew Dolgov
b0dc82dc7e
only exit with nonzero exit code if there was an error 2025-07-04 13:22:06 +03:00
Andrew Dolgov
c1542671c1
return nonzero exit code when fatal error is triggered in on a CLI SAPI 2025-07-04 13:17:25 +03:00
wn_
df28c71641 Improve naming when working with filter actions.
Also updated some related typing and documentation.
2025-05-21 18:34:16 +00:00
wn_
2fa54cc627 Deprecate and remove use of the 'SUBSTRING_FOR_DATE' constant.
With MySQL support removed (b154bc7a10e46dc9fa0406996507c4fd410366da) this constant is unnecessary.
2025-05-18 14:26:05 +00:00
wn_
0acaac7115 Remove an outdated check for 'E_DEPRECATED' existence. 2025-05-18 14:09:27 +00:00
Andrew Dolgov
01159fa6f8
error handler - dump caught exception/fatal error to debug log if running under CLI SAPI 2025-05-03 08:18:16 +03:00
wn
4ae17d0f1c Merge branch 'feature/phpstan-updates' into 'master'
PHPStan update and addressing findings

See merge request tt-rss/tt-rss!122
2025-04-30 16:34:52 +00:00
wn_
0961c8bd4c Remove a PHPStan ignore related to PHP < 8 2025-04-27 14:39:06 +00:00
Andrew Dolgov
b154bc7a10
initial attempt to remove mysql-related stuff from tt-rss 2025-04-14 12:59:00 +03:00
Andrew Dolgov
c1e6a5ff63
enable ta translation 2025-03-26 09:40:54 +03:00
Andrew Dolgov
d373c1f978
add Config::DISABLE_LOGIN_FORM to allow limiting logins to SSO providers 2025-03-14 11:43:25 +03:00
Andrew Dolgov
e990a3c00f Merge branch 'feature/php-misc' into 'master'
More native typing, use some new PHP stuff

See merge request tt-rss/tt-rss!88
2024-12-16 06:29:28 +00:00
wn_
f9b2291c28 Don't bother passing unused arguments to 'TimeHelper::make_local_datetime()'.
There's no point in passing '$long' unless '$no_smart_dt' is set to 'true'.
2024-12-15 18:39:03 +00:00
wn_
1742fb65c5 Use the spread operator instead of 'array_merge' in more places.
PHP 8.1 introduced support for merging string-key arrays (last array with a wins).
2024-12-14 12:26:59 +00:00
wn_
667528d5b9 Use PHP 8 'str_' functions.
A few more characters in some places, but helps with readability.
2024-11-24 13:59:29 +00:00
wn_
abcd0e8ba2 Use native union types in most places. 2024-11-23 17:43:24 +00:00
Andrew Dolgov
c2d0c5a5c9
update usage of deprecated function 2024-11-23 15:59:53 +03:00
Andrew Dolgov
648024eb2e
bump minimum required php version to 8.0 & remove some deprecated code 2024-11-23 15:54:40 +03:00
wn_
154abc61a0 Eliminate use of deprecated 'get_pref()' and 'set_pref()'. 2024-11-18 21:59:45 +00:00
wn_
a784305cc7 Address PHPStan findings as of 2.0.1 2024-11-12 03:15:53 +00:00
wn_
d17f90b96f Fix some broken links and make minor wording tweaks. 2024-08-21 17:59:35 +00:00
wn_
9dd4102c7f Replace basic 'isset()' cases with the null coalescing operator. 2024-08-04 15:42:11 +00:00
wn_
44257b8016 Move side effects out of the 'Sessions' constructor. 2024-07-12 01:18:53 +00:00
wn_
c7cc3c92ba Add and use the 'Sessions' class. 2024-07-11 12:16:00 +00:00
wn_
acf3748621 Switch to the non-deprecated form of 'session_set_save_handler'.
As of PHP 8.4 the form with more than 2 arguments is deprecated.

This also does some initial work to make the functions behave closer to what SessionHandlerInterface describes.

* https://php.watch/versions/8.4/session_set_save_handler-alt-signature-deprecated
* https://wiki.php.net/rfc/deprecate_functions_with_overloaded_signatures
* https://www.php.net/manual/en/class.sessionhandlerinterface.php
2024-07-05 16:39:16 +00:00
Andrew Dolgov
cc51487f08
Merge branch 'master' into weblate-integration 2024-06-14 13:47:14 +03:00
wn_
16b89cc293 Move 'include/functions.php' require into Composer autoloader.
Autoloader regenerated with 'composer dump-autoload --optimize'.
2024-04-20 16:25:33 +00:00
wn_
de00a09538 Make implicit nullable parameters explicitly nullable.
This is to address a deprecation planned for PHP 8.4.

https://wiki.php.net/rfc/deprecate-implicitly-nullable-types
2024-03-26 16:43:39 +00:00
Andrew Dolgov
66db7dc0ac
drop es_LA, move es_ES to es 2024-03-06 15:24:16 +03:00
Andrew Dolgov
81f3139992
add HOOK_VALIDATE_SESSION 2024-02-21 22:13:23 +03:00
Andrew Dolgov
283ad4ebea Merge branch 'feature/unused-var-cleanup' into 'master'
Clean up some unused variables.

See merge request tt-rss/tt-rss!19
2024-01-13 18:29:30 +00:00
Andrew Dolgov
bcdfedeb8a
* mark get_pref/set_pref wrappers as deprecated
* add per-user preference for minimal score required for digest
2024-01-09 11:45:40 +03:00
wn_
8727fb3ba8 Clean up some unused variables.
This is essentially 1ccc0c8c1a without the renames and some other things related to Psalm.
2024-01-08 22:46:13 +00:00
wn_
c7e1caf223 Fix class names in some more places.
Related to the PSR-4 move via 865ecc87963dc3b26e66296616eef2a1cc41ac3f
2023-10-26 15:01:43 +00:00