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

Deprecate Spree::Address firstname, lastname and full_name #3584

Conversation

filippoliverani
Copy link
Contributor

@filippoliverani filippoliverani commented Apr 10, 2020

Description
This PR is a step to solve #3234 and a continuation of #3524.

Address#name is ready to be used instead of firstname, lastname and full_name, we should start to deprecate legacy attributes to be ready to remove them in the next major release.
This PR adds deprecation warnings and removes any remaining reference to legacy attributes.

Checklist:

  • I have followed Pull Request guidelines
  • I have added a detailed description into each commit message
  • I have updated Guides and README accordingly to this change (if needed)
  • I have added tests to cover this change (if needed)
  • [ ] I have attached screenshots to this PR for visual changes (if needed)

core/app/models/spree/address.rb Outdated Show resolved Hide resolved
core/app/models/spree/address.rb Outdated Show resolved Hide resolved
@filippoliverani filippoliverani changed the title Filippoliverani/deprecate address firstname lastname Deprecate Spree::Address firstname, lastname and full_name Apr 10, 2020
@filippoliverani filippoliverani force-pushed the filippoliverani/deprecate-address-firstname-lastname branch from 63f8d30 to acff1da Compare April 10, 2020 13:20
@filippoliverani filippoliverani marked this pull request as ready for review April 10, 2020 14:20
Copy link
Member

@kennyadsl kennyadsl left a comment

Choose a reason for hiding this comment

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

Add deprecation warnings and update docs to notify when Spree::Address
firstname, lastname and full_name attributes are used instead of name.
When Spree::Config.use_combined_first_and_last_name_in_address
preference is set to true, no Address representation should contain any
reference to deprecated legacy name attributes.
@filippoliverani filippoliverani force-pushed the filippoliverani/deprecate-address-firstname-lastname branch from acff1da to 12bdceb Compare April 17, 2020 10:08
@kennyadsl kennyadsl merged commit e9a5f29 into solidusio:master Apr 17, 2020
stem added a commit to stem/solidus_product_assembly that referenced this pull request Apr 18, 2020
Because of addresses' firstname & lastname deprecations in solidusio/solidus#3584,
solidusio/solidus#3524 and probably other PRs, the inputs where deleted
in favor of a single `name` input.
This is only on master for now, so it should be in 2.11 or 3.0.
stem added a commit to stem/solidus_product_assembly that referenced this pull request Apr 18, 2020
Because of addresses' firstname & lastname deprecations in solidusio/solidus#3584,
solidusio/solidus#3524 and probably other PRs, the inputs where deleted
in favor of a single `name` input.
This is only on master for now, so it should be in 2.11 or 3.0.
stem added a commit to stem/solidus_product_assembly that referenced this pull request Apr 18, 2020
Because of addresses' firstname & lastname deprecations in solidusio/solidus#3584,
solidusio/solidus#3524 and probably other PRs, the inputs where deleted
in favor of a single `name` input.
This is only on master for now, so it should be in 2.11 or 3.0.
aldesantis pushed a commit to stem/solidus_product_assembly that referenced this pull request Apr 25, 2020
Because of addresses' firstname & lastname deprecations in solidusio/solidus#3584,
solidusio/solidus#3524 and probably other PRs, the inputs where deleted
in favor of a single `name` input.
This is only on master for now, so it should be in 2.11 or 3.0.
MassimilianoLattanzio added a commit to nebulab/solidus_address_name that referenced this pull request Aug 11, 2023
In solidusio/solidus#3584, they changed the address factory [1],
so the firstname and lastname will differ from the previous version.

This commits reverts the changes, so if in your applications test you're
using the old address factory, the specs will continue to work properly.

1: https://github.com/solidusio/solidus/pull/3584/files#diff-8e88fbe32e58692ffaf3629a7fdfdadfa4378dd248a011fc8d2d266a5ed299a4
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.

4 participants