11 Commits

Author SHA1 Message Date
dependabot[bot]
f1c91c84dd Bump phpstan/phpstan from 2.1.29 to 2.1.31 (#8156)
* Bump phpstan/phpstan from 2.1.29 to 2.1.31

Bumps [phpstan/phpstan](https://github.com/phpstan/phpstan-phar-composer-source) from 2.1.29 to 2.1.31.
- [Commits](https://github.com/phpstan/phpstan-phar-composer-source/commits)

---
updated-dependencies:
- dependency-name: phpstan/phpstan
  dependency-version: 2.1.31
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Fixes

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2025-10-25 11:21:28 +02:00
Alexandre Alapetite
62f32ccadf PHPStan: finalise strictArrayFilter (#7794)
As well as reportPossiblyNonexistentConstantArrayOffset.
And disable PHPStan-next from GitHub Action, since the work is completed for now.
2025-08-07 22:19:45 +02:00
Alexandre Alapetite
64bbb42553 Fix CLI flag parsing (#7430)
* Fix CLI flag parsing
fix https://github.com/FreshRSS/FreshRSS/issues/7428

* Fix other places

* Forgotten debugging
2025-03-22 23:17:52 +01:00
Alexandre Alapetite
e749490693 Pass PHPStan checkBenevolentUnionTypes (#7270) 2025-01-31 13:59:51 +01:00
Alexandre Alapetite
b1d24fbdb7 PHPStan 2.0 (#7131)
* PHPStan 2.0
fix https://github.com/FreshRSS/FreshRSS/issues/6989
https://github.com/phpstan/phpstan/releases/tag/2.0.0
https://github.com/phpstan/phpstan/blob/2.0.x/UPGRADING.md

* More

* More

* Done

* fix i18n CLI

* Restore a PHPStan Next test
For work towards PHPStan Level 10

* 4 more on Level 10

* fix getTagsForEntry

* API at Level 10

* More Level 10

* Finish Minz at Level 10

* Finish CLI at Level 10

* Finish Controllers at Level 10

* More Level 10

* More

* Pass bleedingEdge

* Clean PHPStan options and add TODOs

* Level 10 for main config

* More

* Consitency array vs. list

* Sanitize themes get_infos

* Simplify TagDAO->getTagsForEntries()

* Finish reportAnyTypeWideningInVarTag

* Prepare checkBenevolentUnionTypes and checkImplicitMixed

* Fixes

* Refix

* Another fix

* Casing of __METHOD__ constant
2024-12-27 12:12:49 +01:00
Alexandre Alapetite
dfac9f5813 PHPStan booleansInConditions (#6793)
* PHPStan booleansInConditions

* Uniformisation
2024-09-11 17:14:53 +02:00
Alexandre Alapetite
d2247221bb Minor update whitespace PHPCS rules (#6666)
* Minor update whitespace PHPCS rules
To simplify our configuration, apply more rules, and be clearer about what is added or removed compared with PSR12.
Does not change our current conventions, but just a bit more consistent.

* Forgotten *.phtml

* Sort exclusion patterns + add a few for Extensions repo

* Relaxed some rules
2024-08-01 20:31:40 +02:00
Alexandre Alapetite
0f395dad43 Initial support for PHP 8.4 (#6615)
* Initial support for PHP 8.4
Sole fix needed so far seems to be related to https://wiki.php.net/rfc/deprecate-implicitly-nullable-types

See also upstream PR https://github.com/PhpGt/CssXPath/pull/227

We are also hitting was seems to be a PHP bug https://github.com/php/php-src/issues/14873

* Fix return type

* Disable OPCache while waiting for PHP fix
2024-07-09 15:57:26 +02:00
Luc SANCHEZ
f99c8d5f54 Modernize code to php7.4 (#6043)
* Modernize code to php7.4

* Modernize code to php7.4

* Modernize code to php7.4

* Modernize code to php7.4

* Modernize code to php7.4

* Modernize code to php7.4

* Modernize code to php7.4

* Modernize code to php7.4

* Modernize code to php7.4

* Modernize code to php7.4

* Modernize code to php7.4

* Modernize code to php7.4

* Modernize code to php7.4

* Consistency

---------

Co-authored-by: Luc <sanchezluc+freshrss@gmail.com>
Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2024-06-05 22:04:06 +02:00
Alexandre Alapetite
2d17c020b6 PHPStan 1.11 + minor update dev dependencies (#6459)
* PHPStan 1.11 + minor update dev dependencies
https://github.com/phpstan/phpstan/releases/tag/1.11.0

* Comment style
2024-05-15 08:57:58 +02:00
Kasimir Cash
4b29e666b0 Command Line Parser Concept (#6099)
* Adds logic for validation

* Adds validation to do-install

* Adds help to do-install

* Adds validation & help to reconfigure

* Adds validation to check.translation

* Adds validation to manipulate.translation

* Small fixes to help texts

* Refactors language option validation

* Adds default options to validation

* Fixes validation with regex

* Refactors readAs functions

* Updates to new regex validation format

* Fixes typing around default values

* Adds file extension validation

* Restandardises validation & parsing typing around array of strings

* Adds NotOneOf validation

* Adds ArrayOfString read as

* Refactors existing validation

* Adds validation throughout cli

* Removes unused file

* Adds new CL parser with goal of wrapping CLI behaviour

* Hides parsing and validation

* Rewites CL parser to make better use of classes

* Rolls out new parser across CL

* Fixes error during unknown option check

* Fixes misnamed property calls

* Seperates validations into more appropriate locations

* Adds common boolean forms to validation

* Moves CommandLineParser and Option classes into their own files

* Fixes error when validating Int type

* Rewrites appendTypedValues -> appendTypedValidValues now filters invalid values from output

* Renames  ->  for clarity

* Adds some docs clarifying option defaults and value taking behaviour

* Refactors getUsageMessage for readability

* Minor formatting changes

* Adds tests for CommandLineParser

* Adds more tests

* Adds minor fixs

* Reconfigure now correctly updates config

* More fixes to reconfigure

* Fixes required files for CommandLineParserTest

* Use .php extension for PHP file

* PHPStan ignore instead of wrong typing

* Refactors to support php 7.4

* Moves away from dynamic properties by adding 'Definintions' to all commands

* Renames target to definition for clarity

* Stops null from being returned as a valid value in a certain edge case

* Adds PHPStan ignore instead of incorrect typing

* Refactors tests to take account of new typing solution

* Marks file as executable

* Draft CLI rework

* Finish rewrite as object-oriented

* Fix PHPStan ignore and make more strongly typed

* Rename class Option to CliOption

* Light renaming + anonymous classes

---------

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2024-02-28 13:23:28 +01:00