diff --git a/guides/source/6_1_release_notes.md b/guides/source/6_1_release_notes.md index a8c46ad007..23f3496cab 100644 --- a/guides/source/6_1_release_notes.md +++ b/guides/source/6_1_release_notes.md @@ -37,6 +37,8 @@ Please refer to the [Changelog][railties] for detailed changes. * Remove deprecated `connection` option in the `rails dbconsole` command. +* Remove deprecated `SOURCE_ANNOTATION_DIRECTORIES` environment variable support from `rails notes`. + ### Deprecations ### Notable changes diff --git a/railties/CHANGELOG.md b/railties/CHANGELOG.md index 7dfd4168ac..e48db6a39b 100644 --- a/railties/CHANGELOG.md +++ b/railties/CHANGELOG.md @@ -1,3 +1,7 @@ +* Remove deprecated `SOURCE_ANNOTATION_DIRECTORIES` environment variable support from `rails notes`. + + *Rafael Mendonça França* + * Remove deprecated `connection` option in the `rails dbconsole` command. *Rafael Mendonça França* diff --git a/railties/lib/rails/commands/notes/notes_command.rb b/railties/lib/rails/commands/notes/notes_command.rb index 94cf183855..21900ce545 100644 --- a/railties/lib/rails/commands/notes/notes_command.rb +++ b/railties/lib/rails/commands/notes/notes_command.rb @@ -10,7 +10,6 @@ module Rails def perform(*) require_application_and_environment! - deprecation_warning display_annotations end @@ -23,16 +22,7 @@ module Rails end def directories - Rails::SourceAnnotationExtractor::Annotation.directories + source_annotation_directories - end - - def deprecation_warning - return if source_annotation_directories.empty? - ActiveSupport::Deprecation.warn("`SOURCE_ANNOTATION_DIRECTORIES` is deprecated and will be removed in Rails 6.1. You can add default directories by using config.annotations.register_directories instead.") - end - - def source_annotation_directories - ENV["SOURCE_ANNOTATION_DIRECTORIES"].to_s.split(",") + Rails::SourceAnnotationExtractor::Annotation.directories end end end