Skip to content

Commit fe99bf0

Browse files
committed
Add RFC 3986 and WHATWG compliant URL parsing support
1 parent 551a9ef commit fe99bf0

File tree

141 files changed

+281416
-39
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

141 files changed

+281416
-39
lines changed

.cirrus.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ freebsd_task:
1616
- pkg install -y autoconf bison gmake re2c icu libiconv png freetype2 enchant2 bzip2 t1lib gmp tidyp libsodium libzip libxml2 libxslt openssl oniguruma pkgconf webp libavif
1717
script:
1818
- ./buildconf -f
19-
- ./configure --prefix=/usr/local --enable-debug --enable-option-checking=fatal --enable-fpm --with-pdo-sqlite --without-pear --with-bz2 --with-avif --with-jpeg --with-webp --with-freetype --enable-gd --enable-exif --with-zip --with-zlib --enable-soap --enable-xmlreader --with-xsl --with-libxml --enable-shmop --enable-pcntl --enable-mbstring --with-curl --enable-sockets --with-openssl --with-iconv=/usr/local --enable-bcmath --enable-calendar --enable-ftp --with-ffi --enable-zend-test --enable-dl-test=shared --enable-intl --with-mhash --with-sodium --enable-werror --with-config-file-path=/etc --with-config-file-scan-dir=/etc/php.d
19+
- ./configure --prefix=/usr/local --enable-debug --enable-option-checking=fatal --enable-fpm --with-pdo-sqlite --without-pear --with-bz2 --with-avif --with-jpeg --with-webp --with-freetype --enable-gd --enable-exif --with-zip --with-zlib --enable-soap --enable-xmlreader --with-xsl --with-libxml --enable-shmop --enable-pcntl --enable-mbstring --enable-uri --with-curl --enable-sockets --with-openssl --with-iconv=/usr/local --enable-bcmath --enable-calendar --enable-ftp --with-ffi --enable-zend-test --enable-dl-test=shared --enable-intl --with-mhash --with-sodium --enable-werror --with-config-file-path=/etc --with-config-file-scan-dir=/etc/php.d
2020
- gmake -j2
2121
- mkdir /etc/php.d
2222
- gmake install

.github/actions/configure-macos/action.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ runs:
4747
--enable-pcntl \
4848
--with-readline="$BREW_OPT"/readline \
4949
--enable-mbstring \
50+
--enable-uri \
5051
--with-curl \
5152
--with-gettext="$BREW_OPT"/gettext \
5253
--enable-sockets \

.github/actions/configure-x32/action.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ runs:
4545
--enable-pcntl \
4646
--with-readline \
4747
--enable-mbstring \
48+
--enable-uri \
4849
--with-curl \
4950
--with-gettext \
5051
--enable-sockets \

.github/actions/configure-x64/action.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ runs:
4747
--enable-pcntl \
4848
--without-readline --with-libedit \
4949
--enable-mbstring \
50+
--enable-uri \
5051
--with-curl \
5152
--with-gettext \
5253
--enable-sockets \

.github/labeler.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,11 @@
320320
- any-glob-to-any-file:
321321
- ext/tokenizer/**/*
322322

323+
"Extension: uri":
324+
- changed-files:
325+
- any-glob-to-any-file:
326+
- ext/uri/**/*
327+
323328
"Extension: xml":
324329
- changed-files:
325330
- any-glob-to-any-file:

EXTENSIONS

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -495,6 +495,12 @@ PRIMARY MAINTAINER: Andrei Zmievski <[email protected]> (2002 - 2002)
495495
MAINTENANCE: Maintained
496496
STATUS: Working
497497
-------------------------------------------------------------------------------
498+
EXTENSION: uri
499+
PRIMARY MAINTAINER Máté Kocsis <[email protected]> (2024 - 2024)
500+
MAINTENANCE: Maintained
501+
STATUS: Working
502+
SINCE: 8.5.0
503+
-------------------------------------------------------------------------------
498504
EXTENSION: zip
499505
PRIMARY MAINTAINER: Pierre-Alain Joye <[email protected]> (2006 - 2011)
500506
Remi Collet <[email protected]> (2013-2020)

Zend/zend_string.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -598,6 +598,7 @@ EMPTY_SWITCH_DEFAULT_CASE()
598598
_(ZEND_STR_PORT, "port") \
599599
_(ZEND_STR_USER, "user") \
600600
_(ZEND_STR_PASS, "pass") \
601+
_(ZEND_STR_PASSWORD, "password") \
601602
_(ZEND_STR_PATH, "path") \
602603
_(ZEND_STR_QUERY, "query") \
603604
_(ZEND_STR_FRAGMENT, "fragment") \

