Skip to content

Comments

fix: Move away from deprecated methods to set user config#8082

Merged
juliusknorr merged 1 commit intomainfrom
fix/psalm-deprecation
Dec 19, 2025
Merged

fix: Move away from deprecated methods to set user config#8082
juliusknorr merged 1 commit intomainfrom
fix/psalm-deprecation

Conversation

@juliusknorr
Copy link
Member

@juliusknorr juliusknorr commented Dec 18, 2025

Makes psalm happy again

Copy link
Member

@mejo- mejo- left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for tackling this ❤️

Copy link
Member

@mejo- mejo- left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mhh, seems like MenuBar and propfind Cypress tests fail reliably. Don't know whether that's related though.

@juliusknorr
Copy link
Member Author

The only change i could think about is changing to the bool typed method for the settings that used strings before with '0' or '1' but this is also covered in the server implementation https://github.com/nextcloud/server/blob/master/lib/private/Config/UserConfig.php#L1881

@juliusknorr
Copy link
Member Author

juliusknorr commented Dec 19, 2025

OK, will check:

{
  "reqId": "0AWHgrnbig6CKLJeICHi",
  "level": 3,
  "time": "2025-12-19T07:47:25+00:00",
  "remoteAddr": "127.0.0.1",
  "user": "udlirqe",
  "app": "index",
  "method": "GET",
  "url": "/index.php/apps/dashboard",
  "scriptName": "/index.php",
  "message": "conflict with value type from database",
  "userAgent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Cypress/15.7.1 Chrome/138.0.7204.251 Electron/37.6.0 Safari/537.36",
  "version": "33.0.0.5",
  "exception": {
    "Exception": "OCP\\Config\\Exceptions\\TypeConflictException",
    "Message": "conflict with value type from database",
    "Code": 0,
    "Trace": [
      {
        "file": "/home/runner/work/text/text/lib/private/Config/UserConfig.php",
        "line": 688,
        "function": "getTypedValue",
        "class": "OC\\Config\\UserConfig",
        "type": "->"
      },
      {
        "file": "/home/runner/work/text/text/apps/text/lib/Service/ConfigService.php",
        "line": 46,
        "function": "getValueBool",
        "class": "OC\\Config\\UserConfig",
        "type": "->"
      },
      {
        "file": "/home/runner/work/text/text/apps/text/lib/Service/InitialStateProvider.php",
        "line": 40,
        "function": "isRichWorkspaceEnabledForUser",
        "class": "OCA\\Text\\Service\\ConfigService",
        "type": "->"
      },
      {
        "file": "/home/runner/work/text/text/apps/text/lib/Listeners/LoadViewerListener.php",
        "line": 38,
        "function": "provideState",
        "class": "OCA\\Text\\Service\\InitialStateProvider",
        "type": "->"
      },
      {
        "file": "/home/runner/work/text/text/lib/private/EventDispatcher/ServiceEventListener.php",
        "line": 57,
        "function": "handle",
        "class": "OCA\\Text\\Listeners\\LoadViewerListener",
        "type": "->"
      },
      {
        "file": "/home/runner/work/text/text/3rdparty/symfony/event-dispatcher/EventDispatcher.php",
        "line": 220,
        "function": "__invoke",
        "class": "OC\\EventDispatcher\\ServiceEventListener",
        "type": "->"
      },
      {
        "file": "/home/runner/work/text/text/3rdparty/symfony/event-dispatcher/EventDispatcher.php",
        "line": 56,
        "function": "callListeners",
        "class": "Symfony\\Component\\EventDispatcher\\EventDispatcher",
        "type": "->"
      },
      {
        "file": "/home/runner/work/text/text/lib/private/EventDispatcher/EventDispatcher.php",
        "line": 67,
        "function": "dispatch",
        "class": "Symfony\\Component\\EventDispatcher\\EventDispatcher",
        "type": "->"
      },
      {
        "file": "/home/runner/work/text/text/lib/private/EventDispatcher/EventDispatcher.php",
        "line": 79,
        "function": "dispatch",
        "class": "OC\\EventDispatcher\\EventDispatcher",
        "type": "->"
      },
      {
        "file": "/home/runner/work/text/text/apps/assistant/lib/Listener/BeforeTemplateRenderedListener.php",
        "line": 77,
        "function": "dispatchTyped",
        "class": "OC\\EventDispatcher\\EventDispatcher",
        "type": "->"
      },
      {
        "file": "/home/runner/work/text/text/lib/private/EventDispatcher/ServiceEventListener.php",
        "line": 57,
        "function": "handle",
        "class": "OCA\\Assistant\\Listener\\BeforeTemplateRenderedListener",
        "type": "->"
      },
      {
        "file": "/home/runner/work/text/text/3rdparty/symfony/event-dispatcher/EventDispatcher.php",
        "line": 220,
        "function": "__invoke",
        "class": "OC\\EventDispatcher\\ServiceEventListener",
        "type": "->"
      },
      {
        "file": "/home/runner/work/text/text/3rdparty/symfony/event-dispatcher/EventDispatcher.php",
        "line": 56,
        "function": "callListeners",
        "class": "Symfony\\Component\\EventDispatcher\\EventDispatcher",
        "type": "->"
      },
      {
        "file": "/home/runner/work/text/text/lib/private/EventDispatcher/EventDispatcher.php",
        "line": 67,
        "function": "dispatch",
        "class": "Symfony\\Component\\EventDispatcher\\EventDispatcher",
        "type": "->"
      },
      {
        "file": "/home/runner/work/text/text/lib/private/EventDispatcher/EventDispatcher.php",
        "line": 79,
        "function": "dispatch",
        "class": "OC\\EventDispatcher\\EventDispatcher",
        "type": "->"
      },
      {
        "file": "/home/runner/work/text/text/lib/private/AppFramework/Middleware/AdditionalScriptsMiddleware.php",
        "line": 34,
        "function": "dispatchTyped",
        "class": "OC\\EventDispatcher\\EventDispatcher",
        "type": "->"
      },
      {
        "file": "/home/runner/work/text/text/lib/private/AppFramework/Middleware/MiddlewareDispatcher.php",
        "line": 119,
        "function": "afterController",
        "class": "OC\\AppFramework\\Middleware\\AdditionalScriptsMiddleware",
        "type": "->"
      },
      {
        "file": "/home/runner/work/text/text/lib/private/AppFramework/Http/Dispatcher.php",
        "line": 155,
        "function": "afterController",
        "class": "OC\\AppFramework\\Middleware\\MiddlewareDispatcher",
        "type": "->"
      },
      {
        "file": "/home/runner/work/text/text/lib/private/AppFramework/App.php",
        "line": 153,
        "function": "dispatch",
        "class": "OC\\AppFramework\\Http\\Dispatcher",
        "type": "->"
      },
      {
        "file": "/home/runner/work/text/text/lib/private/Route/Router.php",
        "line": 321,
        "function": "main",
        "class": "OC\\AppFramework\\App",
        "type": "::"
      },
      {
        "file": "/home/runner/work/text/text/lib/base.php",
        "line": 1096,
        "function": "match",
        "class": "OC\\Route\\Router",
        "type": "->"
      },
      {
        "file": "/home/runner/work/text/text/index.php",
        "line": 25,
        "function": "handleRequest",
        "class": "OC",
        "type": "::"
      }
    ],
    "File": "/home/runner/work/text/text/lib/private/Config/UserConfig.php",
    "Line": 769,
    "message": "conflict with value type from database",
    "exception": {},
    "CustomMessage": "conflict with value type from database"
  }
}

