fix: update psalm and fix its errors - #218
Conversation
Signed-off-by: Cristian Scheid <cristianscheid@gmail.com>
Signed-off-by: Cristian Scheid <cristianscheid@gmail.com>
58d9f03 to
81e7ec6
Compare
| * This interface needs to be implemented if you want to define a config lexicon for your application | ||
| * The config lexicon is used to avoid conflicts and problems when storing/retrieving config values | ||
| */ | ||
| #[Implementable(since: '32.0.0')] |
There was a problem hiding this comment.
It should be exposed in nextcloud/ocp already, why do we need to declare as stubs?
There was a problem hiding this comment.
Maybe nextcloud/ocp is not the latest version
There was a problem hiding this comment.
thanks for catching this! To be able to update nextcloud/ocp with composer update, php version in composer.json needs to be bumped from 8.2 to 8.3:
// composer.json at root of app
"platform": {
"php": "8.3"
},I understand this is needed since php 8.2 support was dropped on master. Looking at psalm.xml there is phpVersion="8.1". I wonder if we should update the version there as well or keep it as 8.1?
There was a problem hiding this comment.
Maybe @come-nc or @CarlSchwan can enlighten us on that topic
There was a problem hiding this comment.
This application supports 32 according to https://github.com/nextcloud/globalsiteselector/blob/master/appinfo/info.xml#L24 so it needs to support PHP 8.1. (or to drop support for 32 on master branch)
You should require nextcloud/ocp:dev-stable32 instead of nextcloud/ocp:dev-master.
|
Pushed a similar fix as part of #183 |
Summary
Fixes psalm errors.
after updating psalm, set
ensureOverrideAttribute="false"onpsalm.xmlMissingOverrideAttributeerrorscomposer run psalm -- --alter --issues=MissingOverrideAttributesince PHP override attribute requires PHP >= 8.3.0 andphpVersion="8.1"onpsalm.xmlas a last step, added missing stub
ocp_config_lexicon_ilexicon.phpChecklist
3. to review, feature component)stable32)AI (if applicable)