Pagy NEXT
You can use the NEXT version NOW!
Just edit the Gemfile...
- gem 'pagy', '~> 43.5' # MINOR version restriction
+ gem 'pagy', '~> 43.5.0', require: 'pagy/next' # PATCH version restriction + pagy/next entry point
As an alternative (without Gemfile changes), ensure the environment variable PAGY_NEXT=true is set, BEFORE pagy is required.
$ PAGY_NEXT=true irb
>> require 'pagy'
=> true
>> Pagy::VERSION
=> "43.5.0.next"
How does it work?
Pagy NEXT is the code that will be released as the next MAJOR version. It is already implemented and available in the current version, however it is overridden with the legacy code and deprecation warnings to respect the SemVer contract.
Pagy NEXT provides an opt-in mechanism to bypass the legacy layer entirely. By using require: 'pagy/next' or setting PAGY_NEXT=true, you effectively run the next MAJOR version's code today.
How should you maintain it?
This "early access" mode is lighter and faster, but requires immediate adherence to the latest API changes.
Adjust the gem update policy!
- Use a stricter PATCH version restriction (e.g., replace
~> 43.5with~> 43.5.0) - Follow the Deprecations Instructions after
bundle updateinvolving MINOR or MAJOR releases.
With the PATCH version restriction, bundle will automatically update only PATCH releases, ensuring your NEXT code won't break on update. However, remember to manually check bundle outdated more often to avoid missing MINOR or MAJOR releases.