diff options
Diffstat (limited to 'guides/source/6_0_release_notes.md')
-rw-r--r-- | guides/source/6_0_release_notes.md | 245 |
1 files changed, 225 insertions, 20 deletions
diff --git a/guides/source/6_0_release_notes.md b/guides/source/6_0_release_notes.md index 17d1132e73..1b37bf50e1 100644 --- a/guides/source/6_0_release_notes.md +++ b/guides/source/6_0_release_notes.md @@ -151,25 +151,44 @@ Please refer to the [Changelog][action-cable] for detailed changes. ### Removals +* Replace `ActionCable.startDebugging()` and `ActionCable.stopDebugging()` + with `ActionCable.logger.enabled`. + ([Pull Request](https://github.com/rails/rails/pull/34370)) + ### Deprecations +* There are no deprecations for Action Cable in Rails 6.0. + ### Notable changes -* The ActionCable javascript package has been converted from CoffeeScript - to ES2015, and we now publish the source code in the npm distribution. +* Add support for the `channel_prefix` option for PostgreSQL subscription adapters + in `cable.yml`. + ([Pull Request](https://github.com/rails/rails/pull/35276)) + +* Allow passing a custom configuration to `ActionCable::Server::Base`. + ([Pull Request](https://github.com/rails/rails/pull/34714)) + +* Add `:action_cable_connection` and `:action_cable_channel` load hooks. + ([Pull Request](https://github.com/rails/rails/pull/35094)) - This allows ActionCable users to depend on the javascript source code - rather than the compiled code, which can produce smaller javascript bundles. +* Add `Channel::Base#broadcast_to` and `Channel::Base.broadcasting_for`. + ([Pull Request](https://github.com/rails/rails/pull/35021)) - This change includes some breaking changes to optional parts of the - ActionCable javascript API: +* Close a connection when calling `reject_unauthorized_connection` from an + `ActionCable::Connection`. + ([Pull Request](https://github.com/rails/rails/pull/34194)) - - Configuration of the WebSocket adapter and logger adapter have been moved - from properties of `ActionCable` to properties of `ActionCable.adapters`. +* Convert the Action Cable JavaScript package from CoffeeScript to ES2015 and + publish the source code in the npm distribution. + ([Pull Request](https://github.com/rails/rails/pull/34370)) - - The `ActionCable.startDebugging()` and `ActionCable.stopDebugging()` - methods have been removed and replaced with the property - `ActionCable.logger.enabled`. +* Move the configuration of the WebSocket adapter and logger adapter + from properties of `ActionCable` to `ActionCable.adapters`. + ([Pull Request](https://github.com/rails/rails/pull/34370)) + +* Add an `id` option to the Redis adapter to distinguish Action Cable's Redis + connections. + ([Pull Request](https://github.com/rails/rails/pull/33798)) Action Pack ----------- @@ -183,7 +202,7 @@ Please refer to the [Changelog][action-pack] for detailed changes. * Remove deprecated methods in `ActionDispatch::TestResponse`: `#success?` in favor of `#successful?`, `#missing?` in favor of `#not_found?`, - `#error?` in favor of `#server_error?` + `#error?` in favor of `#server_error?`. ([Commit](https://github.com/rails/rails/commit/13ddc92e079e59a0b894e31bf5bb4fdecbd235d1)) ### Deprecations @@ -210,7 +229,7 @@ Please refer to the [Changelog][action-pack] for detailed changes. * Allow the use of `parsed_body` in `ActionController::TestCase`. ([Pull Request](https://github.com/rails/rails/pull/34717)) -* Raise an `ArgumentError` when multiple root routes exists in the same context +* Raise an `ArgumentError` when multiple root routes exist in the same context without `as:` naming specifications. ([Pull Request](https://github.com/rails/rails/pull/34494)) @@ -279,14 +298,14 @@ Please refer to the [Changelog][action-view] for detailed changes. ### Notable changes -* Clear ActionView cache in development only on file changes, speeding up +* Clear Action View cache in development only on file changes, speeding up development mode. ([Pull Request](https://github.com/rails/rails/pull/35629)) * Move all of the Rails npm packages into a `@rails` scope. ([Pull Request](https://github.com/rails/rails/pull/34905)) -* Only accept formats from registered Mime types. +* Only accept formats from registered MIME types. ([Pull Request](https://github.com/rails/rails/pull/35604), [Pull Request](https://github.com/rails/rails/pull/35753)) * Add allocations to the template and partial rendering server output. @@ -304,7 +323,7 @@ Please refer to the [Changelog][action-view] for detailed changes. enable `ActionView::Template` finalizers. ([Pull Request](https://github.com/rails/rails/pull/32418)) -* Extract the JS `confirm` call to its own, overridable method in `rails_ujs`. +* Extract the JavaScript `confirm` call to its own, overridable method in `rails_ujs`. ([Pull Request](https://github.com/rails/rails/pull/32404)) * Add a `action_controller.default_enforce_utf8` configuration option to handle @@ -383,7 +402,7 @@ Please refer to the [Changelog][active-record] for detailed changes. * Remove support for passing the column name to `count` when a block is passed. ([Commit](https://github.com/rails/rails/commit/67356f2034ab41305af7218f7c8b2fee2d614129)) -* Remove support for delegation of missing methods in a relation to arel. +* Remove support for delegation of missing methods in a relation to Arel. ([Commit](https://github.com/rails/rails/commit/d97980a16d76ad190042b4d8578109714e9c53d0)) * Remove support for delegating missing methods in a relation to private methods of the class. @@ -426,7 +445,7 @@ Please refer to the [Changelog][active-record] for detailed changes. ### Notable changes -* Bump the minimum sqlite3 version to 1.4. +* Bump the minimum version of the `sqlite3` gem to 1.4. ([Pull Request](https://github.com/rails/rails/pull/35844)) * Add `rails db:prepare` to create a database if it doesn't exist, and run its migrations. @@ -448,7 +467,7 @@ Please refer to the [Changelog][active-record] for detailed changes. ([Pull Request](https://github.com/rails/rails/pull/35631)) * Add `rails db:seed:replant` that truncates tables of each database - for ther current environment and loads the seeds. + for the current environment and loads the seeds. ([Pull Request](https://github.com/rails/rails/pull/34779)) * Add `reselect` method, which is a short-hand for `unscope(:select).select(fields)`. @@ -558,7 +577,7 @@ Please refer to the [Changelog][active-record] for detailed changes. * Allow the `:to_table` option of `remove_foreign_key` to be invertible. ([Pull Request](https://github.com/rails/rails/pull/33530)) -* Fix default value for mysql time types with specified precision. +* Fix default value for MySQL time types with specified precision. ([Pull Request](https://github.com/rails/rails/pull/33280)) * Fix the `touch` option to behave consistently with `Persistence#touch` method. @@ -723,10 +742,196 @@ Please refer to the [Changelog][active-support] for detailed changes. ### Removals +* Remove deprecated `#acronym_regex` method from `Inflections`. + ([Commit](https://github.com/rails/rails/commit/0ce67d3cd6d1b7b9576b07fecae3dd5b422a5689)) + +* Remove deprecated `Module#reachable?` method. + ([Commit](https://github.com/rails/rails/commit/6eb1d56a333fd2015610d31793ed6281acd66551)) + +* Remove `` Kernel#` `` without any replacement. + ([Pull Request](https://github.com/rails/rails/pull/31253)) + ### Deprecations +* Deprecate using negative integer arguments for `String#first` and + `String#last`. + ([Pull Request](https://github.com/rails/rails/pull/33058)) + +* Deprecate `ActiveSupport::Multibyte::Unicode#downcase/upcase/swapcase` + in favor of `String#downcase/upcase/swapcase`. + ([Pull Request](https://github.com/rails/rails/pull/34123)) + +* Deprecate `ActiveSupport::Multibyte::Unicode#normalize` + and `ActiveSupport::Multibyte::Chars#normalize` in favor of + `String#unicode_normalize`. + ([Pull Request](https://github.com/rails/rails/pull/34202)) + +* Deprecate `ActiveSupport::Multibyte::Chars.consumes?` in favor of + `String#is_utf8?`. + ([Pull Request](https://github.com/rails/rails/pull/34215)) + +* Deprecate `ActiveSupport::Multibyte::Unicode#pack_graphemes(array)` + and `ActiveSupport::Multibyte::Unicode#unpack_graphemes(string)` + in favor of `array.flatten.pack("U*")` and `string.scan(/\X/).map(&:codepoints)`, + respectively. + ([Pull Request](https://github.com/rails/rails/pull/34254)) + ### Notable changes +* Add support for parallel testing. + ([Pull Request](https://github.com/rails/rails/pull/31900)) + +* Make sure that `String#strip_heredoc` preserves frozen-ness of strings. + ([Pull Request](https://github.com/rails/rails/pull/32037)) + +* Add `String#truncate_bytes` to truncate a string to a maximum bytesize + without breaking multibyte characters or grapheme clusters. + ([Pull Request](https://github.com/rails/rails/pull/27319)) + +* Add `private` option to `delegate` method in order to delegate to + private methods. This option accepts `true/false` as the value. + ([Pull Request](https://github.com/rails/rails/pull/31944)) + +* Add support for translations through I18n for `ActiveSupport::Inflector#ordinal` + and `ActiveSupport::Inflector#ordinalize`. + ([Pull Request](https://github.com/rails/rails/pull/32168)) + +* Add `before?` and `after?` methods to `Date`, `DateTime`, + `Time`, and `TimeWithZone`. + ([Pull Request](https://github.com/rails/rails/pull/32185)) + +* Fix bug where `URI.unescape` would fail with mixed Unicode/escaped character + input. + ([Pull Request](https://github.com/rails/rails/pull/32183)) + +* Fix bug where `ActiveSupport::Cache` would massively inflate the storage + size when compression was enabled. + ([Pull Request](https://github.com/rails/rails/pull/32539)) + +* Redis cache store: `delete_matched` no longer blocks the Redis server. + ([Pull Request](https://github.com/rails/rails/pull/32614)) + +* Fix bug where `ActiveSupport::TimeZone.all` would fail when tzinfo data for + any timezone defined in `ActiveSupport::TimeZone::MAPPING` was missing. + ([Pull Request](https://github.com/rails/rails/pull/32613)) + +* Add `Enumerable#index_with` which allows creating a hash from an enumerable + with the value from a passed block or a default argument. + ([Pull Request](https://github.com/rails/rails/pull/32523)) + +* Allow `Range#===` and `Range#cover?` methods to work with `Range` argument. + ([Pull Request](https://github.com/rails/rails/pull/32938)) + +* Support key expiry in `increment/decrement` operations of RedisCacheStore. + ([Pull Request](https://github.com/rails/rails/pull/33254)) + +* Add cpu time, idle time, and allocations features to log subscriber events. + ([Pull Request](https://github.com/rails/rails/pull/33449)) + +* Add support for event object to the Active Support notification system. + ([Pull Request](https://github.com/rails/rails/pull/33451)) + +* Add support for not caching `nil` entries by introducing new option `skip_nil` + for `ActiveSupport::Cache#fetch`. + ([Pull Request](https://github.com/rails/rails/pull/25437)) + +* Add `Array#extract!` method which removes and returns the elements for which + block returns a true value. + ([Pull Request](https://github.com/rails/rails/pull/33137)) + +* Keep an HTML-safe string HTML-safe after slicing. + ([Pull Request](https://github.com/rails/rails/pull/33808)) + +* Add support for tracing constant autoloads via logging. + ([Commit](https://github.com/rails/rails/commit/c03bba4f1f03bad7dc034af555b7f2b329cf76f5)) + +* Define `unfreeze_time` as an alias of `travel_back`. + ([Pull Request](https://github.com/rails/rails/pull/33813)) + +* Change `ActiveSupport::TaggedLogging.new` to return a new logger instance + instead of mutating the one received as argument. + ([Pull Request](https://github.com/rails/rails/pull/27792)) + +* Treat `#delete_prefix`, `#delete_suffix` and `#unicode_normalize` methods + as non HTML-safe methods. + ([Pull Request](https://github.com/rails/rails/pull/33990)) + +* Fix bug where `#without` for `ActiveSupport::HashWithIndifferentAccess` + would fail with symbol arguments. + ([Pull Request](https://github.com/rails/rails/pull/34012)) + +* Rename `Module#parent`, `Module#parents`, and `Module#parent_name` to + `module_parent`, `module_parents`, and `module_parent_name`. + ([Pull Request](https://github.com/rails/rails/pull/34051)) + +* Add `ActiveSupport::ParameterFilter`. + ([Pull Request](https://github.com/rails/rails/pull/34039)) + +* Fix issue where duration was being rounded to a full second when a float + was added to the duration. + ([Pull Request](https://github.com/rails/rails/pull/34135)) + +* Make `#to_options` an alias for `#symbolize_keys` in + `ActiveSupport::HashWithIndifferentAccess`. + ([Pull Request](https://github.com/rails/rails/pull/34360)) + +* Don't raise an exception anymore if the same block is included multiple times + for a Concern. + ([Pull Request](https://github.com/rails/rails/pull/34553)) + +* Preserve key order passed to `ActiveSupport::CacheStore#fetch_multi`. + ([Pull Request](https://github.com/rails/rails/pull/34700)) + +* Fix `String#safe_constantize` to not throw a `LoadError` for incorrectly + cased constant references. + ([Pull Request](https://github.com/rails/rails/pull/34892)) + +* Add `Hash#deep_transform_values` and `Hash#deep_transform_values!`. + ([Commit](https://github.com/rails/rails/commit/b8dc06b8fdc16874160f61dcf58743fcc10e57db)) + +* Add `ActiveSupport::HashWithIndifferentAccess#assoc`. + ([Pull Request](https://github.com/rails/rails/pull/35080)) + +* Add `before_reset` callback to `CurrentAttributes` and define + `after_reset` as an alias of `resets` for symmetry. + ([Pull Request](https://github.com/rails/rails/pull/35063)) + +* Revise `ActiveSupport::Notifications.unsubscribe` to correctly + handle Regex or other multiple-pattern subscribers. + ([Pull Request](https://github.com/rails/rails/pull/32861)) + +* Add new autoloading mechanism using Zeitwerk. + ([Commit](https://github.com/rails/rails/commit/e53430fa9af239e21e11548499d814f540d421e5)) + +* Add `Array#including` and `Enumerable#including` to conveniently enlarge + a collection. + ([Commit](https://github.com/rails/rails/commit/bfaa3091c3c32b5980a614ef0f7b39cbf83f6db3)) + +* Rename `Array#without` and `Enumerable#without` to `Array#excluding` + and `Enumerable#excluding`. Old method names are retained as aliases. + ([Commit](https://github.com/rails/rails/commit/bfaa3091c3c32b5980a614ef0f7b39cbf83f6db3)) + +* Add support for supplying `locale` to `transliterate` and `parameterize`. + ([Pull Request](https://github.com/rails/rails/pull/35571)) + +* Fix `Time#advance` to work with dates before 1001-03-07. + ([Pull Request](https://github.com/rails/rails/pull/35659)) + +* Update `ActiveSupport::Notifications::Instrumenter#instrument` to allow + not passing block. + ([Pull Request](https://github.com/rails/rails/pull/35705)) + +* Use weak references in descendants tracker to allow anonymous subclasses to + be garbage collected. + ([Pull Request](https://github.com/rails/rails/pull/31442)) + +* Calling test methods with `with_info_handler` method to allow minitest-hooks + plugin to work. + ([Commit](https://github.com/rails/rails/commit/758ba117a008b6ea2d3b92c53b6a7a8d7ccbca69)) + +* Preserve `html_safe?` status on `ActiveSupport::SafeBuffer#*`. + ([Pull Request](https://github.com/rails/rails/pull/36012)) + Active Job ---------- |