solidusio-contrib / solidus_reviews

Product review/rating functionality for your Solidus store.
BSD 3-Clause "New" or "Revised" License
19 stars 49 forks source link

Update solidus_core requirement from >= 2.0.0, < 3 to >= 2.0.0, < 4 #104

Closed dependabot-preview[bot] closed 3 years ago

dependabot-preview[bot] commented 3 years ago

Updates the requirements on solidus_core to permit the latest version.

Release notes

Sourced from solidus_core's releases.

v3.0.0.rc2

This is the second pre-release of Solidus 3.0. Please let's give it a try and let us know if there are issues.

Preliminary Upgrade Guide

Follow these steps:

  1. Update to the last released version of Solidus v2.11 (as of today, it is 2.11.5).
  2. Be sure you have run the migrations installer with bin/rails railties:install:migrations and bin/rails db:migrate.
  3. Run the update task with bin/rails solidus:upgrade:two_point_eleven.
  4. Check your logs (either running your test suite or your production logs) and remove any deprecation warning. If you are using deprecated code, it is very likely that your application is not compliant with Solidus 3.0.
  5. Update your Gemfile to use gem 'solidus', '3.0.0.rc2', run bundle install.

Common Problems

Spree::Image customization

Error:

~/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/activerecord-6.1.3/lib/active_record/dynamic_matchers.rb:22:in `method_missing': undefined method `has_one_attached' for #<Class:0x00007fc91f548d38>
Did you mean?  has_attached_file (NoMethodError)

Cause

Spree::Image has now its default adapter to Active Storage, and you probably want to keep using the Paperclip adapter. This setting can be changed with:

# config/initializers/spree.rb`

config.image_attachment_module = 'Spree::Image::PaperclipAttachment' config.taxon_attachment_module = 'Spree::Taxon::PaperclipAttachment'

Take care you don't have any customization of Spree::Image.attachment_definitions before setting that preference (even in other initializer files loaded before, eg config/initializers/paperclip.rb).

Solution

If you do, you'll see the error described above. To fix this, move the customization to a decorator, for example, if you have:

# config/intitializers/something.rb

Spree::Image.attachment_definitions[:attachment][:styles] = { mini: '48x48>', small: '100x100>', product: '240x240>', large: '600x600>' </tr></table>

... (truncated)

Changelog

Sourced from solidus_core's changelog.

Solidus 3.0.0 (v3.0, 2021-04-20)

Major Changes

Removal of all code deprecated during the 2.x series

The main change in this major version is the removal of all deprecated code that we introduced during the 2.x series. This means that if any code that was deprecated is still being used, the application will break. Following the deprecation messages in the application logs, it should be quite easy to spot what code needs to be changed.

The main things that could break a Solidus application are:

Paranoia gem has been replaced by Discard gem

All references to methods added to models by Paranoia will raise a NoMethodError exception now. Some of those methods are:

  • paranoia_destroy
  • paranoia_delete
  • with_deleted
  • only_deleted
  • really_destroy!
  • after_real_destroy

Pull Requests:

Removed core support to first_name and last_name in Spree::Address

In Solidus v2.11, we added a name attribute to Spree::Address, which is being populated combining first_name and last_name values every time a new address is added to the system. We also provided a rake tasks to update all existing records in order to get applications ready for Solidus 3.0.

With this major version, name is the only supported attributes. first_name and last_name fields are already in the database so if needed, a store can revert this change implementing their own logic.

See 3234 for the rationale behind this change.

Pull Requests:

All the other deprecations removal

For a complete reference to rest of the code removed, these PRs can be taken as reference:

... (truncated)

Commits
  • 3cc2d3e Bump Solidus to 3.0.0.rc2
  • 5368e8a Merge pull request #3982 from nebulab/kennyadsl/uniform-update-task-output
  • a4d278c Improve address name migration task output
  • 558fa4b Merge pull request #3981 from solidusio/dependabot/npm_and_yarn/guides/ellipt...
  • 2e12786 Merge pull request #3933 from nebulab/spaghetticode/migrate-to-address-name
  • c6b3697 Bump elliptic from 6.5.3 to 6.5.4 in /guides
  • 87203d5 Add migrate_address_names task to 2.11 upgrade task
  • b7ba9ad Add Address name data migration rake task
  • 26d6596 Merge pull request #3969 from nebulab/kennyadsl/add-activestorage-dummy-exten...
  • db7ff8d Configure Active Storage on dummy apps for extensions
  • Additional commits viewable in compare view


Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) - `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language - `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language - `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language - `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language - `@dependabot badge me` will comment on this PR with code to add a "Dependabot enabled" badge to your readme Additionally, you can set the following in your Dependabot [dashboard](https://app.dependabot.com): - Update frequency (including time of day and day of week) - Pull request limits (per update run and/or open at any time) - Out-of-range updates (receive only lockfile updates, if desired) - Security updates (receive only security updates, if desired)
dependabot-preview[bot] commented 3 years ago

Looks like solidus_core is no longer updatable, so this is no longer needed.