diff --git a/Changes b/Changes index 6520788617..fc6121d360 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,16 @@ -9.40 2024-11-24 +10.0 2024-12-26 + - Code name "...", this is a major release. + - Removed deprecated support for "'" package separators. + - Removed deprecated support for ?format=* parameter in favor of ?_format=* for content negotiation. + - Removed deprecated support for padded session cookies. + - Removed experimental status from top-level await support in Mojo::Promise. + - Removed experimental status from encrypted session cookie support. + - Removed experimental status from persistent cookie support. + - Removed experimental status from samesite cookie support. + - Removed experimental status from colourful log messages. + - Removed experimental status from freeze option in Mojo::IOLoop. + - Removed experimental status from check and raise functions in Mojo::Exception. 9.39 2024-11-23 - Added EXPERIMENTAL support for encrypted session cookies. diff --git a/lib/Mojo/Base.pm b/lib/Mojo/Base.pm index 70404329a4..4235cad24b 100644 --- a/lib/Mojo/Base.pm +++ b/lib/Mojo/Base.pm @@ -249,8 +249,7 @@ signatures|perlsub/"Signatures">. use Mojo::Base -role, -signatures; If you have L 0.52+ installed you can also use the C<-async_await> flag to activate the C -and C keywords to deal much more efficiently with promises. Note that this feature is B and might -change without warning! +and C keywords to deal much more efficiently with promises. # Also enable async/await use Mojo::Base -strict, -async_await; diff --git a/lib/Mojo/Cookie/Response.pm b/lib/Mojo/Cookie/Response.pm index ea1419c8f6..bf080bb0b2 100644 --- a/lib/Mojo/Cookie/Response.pm +++ b/lib/Mojo/Cookie/Response.pm @@ -135,9 +135,7 @@ Cookie path. my $samesite = $cookie->samesite; $cookie = $cookie->samesite('Lax'); -SameSite value. Note that this attribute is B because even though most commonly used browsers support the -feature, there is no specification yet besides L. +SameSite value. =head2 secure diff --git a/lib/Mojo/Exception.pm b/lib/Mojo/Exception.pm index 966e3514c2..63c35f51c9 100644 --- a/lib/Mojo/Exception.pm +++ b/lib/Mojo/Exception.pm @@ -196,7 +196,7 @@ L implements the following functions, which can be imported ind my $bool = check $err => ['MyApp::X::Foo' => sub {...}]; Process exceptions by dispatching them to handlers with one or more matching conditions. Exceptions that could not be -handled will be rethrown automatically. Note that this function is B and might change without warning! +handled will be rethrown automatically. # Handle various types of exceptions eval { @@ -249,8 +249,7 @@ handler matched. raise 'MyApp::X::Foo', 'Something went wrong!'; Raise a L, if the class does not exist yet (classes are checked for a C method), one is created -as a L subclass on demand. Note that this function is B and might change without -warning! +as a L subclass on demand. =head1 ATTRIBUTES diff --git a/lib/Mojo/IOLoop.pm b/lib/Mojo/IOLoop.pm index 81a91b3fa9..411dc2eb7c 100644 --- a/lib/Mojo/IOLoop.pm +++ b/lib/Mojo/IOLoop.pm @@ -432,8 +432,7 @@ These options are currently available: freeze => 1 Freeze the current state of the event loop in time before resetting it. This will prevent active connections from -getting closed immediately, which can help with many unintended side effects when processes are forked. Note that this -option is B and might change without warning! +getting closed immediately, which can help with many unintended side effects when processes are forked. =back diff --git a/lib/Mojo/Loader.pm b/lib/Mojo/Loader.pm index f65e44adb9..1331dc633f 100644 --- a/lib/Mojo/Loader.pm +++ b/lib/Mojo/Loader.pm @@ -4,7 +4,7 @@ use Mojo::Base -strict; use Exporter qw(import); use Mojo::Exception; use Mojo::File qw(path); -use Mojo::Util qw(b64_decode class_to_path deprecated); +use Mojo::Util qw(b64_decode class_to_path); our @EXPORT_OK = qw(data_section file_is_binary find_modules find_packages load_class load_classes); @@ -42,9 +42,6 @@ sub load_class { # Invalid class name return 1 if ($class || '') !~ /^\w(?:[\w:']*\w)?$/; - deprecated - q{Calling Mojo::Loader::load_class with a class name using the old package separator "'" is deprecated; use "::"} - if $class =~ m/'/; # Load if not already loaded return undef if $class->can('new') || eval "require $class; 1"; diff --git a/lib/Mojo/Log.pm b/lib/Mojo/Log.pm index 0a05c40d1d..bfedc49f7e 100644 --- a/lib/Mojo/Log.pm +++ b/lib/Mojo/Log.pm @@ -193,8 +193,7 @@ L implements the following attributes. $log = $log->color($bool); Colorize log messages with the levels C, C and C using L, defaults to the value of -the C environment variables. Note that this attribute is B and might change without -warning! +the C environment variables. =head2 format diff --git a/lib/Mojo/UserAgent/CookieJar.pm b/lib/Mojo/UserAgent/CookieJar.pm index df3293fd80..43cb913256 100644 --- a/lib/Mojo/UserAgent/CookieJar.pm +++ b/lib/Mojo/UserAgent/CookieJar.pm @@ -215,8 +215,7 @@ L implements the following attributes. my $file = $jar->file; $jar = $jar->file('/home/sri/cookies.txt'); -File to L cookies from and L cookies to in Netscape format. Note that this attribute is -B and might change without warning! +File to L cookies from and L cookies to in Netscape format. # Save cookies to file $jar->file('cookies.txt')->save; @@ -291,7 +290,7 @@ Find L objects in the jar for L object. $jar = $jar->load; -Load cookies from L. Note that this method is B and might change without warning! +Load cookies from L. =head2 prepare @@ -303,13 +302,13 @@ Prepare request cookies for transaction. $jar = $jar->save; -Save cookies to L. Note that this method is B and might change without warning! +Save cookies to L. =head2 to_string my $string = $jar->to_string; -Stringify cookies in Netscape format. Note that this method is B and might change without warning! +Stringify cookies in Netscape format. =head1 SEE ALSO diff --git a/lib/Mojo/Util.pm b/lib/Mojo/Util.pm index 86ec4abc62..1195488520 100644 --- a/lib/Mojo/Util.pm +++ b/lib/Mojo/Util.pm @@ -678,8 +678,7 @@ Decode bytes to characters with L, or return C if decoding failed my $value = decrypt_cookie $encrypted, 'passw0rd', 'salt'; -Decrypt cookie value encrypted with L, returns the decrypted value or C. Note that this -function is B and might change without warning! +Decrypt cookie value encrypted with L, returns the decrypted value or C. =head2 deprecated @@ -704,7 +703,7 @@ Encode characters to bytes with L. my $encrypted = encrypt_cookie $value, 'passw0rd', 'salt'; -Encrypt cookie value. Note that this function is B and might change without warning! +Encrypt cookie value. =head2 extract_usage @@ -728,7 +727,7 @@ function was called from. my $secret = generate_secret; Generate a random secret with a cryptographically secure random number generator if available, and a less secure -fallback if not. Note that this function is B and might change without warning! +fallback if not. =head2 getopt @@ -769,7 +768,6 @@ Compress bytes with L. my ($params, $remainder) = header_params 'one=foo; two="bar", three=baz'; Extract HTTP header field parameters until the first comma according to L. -Note that this function is B and might change without warning! =head2 hmac_sha1_sum diff --git a/lib/Mojolicious.pm b/lib/Mojolicious.pm index 95d7fa9c03..eaded13230 100644 --- a/lib/Mojolicious.pm +++ b/lib/Mojolicious.pm @@ -56,8 +56,8 @@ has types => sub { Mojolicious::Types->new }; has ua => sub { Mojo::UserAgent->new }; has validator => sub { Mojolicious::Validator->new }; -our $CODENAME = 'Waffle'; -our $VERSION = '9.40'; +our $CODENAME = '...'; +our $VERSION = '10.0'; sub BUILD_DYNAMIC { my ($class, $method, $dyn_methods) = @_; diff --git a/lib/Mojolicious/Controller.pm b/lib/Mojolicious/Controller.pm index 1b92f5ea69..cc24187198 100644 --- a/lib/Mojolicious/Controller.pm +++ b/lib/Mojolicious/Controller.pm @@ -441,7 +441,7 @@ you want to access more than just the last one, you can use L. Access encrypted request cookie values and create new encrypted response cookies. If there are multiple values sharing the same name, and you want to access more than just the last one, you can use L. Cookies are encrypted with ChaCha20-Poly1305, to prevent tampering, and the ones failing decryption will be automatically -discarded. Note that this method is B and might change without warning! +discarded. =head2 every_cookie @@ -457,7 +457,7 @@ Similar to L, but returns all request cookie values sharing the same my $values = $c->every_encrypted_cookie('foo'); Similar to L, but returns all encrypted request cookie values sharing the same name as an array -reference. Note that this method is B and might change without warning! +reference. # Get first encrypted cookie value my $first = $c->every_encrypted_cookie('foo')->[0]; diff --git a/lib/Mojolicious/Renderer.pm b/lib/Mojolicious/Renderer.pm index f76be5da15..5b7ab04ea0 100644 --- a/lib/Mojolicious/Renderer.pm +++ b/lib/Mojolicious/Renderer.pm @@ -7,7 +7,7 @@ use Mojo::DynamicMethods; use Mojo::File qw(curfile path); use Mojo::JSON qw(encode_json); use Mojo::Loader qw(data_section); -use Mojo::Util qw(decamelize deprecated encode gzip md5_sum monkey_patch); +use Mojo::Util qw(decamelize encode gzip md5_sum monkey_patch); has cache => sub { Mojo::Cache->new }; has classes => sub { ['main'] }; @@ -27,13 +27,9 @@ sub DESTROY { Mojo::Util::_teardown($_) for @{shift->{namespaces}} } sub accepts { my ($self, $c) = (shift, shift); - # DEPRECATED! - my $req = $c->req; - my $param = $req->param('format'); - deprecated 'The ?format=* parameter is deprecated in favor of ?_format=* for content negotiation' if defined $param; - # List representations - my $fmt = $param // $req->param('_format') || $c->stash->{format}; + my $req = $c->req; + my $fmt = $req->param('_format') || $c->stash->{format}; my @exts = $fmt ? ($fmt) : (); push @exts, @{$c->app->types->detect($req->headers->accept)}; return \@exts unless @_; diff --git a/lib/Mojolicious/Sessions.pm b/lib/Mojolicious/Sessions.pm index e070e441a9..c9c1fa274e 100644 --- a/lib/Mojolicious/Sessions.pm +++ b/lib/Mojolicious/Sessions.pm @@ -63,8 +63,7 @@ sub store { $c->$method($self->cookie_name, $value, $options); } -# DEPRECATED! (Remove once old sessions with padding are no longer a concern) -sub _deserialize { Mojo::JSON::decode_json($_[0] =~ s/\}\KZ*$//r) } +sub _deserialize { Mojo::JSON::decode_json($_[0]) } sub _serialize { Mojo::JSON::encode_json($_[0]) } @@ -147,17 +146,14 @@ A callback used to deserialize sessions, defaults to L. my $bool = $sessions->encrypted; $sessions = $sessions->encrypted($bool); -Use encrypted session cookies instead of merely cryptographically signed ones. Note that this attribute is -B and might change without warning! +Use encrypted session cookies instead of merely cryptographically signed ones. =head2 samesite my $samesite = $sessions->samesite; $sessions = $sessions->samesite('Strict'); -Set the SameSite value on all session cookies, defaults to C. Note that this attribute is B because -even though most commonly used browsers support the feature, there is no specification yet besides L. +Set the SameSite value on all session cookies, defaults to C. # Disable SameSite feature $sessions->samesite(undef);