codeigniter4 / cache

PSR-6 and PSR-16 Cache Adapters for CodeIgniter 4
MIT License
8 stars 4 forks source link

chore: update Psalm config #40

Closed kenjis closed 3 months ago

kenjis commented 3 months ago

Description

Run vendor/bin/psalm
Warning: "findUnusedBaselineEntry" will default to "true" in Psalm 6. You should explicitly enable or disable this setting.
Warning: "findUnusedCode" will default to "true" in Psalm 6. You should explicitly enable or disable this setting.
Warning: "findUnusedBaselineEntry" will default to "true" in Psalm 6. You should explicitly enable or disable this setting.
Warning: "findUnusedCode" will default to "true" in Psalm 6. You should explicitly enable or disable this setting.
Target PHP version: 7.4 (inferred from composer.json).
Scanning files...
Analyzing files...

░░EEE░░░
Error: src/Pool.php:230:20: UndefinedFunction: Function CodeIgniter\Psr\Cache\config does not exist (see https://psalm.dev/021)
Error: src/SimpleCache.php:67:20: UndefinedFunction: Function CodeIgniter\Psr\Cache\config does not exist (see https://psalm.dev/021)
Error: src/SupportTrait.php:44:30: UndefinedFunction: Function CodeIgniter\Psr\Cache\service does not exist (see https://psalm.dev/021)
Error: src/SupportTrait.php:46:30: UndefinedFunction: Function CodeIgniter\Psr\Cache\service does not exist (see https://psalm.dev/021)
------------------------------
4 errors found
------------------------------
19 other issues found.
You can display them with --show-info=true
------------------------------
Psalm can automatically fix 8 of these issues.
Run Psalm again with 
--alter --issues=MissingReturnType --dry-run
to see what it can fix.
------------------------------

Checks took 4.40 seconds and used 292.190MB of memory
Psalm was able to infer types for 93.8511% of the codebase
Error: Process completed with exit code 2.

https://github.com/codeigniter4/cache/actions/runs/9032646473/job/24821235799

Checklist:

coveralls commented 3 months ago

Pull Request Test Coverage Report for Build 9039778338

Details


Totals Coverage Status
Change from base Build 9032646470: 97.9%
Covered Lines: 138
Relevant Lines: 141

💛 - Coveralls
kenjis commented 3 months ago

Why? There is no codeigniter4/codeigniter4 nor php-coveralls/php-coveralls in the composer.json.

  • Root composer.json requires codeigniter4/codeigniter4 dev-develop
  • Root composer.json requires php-coveralls/php-coveralls ^2.4
Detected last version: v1.0.0
Comparing from b965e7f51a1575a1fce49035886c7fbdaf87190a to b8dda4d4c44b5d0e1dfa461d8d2dea352458f0b1...
<warning>No composer.lock file present. Updating dependencies to latest instead of installing from lock file. See https://getcomposer.org/install for more information.</warning>
Loading composer repositories with package information
                                                      Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
Error: Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - php-coveralls/php-coveralls[v2.5.0, ..., v2.7.0] require psr/log ^1.0 || ^2.0 -> satisfiable by psr/log[1.0.0, ..., 1.1.4, 2.0.0].
    - php-coveralls/php-coveralls[v2.4.0, ..., v2.4.3] require psr/log ^1.0 -> satisfiable by psr/log[1.0.0, ..., 1.1.4].
    - You can only install one version of a package, so only one of these can be installed: psr/log[1.0.0, ..., 1.1.4, 2.0.0, 3.0.0, 3.x-dev].
    - codeigniter4/codeigniter4 dev-develop requires psr/log ^3.0 -> satisfiable by psr/log[3.0.0, 3.x-dev].
    - Root composer.json requires codeigniter4/codeigniter4 dev-develop -> satisfiable by codeigniter4/codeigniter4[dev-develop].
    - Root composer.json requires php-coveralls/php-coveralls ^2.4 -> satisfiable by php-coveralls/php-coveralls[v2.4.0, ..., v2.7.0].

    - php-coveralls/php-coveralls[v2.5.0, ..., v2.7.0] require psr/log ^1.0 || ^2.0 -> satisfiable by psr/log[1.0.0, ..., 1.1.4, 2.0.0].
    - php-coveralls/php-coveralls[v2.4.0, ..., v2.4.3] require psr/log ^1.0 -> satisfiable by psr/log[1.0.0, ..., 1.1.4].
    - You can only install one version of a package, so only one of these can be installed: psr/log[1.0.0, ..., 1.1.4, 2.0.0, 3.0.0, 3.x-dev].
    - codeigniter4/codeigniter4 dev-develop requires psr/log ^3.0 -> satisfiable by psr/log[3.0.0, 3.x-dev].
    - Root composer.json requires codeigniter4/codeigniter4 dev-develop -> satisfiable by codeigniter4/codeigniter4[dev-develop].
    - Root composer.json requires php-coveralls/php-coveralls ^2.4 -> satisfiable by php-coveralls/php-coveralls[v2.4.0, ..., v2.7.0].

<warning>Running update with --no-dev does not mean require-dev is ignored, it just means the packages will not be installed. If dev requirements are blocking the update you have to resolve those problems.</warning>

In MissingInstalledJson.php line 15:

  Could not locate a "composer/installed.json" file in "/tmp/api-compare-b965  
  e7f51a1575a1fce49035886c7fbdaf87190a663ec0d28a8cf/vendor"                    

roave-backwards-compatibility-check:assert-backwards-compatible [--from [FROM]] [--to TO] [--format [FORMAT]] [--install-development-dependencies]

Error: Process completed with exit code 1.

https://github.com/codeigniter4/cache/actions/runs/9039778315/job/24843115363?pr=40

kenjis commented 3 months ago

@MGatner Do you know why the above error occurs?

MGatner commented 3 months ago

I think that's an issue with Roave's BC Check, not our Composer file. I see they just had some major changes - it might be prudent to drop the workflow temporarily until we can migrate.

kenjis commented 3 months ago

Ah, I've found codeigniter4/codeigniter4 dev-develop in the master branch: https://github.com/codeigniter4/cache/blob/b965e7f51a1575a1fce49035886c7fbdaf87190a/composer.json#L36