{"record":{"id":"d65b800f1bb53b36","repo":"spree/spree","slug":"self-class-user-is-deprecated-and-will-be-remov","errorCode":null,"errorMessage":"#{self.class}#user is deprecated and will be removed in Spree 6.1. Use #customer instead.","messagePattern":"#(.+?)#user is deprecated and will be removed in Spree 6\\.1\\. Use #customer instead\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"spree/core/app/models/concerns/spree/deprecated_customer_alias.rb","lineNumber":13,"sourceCode":"module Spree\n  # Deprecation shim for the 6.0 user_id -> customer_id / belongs_to :user -> :customer\n  # rename. Included by customer-facing models so `.user` / `.user_id` keep working\n  # for one release. Remove in Spree 6.1.\n  module DeprecatedCustomerAlias\n    extend ActiveSupport::Concern\n\n    included do\n      alias_attribute :user_id, :customer_id\n    end\n\n    def user\n      Spree::Deprecation.warn(\"#{self.class}#user is deprecated and will be removed in Spree 6.1. Use #customer instead.\") if defined?(Spree::Deprecation)\n      customer\n    end\n\n    def user=(value)\n      Spree::Deprecation.warn(\"#{self.class}#user= is deprecated and will be removed in Spree 6.1. Use #customer= instead.\") if defined?(Spree::Deprecation)\n      self.customer = value\n    end\n  end\nend\n","sourceCodeStart":1,"sourceCodeEnd":23,"githubUrl":"https://github.com/spree/spree/blob/06bf66a8684b9de03210bbb2ddc8c1f5ba522fa2/spree/core/app/models/concerns/spree/deprecated_customer_alias.rb#L1-L23","documentation":"Error \"#{self.class}#user is deprecated and will be removed in Spree 6.1. Use #customer instead.\" thrown in spree/spree.","triggerScenarios":"Thrown at spree/core/app/models/concerns/spree/deprecated_customer_alias.rb:13 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"06bf66a8684b9de03210bbb2ddc8c1f5ba522fa2","analyzedAt":"2026-08-21T14:59:48.125Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}