Add composer fields to silence PHPStan#5716
Conversation
51c4453 to
897e43f
Compare
|
Complains that I need to regenerate the I'll open a separate PR to run |
|
@jeffwidman use |
|
Thanks, I did try |
|
@jeffwidman v1/composer.lock
v2/composer.lock
In the vendor/composer directory composer keeps a file (installed.json) that contains the actual versions of the installed dependencies. My guess is that you did not perform a |
Addresses the following warnings: ``` 16.51 > phpstan analyse 16.82 Note: Using configuration file /opt/composer/v1/phpstan.neon. 18.22 0/6 [░░░░░░░░░░░░░░░░░░░░░░░░░░░░] 0% 6/6 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100% 18.31 18.31 18.31 [OK] No errors 18.31 18.73 ./composer.json is valid for simple usage with Composer but has 18.73 strict errors that make it unable to be published as a package 18.73 See https://getcomposer.org/doc/04-schema.md for details on the schema 18.73 # General warnings 18.73 - No license specified, it is recommended to do so. For closed-source software you may use "proprietary" as license. 18.73 # Publish warnings 18.73 - name : The property name is required 18.73 - description : The property description is required ``` As noted, these are not strictly needed given that we aren't publishing packages / libraries, but it's always nice to silence warnings for less visual noise. Fix dependabot#5695 After editing the `composer.json` file, `composer.lock` was regenerated using `composer install && composer update --lock`. I made sure to use `composer1` for the `v1` helpers, and `composer` for the `v2` helpers.
897e43f to
b8cbc9a
Compare
Thanks @stefangr that was exactly it! |
| }, | ||
| "platform-dev": [], | ||
| "plugin-api-version": "1.1.0" | ||
| "plugin-api-version": "2.3.0" |
There was a problem hiding this comment.
I did notice this change also crept in with composer update --lock. But it should be fine given that we don't use any plugins, and even if we did I suspect we'd want to be on the v2 API given that this is composer v2.
| { | ||
| "name": "dependabot/composer-v1-helper", | ||
| "description": "A helper package for Dependabot to perform updates using Composer", | ||
| "license": "The Prosperity Public License 2.0.0", |
There was a problem hiding this comment.
PHPStan will still complain about this, since it's not a SPDX identifier: https://github.com/dependabot/dependabot-core/actions/runs/3049309247/jobs/4915246993#step:6:175
I looked into submitting this license for inclusion into SPDX index, but after reading through spdx/license-list-XML#960 decided that wasn't worth pursuing further.
I could have used "proprietary", but decided to just ignore that warning for now.
Addresses the following warnings:
As noted, these are not strictly needed given that we aren't publishing packages / libraries, but it's always nice to silence warnings for less visual noise.
After editing the
composer.jsonfile,composer.lockwas regeneratedusing
composer install && composer update --lock. I made sure to usecomposer1for thev1helpers, andcomposerfor thev2helpers.Fix #5695