-
Notifications
You must be signed in to change notification settings - Fork 93
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
OCC-245: Upgrade to latest OC preview to test System.Text.Json #454
Merged
Merged
Changes from all commits
Commits
Show all changes
128 commits
Select commit
Hold shift + click to select a range
6175523
Fix "MD001: heading-increment" and "MD009: no-trailing-spaces".
sarahelsaig e019969
Update package versions and use single variable for OC versions.
sarahelsaig cd19878
Merge remote-tracking branch 'origin/issue/OFFI-33' into issue/OCC-252
sarahelsaig 7eebeb6
Fix using.
sarahelsaig 32b6d2e
Fix xUnit1045 warning.
sarahelsaig 153a95c
Remove obsolete custom htmlvalidate config file.
sarahelsaig b1681db
Add orchardcore-preview to the nuget config.
sarahelsaig 367ba07
Update references.
sarahelsaig 86122d1
Remove Newtonsoft from cshtml files.
sarahelsaig 922dd73
Migrate ProductAttributeValueConverter to STJ.
sarahelsaig abd80f1
Fix various OC 2.0 changes (excl. PopulateSettings related stuff).
sarahelsaig 6545756
Use CopySettingsTo.
sarahelsaig 7884080
Update to the latest OC preview version.
sarahelsaig 2d5539f
Merge remote-tracking branch 'origin/main' into issue/OCC-245
sarahelsaig e829bab
Remove no longer needed compatibility suppression files.
sarahelsaig 26b710c
Update Nuget.config.
sarahelsaig 0887f75
Fix remaining build errors in NEST.
sarahelsaig 0f396fd
Move Payment into abstractions because we can't do arbitrary polymorp…
sarahelsaig e388924
Remove Legacy*Converter.cs files.
sarahelsaig 8409ebf
Fix errors.
sarahelsaig 9c3d50f
Get rid of remaining `using Newtonsoft.Json`.
sarahelsaig 4210f13
Replace obsolete method call.
sarahelsaig 934808d
Update OC package version in OCC.
sarahelsaig 1c2e2fa
Fix incorrect WhenWritingNull usage.
sarahelsaig 9560f29
update OC version
sarahelsaig d0d60b1
Update OC version.
sarahelsaig 5144dac
LocalizedHtmlStringConverter is not needed.
sarahelsaig 7795943
Update OC preview version.
sarahelsaig 775d66f
Fix price serialization.
sarahelsaig cf45fa5
Move NullCurrencySelector to the last injection order.
sarahelsaig 64a526d
Fix strange behavior for ICurrencySelector.
sarahelsaig 2cb9653
Update OC preview version
sarahelsaig 4054dfa
Update package versions and Nuget.config.
sarahelsaig 8558dd1
Merge remote-tracking branch 'origin/issue/OCC-245' into issue/OCC-245
sarahelsaig a4b4c5c
Autofix all usings.
sarahelsaig cd5ef56
Fix static various code analysis warnings.
sarahelsaig 86f64f9
Fix versions in OrchardCore.Commerce.Web.csproj.
sarahelsaig 409bc73
Remove lingering Newtonsoft references.
sarahelsaig 01c259c
Update site setting selector.
sarahelsaig a3f044f
Prevent LocalizedHtmlString deserialization.
sarahelsaig dfa6bea
Temporarily increase timeout-minutes.
sarahelsaig ded7562
Merge branch 'task/system-text-json-migration' into issue/OCC-245
sarahelsaig 6f369a0
Update OC preview version.
sarahelsaig 6ccc73f
Merge branch 'issue/OCC-245' of github.com:OrchardCMS/OrchardCore.Com…
sarahelsaig e250237
Bug fix settings retrieval.
sarahelsaig 230064b
dummy
sarahelsaig bf6f668
Update OC preview version.
sarahelsaig 380814e
Update error handling to the new message.
sarahelsaig d014273
Use Trumbowyg.
sarahelsaig 4c6b75e
Unusing.
sarahelsaig 1aab941
Fix html string deserialization.
sarahelsaig ace70c7
Fix string price deserialization.
sarahelsaig cf0448e
Fix error CA1725.
sarahelsaig 64c9d74
Fix formatting.
sarahelsaig c94656c
Bug fix TextProductAttributeDeserializer deserialization.
sarahelsaig daa36d4
Make sure ContentLocalizationStartup's Order is higher than OrchardCo…
sarahelsaig 5d6c579
Add test-verbosity for ubuntu.
sarahelsaig ae1d000
Update to latest OC preview version.
sarahelsaig ecaae29
Try dotnet-test-process-timeout.
sarahelsaig f1ad548
Merge remote-tracking branch 'origin/issue/OCC-245' into issue/OCC-245
sarahelsaig 5b83a89
Remove dotnet-test-process-timeout to confirm that it really did just…
sarahelsaig e0c7de4
Yep, dotnet-test-process-timeout is needed.
sarahelsaig 01d7e42
Test if really only FullSecurityScanShouldPass fails.
sarahelsaig c8a988c
Merge branch 'task/system-text-json-migration' into issue/OCC-245
sarahelsaig 6c4e953
Update OC preview version.
sarahelsaig 986e670
Add decimal add/subtract operators to Amount.
sarahelsaig b019ea2
Clean up AmountConverterFilter.
sarahelsaig 1e94ef8
Rename order_line_item_view_models_and_tax_rates to order_part_to_ord…
sarahelsaig c407dde
Add amount_to_string filter.
sarahelsaig c255f51
Update HL and UITT versions.
sarahelsaig d17faf8
Merge branch 'issue/OCC-245' of github.com:OrchardCMS/OrchardCore.Com…
sarahelsaig 8a44ac4
Fix analyzer warnings.
sarahelsaig 542cf64
Update src/Libraries/OrchardCore.Commerce.MoneyDataType/Serialization…
sarahelsaig 1b7143d
Update src/Libraries/OrchardCore.Commerce.MoneyDataType/Serialization…
sarahelsaig b9bd11b
Apply suggestions from code review
sarahelsaig 858b037
Fix errors after applying review suggestions.
sarahelsaig 19cafa1
Add JConvert to the dictionary.
sarahelsaig 6fb7f99
Always update the model even if validation failed
sarahelsaig bee9997
Shortcut GetOutput if it's already in the expected type.
sarahelsaig 5b10bc5
Use constant for configure order.
sarahelsaig 455a80a
Use GetSettingsAsync extension method.
sarahelsaig 4320fff
See if we can force timeout using Task.WhenAny
sarahelsaig 9ff0a75
Format line.
sarahelsaig 78bfa00
Format line.
sarahelsaig b54e42a
Use fact timeout instead.
sarahelsaig 28ab541
Try with 5 minutes for now.
sarahelsaig 2ddaaeb
Fact timeout doesn't work, stick with dotnet-test-process-timeout.
sarahelsaig 8c738dc
Revert `@JConvert.SerializeObject` back to `@Json.Serialize`.
sarahelsaig 6ccffc6
Use `await app.RunAsync();`
sarahelsaig 86fae3d
Use `await app.RunAsync();`
sarahelsaig c7c241a
Refactor to get rid of "This method is intentionally not awaited sinc…
sarahelsaig db096da
Check if it's already done.
sarahelsaig 2e386c6
Add missing maxCount parameter.
sarahelsaig 37cd4fb
Remove locks.
sarahelsaig cce49d5
Try preloading the shape cache.
sarahelsaig 9208980
Revert previous experimental changes.
sarahelsaig 8f342e6
Update HL version.
sarahelsaig 694697d
Use PrepareShapeTable.
sarahelsaig 42cbdec
Update UITT version to use the new shape table prepare controller.
sarahelsaig 70dd9dd
Update UITT version again.
sarahelsaig 0a57bfa
We don't need build-create-binary-log here any more.
sarahelsaig fce1111
Update OC preview version.
sarahelsaig 764b8d4
Remove workaround that shouldn't be necessary any more.
sarahelsaig a51f09b
Fix error IDE0010: Populate switch.
sarahelsaig 57c74b6
Better OC Layers docs link
Piedone 526217d
Update NuGet.config
sarahelsaig f775cc4
Update src/Modules/OrchardCore.Commerce/Startup.cs
sarahelsaig 9d93e7e
Fix nuget config.
sarahelsaig 12e2685
Re-add dotnet-test-process-timeout.
sarahelsaig d3cb472
Fix solution item path in unix.
sarahelsaig c085400
Rename Behaviour to Behavior
sarahelsaig 7b2431e
Remove incorrect comment.
sarahelsaig 2483e96
Add 3.0.0 change notes.
sarahelsaig 92f2609
Get rid of the last shreds of IPayment.
sarahelsaig 2ea9013
Reduce security scan max duration.
sarahelsaig c62ebb8
Hopefully dotnet-test-process-timeout can be dropped now.
sarahelsaig d146996
Make active scan single threaded to prevent deadlocks.
sarahelsaig 9afdb73
Converters don't need to be internal.
sarahelsaig d50e7e2
Revert threadPerHost, it's not effective.
sarahelsaig b5b8e76
Fix error CA1725
sarahelsaig e713c5f
Add docs on the Liquid filter changes.
sarahelsaig b43204e
Typos/grammar
Piedone 55bf922
Apply suggestions from code review
sarahelsaig 409c039
Fix warnings.
sarahelsaig 2babc78
Clean up configuration order usage.
sarahelsaig 5a21eaf
Update HL and UITT preview versions.
sarahelsaig 9e397dd
Update HL and UITT preview versions.
sarahelsaig f06dd9f
Merge branch 'task/system-text-json-migration' into issue/OCC-245
sarahelsaig File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<configuration> | ||
<packageSources> | ||
<!-- Ignore global configuration --> | ||
<clear /> | ||
<add key="LombiqPreview" value="https://nuget.cloudsmith.io/lombiq/open-source-orchard-core-extensions/v3/index.json" /> | ||
<add key="OrchardCorePreview" value="https://nuget.cloudsmith.io/orchardcore/preview/v3/index.json" /> | ||
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" /> | ||
</packageSources> | ||
<packageSourceMapping> | ||
<packageSource key="nuget.org"> | ||
<package pattern="*" /> | ||
<!-- OrchardCore.Translations.All is on a separate repo and doesn't have a preview --> | ||
<package pattern="OrchardCore.Translations.*" /> | ||
</packageSource> | ||
<packageSource key="OrchardCorePreview"> | ||
<package pattern="OrchardCore*" /> | ||
<!-- OrchardCore theme packages --> | ||
<package pattern="SafeMode" /> | ||
<package pattern="TheAgencyTheme" /> | ||
<package pattern="TheBlogTheme" /> | ||
<package pattern="TheComingSoonTheme" /> | ||
<package pattern="TheTheme" /> | ||
<package pattern="TheAdmin" /> | ||
</packageSource> | ||
<!-- Enable these to use the Lombiq packages from Cloudsmith instead of NuGet. | ||
<packageSource key="LombiqPreview"> | ||
<package pattern="Lombiq.HelpfulLibraries*" /> | ||
<package pattern="Lombiq.Tests.UI*" /> | ||
</packageSource> | ||
--> | ||
</packageSourceMapping> | ||
</configuration> |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Orchard Core Commerce 3.0.0 | ||
|
||
Release date: Not yet released | ||
|
||
## Important Upgrade Instructions | ||
|
||
Prior to making the leap to Orchard Core Commerce 3.0.0, please read and follow the instructions for the [Orchard Core 2.0.0 release](https://docs.orchardcore.net/en/latest/releases/2.0.0/), as it contains several major breaking changes. | ||
|
||
## Breaking Changes | ||
|
||
### Dropped `Newtonsoft.Json` Support | ||
|
||
The most important breaking change in OC 2.0 is the end of support for [Newtonsoft Json.NET](https://www.newtonsoft.com/json) and the switch to the [System.Text.Json](https://www.nuget.org/packages/System.Text.Json) (STJ) library. For OCC, all Newtonsoft converters are removed, STJ converters were written or updated as necessary. Any models and interfaces that use `JToken` or `JObject` (such as `OrderPart.AdditionalData` and `IUserService.AlterUserSettingAsync()`) now use `JsonNode` and `JsonObject` respectively. | ||
|
||
### Replaced `IPayment` with `Payment` Everywhere | ||
|
||
We've dropped the [`IPayment`](https://github.com/OrchardCMS/OrchardCore.Commerce/blob/34ae00470e954459f19f688c9bfc51d196c386ca/src/Libraries/OrchardCore.Commerce.Abstractions/Abstractions/IPayment.cs) interface, now services and models use `Payment` directly, which was also moved into the `OrchardCore.Commerce.Abstractions` library. Migrating to STJ meant that to retain the polymorphic deserialization support for models using `IPayment` would've taken on some additional complexity, while we already found the separate interface unnecessary. | ||
|
||
Update using references to `OrchardCore.Commerce.Abstractions.Models`. If you have a custom payment processor integration, update it to use `Payment`. | ||
|
||
### Liquid Filters | ||
|
||
The `order_line_item_view_models_and_tax_rates` Liquid filter has been removed. A new `order_part_to_order_summary` filter has been added instead, which can be treated as a drop-in replacement. It has additional `Amount` type properties: `UnitTax`, `SubTotal`, `TaxTotal`, and `Total`. These contain the calculated and appropriately rounded values. | ||
|
||
The new `amount_to_string` filter processes the input object as `Amount` (like the `amount` filter) and correctly formats it just like the `Amount.ToString()` override in C#. You can use `amount_to_string: dot: ","` to make it display a comma as the decimal separator when it would use a dot. Unlike `amount`, you can also use this filter on a number with the `currency: "three-letter-code""` argument (e.g. `{{ value | amount_to_string: currency: "EUR" }}`). This will display any numeric value as the given currency. | ||
|
||
## Change Logs | ||
|
||
Please check the GitHub release entry [here](https://github.com/OrchardCMS/OrchardCore.Commerce/releases/tag/v3.0.0). | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 0 additions & 35 deletions
35
src/Libraries/OrchardCore.Commerce.Abstractions/Abstractions/IPayment.cs
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/Libraries/OrchardCore.Commerce.Abstractions/Abstractions/IProductAttributeValue.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 2 additions & 4 deletions
6
...rdCore.Commerce.Payment/Models/Payment.cs → ...e.Commerce.Abstractions/Models/Payment.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,11 @@ | ||
using OrchardCore.Commerce.Abstractions.Abstractions; | ||
using OrchardCore.Commerce.MoneyDataType; | ||
using System; | ||
|
||
namespace OrchardCore.Commerce.Payment.Models; | ||
namespace OrchardCore.Commerce.Abstractions.Models; | ||
|
||
public record Payment( | ||
string Kind, | ||
string TransactionId, | ||
string ChargeText, | ||
Amount Amount, | ||
DateTime CreatedUtc) | ||
: IPayment; | ||
DateTime CreatedUtc); |
5 changes: 2 additions & 3 deletions
5
src/Libraries/OrchardCore.Commerce.Abstractions/Models/PrioritizedPrice.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Abstractions
in the name space may be weird.Payments
may be betterThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file was moved into the
OrchardCore.Commerce.Abstractions
library which contains all the shared models and interfaces needed across several modules, to avoid unnecessary cross dependency. We don't group namespaces by role inside the Abstractions library at all, because most classes here are hard to categorize and only doing it for some that are easy (like this one) would be even more weird. Also it feels like unnecessary namespace pollution to me.