@juliusknorr juliusknorr force-pushed the fix/psalm-deprecation branch from e62b378 to a5b61df Compare December 19, 2025 08:48
@juliusknorr
Copy link
Member Author

Found it, need to store as bool of course as well.

Also will do a follow up to introduce a config lexicon

@max-nextcloud

This comment was marked as off-topic.

@juliusknorr
Copy link
Member Author

juliusknorr commented Dec 19, 2025

Just tried locally and can reproduce the double / in the mkcol url seems problematic

No just happened once 🙈

@max-nextcloud
Copy link
Collaborator

grafik

Sorry... that MKCOL is a red hering. It's from the repeat attempt. The folder cannot be created multiple times. This is the actual first failure.

@juliusknorr
Copy link
Member Author

juliusknorr commented Dec 19, 2025

Thanks, apparently there was one more usage of the deprecated method in the DAV plugin which was not catched by psalm for some reason and then was incompatible with the boolean type that is now set when setting the config options again

@juliusknorr juliusknorr force-pushed the fix/psalm-deprecation branch 2 times, most recently from db04b14 to 34d4abc Compare December 19, 2025 11:31
Signed-off-by: Julius Knorr <jus@bitgrid.net>
@juliusknorr juliusknorr force-pushed the fix/psalm-deprecation branch from 34d4abc to bcef4c4 Compare December 19, 2025 21:49
@juliusknorr juliusknorr merged commit 85a7e3b into main Dec 19, 2025
70 checks passed
@juliusknorr juliusknorr deleted the fix/psalm-deprecation branch December 19, 2025 22:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants