Skip to content

Commit

Permalink
Add a new test to check new deprecations
Browse files Browse the repository at this point in the history
  • Loading branch information
kamil-tekiela committed Apr 5, 2024
1 parent 4912491 commit 1d8cbc2
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions ext/session/tests/deprecations.phpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
--TEST--
Setting deprecated values directly in session_start()
--EXTENSIONS--
session
--SKIPIF--
<?php include 'skipif.inc'; ?>
--INI--
session.use_cookies=0
session.use_only_cookies=1
session.use_trans_sid=0
--FILE--
<?php

// Expecting no deprecation here
ini_set("session.use_only_cookie", "1");

// Expecting deprecation here
session_start([ 'use_cookies' => '0', 'use_only_cookies' => '0', 'use_trans_sid' => '1']);
?>
--EXPECTF--
Deprecated: session_start(): Disabling session.use_only_cookies INI setting is deprecated in %s on line 7

Warning: session_start(): Session ini settings cannot be changed after headers have already been sent in %s on line 7

Warning: session_start(): Setting option "use_trans_sid" failed in %s on line 7

Warning: session_start(): Session cache limiter cannot be sent after headers have already been sent (output started at %s:7) in %s on line 7

0 comments on commit 1d8cbc2

Please sign in to comment.