ext/dom/config.m4

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ if test "$PHP_DOM" != "no"; then
88
PHP_SETUP_LIBXML([DOM_SHARED_LIBADD], [
99
AC_DEFINE([HAVE_DOM], [1],
1010
[Define to 1 if the PHP extension 'dom' is available.])
11-
PHP_LEXBOR_CFLAGS="-I@ext_srcdir@/lexbor -DLEXBOR_STATIC"
11+
PHP_LEXBOR_CFLAGS="-I@ext_srcdir@/lexbor -DLEXBOR_STATIC -Wno-uninitialized"
1212
LEXBOR_DIR="lexbor/lexbor"
1313
LEXBOR_SOURCES=m4_normalize(["
1414
$LEXBOR_DIR/core/array_obj.c
@@ -22,6 +22,7 @@ if test "$PHP_DOM" != "no"; then
2222
$LEXBOR_DIR/core/hash.c
2323
$LEXBOR_DIR/core/mem.c
2424
$LEXBOR_DIR/core/mraw.c
25+
$LEXBOR_DIR/core/plog.c
2526
$LEXBOR_DIR/core/print.c
2627
$LEXBOR_DIR/core/serialize.c
2728
$LEXBOR_DIR/core/shs.c
@@ -184,8 +185,12 @@ if test "$PHP_DOM" != "no"; then
184185
$LEXBOR_DIR/html/tree/open_elements.c
185186
$LEXBOR_DIR/ns/ns.c
186187
$LEXBOR_DIR/ports/posix/lexbor/core/memory.c
188+
$LEXBOR_DIR/punycode/punycode.c
187189
$LEXBOR_DIR/selectors-adapted/selectors.c
188190
$LEXBOR_DIR/tag/tag.c
191+
$LEXBOR_DIR/unicode/idna.c
192+
$LEXBOR_DIR/unicode/unicode.c
193+
$LEXBOR_DIR/url/url.c
189194
"])
190195
PHP_NEW_EXTENSION([dom], m4_normalize([
191196
attr.c
@@ -242,6 +247,9 @@ if test "$PHP_DOM" != "no"; then
242247
$ext_builddir/$LEXBOR_DIR/ports/posix/lexbor/core
243248
$ext_builddir/$LEXBOR_DIR/selectors-adapted
244249
$ext_builddir/$LEXBOR_DIR/tag
250+
$ext_builddir/$LEXBOR_DIR/punycode
251+
$ext_builddir/$LEXBOR_DIR/unicode
252+
$ext_builddir/$LEXBOR_DIR/url
245253
])
246254
PHP_SUBST([DOM_SHARED_LIBADD])
247255
PHP_INSTALL_HEADERS([ext/dom], m4_normalize([
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
/*
2+
* Copyright (C) 2023 Alexander Borisov
3+
*
4+
* Author: Alexander Borisov <[email protected]>
5+
*/
6+
7+
#ifndef LEXBOR_PUNYCODE_BASE_H
8+
#define LEXBOR_PUNYCODE_BASE_H
9+
10+
#ifdef __cplusplus
11+
extern "C" {
12+
#endif
13+
14+
#include "lexbor/core/base.h"
15+
16+
17+
#define LXB_PUNYCODE_VERSION_MAJOR 1
18+
#define LXB_PUNYCODE_VERSION_MINOR 0
19+
#define LXB_PUNYCODE_VERSION_PATCH 0
20+
21+
#define LEXBOR_PUNYCODE_VERSION_STRING LEXBOR_STRINGIZE(LXB_PUNYCODE_VERSION_MAJOR) "." \
22+
LEXBOR_STRINGIZE(LXB_PUNYCODE_VERSION_MINOR) "." \
23+
LEXBOR_STRINGIZE(LXB_PUNYCODE_VERSION_PATCH)
24+
25+
26+
#ifdef __cplusplus
27+
} /* extern "C" */
28+
#endif
29+
30+
#endif /* LEXBOR_PUNYCODE_BASE_H */
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
set(DEPENDENCIES "core encoding")
2+
set(DESCRIPTION "The module implemented by PUNYCODE specification.
3+
Specification: https://www.rfc-editor.org/rfc/inline-errata/rfc3492.html")

0 commit comments

Comments
 (0)