diff --git a/Library/Homebrew/build_options.rb b/Library/Homebrew/build_options.rb
index 36ae1d613e..5f173ad2d2 100644
--- a/Library/Homebrew/build_options.rb
+++ b/Library/Homebrew/build_options.rb
@@ -11,12 +11,6 @@ class BuildOptions
@options = options
end
- # TODO: rename private_include? when include? is removed.
- # @deprecated
- def include?(_)
- odisabled "BuildOptions#include?"
- end
-
# True if a {Formula} is being built with a specific option.
#
args << "--i-want-spam" if build.with? "spam"
#
@@ -33,9 +27,9 @@ class BuildOptions
option_names.any? do |name|
if option_defined? "with-#{name}"
- private_include? "with-#{name}"
+ include? "with-#{name}"
elsif option_defined? "without-#{name}"
- !private_include? "without-#{name}"
+ !include? "without-#{name}" # rubocop:disable Rails/NegateInclude
else
false
end
@@ -50,7 +44,7 @@ class BuildOptions
# True if a {Formula} is being built as a bottle (i.e. binary package).
def bottle?
- private_include? "build-bottle"
+ include? "build-bottle"
end
# True if a {Formula} is being built with {Formula.head} instead of {Formula.stable}.
@@ -61,7 +55,7 @@ class BuildOptions
# args << "--and-a-cold-beer" if build.with? "cold-beer"
# end
def head?
- private_include? "HEAD"
+ include? "HEAD"
end
# True if a {Formula} is being built with {Formula.stable} instead of {Formula.head}.
@@ -71,18 +65,6 @@ class BuildOptions
!head?
end
- # True if a {Formula} is being built universally.
- # e.g. on newer Intel Macs this means a combined x86_64/x86 binary/library.
- # args << "--universal-binary" if build.universal?
- def universal?
- odisabled "BuildOptions#universal?"
- end
-
- # True if a {Formula} is being built in C++11 mode.
- def cxx11?
- odisabled "BuildOptions#cxx11?"
- end
-
# True if the build has any arguments or options specified.
def any_args_or_options?
!@args.empty? || !@options.empty?
@@ -100,8 +82,7 @@ class BuildOptions
private
- # TODO: rename to include? when include? is removed.
- def private_include?(name)
+ def include?(name)
@args.include?("--#{name}")
end
diff --git a/Library/Homebrew/cask/cmd.rb b/Library/Homebrew/cask/cmd.rb
index abb3764f1b..0d6cd171bf 100644
--- a/Library/Homebrew/cask/cmd.rb
+++ b/Library/Homebrew/cask/cmd.rb
@@ -174,7 +174,7 @@ module Cask
[args.remaining.empty? ? NullCommand : UnknownSubcommand.new(args.remaining.first), argv]
if (replacement = DEPRECATED_COMMANDS[command])
- odeprecated "brew cask #{command.command_name}", replacement
+ odisabled "brew cask #{command.command_name}", replacement
end
if args.help?
diff --git a/Library/Homebrew/cli/args.rb b/Library/Homebrew/cli/args.rb
index 8ca8dea7d1..1767309572 100644
--- a/Library/Homebrew/cli/args.rb
+++ b/Library/Homebrew/cli/args.rb
@@ -64,42 +64,6 @@ module Homebrew
named.blank?
end
- def formulae
- odisabled "args.formulae", "args.named.to_formulae"
- end
-
- def formulae_and_casks
- odisabled "args.formulae_and_casks", "args.named.to_formulae_and_casks"
- end
-
- def resolved_formulae
- odisabled "args.resolved_formulae", "args.named.to_resolved_formulae"
- end
-
- def resolved_formulae_casks
- odisabled "args.resolved_formulae_casks", "args.named.to_resolved_formulae_to_casks"
- end
-
- def formulae_paths
- odisabled "args.formulae_paths", "args.named.to_formulae_paths"
- end
-
- def casks
- odisabled "args.casks", "args.named.homebrew_tap_cask_names"
- end
-
- def loaded_casks
- odisabled "args.loaded_casks", "args.named.to_cask"
- end
-
- def kegs
- odisabled "args.kegs", "args.named.to_kegs"
- end
-
- def kegs_casks
- odisabled "args.kegs", "args.named.to_kegs_to_casks"
- end
-
def build_stable?
!HEAD?
end
diff --git a/Library/Homebrew/cmd/gist-logs.rb b/Library/Homebrew/cmd/gist-logs.rb
index d264c86151..b8735643b4 100644
--- a/Library/Homebrew/cmd/gist-logs.rb
+++ b/Library/Homebrew/cmd/gist-logs.rb
@@ -57,7 +57,7 @@ module Homebrew
files["00.tap.out"] = { content: tap }
end
- odisabled "`brew gist-logs` with a password", "HOMEBREW_GITHUB_API_TOKEN" if GitHub.api_credentials_type == :none
+ odie "`brew gist-logs` requires HOMEBREW_GITHUB_API_TOKEN to be set!" if GitHub.api_credentials_type == :none
# Description formatted to work well as page title when viewing gist
descr = if f.core_formula?
@@ -94,14 +94,6 @@ module Homebrew
result
end
- def login!
- print "GitHub User: "
- ENV["HOMEBREW_GITHUB_API_USERNAME"] = $stdin.gets.chomp
- print "Password: "
- ENV["HOMEBREW_GITHUB_API_PASSWORD"] = noecho_gets.chomp
- puts
- end
-
def load_logs(dir)
logs = {}
if dir.exist?
diff --git a/Library/Homebrew/cmd/list.rb b/Library/Homebrew/cmd/list.rb
index 5589ed7dd1..a906de4b09 100644
--- a/Library/Homebrew/cmd/list.rb
+++ b/Library/Homebrew/cmd/list.rb
@@ -115,8 +115,7 @@ module Homebrew
ls_args << "-t" if args.t?
if !$stdout.tty? && !args.formula? && !args.cask?
- odeprecated "`brew list` to only list formulae", "`brew list --formula`"
- safe_system "ls", *ls_args, HOMEBREW_CELLAR
+ odisabled "`brew list` to only list formulae", "`brew list --formula`"
else
safe_system "ls", *ls_args, HOMEBREW_CELLAR unless args.cask?
list_casks(args: args) unless args.formula?
diff --git a/Library/Homebrew/cmd/outdated.rb b/Library/Homebrew/cmd/outdated.rb
index ea40aad78f..2a41e1752f 100644
--- a/Library/Homebrew/cmd/outdated.rb
+++ b/Library/Homebrew/cmd/outdated.rb
@@ -49,9 +49,9 @@ module Homebrew
args = outdated_args.parse
case (j = json_version(args.json))
- when :v1, :default
+ when :v1
odisabled "brew outdated --json#{j == :v1 ? "=v1" : ""}", "brew outdated --json=v2"
- when :v2
+ when :v2, :default
formulae, casks = if args.formula?
[outdated_formulae(args: args), []]
elsif args.cask?
diff --git a/Library/Homebrew/cmd/search.rb b/Library/Homebrew/cmd/search.rb
index d2bed58275..25052f3e4f 100644
--- a/Library/Homebrew/cmd/search.rb
+++ b/Library/Homebrew/cmd/search.rb
@@ -78,7 +78,7 @@ module Homebrew
puts Formatter.columns(Cask::Cask.to_a.map(&:full_name).sort)
else
- # odeprecated "'brew search' with no arguments to output formulae", "'brew formulae'"
+ odeprecated "'brew search' with no arguments to output formulae", "'brew formulae'"
puts Formatter.columns(Formula.full_names.sort)
end
diff --git a/Library/Homebrew/cmd/switch.rb b/Library/Homebrew/cmd/switch.rb
index a25cccce48..d7b5f5e9cf 100644
--- a/Library/Homebrew/cmd/switch.rb
+++ b/Library/Homebrew/cmd/switch.rb
@@ -25,41 +25,8 @@ module Homebrew
end
def switch
- args = switch_args.parse
+ switch_args.parse
- name = args.named.first
- rack = Formulary.to_rack(name)
-
- odie "#{name} not found in the Cellar." unless rack.directory?
-
- odeprecated "`brew switch`", "`brew link` @-versioned formulae"
-
- versions = rack.subdirs
- .map { |d| Keg.new(d).version }
- .sort
- .join(", ")
- version = args.named.second
-
- odie <<~EOS unless (rack/version).directory?
- #{name} does not have a version \"#{version}\" in the Cellar.
- #{name}'s installed versions: #{versions}
- EOS
-
- # Unlink all existing versions
- rack.subdirs.each do |v|
- keg = Keg.new(v)
- puts "Cleaning #{keg}"
- keg.unlink
- end
-
- keg = Keg.new(rack/version)
-
- # Link new version, if not keg-only
- if Formulary.keg_only?(rack)
- keg.optlink(verbose: args.verbose?)
- puts "Opt link created for #{keg}"
- else
- puts "#{keg.link} links created for #{keg}"
- end
+ odisabled "`brew switch`", "`brew link` @-versioned formulae"
end
end
diff --git a/Library/Homebrew/compat.rb b/Library/Homebrew/compat.rb
index 583726728f..b4806eee61 100644
--- a/Library/Homebrew/compat.rb
+++ b/Library/Homebrew/compat.rb
@@ -1,6 +1,2 @@
# typed: strict
# frozen_string_literal: true
-
-require "compat/cli/parser"
-require "compat/formula"
-require "compat/global"
diff --git a/Library/Homebrew/compat/cli/parser.rb b/Library/Homebrew/compat/cli/parser.rb
deleted file mode 100644
index 0753ad7a5c..0000000000
--- a/Library/Homebrew/compat/cli/parser.rb
+++ /dev/null
@@ -1,20 +0,0 @@
-# typed: true
-# frozen_string_literal: true
-
-require "compat/global"
-
-module Homebrew
- module CLI
- class Parser
- module Compat
- def parse(*)
- args = super
- Homebrew.args = args.dup
- args
- end
- end
-
- prepend Compat
- end
- end
-end
diff --git a/Library/Homebrew/compat/cli/parser.rbi b/Library/Homebrew/compat/cli/parser.rbi
deleted file mode 100644
index 39061bb798..0000000000
--- a/Library/Homebrew/compat/cli/parser.rbi
+++ /dev/null
@@ -1,15 +0,0 @@
-# typed: strict
-
-module Homebrew
- module CLI
- class Parser
- module Compat
- include Kernel
-
- module DeprecatedArgs
- include Kernel
- end
- end
- end
- end
-end
diff --git a/Library/Homebrew/compat/formula.rb b/Library/Homebrew/compat/formula.rb
deleted file mode 100644
index fd5f98f979..0000000000
--- a/Library/Homebrew/compat/formula.rb
+++ /dev/null
@@ -1,24 +0,0 @@
-# typed: true
-# frozen_string_literal: true
-
-class Formula
- module Compat
- def installed_prefix
- odisabled "Formula#installed_prefix",
- "Formula#latest_installed_prefix (or Formula#any_installed_prefix)"
- end
-
- # The currently installed version for this formula. Will raise an exception
- # if the formula is not installed.
- # @private
- def installed_version
- odisabled "Formula#installed_version"
- end
-
- def opt_or_installed_prefix_keg
- odisabled "Formula#opt_or_installed_prefix_keg", "Formula#any_installed_keg"
- end
- end
-
- prepend Compat
-end
diff --git a/Library/Homebrew/compat/formula.rbi b/Library/Homebrew/compat/formula.rbi
deleted file mode 100644
index 976ddb4a12..0000000000
--- a/Library/Homebrew/compat/formula.rbi
+++ /dev/null
@@ -1,11 +0,0 @@
-# typed: strict
-
-class Formula
- module Compat
- include Kernel
-
- def any_installed_keg; end
-
- def latest_installed_prefix; end
- end
-end
diff --git a/Library/Homebrew/compat/global.rb b/Library/Homebrew/compat/global.rb
deleted file mode 100644
index e229b7cc6e..0000000000
--- a/Library/Homebrew/compat/global.rb
+++ /dev/null
@@ -1,20 +0,0 @@
-# typed: true
-# frozen_string_literal: true
-
-module Homebrew
- module Compat
- attr_writer :args
-
- def args
- unless @printed_args_warning
- odisabled "Homebrew.args", "`args = _args.parse` and pass `args` along the call chain"
- end
-
- @args ||= CLI::Args.new
- end
- end
-
- class << self
- prepend Compat
- end
-end
diff --git a/Library/Homebrew/compat/global.rbi b/Library/Homebrew/compat/global.rbi
deleted file mode 100644
index fe79dc4ab8..0000000000
--- a/Library/Homebrew/compat/global.rbi
+++ /dev/null
@@ -1,8 +0,0 @@
-# typed: strict
-# frozen_string_literal: true
-
-module Homebrew
- module Compat
- include Kernel
- end
-end
diff --git a/Library/Homebrew/compat/language/haskell.rb b/Library/Homebrew/compat/language/haskell.rb
deleted file mode 100644
index ccb7901681..0000000000
--- a/Library/Homebrew/compat/language/haskell.rb
+++ /dev/null
@@ -1,12 +0,0 @@
-# typed: true
-# frozen_string_literal: true
-
-module Language
- module Haskell
- module Cabal
- def self.included(_)
- odisabled "include Language::Haskell::Cabal"
- end
- end
- end
-end
diff --git a/Library/Homebrew/dev-cmd/diy.rb b/Library/Homebrew/dev-cmd/diy.rb
index 8a11fa2d76..484cd531f7 100644
--- a/Library/Homebrew/dev-cmd/diy.rb
+++ b/Library/Homebrew/dev-cmd/diy.rb
@@ -30,51 +30,8 @@ module Homebrew
end
def diy
- args = diy_args.parse
+ diy_args.parse
- odeprecated "`brew diy`"
-
- path = Pathname.getwd
-
- version = args.version || detect_version(path)
- name = args.name || detect_name(path, version)
-
- prefix = HOMEBREW_CELLAR/name/version
-
- if File.file? "CMakeLists.txt"
- puts "-DCMAKE_INSTALL_PREFIX=#{prefix}"
- elsif File.file? "configure"
- puts "--prefix=#{prefix}"
- elsif File.file? "meson.build"
- puts "-Dprefix=#{prefix}"
- else
- raise "Couldn't determine build system. You can manually put files into #{prefix}"
- end
- end
-
- def detect_version(path)
- version = path.version.to_s
- raise "Couldn't determine version, set it with --version=" if version.empty?
-
- version
- end
-
- def detect_name(path, version)
- basename = path.basename.to_s
- detected_name = basename[/(.*?)-?#{Regexp.escape(version)}/, 1] || basename
- detected_name.downcase!
-
- canonical_name = Formulary.canonical_name(detected_name)
-
- odie <<~EOS if detected_name != canonical_name
- The detected name #{detected_name.inspect} exists in Homebrew as an alias
- of #{canonical_name.inspect}. Consider using the canonical name instead:
- brew diy --name=#{canonical_name}
-
- To continue using the detected name, pass it explicitly:
- brew diy --name=#{detected_name}
- EOS
-
- detected_name
+ odisabled "`brew diy`"
end
end
diff --git a/Library/Homebrew/dev-cmd/pr-pull.rb b/Library/Homebrew/dev-cmd/pr-pull.rb
index a3a75d7f7a..28b9547005 100644
--- a/Library/Homebrew/dev-cmd/pr-pull.rb
+++ b/Library/Homebrew/dev-cmd/pr-pull.rb
@@ -361,7 +361,7 @@ module Homebrew
def pr_pull
args = pr_pull_args.parse
- odeprecated "`brew pr-pull --workflow`", "`brew pr-pull --workflows=`" if args.workflow.presence
+ odisabled "`brew pr-pull --workflow`", "`brew pr-pull --workflows=`" if args.workflow.presence
workflows = if args.workflow.blank?
args.workflows.presence || ["tests.yml"]
diff --git a/Library/Homebrew/env_config.rb b/Library/Homebrew/env_config.rb
index 862b079c51..81d5992d87 100644
--- a/Library/Homebrew/env_config.rb
+++ b/Library/Homebrew/env_config.rb
@@ -155,10 +155,6 @@ module Homebrew
"of Ruby is new enough.",
boolean: true,
},
- HOMEBREW_GITHUB_API_PASSWORD: {
- description: "Use this password for authentication with the GitHub API, for features " \
- "such as `brew search`. This is deprecated in favour of using `HOMEBREW_GITHUB_API_TOKEN`.",
- },
HOMEBREW_GITHUB_API_TOKEN: {
description: "Use this personal access token for the GitHub API, for features such as " \
"`brew search`. You can create one at . If set, " \
@@ -167,10 +163,6 @@ module Homebrew
"\n\n *Note:* Homebrew doesn't require permissions for any of the scopes, but some " \
"developer commands may require additional permissions.",
},
- HOMEBREW_GITHUB_API_USERNAME: {
- description: "Use this username for authentication with the GitHub API, for features " \
- "such as `brew search`. This is deprecated in favour of using `HOMEBREW_GITHUB_API_TOKEN`.",
- },
HOMEBREW_GIT_EMAIL: {
description: "Set the Git author and committer email to this value.",
},
diff --git a/Library/Homebrew/extend/ENV/std.rb b/Library/Homebrew/extend/ENV/std.rb
index 1d92df818b..d92c8c744f 100644
--- a/Library/Homebrew/extend/ENV/std.rb
+++ b/Library/Homebrew/extend/ENV/std.rb
@@ -99,6 +99,8 @@ module Stdenv
%w[O3 O2 O1 O0 Os].each do |opt|
define_method opt do
+ odeprecated "ENV.#{opt}"
+
send(:remove_from_cflags, /-O./)
send(:append_to_cflags, "-#{opt}")
end
@@ -139,18 +141,24 @@ module Stdenv
sig { void }
def m64
+ odeprecated "ENV.m64"
+
append_to_cflags "-m64"
append "LDFLAGS", "-arch #{Hardware::CPU.arch_64_bit}"
end
sig { void }
def m32
+ odeprecated "ENV.m32"
+
append_to_cflags "-m32"
append "LDFLAGS", "-arch #{Hardware::CPU.arch_32_bit}"
end
sig { void }
def universal_binary
+ odeprecated "ENV.universal_binary"
+
check_for_compiler_universal_support
append_to_cflags Hardware::CPU.universal_archs.as_arch_flags
@@ -176,6 +184,8 @@ module Stdenv
sig { void }
def libstdcxx
+ odeprecated "ENV.libstdcxx"
+
append "CXX", "-stdlib=libstdc++" if compiler == :clang
end
diff --git a/Library/Homebrew/extend/ENV/super.rb b/Library/Homebrew/extend/ENV/super.rb
index 12584febb3..3e11757676 100644
--- a/Library/Homebrew/extend/ENV/super.rb
+++ b/Library/Homebrew/extend/ENV/super.rb
@@ -294,6 +294,8 @@ module Superenv
sig { void }
def universal_binary
+ odeprecated "ENV.universal_binary"
+
check_for_compiler_universal_support
self["HOMEBREW_ARCHFLAGS"] = Hardware::CPU.universal_archs.as_arch_flags
@@ -306,11 +308,15 @@ module Superenv
sig { void }
def m32
+ odeprecated "ENV.m32"
+
append "HOMEBREW_ARCHFLAGS", "-m32"
end
sig { void }
def m64
+ odeprecated "ENV.m64"
+
append "HOMEBREW_ARCHFLAGS", "-m64"
end
@@ -327,6 +333,8 @@ module Superenv
sig { void }
def libstdcxx
+ odeprecated "ENV.libstdcxx"
+
append_to_cccfg "h" if compiler == :clang
end
@@ -338,6 +346,8 @@ module Superenv
%w[O3 O2 O1 O0 Os].each do |opt|
define_method opt do
+ odeprecated "ENV.#{opt}"
+
send(:[]=, "HOMEBREW_OPTIMIZATION_LEVEL", opt)
end
end
diff --git a/Library/Homebrew/extend/os/mac/requirements/java_requirement.rb b/Library/Homebrew/extend/os/mac/requirements/java_requirement.rb
index dfcb9ea655..b0e1576147 100644
--- a/Library/Homebrew/extend/os/mac/requirements/java_requirement.rb
+++ b/Library/Homebrew/extend/os/mac/requirements/java_requirement.rb
@@ -26,23 +26,8 @@ class JavaRequirement < Requirement
end
def java_home_cmd
- # TODO: disable for all macOS versions and Linux on next minor release
- # but --version with ranges is broken on Big Sur today.
- if MacOS.version >= :big_sur && @version&.end_with?("+")
- odisabled %Q(depends_on java: "#{@version}"),
- 'depends_on "openjdk@11", depends_on "openjdk@8" or depends_on "openjdk"'
- end
- odeprecated "depends_on :java",
- 'depends_on "openjdk@11", depends_on "openjdk@8" or depends_on "openjdk"'
-
- return unless File.executable?("/usr/libexec/java_home")
-
- args = %w[--failfast]
- args << "--version" << @version.to_s if @version
- java_home = Utils.popen_read("/usr/libexec/java_home", *args).chomp
- return unless $CHILD_STATUS.success?
-
- Pathname.new(java_home)/"bin/java"
+ odisabled "depends_on :java",
+ 'depends_on "openjdk@11", depends_on "openjdk@8" or depends_on "openjdk"'
end
def env_apple
diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb
index a265e3bfbb..721cbe574e 100644
--- a/Library/Homebrew/formula.rb
+++ b/Library/Homebrew/formula.rb
@@ -2278,7 +2278,6 @@ class Formula
if args.nil?
@licenses
else
- odisabled "`license [...]`", "`license any_of: [...]`" if args.is_a? Array
@licenses = args
end
end
diff --git a/Library/Homebrew/requirements/java_requirement.rb b/Library/Homebrew/requirements/java_requirement.rb
index c99e82f7a5..0d157ad957 100644
--- a/Library/Homebrew/requirements/java_requirement.rb
+++ b/Library/Homebrew/requirements/java_requirement.rb
@@ -33,13 +33,10 @@ class JavaRequirement < Requirement
next true
end
- def initialize(tags = [])
- odeprecated "depends_on :java",
- '"depends_on "openjdk@11", "depends_on "openjdk@8" or "depends_on "openjdk"'
-
- @version = tags.shift if tags.first&.match?(/^\d/)
- super(tags)
- @cask = suggestion.token
+ def initialize(_tags = [])
+ odisabled "depends_on :java",
+ '"depends_on "openjdk@11", "depends_on "openjdk@8" or "depends_on "openjdk"'
+ super
end
sig { returns(String) }
diff --git a/Library/Homebrew/tab.rb b/Library/Homebrew/tab.rb
index 5cdbc92261..e7224ed1e8 100644
--- a/Library/Homebrew/tab.rb
+++ b/Library/Homebrew/tab.rb
@@ -232,14 +232,6 @@ class Tab < OpenStruct
used_options.include? opt
end
- def universal?
- odisabled "Tab#universal?"
- end
-
- def cxx11?
- odisabled "Tab#cxx11?"
- end
-
def head?
spec == :head
end
diff --git a/Library/Homebrew/test/cask/cmd_spec.rb b/Library/Homebrew/test/cask/cmd_spec.rb
index 36b55ebbdb..d1385d7a3d 100644
--- a/Library/Homebrew/test/cask/cmd_spec.rb
+++ b/Library/Homebrew/test/cask/cmd_spec.rb
@@ -15,12 +15,6 @@ describe Cask::Cmd, :cask do
allow(Homebrew).to receive(:raise_deprecation_exceptions?).and_return(false)
end
- it "prints help output when subcommand receives `--help` flag" do
- expect {
- described_class.run("info", "--help")
- }.to output(/Displays information about the given cask/).to_stdout
- end
-
it "exits with a status of 1 when something goes wrong" do
allow(described_class).to receive(:lookup_command).and_raise(Cask::CaskError)
command = described_class.new("noop")
diff --git a/Library/Homebrew/test/cmd/cask_spec.rb b/Library/Homebrew/test/cmd/cask_spec.rb
deleted file mode 100644
index 666854d972..0000000000
--- a/Library/Homebrew/test/cmd/cask_spec.rb
+++ /dev/null
@@ -1,12 +0,0 @@
-# typed: false
-# frozen_string_literal: true
-
-describe "brew cask", :integration_test, :needs_macos, :needs_network do
- describe "list" do
- it "returns a list of installed Casks" do
- setup_remote_tap "homebrew/cask"
-
- expect { brew "cask", "list" }.to be_a_success
- end
- end
-end
diff --git a/Library/Homebrew/utils/git.rb b/Library/Homebrew/utils/git.rb
index 39f0932309..c8d51803ea 100644
--- a/Library/Homebrew/utils/git.rb
+++ b/Library/Homebrew/utils/git.rb
@@ -88,10 +88,8 @@ module Utils
Utils.popen_read(git, "-C", repo, "show", "#{commit}:#{relative_file}")
end
- def commit_message(repo, commit = nil)
- odeprecated "Utils::Git.commit_message(repo)", "Pathname(repo).git_commit_message"
- commit ||= "HEAD"
- Pathname(repo).extend(GitRepositoryExtension).git_commit_message(commit)
+ def commit_message(_repo, _commit = nil)
+ odisabled "Utils::Git.commit_message(repo)", "Pathname(repo).git_commit_message"
end
def ensure_installed!
@@ -135,14 +133,12 @@ module Utils
.prepend(Formula["gnupg"].opt_bin)
end
- def origin_branch(repo)
- odeprecated "Utils::Git.origin_branch(repo)", "Pathname(repo).git_origin_branch"
- Pathname(repo).extend(GitRepositoryExtension).git_origin_branch
+ def origin_branch(_repo)
+ odisabled "Utils::Git.origin_branch(repo)", "Pathname(repo).git_origin_branch"
end
- def current_branch(repo)
- odeprecated "Utils::Git.current_branch(repo)", "Pathname(repo).git_branch"
- Pathname(repo).extend(GitRepositoryExtension).git_branch
+ def current_branch(_repo)
+ odisabled "Utils::Git.current_branch(repo)", "Pathname(repo).git_branch"
end
# Special case of `git cherry-pick` that permits non-verbose output and
diff --git a/Library/Homebrew/utils/github.rb b/Library/Homebrew/utils/github.rb
index f214d9f2f5..ff0ae53d8a 100644
--- a/Library/Homebrew/utils/github.rb
+++ b/Library/Homebrew/utils/github.rb
@@ -92,13 +92,6 @@ module GitHub
end
end
- def env_username_password
- return unless Homebrew::EnvConfig.github_api_username
- return unless Homebrew::EnvConfig.github_api_password
-
- odisabled "the GitHub API with HOMEBREW_GITHUB_API_PASSWORD", "HOMEBREW_GITHUB_API_TOKEN"
- end
-
# Gets the password field from `git-credential-osxkeychain` for github.com,
# but only if that password looks like a GitHub Personal Access Token.
sig { returns(T.nilable(String)) }
@@ -128,7 +121,7 @@ module GitHub
def api_credentials
@api_credentials ||= begin
- Homebrew::EnvConfig.github_api_token || env_username_password || keychain_username_password
+ Homebrew::EnvConfig.github_api_token || keychain_username_password
end
end
@@ -136,8 +129,6 @@ module GitHub
def api_credentials_type
if Homebrew::EnvConfig.github_api_token
:env_token
- elsif env_username_password
- :env_username_password
elsif keychain_username_password
:keychain_username_password
else
diff --git a/docs/Manpage.md b/docs/Manpage.md
index bbbdfc71a0..75fe6e21d7 100644
--- a/docs/Manpage.md
+++ b/docs/Manpage.md
@@ -1773,17 +1773,11 @@ example, run `export HOMEBREW_NO_INSECURE_REDIRECT=1` rather than just
- `HOMEBREW_FORCE_VENDOR_RUBY`
If set, always use Homebrew's vendored, relocatable Ruby version even if the system version of Ruby is new enough.
-- `HOMEBREW_GITHUB_API_PASSWORD`
-
Use this password for authentication with the GitHub API, for features such as `brew search`. This is deprecated in favour of using `HOMEBREW_GITHUB_API_TOKEN`.
-
- `HOMEBREW_GITHUB_API_TOKEN`
Use this personal access token for the GitHub API, for features such as `brew search`. You can create one at . If set, GitHub will allow you a greater number of API requests. For more information, see:
*Note:* Homebrew doesn't require permissions for any of the scopes, but some developer commands may require additional permissions.
-- `HOMEBREW_GITHUB_API_USERNAME`
-
Use this username for authentication with the GitHub API, for features such as `brew search`. This is deprecated in favour of using `HOMEBREW_GITHUB_API_TOKEN`.
-
- `HOMEBREW_GIT_EMAIL`
Set the Git author and committer email to this value.
diff --git a/manpages/brew.1 b/manpages/brew.1
index df3bac4dc1..d5bc11e38f 100644
--- a/manpages/brew.1
+++ b/manpages/brew.1
@@ -2524,12 +2524,6 @@ If set, running Homebrew on Linux will use URLs for macOS\. This is useful when
If set, always use Homebrew\'s vendored, relocatable Ruby version even if the system version of Ruby is new enough\.
.
.TP
-\fBHOMEBREW_GITHUB_API_PASSWORD\fR
-.
-.br
-Use this password for authentication with the GitHub API, for features such as \fBbrew search\fR\. This is deprecated in favour of using \fBHOMEBREW_GITHUB_API_TOKEN\fR\.
-.
-.TP
\fBHOMEBREW_GITHUB_API_TOKEN\fR
.
.br
@@ -2539,12 +2533,6 @@ Use this personal access token for the GitHub API, for features such as \fBbrew
\fINote:\fR Homebrew doesn\'t require permissions for any of the scopes, but some developer commands may require additional permissions\.
.
.TP
-\fBHOMEBREW_GITHUB_API_USERNAME\fR
-.
-.br
-Use this username for authentication with the GitHub API, for features such as \fBbrew search\fR\. This is deprecated in favour of using \fBHOMEBREW_GITHUB_API_TOKEN\fR\.
-.
-.TP
\fBHOMEBREW_GIT_EMAIL\fR
.
.br