mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
Merge branch 'PHP-8.5'
* PHP-8.5: PHP 8.5 | UPGRADING: fix entry about new grapheme $locale parameter (#20239) uri: Make uri_parser_rfc3986.h usable for external extensions (#20173) Fix missing deprecation message for default case statement followed by semicolon (#20172)
This commit is contained in:
@@ -6393,6 +6393,11 @@ static void zend_compile_switch(zend_ast *ast) /* {{{ */
|
||||
zend_ast *cond_ast = case_ast->child[0];
|
||||
znode cond_node;
|
||||
|
||||
if (case_ast->attr == ZEND_ALT_CASE_SYNTAX) {
|
||||
CG(zend_lineno) = case_ast->lineno;
|
||||
zend_error(E_DEPRECATED, "Case statements followed by a semicolon (;) are deprecated, use a colon (:) instead");
|
||||
}
|
||||
|
||||
if (!cond_ast) {
|
||||
if (has_default_case) {
|
||||
CG(zend_lineno) = case_ast->lineno;
|
||||
@@ -6403,11 +6408,6 @@ static void zend_compile_switch(zend_ast *ast) /* {{{ */
|
||||
continue;
|
||||
}
|
||||
|
||||
if (case_ast->attr == ZEND_ALT_CASE_SYNTAX) {
|
||||
CG(zend_lineno) = case_ast->lineno;
|
||||
zend_error(E_DEPRECATED, "Case statements followed by a semicolon (;) are deprecated, use a colon (:) instead");
|
||||
}
|
||||
|
||||
zend_compile_expr(&cond_node, cond_ast);
|
||||
|
||||
if (expr_node.op_type == IS_CONST
|
||||
|
||||
@@ -20,6 +20,14 @@
|
||||
#include "Zend/zend_smart_str.h"
|
||||
#include "Zend/zend_exceptions.h"
|
||||
|
||||
#include <uriparser/Uri.h>
|
||||
|
||||
struct php_uri_parser_rfc3986_uris {
|
||||
UriUriA uri;
|
||||
UriUriA normalized_uri;
|
||||
bool normalized_uri_initialized;
|
||||
};
|
||||
|
||||
static void *php_uri_parser_rfc3986_memory_manager_malloc(UriMemoryManager *memory_manager, size_t size)
|
||||
{
|
||||
return emalloc(size);
|
||||
|
||||
@@ -17,16 +17,11 @@
|
||||
#ifndef PHP_URI_PARSER_RFC3986_H
|
||||
#define PHP_URI_PARSER_RFC3986_H
|
||||
|
||||
#include <uriparser/Uri.h>
|
||||
#include "php_uri_common.h"
|
||||
|
||||
extern const php_uri_parser php_uri_parser_rfc3986;
|
||||
|
||||
typedef struct php_uri_parser_rfc3986_uris {
|
||||
UriUriA uri;
|
||||
UriUriA normalized_uri;
|
||||
bool normalized_uri_initialized;
|
||||
} php_uri_parser_rfc3986_uris;
|
||||
typedef struct php_uri_parser_rfc3986_uris php_uri_parser_rfc3986_uris;
|
||||
|
||||
zend_result php_uri_parser_rfc3986_userinfo_read(void *uri, php_uri_component_read_mode read_mode, zval *retval);
|
||||
zend_result php_uri_parser_rfc3986_userinfo_write(void *uri, zval *value, zval *errors);
|
||||
|
||||
@@ -38,6 +38,8 @@ switch ($a):
|
||||
endswitch;
|
||||
?>
|
||||
--EXPECTF--
|
||||
Deprecated: Case statements followed by a semicolon (;) are deprecated, use a colon (:) instead in %s
|
||||
|
||||
Deprecated: Case statements followed by a semicolon (;) are deprecated, use a colon (:) instead in %s
|
||||
If: 11
|
||||
While: 12346789
|
||||
|
||||
Reference in New Issue
Block a user