Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add LoginInfoConverter #15422

Merged
merged 25 commits into from
Mar 1, 2024
Merged

Conversation

hyzx86
Copy link
Contributor

@hyzx86 hyzx86 commented Feb 28, 2024

try fix #15416

@hyzx86 hyzx86 marked this pull request as draft February 28, 2024 18:29
@MikeAlhayek MikeAlhayek marked this pull request as ready for review February 28, 2024 19:46
@MikeAlhayek
Copy link
Member

@hyzx86 I made some changes to the PR. Can you please confirm that the code change work in your environment?

@hyzx86
Copy link
Contributor Author

hyzx86 commented Feb 29, 2024

Deserialization of types without a parameterless constructor, a singular parameterized constructor, or a parameterized constructor annotated with 'JsonConstructorAttribute' is not supported. Type 'OrchardCore.Deployment.DeploymentStep'. Path: $.DeploymentSteps[0] | LineNumber: 0 | BytePositionInLine: 173.”
    public class DeploymentPlan
    {
        public long Id { get; set; }
        public string Name { get; set; }
        public List<DeploymentStep> DeploymentSteps { get; init; } = [];
    }
    public abstract class DeploymentStep
    {
        public string Id { get; set; }
        public string Name { get; set; }
    }

image

@MikeAlhayek
Copy link
Member

@hyzx86 are you using custom deployment steps? Make sure you follow all the breaking changes steps here (use services.AddDeployment<>) extension to register it.

https://docs.orchardcore.net/en/latest/docs/releases/1.9.0/

@hyzx86
Copy link
Contributor Author

hyzx86 commented Feb 29, 2024

@hyzx86 are you using custom deployment steps? Make sure you follow all the breaking changes steps here (use services.AddDeployment<>) extension to register it. 

https://docs.orchardcore.net/en/latest/docs/releases/1.9.0/

Yes, my suggestion is to implement a fake serialization converter, and if there are incorrect registrations in the user's data, output a log here, guiding the user to add them using the correct registration method

@MikeAlhayek
Copy link
Member

Yes, my suggestion is to implement a fake serialization converter, and if there are incorrect registrations in the user's data, output a log here, guiding the user to add them using the correct registration method

We logged the instruction in the release notes to ensure that users are able to follow during migration.

@MikeAlhayek
Copy link
Member

@hyzx86 look at the simple test I added. It works as expected. You can add additional tests if you like by creating User object and evaluating the UserLoginInfo collection.

Any additional issues you have, maybe due to something else.

@hyzx86
Copy link
Contributor Author

hyzx86 commented Mar 1, 2024

@MikeAlhayek I also added a test, which I felt was more realistic

cad7ddd

Unfortunately, it doesn't seem to work

@hyzx86
Copy link
Contributor Author

hyzx86 commented Mar 1, 2024

Ok, so far everything looks good

@MikeAlhayek MikeAlhayek enabled auto-merge (squash) March 1, 2024 16:30
@MikeAlhayek
Copy link
Member

@hyzx86 thank you! I cleaned up the tests. Merging it.

@MikeAlhayek MikeAlhayek merged commit 8dc12ff into OrchardCMS:main Mar 1, 2024
4 checks passed
urbanit pushed a commit to urbanit/OrchardCore that referenced this pull request Mar 18, 2024
---------

Co-authored-by: Mike Alhayek <mike@crestapps.com>
Co-authored-by: hyzx86 <yanzhong.han@jizhousoft.com>
@hyzx86 hyzx86 deleted the addLoginInfoConverter branch June 13, 2024 06:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update OC 1.8.0-preview-17858 to 1.9.x latest
2 participants