summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--REFLECTION496
-rw-r--r--php-pecl-request.spec90
2 files changed, 423 insertions, 163 deletions
diff --git a/REFLECTION b/REFLECTION
index 6e3269a..821db6c 100644
--- a/REFLECTION
+++ b/REFLECTION
@@ -1,13 +1,11 @@
-Extension [ <persistent> extension #181 request version 1.0.0b2 ] {
+Extension [ <persistent> extension #113 request version 2.0.0 ] {
- Dependencies {
Dependency [ spl (Required) ]
- Dependency [ date (Required) ]
- Dependency [ json (Optional) ]
}
- - Classes [2] {
- Class [ <internal:request> class ServerRequest ] {
+ - Classes [5] {
+ Class [ <internal:request> class SapiRequest ] {
- Constants [0] {
}
@@ -15,34 +13,11 @@ Extension [ <persistent> extension #181 request version 1.0.0b2 ] {
- Static properties [0] {
}
- - Static methods [3] {
- Method [ <internal:request> static public method parseAccept ] {
-
- - Parameters [1] {
- Parameter #0 [ <required> string $header ]
- }
- - Return [ array or NULL ]
- }
-
- Method [ <internal:request> static public method parseContentType ] {
-
- - Parameters [1] {
- Parameter #0 [ <required> string $header ]
- }
- - Return [ array or NULL ]
- }
-
- Method [ <internal:request> static public method parseDigestAuth ] {
-
- - Parameters [1] {
- Parameter #0 [ <required> string $header ]
- }
- - Return [ array or NULL ]
- }
+ - Static methods [0] {
}
- - Properties [31] {
- Property [ <default> private $_initialized ]
+ - Properties [27] {
+ Property [ <default> private $isUnconstructed ]
Property [ <default> public $accept ]
Property [ <default> public $acceptCharset ]
Property [ <default> public $acceptEncoding ]
@@ -57,84 +32,238 @@ Extension [ <persistent> extension #181 request version 1.0.0b2 ] {
Property [ <default> public $contentMd5 ]
Property [ <default> public $contentType ]
Property [ <default> public $cookie ]
- Property [ <default> public $env ]
Property [ <default> public $files ]
Property [ <default> public $forwarded ]
Property [ <default> public $forwardedFor ]
Property [ <default> public $forwardedHost ]
Property [ <default> public $forwardedProto ]
- Property [ <default> public $get ]
Property [ <default> public $headers ]
Property [ <default> public $input ]
Property [ <default> public $method ]
- Property [ <default> public $params ]
- Property [ <default> public $post ]
+ Property [ <default> public $query ]
Property [ <default> public $server ]
Property [ <default> public $uploads ]
Property [ <default> public $url ]
- Property [ <default> public $xhr ]
}
- - Methods [7] {
+ - Methods [1] {
Method [ <internal:request, ctor> public method __construct ] {
+ - Parameters [2] {
+ Parameter #0 [ <required> array $globals ]
+ Parameter #1 [ <optional> string or NULL $content ]
+ }
+ }
+ }
+ }
+
+ Interface [ <internal:request> interface SapiResponseInterface ] {
+
+ - Constants [0] {
+ }
+
+ - Static properties [0] {
+ }
+
+ - Static methods [0] {
+ }
+
+ - Properties [0] {
+ }
+
+ - Methods [23] {
+ Method [ <internal:request> abstract public method setVersion ] {
+
- Parameters [1] {
- Parameter #0 [ <optional> array or NULL $globals ]
+ Parameter #0 [ <required> string or NULL $version ]
}
+ - Return [ SapiResponseInterface ]
}
- Method [ <internal:request> final public method withInput ] {
+ Method [ <internal:request> abstract public method getVersion ] {
+
+ - Parameters [0] {
+ }
+ - Return [ string or NULL ]
+ }
+
+ Method [ <internal:request> abstract public method setCode ] {
- Parameters [1] {
- Parameter #0 [ <required> $input ]
+ Parameter #0 [ <required> int or NULL $code ]
}
- - Return [ ServerRequest ]
+ - Return [ SapiResponseInterface ]
}
- Method [ <internal:request> final public method withParam ] {
+ Method [ <internal:request> abstract public method getCode ] {
+
+ - Parameters [0] {
+ }
+ - Return [ int or NULL ]
+ }
+
+ Method [ <internal:request> abstract public method addHeader ] {
+
+ - Parameters [2] {
+ Parameter #0 [ <required> string $label ]
+ Parameter #1 [ <required> string $value ]
+ }
+ - Return [ SapiResponseInterface ]
+ }
+
+ Method [ <internal:request> abstract public method setHeader ] {
- Parameters [2] {
- Parameter #0 [ <required> string $key ]
- Parameter #1 [ <required> $val ]
+ Parameter #0 [ <required> string $label ]
+ Parameter #1 [ <required> string $value ]
+ }
+ - Return [ SapiResponseInterface ]
+ }
+
+ Method [ <internal:request> abstract public method unsetHeader ] {
+
+ - Parameters [1] {
+ Parameter #0 [ <required> string $label ]
}
- - Return [ ServerRequest ]
+ - Return [ SapiResponseInterface ]
}
- Method [ <internal:request> final public method withParams ] {
+ Method [ <internal:request> abstract public method getHeader ] {
- Parameters [1] {
- Parameter #0 [ <required> array $params ]
+ Parameter #0 [ <required> string $label ]
}
- - Return [ ServerRequest ]
+ - Return [ string or NULL ]
}
- Method [ <internal:request> final public method withoutParam ] {
+ Method [ <internal:request> abstract public method hasHeader ] {
- Parameters [1] {
- Parameter #0 [ <required> string $key ]
+ Parameter #0 [ <required> string $label ]
+ }
+ - Return [ bool ]
+ }
+
+ Method [ <internal:request> abstract public method unsetHeaders ] {
+
+ - Parameters [0] {
+ }
+ - Return [ SapiResponseInterface ]
+ }
+
+ Method [ <internal:request> abstract public method getHeaders ] {
+
+ - Parameters [0] {
}
- - Return [ ServerRequest ]
+ - Return [ array or NULL ]
}
- Method [ <internal:request> final public method withoutParams ] {
+ Method [ <internal:request> abstract public method getCookie ] {
- Parameters [1] {
- Parameter #0 [ <required> array or NULL $keys ]
+ Parameter #0 [ <required> string $name ]
}
- - Return [ ServerRequest ]
+ - Return [ array or NULL ]
}
- Method [ <internal:request> final public method withUrl ] {
+ Method [ <internal:request> abstract public method hasCookie ] {
- Parameters [1] {
- Parameter #0 [ <required> array $url ]
+ Parameter #0 [ <required> string $name ]
}
- - Return [ ServerRequest ]
+ - Return [ bool ]
+ }
+
+ Method [ <internal:request> abstract public method setCookie ] {
+
+ - Parameters [7] {
+ Parameter #0 [ <required> string $name ]
+ Parameter #1 [ <optional> string $value ]
+ Parameter #2 [ <optional> $expires_or_options ]
+ Parameter #3 [ <optional> string $path ]
+ Parameter #4 [ <optional> string $domain ]
+ Parameter #5 [ <optional> bool $secure ]
+ Parameter #6 [ <optional> bool $httponly ]
+ }
+ - Return [ SapiResponseInterface ]
+ }
+
+ Method [ <internal:request> abstract public method setRawCookie ] {
+
+ - Parameters [7] {
+ Parameter #0 [ <required> string $name ]
+ Parameter #1 [ <optional> string $value ]
+ Parameter #2 [ <optional> $expires_or_options ]
+ Parameter #3 [ <optional> string $path ]
+ Parameter #4 [ <optional> string $domain ]
+ Parameter #5 [ <optional> bool $secure ]
+ Parameter #6 [ <optional> bool $httponly ]
+ }
+ - Return [ SapiResponseInterface ]
+ }
+
+ Method [ <internal:request> abstract public method unsetCookie ] {
+
+ - Parameters [1] {
+ Parameter #0 [ <required> string $name ]
+ }
+ - Return [ SapiResponseInterface ]
+ }
+
+ Method [ <internal:request> abstract public method unsetCookies ] {
+
+ - Parameters [0] {
+ }
+ - Return [ SapiResponseInterface ]
+ }
+
+ Method [ <internal:request> abstract public method getCookies ] {
+
+ - Parameters [0] {
+ }
+ - Return [ array or NULL ]
+ }
+
+ Method [ <internal:request> abstract public method setContent ] {
+
+ - Parameters [1] {
+ Parameter #0 [ <required> $content ]
+ }
+ - Return [ SapiResponseInterface ]
+ }
+
+ Method [ <internal:request> abstract public method getContent ] {
+
+ - Parameters [0] {
+ }
+ }
+
+ Method [ <internal:request> abstract public method setHeaderCallbacks ] {
+
+ - Parameters [1] {
+ Parameter #0 [ <required> array $callbacks ]
+ }
+ - Return [ SapiResponseInterface ]
+ }
+
+ Method [ <internal:request> abstract public method addHeaderCallback ] {
+
+ - Parameters [1] {
+ Parameter #0 [ <required> callable $callback ]
+ }
+ - Return [ SapiResponseInterface ]
+ }
+
+ Method [ <internal:request> abstract public method getHeaderCallbacks ] {
+
+ - Parameters [0] {
+ }
+ - Return [ array or NULL ]
}
}
}
- Class [ <internal:request> class ServerResponse ] {
+ Class [ <internal:request> class SapiResponse implements SapiResponseInterface ] {
- Constants [0] {
}
@@ -146,204 +275,307 @@ Extension [ <persistent> extension #181 request version 1.0.0b2 ] {
}
- Properties [6] {
- Property [ <default> protected $version ]
- Property [ <default> protected $status ]
- Property [ <default> protected $headers ]
- Property [ <default> protected $cookies ]
- Property [ <default> protected $content ]
- Property [ <default> protected $callbacks ]
+ Property [ <default> private $version ]
+ Property [ <default> private $code ]
+ Property [ <default> private $headers ]
+ Property [ <default> private $cookies ]
+ Property [ <default> private $content ]
+ Property [ <default> private $callbacks ]
}
- - Methods [26] {
- Method [ <internal:request, ctor> public method __construct ] {
+ - Methods [23] {
+ Method [ <internal:request, prototype SapiResponseInterface> final public method setVersion ] {
- - Parameters [0] {
+ - Parameters [1] {
+ Parameter #0 [ <required> string or NULL $version ]
}
+ - Return [ SapiResponseInterface ]
}
- Method [ <internal:request> public method getVersion ] {
+ Method [ <internal:request, prototype SapiResponseInterface> final public method getVersion ] {
- Parameters [0] {
}
- - Return [ string ]
+ - Return [ string or NULL ]
}
- Method [ <internal:request> public method setVersion ] {
+ Method [ <internal:request, prototype SapiResponseInterface> final public method setCode ] {
- Parameters [1] {
- Parameter #0 [ <required> string $version ]
+ Parameter #0 [ <required> int or NULL $code ]
}
+ - Return [ SapiResponseInterface ]
}
- Method [ <internal:request> public method getStatus ] {
+ Method [ <internal:request, prototype SapiResponseInterface> final public method getCode ] {
- Parameters [0] {
}
+ - Return [ int or NULL ]
}
- Method [ <internal:request> public method setStatus ] {
+ Method [ <internal:request, prototype SapiResponseInterface> final public method setHeader ] {
- - Parameters [1] {
- Parameter #0 [ <required> integer $status ]
+ - Parameters [2] {
+ Parameter #0 [ <required> string $label ]
+ Parameter #1 [ <required> string $value ]
}
+ - Return [ SapiResponseInterface ]
}
- Method [ <internal:request> public method getHeader ] {
+ Method [ <internal:request, prototype SapiResponseInterface> final public method addHeader ] {
- - Parameters [0] {
+ - Parameters [2] {
+ Parameter #0 [ <required> string $label ]
+ Parameter #1 [ <required> string $value ]
}
- - Return [ string or NULL ]
+ - Return [ SapiResponseInterface ]
}
- Method [ <internal:request> public method getHeaders ] {
+ Method [ <internal:request, prototype SapiResponseInterface> final public method unsetHeader ] {
- - Parameters [0] {
+ - Parameters [1] {
+ Parameter #0 [ <required> string $label ]
}
- - Return [ array ]
+ - Return [ SapiResponseInterface ]
}
- Method [ <internal:request> public method setHeader ] {
+ Method [ <internal:request, prototype SapiResponseInterface> final public method getHeader ] {
- - Parameters [2] {
+ - Parameters [1] {
Parameter #0 [ <required> string $label ]
- Parameter #1 [ <required> $value ]
}
+ - Return [ string or NULL ]
}
- Method [ <internal:request> public method addHeader ] {
+ Method [ <internal:request, prototype SapiResponseInterface> final public method hasHeader ] {
- - Parameters [2] {
+ - Parameters [1] {
Parameter #0 [ <required> string $label ]
- Parameter #1 [ <required> $value ]
}
+ - Return [ bool ]
}
- Method [ <internal:request> public method getCookies ] {
+ Method [ <internal:request, prototype SapiResponseInterface> final public method unsetHeaders ] {
- Parameters [0] {
}
- - Return [ array ]
+ - Return [ SapiResponseInterface ]
}
- Method [ <internal:request> public method setCookie ] {
+ Method [ <internal:request, prototype SapiResponseInterface> final public method getHeaders ] {
+
+ - Parameters [0] {
+ }
+ - Return [ array or NULL ]
+ }
+
+ Method [ <internal:request, prototype SapiResponseInterface> final public method setCookie ] {
- Parameters [7] {
- Parameter #0 [ <required> $name ]
+ Parameter #0 [ <required> string $name ]
Parameter #1 [ <optional> string $value ]
- Parameter #2 [ <optional> integer $expires ]
+ Parameter #2 [ <optional> $expires_or_options ]
Parameter #3 [ <optional> string $path ]
Parameter #4 [ <optional> string $domain ]
- Parameter #5 [ <optional> $secure ]
- Parameter #6 [ <optional> $httponly ]
+ Parameter #5 [ <optional> bool $secure ]
+ Parameter #6 [ <optional> bool $httponly ]
}
+ - Return [ SapiResponseInterface ]
}
- Method [ <internal:request> public method setRawCookie ] {
+ Method [ <internal:request, prototype SapiResponseInterface> final public method setRawCookie ] {
- Parameters [7] {
- Parameter #0 [ <required> $name ]
+ Parameter #0 [ <required> string $name ]
Parameter #1 [ <optional> string $value ]
- Parameter #2 [ <optional> integer $expires ]
+ Parameter #2 [ <optional> $expires_or_options ]
Parameter #3 [ <optional> string $path ]
Parameter #4 [ <optional> string $domain ]
- Parameter #5 [ <optional> $secure ]
- Parameter #6 [ <optional> $httponly ]
+ Parameter #5 [ <optional> bool $secure ]
+ Parameter #6 [ <optional> bool $httponly ]
}
+ - Return [ SapiResponseInterface ]
}
- Method [ <internal:request> public method getContent ] {
+ Method [ <internal:request, prototype SapiResponseInterface> final public method unsetCookie ] {
+
+ - Parameters [1] {
+ Parameter #0 [ <required> string $name ]
+ }
+ - Return [ SapiResponseInterface ]
+ }
+
+ Method [ <internal:request, prototype SapiResponseInterface> final public method unsetCookies ] {
- Parameters [0] {
}
+ - Return [ SapiResponseInterface ]
}
- Method [ <internal:request> public method setContent ] {
+ Method [ <internal:request, prototype SapiResponseInterface> final public method getCookie ] {
- Parameters [1] {
- Parameter #0 [ <required> $content ]
+ Parameter #0 [ <required> string $name ]
}
+ - Return [ array or NULL ]
}
- Method [ <internal:request> public method setContentJson ] {
+ Method [ <internal:request, prototype SapiResponseInterface> final public method hasCookie ] {
- - Parameters [3] {
- Parameter #0 [ <required> $content ]
- Parameter #1 [ <optional> integer $options ]
- Parameter #2 [ <optional> integer $depth ]
+ - Parameters [1] {
+ Parameter #0 [ <required> string $name ]
}
+ - Return [ bool ]
}
- Method [ <internal:request> public method setContentDownload ] {
+ Method [ <internal:request, prototype SapiResponseInterface> final public method getCookies ] {
- - Parameters [4] {
- Parameter #0 [ <required> $fh ]
- Parameter #1 [ <required> string $name ]
- Parameter #2 [ <optional> string $disposition ]
- Parameter #3 [ <optional> array $params ]
+ - Parameters [0] {
}
+ - Return [ array or NULL ]
}
- Method [ <internal:request> public method addHeaderCallback ] {
+ Method [ <internal:request, prototype SapiResponseInterface> final public method setContent ] {
- Parameters [1] {
- Parameter #0 [ <required> callable $callback ]
+ Parameter #0 [ <required> $content ]
}
+ - Return [ SapiResponseInterface ]
}
- Method [ <internal:request> public method setHeaderCallbacks ] {
+ Method [ <internal:request, prototype SapiResponseInterface> final public method getContent ] {
+
+ - Parameters [0] {
+ }
+ }
+
+ Method [ <internal:request, prototype SapiResponseInterface> final public method setHeaderCallbacks ] {
- Parameters [1] {
Parameter #0 [ <required> array $callbacks ]
}
+ - Return [ SapiResponseInterface ]
}
- Method [ <internal:request> public method getHeaderCallbacks ] {
+ Method [ <internal:request, prototype SapiResponseInterface> final public method addHeaderCallback ] {
+
+ - Parameters [1] {
+ Parameter #0 [ <required> callable $callback ]
+ }
+ - Return [ SapiResponseInterface ]
+ }
+
+ Method [ <internal:request, prototype SapiResponseInterface> final public method getHeaderCallbacks ] {
- Parameters [0] {
}
+ - Return [ array or NULL ]
}
+ }
+ }
- Method [ <internal:request> public method date ] {
+ Class [ <internal:request> class SapiResponseSender ] {
+
+ - Constants [0] {
+ }
+
+ - Static properties [0] {
+ }
+
+ - Static methods [0] {
+ }
+
+ - Properties [0] {
+ }
+
+ - Methods [6] {
+ Method [ <internal:request> public method send ] {
- Parameters [1] {
- Parameter #0 [ <required> $date ]
+ Parameter #0 [ <required> SapiResponseInterface $response ]
}
- - Return [ string ]
+ - Return [ void ]
}
- Method [ <internal:request> public method send ] {
+ Method [ <internal:request> public method runHeaderCallbacks ] {
- - Parameters [0] {
+ - Parameters [1] {
+ Parameter #0 [ <required> SapiResponseInterface $response ]
}
+ - Return [ void ]
}
- Method [ <internal:request> protected method runHeaderCallbacks ] {
+ Method [ <internal:request> public method sendStatus ] {
- - Parameters [0] {
+ - Parameters [1] {
+ Parameter #0 [ <required> SapiResponseInterface $response ]
}
+ - Return [ void ]
}
- Method [ <internal:request> protected method sendStatus ] {
+ Method [ <internal:request> public method sendHeaders ] {
- - Parameters [0] {
+ - Parameters [1] {
+ Parameter #0 [ <required> SapiResponseInterface $response ]
}
+ - Return [ void ]
}
- Method [ <internal:request> protected method sendHeaders ] {
+ Method [ <internal:request> public method sendCookies ] {
- - Parameters [0] {
+ - Parameters [1] {
+ Parameter #0 [ <required> SapiResponseInterface $response ]
}
+ - Return [ void ]
}
- Method [ <internal:request> protected method sendCookies ] {
+ Method [ <internal:request> public method sendContent ] {
- - Parameters [0] {
+ - Parameters [1] {
+ Parameter #0 [ <required> SapiResponseInterface $response ]
}
+ - Return [ void ]
}
+ }
+ }
- Method [ <internal:request> protected method sendContent ] {
+ Class [ <internal:request> class SapiUpload ] {
- - Parameters [0] {
+ - Constants [0] {
+ }
+
+ - Static properties [0] {
+ }
+
+ - Static methods [0] {
+ }
+
+ - Properties [6] {
+ Property [ <default> private $isUnconstructed ]
+ Property [ <default> public $name ]
+ Property [ <default> public $type ]
+ Property [ <default> public $size ]
+ Property [ <default> public $tmpName ]
+ Property [ <default> public $error ]
+ }
+
+ - Methods [2] {
+ Method [ <internal:request, ctor> public method __construct ] {
+
+ - Parameters [5] {
+ Parameter #0 [ <optional> string or NULL $name ]
+ Parameter #1 [ <optional> string or NULL $type ]
+ Parameter #2 [ <optional> int or NULL $size ]
+ Parameter #3 [ <optional> string or NULL $tmpName ]
+ Parameter #4 [ <optional> int or NULL $error ]
+ }
+ }
+
+ Method [ <internal:request> public method move ] {
+
+ - Parameters [1] {
+ Parameter #0 [ <required> string $destination ]
}
}
}
diff --git a/php-pecl-request.spec b/php-pecl-request.spec
index 0d8fdeb..9ebb8c4 100644
--- a/php-pecl-request.spec
+++ b/php-pecl-request.spec
@@ -1,6 +1,6 @@
# remirepo spec file for php-pecl-request
#
-# Copyright (c) 2016-2019 Remi Collet
+# Copyright (c) 2016-2020 Remi Collet
# License: CC-BY-SA
# http://creativecommons.org/licenses/by-sa/4.0/
#
@@ -14,21 +14,18 @@
%global pecl_name request
%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}}
%global ini_name 40-%{pecl_name}.ini
-%global prever b2
+#global prever b2
Summary: Server-side request and response objects
Name: %{?sub_prefix}php-pecl-%{pecl_name}
-Version: 1.0.0
-Release: 0.11.%{prever}%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}
+Version: 2.0.0
+Release: 1%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}
License: PHP
-URL: http://pecl.php.net/package/%{pecl_name}
-Source0: http://pecl.php.net/get/%{pecl_name}-%{version}%{?prever}.tgz
-
-Patch0: https://patch-diff.githubusercontent.com/raw/pmjones/ext-request/pull/12.patch
-Patch1: https://patch-diff.githubusercontent.com/raw/pmjones/ext-request/pull/14.patch
+URL: https://pecl.php.net/package/%{pecl_name}
+Source0: https://pecl.php.net/get/%{pecl_name}-%{version}%{?prever}.tgz
BuildRequires: %{?dtsprefix}gcc
-BuildRequires: %{?scl_prefix}php-devel > 7
+BuildRequires: %{?scl_prefix}php-devel > 7.3
BuildRequires: %{?scl_prefix}php-pear
BuildRequires: %{?scl_prefix}php-json
@@ -54,20 +51,16 @@ Provides: %{?scl_prefix}php-pecl-%{pecl_name}%{?_isa} = %{version}-%{rele
%if "%{?vendor}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel}
# Other third party repo stuff
-Obsoletes: php70u-pecl-%{pecl_name} <= %{version}
-Obsoletes: php70w-pecl-%{pecl_name} <= %{version}
-%if "%{php_version}" > "7.1"
-Obsoletes: php71u-pecl-%{pecl_name} <= %{version}
-Obsoletes: php71w-pecl-%{pecl_name} <= %{version}
-%endif
-%if "%{php_version}" > "7.2"
Obsoletes: php72u-pecl-%{pecl_name} <= %{version}
Obsoletes: php72w-pecl-%{pecl_name} <= %{version}
-%endif
%if "%{php_version}" > "7.3"
Obsoletes: php73-pecl-%{pecl_name} <= %{version}
Obsoletes: php73w-pecl-%{pecl_name} <= %{version}
%endif
+%if "%{php_version}" > "7.4"
+Obsoletes: php74-pecl-%{pecl_name} <= %{version}
+Obsoletes: php74w-pecl-%{pecl_name} <= %{version}
+%endif
%endif
%if 0%{?fedora} < 20 && 0%{?rhel} < 7
@@ -79,25 +72,36 @@ Obsoletes: php73w-pecl-%{pecl_name} <= %{version}
%description
This extension provides server-side request and response objects for PHP.
-These are *not* HTTP message objects proper. They are more like wrappers
-for existing global PHP variables and functions, with some limited
-additional convenience functionality.
-This extension defines two classes in the global namespace:
+These are *not* HTTP message objects proper. They are more like wrappers
+for existing global PHP variables and functions.
-- ServerRequest, composed of read-only copies of PHP superglobals and some
- other commonly-used values, with methods for adding application-specific
- request information in immutable fashion.
+Four classes and one interface are defined in the global namespace:
-- ServerResponse, essentially a wrapper around (and buffer for) response-
- related PHP functions, with some additional convenience methods, and self-
- sending capability.
+- SapiRequest, composed of read-only copies of PHP superglobals and
+ some other commonly-used values.
+- SapiUpload, a value-object style descriptor of each uploaded file.
+- SapiResponse and SapiResponseInterface, essentially a wrapper around
+ (and buffer for) response-related PHP functions.
+- SapiResponseSender, for sending a SapiResponse.
Documentation: https://gitlab.com/pmjones/phprequest
Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')%{?scl: as Software Collection (%{scl} by %{?scl_vendor}%{!?scl_vendor:rh})}.
+%package devel
+Summary: %{name} developer files (header)
+Group: Development/Libraries
+Requires: %{name}%{?_isa} = %{version}-%{release}
+Requires: %{?scl_prefix}php-devel%{?_isa}
+Provides: %{?scl_prefix}php-pecl-%{pecl_name}-devel = %{version}-%{release}
+Provides: %{?scl_prefix}php-pecl-%{pecl_name}-devel%{?_isa} = %{version}-%{release}
+
+%description devel
+These are the files needed to compile programs using %{name}.
+
+
%prep
%setup -q -c
mv %{pecl_name}-%{version}%{?prever} NTS
@@ -108,9 +112,6 @@ sed -e 's/role="test"/role="src"/' \
-i package.xml
cd NTS
-%patch0 -p1 -b .pr12
-%patch1 -p1 -b .pr14
-
# Sanity check, really often broken
extver=$(sed -n '/define PHP_REQUEST_VERSION/{s/.* "//;s/".*$//;p}' php_request.h)
if test "x${extver}" != "x%{version}%{?prever}"; then
@@ -178,6 +179,9 @@ for i in $(grep 'role="doc"' ../package.xml | sed -e 's/^.*name="//;s/".*$//')
do install -Dpm 644 $i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i
done
+mkdir -p %{buildroot}%{pecl_testdir}/%{pecl_name}
+cp -pr tests %{buildroot}%{pecl_testdir}/%{pecl_name}/tests
+
%if 0%{?fedora} < 24 && 0%{?rhel} < 8
# when pear installed alone, after us
@@ -200,6 +204,12 @@ fi
%check
+# CGI tests
+find ?TS/tests \
+ -name \*.phpt \
+ -exec grep -qE '^--(POST_RAW|CGI)--$' {} \; \
+ -delete
+
: Minimal load test for NTS extension
cd NTS
%{_bindir}/php --no-php-ini \
@@ -217,6 +227,11 @@ REPORT_EXIT_STATUS=1 \
%if %{with_zts}
: Minimal load test for ZTS extension
cd ../ZTS
+# failing for ZTS
+rm tests/request/cookie.phpt
+rm tests/request/input.phpt
+rm tests/request/query.phpt
+rm tests/request/variables_order.phpt
%{__ztsphp} --no-php-ini \
--define extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so \
@@ -244,8 +259,21 @@ REPORT_EXIT_STATUS=1 \
%{php_ztsextdir}/%{pecl_name}.so
%endif
+%files devel
+%doc %{pecl_testdir}/%{pecl_name}
+%{php_incldir}/ext/%{pecl_name}
+
+%if %{with_zts}
+%{php_ztsincldir}/ext/%{pecl_name}
+%endif
+
%changelog
+* Wed Apr 8 2020 Remi Collet <remi@remirepo.net> - 2.0.0-1
+- update to 2.0.0
+- raise dependency on PHP 7.3
+- add devel sub-package
+
* Tue Aug 27 2019 Remi Collet <remi@remirepo.net> - 1.0.0-0.11.b2
- add build dependency on php-json