Compare commits
14 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6e59b63791 | ||
|
|
9c7b3cea83 | ||
|
|
26af6a07f4 | ||
|
|
b7c6d4b478 | ||
|
|
9936fc04da | ||
|
|
1e0dfa2106 | ||
|
|
3af6f6a8f0 | ||
|
|
1e793c0d16 | ||
|
|
5be34453ce | ||
|
|
7773b78e17 | ||
|
|
2a3798c8c2 | ||
|
|
bc8303fe5f | ||
|
|
ba89b188d9 | ||
|
|
d15618cde4 |
@@ -1,13 +1,15 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
base_folder='/var/www/html/developers/clemens/core_data/php_libraries/trunk/www/';
|
BASE_FOLDER=$(dirname $(readlink -f $0))"/";
|
||||||
|
# Assume script is in 4dev/bin
|
||||||
|
base_folder="${BASE_FOLDER}../../www/";
|
||||||
|
|
||||||
# locale gettext po to mo translator master
|
# locale gettext po to mo translator master
|
||||||
for file in $(ls -1 ${base_folder}../4dev/locale/*.po); do
|
for file in $(ls -1 ${base_folder}../4dev/locale/*.po); do
|
||||||
file=$(basename $file .po);
|
file=$(basename $file .po);
|
||||||
echo "Translate language ${file}";
|
|
||||||
locale=$(echo "${file}" | cut -d "-" -f 1);
|
locale=$(echo "${file}" | cut -d "-" -f 1);
|
||||||
domain=$(echo "${file}" | cut -d "-" -f 2);
|
domain=$(echo "${file}" | cut -d "-" -f 2);
|
||||||
|
echo "- Translate language file '${file}' for locale '${locale}' and domain '${domain}':";
|
||||||
if [ ! -d "${base_folder}/includes/locale/${locale}/LC_MESSAGES/" ]; then
|
if [ ! -d "${base_folder}/includes/locale/${locale}/LC_MESSAGES/" ]; then
|
||||||
mkdir -p "${base_folder}/includes/locale/${locale}/LC_MESSAGES/";
|
mkdir -p "${base_folder}/includes/locale/${locale}/LC_MESSAGES/";
|
||||||
fi;
|
fi;
|
||||||
|
|||||||
@@ -3,26 +3,26 @@
|
|||||||
CREATE OR REPLACE FUNCTION set_edit_access_uid() RETURNS TRIGGER AS
|
CREATE OR REPLACE FUNCTION set_edit_access_uid() RETURNS TRIGGER AS
|
||||||
$$
|
$$
|
||||||
DECLARE
|
DECLARE
|
||||||
myrec RECORD;
|
myrec RECORD;
|
||||||
v_uid VARCHAR;
|
v_uid VARCHAR;
|
||||||
BEGIN
|
BEGIN
|
||||||
-- skip if NEW.name is not set
|
-- skip if NEW.name is not set
|
||||||
IF NEW.name IS NOT NULL AND NEW.name <> '' THEN
|
IF NEW.name IS NOT NULL AND NEW.name <> '' THEN
|
||||||
-- use NEW.name as base, remove all spaces
|
-- use NEW.name as base, remove all spaces
|
||||||
-- name data is already unique, so we do not need to worry about this here
|
-- name data is already unique, so we do not need to worry about this here
|
||||||
v_uid := REPLACE(NEW.name, ' ', '');
|
v_uid := REPLACE(NEW.name, ' ', '');
|
||||||
IF TG_OP = 'INSERT' THEN
|
IF TG_OP = 'INSERT' THEN
|
||||||
-- always set
|
-- always set
|
||||||
NEW.uid := v_uid;
|
NEW.uid := v_uid;
|
||||||
ELSIF TG_OP = 'UPDATE' THEN
|
ELSIF TG_OP = 'UPDATE' THEN
|
||||||
-- check if not set, then set
|
-- check if not set, then set
|
||||||
SELECT INTO myrec t.* FROM edit_access t WHERE edit_access_id = NEW.edit_access_id;
|
SELECT INTO myrec t.* FROM edit_access t WHERE edit_access_id = NEW.edit_access_id;
|
||||||
IF FOUND THEN
|
IF FOUND THEN
|
||||||
NEW.uid := v_uid;
|
NEW.uid := v_uid;
|
||||||
END IF;
|
END IF;
|
||||||
END IF;
|
END IF;
|
||||||
END IF;
|
END IF;
|
||||||
RETURN NEW;
|
RETURN NEW;
|
||||||
END;
|
END;
|
||||||
$$
|
$$
|
||||||
LANGUAGE 'plpgsql';
|
LANGUAGE 'plpgsql';
|
||||||
|
|||||||
@@ -3,26 +3,26 @@
|
|||||||
CREATE OR REPLACE FUNCTION set_edit_group_uid() RETURNS TRIGGER AS
|
CREATE OR REPLACE FUNCTION set_edit_group_uid() RETURNS TRIGGER AS
|
||||||
$$
|
$$
|
||||||
DECLARE
|
DECLARE
|
||||||
myrec RECORD;
|
myrec RECORD;
|
||||||
v_uid VARCHAR;
|
v_uid VARCHAR;
|
||||||
BEGIN
|
BEGIN
|
||||||
-- skip if NEW.name is not set
|
-- skip if NEW.name is not set
|
||||||
IF NEW.name IS NOT NULL AND NEW.name <> '' THEN
|
IF NEW.name IS NOT NULL AND NEW.name <> '' THEN
|
||||||
-- use NEW.name as base, remove all spaces
|
-- use NEW.name as base, remove all spaces
|
||||||
-- name data is already unique, so we do not need to worry about this here
|
-- name data is already unique, so we do not need to worry about this here
|
||||||
v_uid := REPLACE(NEW.name, ' ', '');
|
v_uid := REPLACE(NEW.name, ' ', '');
|
||||||
IF TG_OP = 'INSERT' THEN
|
IF TG_OP = 'INSERT' THEN
|
||||||
-- always set
|
-- always set
|
||||||
NEW.uid := v_uid;
|
NEW.uid := v_uid;
|
||||||
ELSIF TG_OP = 'UPDATE' THEN
|
ELSIF TG_OP = 'UPDATE' THEN
|
||||||
-- check if not set, then set
|
-- check if not set, then set
|
||||||
SELECT INTO myrec t.* FROM edit_group t WHERE edit_group_id = NEW.edit_group_id;
|
SELECT INTO myrec t.* FROM edit_group t WHERE edit_group_id = NEW.edit_group_id;
|
||||||
IF FOUND THEN
|
IF FOUND THEN
|
||||||
NEW.uid := v_uid;
|
NEW.uid := v_uid;
|
||||||
END IF;
|
END IF;
|
||||||
END IF;
|
END IF;
|
||||||
END IF;
|
END IF;
|
||||||
RETURN NEW;
|
RETURN NEW;
|
||||||
END;
|
END;
|
||||||
$$
|
$$
|
||||||
LANGUAGE 'plpgsql';
|
LANGUAGE 'plpgsql';
|
||||||
|
|||||||
@@ -9,142 +9,142 @@ CREATE OR REPLACE FUNCTION edit_log_insert_trigger ()
|
|||||||
RETURNS TRIGGER AS
|
RETURNS TRIGGER AS
|
||||||
$$
|
$$
|
||||||
DECLARE
|
DECLARE
|
||||||
start_date DATE := '2010-01-01';
|
start_date DATE := '2010-01-01';
|
||||||
end_date DATE;
|
end_date DATE;
|
||||||
timeformat TEXT := 'YYYY';
|
timeformat TEXT := 'YYYY';
|
||||||
selector TEXT := 'year';
|
selector TEXT := 'year';
|
||||||
base_table TEXT := 'edit_log';
|
base_table TEXT := 'edit_log';
|
||||||
_interval INTERVAL := '1 ' || selector;
|
_interval INTERVAL := '1 ' || selector;
|
||||||
_interval_next INTERVAL := '2 ' || selector;
|
_interval_next INTERVAL := '2 ' || selector;
|
||||||
table_name TEXT;
|
table_name TEXT;
|
||||||
-- compare date column
|
-- compare date column
|
||||||
compare_date DATE := NEW.event_date;
|
compare_date DATE := NEW.event_date;
|
||||||
compare_date_name TEXT := 'event_date';
|
compare_date_name TEXT := 'event_date';
|
||||||
-- the create commands
|
-- the create commands
|
||||||
command_create_table TEXT := 'CREATE TABLE IF NOT EXISTS {TABLE_NAME} (CHECK({COMPARE_DATE_NAME} >= {START_DATE} AND {COMPARE_DATE_NAME} < {END_DATE})) INHERITS ({BASE_NAME})';
|
command_create_table TEXT := 'CREATE TABLE IF NOT EXISTS {TABLE_NAME} (CHECK({COMPARE_DATE_NAME} >= {START_DATE} AND {COMPARE_DATE_NAME} < {END_DATE})) INHERITS ({BASE_NAME})';
|
||||||
command_create_primary_key TEXT := 'ALTER TABLE {TABLE_NAME} ADD PRIMARY KEY ({BASE_TABLE}_id)';
|
command_create_primary_key TEXT := 'ALTER TABLE {TABLE_NAME} ADD PRIMARY KEY ({BASE_TABLE}_id)';
|
||||||
command_create_foreign_key_1 TEXT := 'ALTER TABLE {TABLE_NAME} ADD CONSTRAINT {TABLE_NAME}_euid_fkey FOREIGN KEY (euid) REFERENCES edit_user (edit_user_id) MATCH FULL ON UPDATE CASCADE ON DELETE SET NULL';
|
command_create_foreign_key_1 TEXT := 'ALTER TABLE {TABLE_NAME} ADD CONSTRAINT {TABLE_NAME}_euid_fkey FOREIGN KEY (euid) REFERENCES edit_user (edit_user_id) MATCH FULL ON UPDATE CASCADE ON DELETE SET NULL';
|
||||||
command_create_trigger_1 TEXT = 'CREATE TRIGGER trg_{TABLE_NAME} BEFORE INSERT OR UPDATE ON {TABLE_NAME} FOR EACH ROW EXECUTE PROCEDURE set_edit_generic()';
|
command_create_trigger_1 TEXT = 'CREATE TRIGGER trg_{TABLE_NAME} BEFORE INSERT OR UPDATE ON {TABLE_NAME} FOR EACH ROW EXECUTE PROCEDURE set_edit_generic()';
|
||||||
BEGIN
|
BEGIN
|
||||||
-- we are in valid start time area
|
-- we are in valid start time area
|
||||||
IF (NEW.event_date >= start_date) THEN
|
IF (NEW.event_date >= start_date) THEN
|
||||||
-- current table name
|
-- current table name
|
||||||
table_name := base_table || '_' || to_char(NEW.event_date, timeformat);
|
table_name := base_table || '_' || to_char(NEW.event_date, timeformat);
|
||||||
BEGIN
|
BEGIN
|
||||||
EXECUTE 'INSERT INTO ' || quote_ident(table_name) || ' SELECT ($1).*' USING NEW;
|
EXECUTE 'INSERT INTO ' || quote_ident(table_name) || ' SELECT ($1).*' USING NEW;
|
||||||
-- if insert failed because of missing table, create new below
|
-- if insert failed because of missing table, create new below
|
||||||
EXCEPTION
|
EXCEPTION
|
||||||
WHEN undefined_table THEN
|
WHEN undefined_table THEN
|
||||||
-- another block, so in case the creation fails here too
|
-- another block, so in case the creation fails here too
|
||||||
BEGIN
|
BEGIN
|
||||||
-- create new table here + all indexes
|
-- create new table here + all indexes
|
||||||
start_date := date_trunc(selector, NEW.event_date);
|
start_date := date_trunc(selector, NEW.event_date);
|
||||||
end_date := date_trunc(selector, NEW.event_date + _interval);
|
end_date := date_trunc(selector, NEW.event_date + _interval);
|
||||||
-- creat table
|
-- creat table
|
||||||
EXECUTE format(REPLACE( -- end date
|
EXECUTE format(REPLACE( -- end date
|
||||||
REPLACE( -- start date
|
REPLACE( -- start date
|
||||||
REPLACE( -- compare date name
|
REPLACE( -- compare date name
|
||||||
REPLACE( -- base name (inherit)
|
REPLACE( -- base name (inherit)
|
||||||
REPLACE( -- table name
|
REPLACE( -- table name
|
||||||
command_create_table,
|
command_create_table,
|
||||||
'{TABLE_NAME}',
|
'{TABLE_NAME}',
|
||||||
table_name
|
table_name
|
||||||
),
|
),
|
||||||
'{BASE_NAME}',
|
'{BASE_NAME}',
|
||||||
base_table
|
base_table
|
||||||
),
|
),
|
||||||
'{COMPARE_DATE_NAME}',
|
'{COMPARE_DATE_NAME}',
|
||||||
compare_date_name
|
compare_date_name
|
||||||
),
|
),
|
||||||
'{START_DATE}',
|
'{START_DATE}',
|
||||||
quote_literal(start_date)
|
quote_literal(start_date)
|
||||||
),
|
),
|
||||||
'{END_DATE}',
|
'{END_DATE}',
|
||||||
quote_literal(end_date)
|
quote_literal(end_date)
|
||||||
));
|
));
|
||||||
-- create all indexes and triggers
|
-- create all indexes and triggers
|
||||||
EXECUTE format(REPLACE(
|
EXECUTE format(REPLACE(
|
||||||
REPLACE(
|
REPLACE(
|
||||||
command_create_primary_key,
|
command_create_primary_key,
|
||||||
'{TABLE_NAME}',
|
'{TABLE_NAME}',
|
||||||
table_name
|
table_name
|
||||||
),
|
),
|
||||||
'{BASE_TABLE}',
|
'{BASE_TABLE}',
|
||||||
base_table
|
base_table
|
||||||
));
|
));
|
||||||
-- FK constraints
|
-- FK constraints
|
||||||
EXECUTE format(REPLACE(command_create_foreign_key_1, '{TABLE_NAME}', table_name));
|
EXECUTE format(REPLACE(command_create_foreign_key_1, '{TABLE_NAME}', table_name));
|
||||||
-- generic trigger
|
-- generic trigger
|
||||||
EXECUTE format(REPLACE(command_create_trigger_1, '{TABLE_NAME}', table_name));
|
EXECUTE format(REPLACE(command_create_trigger_1, '{TABLE_NAME}', table_name));
|
||||||
|
|
||||||
-- insert try again
|
-- insert try again
|
||||||
EXECUTE 'INSERT INTO ' || quote_ident(table_name) || ' SELECT ($1).*' USING NEW;
|
EXECUTE 'INSERT INTO ' || quote_ident(table_name) || ' SELECT ($1).*' USING NEW;
|
||||||
EXCEPTION
|
EXCEPTION
|
||||||
WHEN OTHERS THEN
|
WHEN OTHERS THEN
|
||||||
-- if this faled, throw it into the overflow table (so we don't loose anything)
|
-- if this faled, throw it into the overflow table (so we don't loose anything)
|
||||||
INSERT INTO edit_log_overflow VALUES (NEW.*);
|
INSERT INTO edit_log_overflow VALUES (NEW.*);
|
||||||
END;
|
END;
|
||||||
-- other errors, insert into overlow
|
-- other errors, insert into overlow
|
||||||
WHEN OTHERS THEN
|
WHEN OTHERS THEN
|
||||||
-- if this faled, throw it into the overflow table (so we don't loose anything)
|
-- if this faled, throw it into the overflow table (so we don't loose anything)
|
||||||
INSERT INTO edit_log_overflow VALUES (NEW.*);
|
INSERT INTO edit_log_overflow VALUES (NEW.*);
|
||||||
END;
|
END;
|
||||||
-- main insert run done, check if we have to create next months table
|
-- main insert run done, check if we have to create next months table
|
||||||
BEGIN
|
BEGIN
|
||||||
-- check if next month table exists
|
-- check if next month table exists
|
||||||
table_name := base_table || '_' || to_char((SELECT NEW.event_date + _interval)::DATE, timeformat);
|
table_name := base_table || '_' || to_char((SELECT NEW.event_date + _interval)::DATE, timeformat);
|
||||||
-- RAISE NOTICE 'SEARCH NEXT: %', table_name;
|
-- RAISE NOTICE 'SEARCH NEXT: %', table_name;
|
||||||
IF (SELECT to_regclass(table_name)) IS NULL THEN
|
IF (SELECT to_regclass(table_name)) IS NULL THEN
|
||||||
-- move inner interval same
|
-- move inner interval same
|
||||||
start_date := date_trunc(selector, NEW.event_date + _interval);
|
start_date := date_trunc(selector, NEW.event_date + _interval);
|
||||||
end_date := date_trunc(selector, NEW.event_date + _interval_next);
|
end_date := date_trunc(selector, NEW.event_date + _interval_next);
|
||||||
-- RAISE NOTICE 'CREATE NEXT: %', table_name;
|
-- RAISE NOTICE 'CREATE NEXT: %', table_name;
|
||||||
-- create table
|
-- create table
|
||||||
EXECUTE format(REPLACE( -- end date
|
EXECUTE format(REPLACE( -- end date
|
||||||
REPLACE( -- start date
|
REPLACE( -- start date
|
||||||
REPLACE( -- compare date name
|
REPLACE( -- compare date name
|
||||||
REPLACE( -- base name (inherit)
|
REPLACE( -- base name (inherit)
|
||||||
REPLACE( -- table name
|
REPLACE( -- table name
|
||||||
command_create_table,
|
command_create_table,
|
||||||
'{TABLE_NAME}',
|
'{TABLE_NAME}',
|
||||||
table_name
|
table_name
|
||||||
),
|
),
|
||||||
'{BASE_NAME}',
|
'{BASE_NAME}',
|
||||||
base_table
|
base_table
|
||||||
),
|
),
|
||||||
'{COMPARE_DATE_NAME}',
|
'{COMPARE_DATE_NAME}',
|
||||||
compare_date_name
|
compare_date_name
|
||||||
),
|
),
|
||||||
'{START_DATE}',
|
'{START_DATE}',
|
||||||
quote_literal(start_date)
|
quote_literal(start_date)
|
||||||
),
|
),
|
||||||
'{END_DATE}',
|
'{END_DATE}',
|
||||||
quote_literal(end_date)
|
quote_literal(end_date)
|
||||||
));
|
));
|
||||||
-- create all indexes and triggers
|
-- create all indexes and triggers
|
||||||
EXECUTE format(REPLACE(
|
EXECUTE format(REPLACE(
|
||||||
REPLACE(
|
REPLACE(
|
||||||
command_create_primary_key,
|
command_create_primary_key,
|
||||||
'{TABLE_NAME}',
|
'{TABLE_NAME}',
|
||||||
table_name
|
table_name
|
||||||
),
|
),
|
||||||
'{BASE_TABLE}',
|
'{BASE_TABLE}',
|
||||||
base_table
|
base_table
|
||||||
));
|
));
|
||||||
-- FK constraints
|
-- FK constraints
|
||||||
EXECUTE format(REPLACE(command_create_foreign_key_1, '{TABLE_NAME}', table_name));
|
EXECUTE format(REPLACE(command_create_foreign_key_1, '{TABLE_NAME}', table_name));
|
||||||
-- generic trigger
|
-- generic trigger
|
||||||
EXECUTE format(REPLACE(command_create_trigger_1, '{TABLE_NAME}', table_name));
|
EXECUTE format(REPLACE(command_create_trigger_1, '{TABLE_NAME}', table_name));
|
||||||
END IF;
|
END IF;
|
||||||
EXCEPTION
|
EXCEPTION
|
||||||
WHEN OTHERS THEN
|
WHEN OTHERS THEN
|
||||||
RAISE NOTICE 'Failed to create next table: %', table_name;
|
RAISE NOTICE 'Failed to create next table: %', table_name;
|
||||||
END;
|
END;
|
||||||
ELSE
|
ELSE
|
||||||
-- if outside valid date, insert into overflow
|
-- if outside valid date, insert into overflow
|
||||||
INSERT INTO edit_log_overflow VALUES (NEW.*);
|
INSERT INTO edit_log_overflow VALUES (NEW.*);
|
||||||
END IF;
|
END IF;
|
||||||
RETURN NULL;
|
RETURN NULL;
|
||||||
END
|
END
|
||||||
$$
|
$$
|
||||||
LANGUAGE 'plpgsql';
|
LANGUAGE 'plpgsql';
|
||||||
|
|||||||
@@ -5,22 +5,22 @@ CREATE OR REPLACE FUNCTION set_login_user_id_set_date()
|
|||||||
RETURNS TRIGGER AS
|
RETURNS TRIGGER AS
|
||||||
$$
|
$$
|
||||||
BEGIN
|
BEGIN
|
||||||
-- if new is not null/empty
|
-- if new is not null/empty
|
||||||
-- and old one is null or old one different new one
|
-- and old one is null or old one different new one
|
||||||
-- set NOW()
|
-- set NOW()
|
||||||
-- if new one is NULL
|
-- if new one is NULL
|
||||||
-- set NULL
|
-- set NULL
|
||||||
IF
|
IF
|
||||||
NEW.login_user_id IS NOT NULL AND NEW.login_user_id <> '' AND
|
NEW.login_user_id IS NOT NULL AND NEW.login_user_id <> '' AND
|
||||||
(OLD.login_user_id IS NULL OR NEW.login_user_id <> OLD.login_user_id)
|
(OLD.login_user_id IS NULL OR NEW.login_user_id <> OLD.login_user_id)
|
||||||
THEN
|
THEN
|
||||||
NEW.login_user_id_set_date = NOW();
|
NEW.login_user_id_set_date = NOW();
|
||||||
NEW.login_user_id_last_revalidate = NOW();
|
NEW.login_user_id_last_revalidate = NOW();
|
||||||
ELSIF NEW.login_user_id IS NULL OR NEW.login_user_id = '' THEN
|
ELSIF NEW.login_user_id IS NULL OR NEW.login_user_id = '' THEN
|
||||||
NEW.login_user_id_set_date = NULL;
|
NEW.login_user_id_set_date = NULL;
|
||||||
NEW.login_user_id_last_revalidate = NULL;
|
NEW.login_user_id_last_revalidate = NULL;
|
||||||
END IF;
|
END IF;
|
||||||
RETURN NEW;
|
RETURN NEW;
|
||||||
END;
|
END;
|
||||||
$$
|
$$
|
||||||
LANGUAGE 'plpgsql';
|
LANGUAGE 'plpgsql';
|
||||||
|
|||||||
@@ -4,15 +4,15 @@ CREATE FUNCTION random_string(randomLength int)
|
|||||||
RETURNS text AS
|
RETURNS text AS
|
||||||
$$
|
$$
|
||||||
SELECT array_to_string(
|
SELECT array_to_string(
|
||||||
ARRAY(
|
ARRAY(
|
||||||
SELECT substring(
|
SELECT substring(
|
||||||
'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789',
|
'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789',
|
||||||
trunc(random() * 62)::int + 1,
|
trunc(random() * 62)::int + 1,
|
||||||
1
|
1
|
||||||
)
|
)
|
||||||
FROM generate_series(1, randomLength) AS gs(x)
|
FROM generate_series(1, randomLength) AS gs(x)
|
||||||
),
|
),
|
||||||
''
|
''
|
||||||
)
|
)
|
||||||
$$
|
$$
|
||||||
LANGUAGE SQL
|
LANGUAGE SQL
|
||||||
|
|||||||
@@ -4,12 +4,12 @@ CREATE OR REPLACE FUNCTION set_date()
|
|||||||
RETURNS TRIGGER AS
|
RETURNS TRIGGER AS
|
||||||
$$
|
$$
|
||||||
BEGIN
|
BEGIN
|
||||||
IF TG_OP = 'INSERT' THEN
|
IF TG_OP = 'INSERT' THEN
|
||||||
NEW.date_created := 'now';
|
NEW.date_created := 'now';
|
||||||
ELSIF TG_OP = 'UPDATE' THEN
|
ELSIF TG_OP = 'UPDATE' THEN
|
||||||
NEW.date_updated := 'now';
|
NEW.date_updated := 'now';
|
||||||
END IF;
|
END IF;
|
||||||
RETURN NEW;
|
RETURN NEW;
|
||||||
END;
|
END;
|
||||||
$$
|
$$
|
||||||
LANGUAGE 'plpgsql';
|
LANGUAGE 'plpgsql';
|
||||||
|
|||||||
@@ -4,15 +4,15 @@ CREATE OR REPLACE FUNCTION set_edit_generic()
|
|||||||
RETURNS TRIGGER AS
|
RETURNS TRIGGER AS
|
||||||
$$
|
$$
|
||||||
DECLARE
|
DECLARE
|
||||||
random_length INT = 12; -- that should be long enough
|
random_length INT = 25; -- that should be long enough
|
||||||
BEGIN
|
BEGIN
|
||||||
IF TG_OP = 'INSERT' THEN
|
IF TG_OP = 'INSERT' THEN
|
||||||
NEW.date_created := 'now';
|
NEW.date_created := 'now';
|
||||||
NEW.cuid := random_string(random_length);
|
NEW.cuid := random_string(random_length);
|
||||||
ELSIF TG_OP = 'UPDATE' THEN
|
ELSIF TG_OP = 'UPDATE' THEN
|
||||||
NEW.date_updated := 'now';
|
NEW.date_updated := 'now';
|
||||||
END IF;
|
END IF;
|
||||||
RETURN NEW;
|
RETURN NEW;
|
||||||
END;
|
END;
|
||||||
$$
|
$$
|
||||||
LANGUAGE 'plpgsql';
|
LANGUAGE 'plpgsql';
|
||||||
|
|||||||
@@ -5,17 +5,17 @@ CREATE OR REPLACE FUNCTION set_generic()
|
|||||||
RETURNS TRIGGER AS
|
RETURNS TRIGGER AS
|
||||||
$$
|
$$
|
||||||
DECLARE
|
DECLARE
|
||||||
random_length INT = 32; -- long for massive data
|
random_length INT = 32; -- long for massive data
|
||||||
BEGIN
|
BEGIN
|
||||||
IF TG_OP = 'INSERT' THEN
|
IF TG_OP = 'INSERT' THEN
|
||||||
NEW.date_created := 'now';
|
NEW.date_created := 'now';
|
||||||
IF NEW.uid IS NULL THEN
|
IF NEW.uid IS NULL THEN
|
||||||
NEW.uid := random_string(random_length);
|
NEW.uid := random_string(random_length);
|
||||||
END IF;
|
END IF;
|
||||||
ELSIF TG_OP = 'UPDATE' THEN
|
ELSIF TG_OP = 'UPDATE' THEN
|
||||||
NEW.date_updated := 'now';
|
NEW.date_updated := 'now';
|
||||||
END IF;
|
END IF;
|
||||||
RETURN NEW;
|
RETURN NEW;
|
||||||
END;
|
END;
|
||||||
$$
|
$$
|
||||||
LANGUAGE 'plpgsql';
|
LANGUAGE 'plpgsql';
|
||||||
|
|||||||
@@ -4,12 +4,12 @@ CREATE OR REPLACE FUNCTION set_uid()
|
|||||||
RETURNS TRIGGER AS
|
RETURNS TRIGGER AS
|
||||||
$$
|
$$
|
||||||
DECLARE
|
DECLARE
|
||||||
random_length INT = 32; -- that should be long enough
|
random_length INT = 32; -- that should be long enough
|
||||||
BEGIN
|
BEGIN
|
||||||
IF TG_OP = 'INSERT' THEN
|
IF TG_OP = 'INSERT' THEN
|
||||||
NEW.uid := random_string(random_length);
|
NEW.uid := random_string(random_length);
|
||||||
END IF;
|
END IF;
|
||||||
RETURN NEW;
|
RETURN NEW;
|
||||||
END;
|
END;
|
||||||
$$
|
$$
|
||||||
LANGUAGE 'plpgsql';
|
LANGUAGE 'plpgsql';
|
||||||
|
|||||||
@@ -6,14 +6,14 @@
|
|||||||
-- RETURNS TRIGGER AS
|
-- RETURNS TRIGGER AS
|
||||||
-- $$
|
-- $$
|
||||||
-- BEGIN
|
-- BEGIN
|
||||||
-- IF TG_OP = 'INSERT' THEN
|
-- IF TG_OP = 'INSERT' THEN
|
||||||
-- NEW.date_created := clock_timestamp();
|
-- NEW.date_created := clock_timestamp();
|
||||||
-- NEW.user_created := current_user;
|
-- NEW.user_created := current_user;
|
||||||
-- ELSIF TG_OP = 'UPDATE' THEN
|
-- ELSIF TG_OP = 'UPDATE' THEN
|
||||||
-- NEW.date_updated := clock_timestamp();
|
-- NEW.date_updated := clock_timestamp();
|
||||||
-- NEW.user_updated := current_user;
|
-- NEW.user_updated := current_user;
|
||||||
-- END IF;
|
-- END IF;
|
||||||
-- RETURN NEW;
|
-- RETURN NEW;
|
||||||
-- END;
|
-- END;
|
||||||
-- $$
|
-- $$
|
||||||
-- LANGUAGE 'plpgsql';
|
-- LANGUAGE 'plpgsql';
|
||||||
|
|||||||
@@ -7,13 +7,13 @@
|
|||||||
|
|
||||||
-- DROP TABLE edit_access;
|
-- DROP TABLE edit_access;
|
||||||
CREATE TABLE edit_access (
|
CREATE TABLE edit_access (
|
||||||
edit_access_id SERIAL PRIMARY KEY,
|
edit_access_id SERIAL PRIMARY KEY,
|
||||||
enabled SMALLINT NOT NULL DEFAULT 0,
|
enabled SMALLINT NOT NULL DEFAULT 0,
|
||||||
protected SMALLINT DEFAULT 0,
|
protected SMALLINT DEFAULT 0,
|
||||||
deleted SMALLINT DEFAULT 0,
|
deleted SMALLINT DEFAULT 0,
|
||||||
uid VARCHAR,
|
uid VARCHAR,
|
||||||
name VARCHAR UNIQUE,
|
name VARCHAR UNIQUE,
|
||||||
description VARCHAR,
|
description VARCHAR,
|
||||||
color VARCHAR,
|
color VARCHAR,
|
||||||
additional_acl JSONB
|
additional_acl JSONB
|
||||||
) INHERITS (edit_generic) WITHOUT OIDS;
|
) INHERITS (edit_generic) WITHOUT OIDS;
|
||||||
|
|||||||
@@ -7,12 +7,12 @@
|
|||||||
|
|
||||||
-- DROP TABLE edit_access_data;
|
-- DROP TABLE edit_access_data;
|
||||||
CREATE TABLE edit_access_data (
|
CREATE TABLE edit_access_data (
|
||||||
edit_access_data_id SERIAL PRIMARY KEY,
|
edit_access_data_id SERIAL PRIMARY KEY,
|
||||||
edit_access_id INT NOT NULL,
|
edit_access_id INT NOT NULL,
|
||||||
FOREIGN KEY (edit_access_id) REFERENCES edit_access (edit_access_id) MATCH FULL ON DELETE CASCADE ON UPDATE CASCADE,
|
FOREIGN KEY (edit_access_id) REFERENCES edit_access (edit_access_id) MATCH FULL ON DELETE CASCADE ON UPDATE CASCADE,
|
||||||
enabled SMALLINT NOT NULL DEFAULT 0,
|
enabled SMALLINT NOT NULL DEFAULT 0,
|
||||||
name VARCHAR,
|
name VARCHAR,
|
||||||
value VARCHAR
|
value VARCHAR
|
||||||
) INHERITS (edit_generic) WITHOUT OIDS;
|
) INHERITS (edit_generic) WITHOUT OIDS;
|
||||||
|
|
||||||
-- create a unique index for each attached data block for each edit access can
|
-- create a unique index for each attached data block for each edit access can
|
||||||
|
|||||||
@@ -8,9 +8,9 @@
|
|||||||
|
|
||||||
-- DROP TABLE edit_access_right;
|
-- DROP TABLE edit_access_right;
|
||||||
CREATE TABLE edit_access_right (
|
CREATE TABLE edit_access_right (
|
||||||
edit_access_right_id SERIAL PRIMARY KEY,
|
edit_access_right_id SERIAL PRIMARY KEY,
|
||||||
name VARCHAR,
|
name VARCHAR,
|
||||||
level SMALLINT,
|
level SMALLINT,
|
||||||
type VARCHAR,
|
type VARCHAR,
|
||||||
UNIQUE (level,type)
|
UNIQUE (level,type)
|
||||||
) INHERITS (edit_generic) WITHOUT OIDS;
|
) INHERITS (edit_generic) WITHOUT OIDS;
|
||||||
|
|||||||
@@ -7,13 +7,13 @@
|
|||||||
|
|
||||||
-- DROP TABLE edit_access_user;
|
-- DROP TABLE edit_access_user;
|
||||||
CREATE TABLE edit_access_user (
|
CREATE TABLE edit_access_user (
|
||||||
edit_access_user_id SERIAL PRIMARY KEY,
|
edit_access_user_id SERIAL PRIMARY KEY,
|
||||||
edit_access_id INT NOT NULL,
|
edit_access_id INT NOT NULL,
|
||||||
FOREIGN KEY (edit_access_id) REFERENCES edit_access (edit_access_id) MATCH FULL ON DELETE CASCADE ON UPDATE CASCADE,
|
FOREIGN KEY (edit_access_id) REFERENCES edit_access (edit_access_id) MATCH FULL ON DELETE CASCADE ON UPDATE CASCADE,
|
||||||
edit_user_id INT NOT NULL,
|
edit_user_id INT NOT NULL,
|
||||||
FOREIGN KEY (edit_user_id) REFERENCES edit_user (edit_user_id) MATCH FULL ON DELETE CASCADE ON UPDATE CASCADE,
|
FOREIGN KEY (edit_user_id) REFERENCES edit_user (edit_user_id) MATCH FULL ON DELETE CASCADE ON UPDATE CASCADE,
|
||||||
edit_access_right_id INT NOT NULL,
|
edit_access_right_id INT NOT NULL,
|
||||||
FOREIGN KEY (edit_access_right_id) REFERENCES edit_access_right (edit_access_right_id) MATCH FULL ON DELETE CASCADE ON UPDATE CASCADE,
|
FOREIGN KEY (edit_access_right_id) REFERENCES edit_access_right (edit_access_right_id) MATCH FULL ON DELETE CASCADE ON UPDATE CASCADE,
|
||||||
edit_default SMALLINT DEFAULT 0,
|
edit_default SMALLINT DEFAULT 0,
|
||||||
enabled SMALLINT NOT NULL DEFAULT 0
|
enabled SMALLINT NOT NULL DEFAULT 0
|
||||||
) INHERITS (edit_generic) WITHOUT OIDS;
|
) INHERITS (edit_generic) WITHOUT OIDS;
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
-- DROP TABLE edit_generic;
|
-- DROP TABLE edit_generic;
|
||||||
CREATE TABLE edit_generic (
|
CREATE TABLE edit_generic (
|
||||||
cuid VARCHAR,
|
cuid VARCHAR,
|
||||||
date_created TIMESTAMP WITHOUT TIME ZONE DEFAULT clock_timestamp(),
|
date_created TIMESTAMP WITHOUT TIME ZONE DEFAULT clock_timestamp(),
|
||||||
date_updated TIMESTAMP WITHOUT TIME ZONE
|
date_updated TIMESTAMP WITHOUT TIME ZONE
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -7,14 +7,14 @@
|
|||||||
|
|
||||||
-- DROP TABLE edit_group;
|
-- DROP TABLE edit_group;
|
||||||
CREATE TABLE edit_group (
|
CREATE TABLE edit_group (
|
||||||
edit_group_id SERIAL PRIMARY KEY,
|
edit_group_id SERIAL PRIMARY KEY,
|
||||||
edit_scheme_id INT,
|
edit_scheme_id INT,
|
||||||
FOREIGN KEY (edit_scheme_id) REFERENCES edit_scheme (edit_scheme_id) MATCH FULL ON DELETE CASCADE ON UPDATE CASCADE,
|
FOREIGN KEY (edit_scheme_id) REFERENCES edit_scheme (edit_scheme_id) MATCH FULL ON DELETE CASCADE ON UPDATE CASCADE,
|
||||||
edit_access_right_id INT NOT NULL,
|
edit_access_right_id INT NOT NULL,
|
||||||
FOREIGN KEY (edit_access_right_id) REFERENCES edit_access_right (edit_access_right_id) MATCH FULL ON DELETE CASCADE ON UPDATE CASCADE,
|
FOREIGN KEY (edit_access_right_id) REFERENCES edit_access_right (edit_access_right_id) MATCH FULL ON DELETE CASCADE ON UPDATE CASCADE,
|
||||||
enabled SMALLINT NOT NULL DEFAULT 0,
|
enabled SMALLINT NOT NULL DEFAULT 0,
|
||||||
deleted SMALLINT DEFAULT 0,
|
deleted SMALLINT DEFAULT 0,
|
||||||
uid VARCHAR,
|
uid VARCHAR,
|
||||||
name VARCHAR,
|
name VARCHAR,
|
||||||
additional_acl JSONB
|
additional_acl JSONB
|
||||||
) INHERITS (edit_generic) WITHOUT OIDS;
|
) INHERITS (edit_generic) WITHOUT OIDS;
|
||||||
|
|||||||
@@ -8,11 +8,11 @@
|
|||||||
|
|
||||||
-- DROP TABLE edit_language;
|
-- DROP TABLE edit_language;
|
||||||
CREATE TABLE edit_language (
|
CREATE TABLE edit_language (
|
||||||
edit_language_id SERIAL PRIMARY KEY,
|
edit_language_id SERIAL PRIMARY KEY,
|
||||||
enabled SMALLINT NOT NULL DEFAULT 0,
|
enabled SMALLINT NOT NULL DEFAULT 0,
|
||||||
lang_default SMALLINT NOT NULL DEFAULT 0,
|
lang_default SMALLINT NOT NULL DEFAULT 0,
|
||||||
long_name VARCHAR,
|
long_name VARCHAR,
|
||||||
short_name VARCHAR, -- en_US, en or en_US@latin without encoding
|
short_name VARCHAR, -- en_US, en or en_US@latin without encoding
|
||||||
iso_name VARCHAR, -- should actually be encoding
|
iso_name VARCHAR, -- should actually be encoding
|
||||||
order_number INT
|
order_number INT
|
||||||
) INHERITS (edit_generic) WITHOUT OIDS;
|
) INHERITS (edit_generic) WITHOUT OIDS;
|
||||||
|
|||||||
@@ -7,35 +7,35 @@
|
|||||||
|
|
||||||
-- DROP TABLE edit_log;
|
-- DROP TABLE edit_log;
|
||||||
CREATE TABLE edit_log (
|
CREATE TABLE edit_log (
|
||||||
edit_log_id SERIAL PRIMARY KEY,
|
edit_log_id SERIAL PRIMARY KEY,
|
||||||
euid INT, -- this is a foreign key, but I don't nedd to reference to it
|
euid INT, -- this is a foreign key, but I don't nedd to reference to it
|
||||||
FOREIGN KEY (euid) REFERENCES edit_user (edit_user_id) MATCH FULL ON UPDATE CASCADE ON DELETE SET NULL,
|
FOREIGN KEY (euid) REFERENCES edit_user (edit_user_id) MATCH FULL ON UPDATE CASCADE ON DELETE SET NULL,
|
||||||
username VARCHAR,
|
username VARCHAR,
|
||||||
password VARCHAR,
|
password VARCHAR,
|
||||||
event_date TIMESTAMP WITHOUT TIME ZONE DEFAULT CURRENT_TIMESTAMP,
|
event_date TIMESTAMP WITHOUT TIME ZONE DEFAULT CURRENT_TIMESTAMP,
|
||||||
ip VARCHAR,
|
ip VARCHAR,
|
||||||
error TEXT,
|
error TEXT,
|
||||||
event TEXT,
|
event TEXT,
|
||||||
data_binary BYTEA,
|
data_binary BYTEA,
|
||||||
data TEXT,
|
data TEXT,
|
||||||
page VARCHAR,
|
page VARCHAR,
|
||||||
action VARCHAR,
|
action VARCHAR,
|
||||||
action_id VARCHAR,
|
action_id VARCHAR,
|
||||||
action_yes VARCHAR,
|
action_yes VARCHAR,
|
||||||
action_flag VARCHAR,
|
action_flag VARCHAR,
|
||||||
action_menu VARCHAR,
|
action_menu VARCHAR,
|
||||||
action_loaded VARCHAR,
|
action_loaded VARCHAR,
|
||||||
action_value VARCHAR,
|
action_value VARCHAR,
|
||||||
action_type VARCHAR,
|
action_type VARCHAR,
|
||||||
action_error VARCHAR,
|
action_error VARCHAR,
|
||||||
user_agent VARCHAR,
|
user_agent VARCHAR,
|
||||||
referer VARCHAR,
|
referer VARCHAR,
|
||||||
script_name VARCHAR,
|
script_name VARCHAR,
|
||||||
query_string VARCHAR,
|
query_string VARCHAR,
|
||||||
server_name VARCHAR,
|
server_name VARCHAR,
|
||||||
http_host VARCHAR,
|
http_host VARCHAR,
|
||||||
http_accept VARCHAR,
|
http_accept VARCHAR,
|
||||||
http_accept_charset VARCHAR,
|
http_accept_charset VARCHAR,
|
||||||
http_accept_encoding VARCHAR,
|
http_accept_encoding VARCHAR,
|
||||||
session_id VARCHAR
|
session_id VARCHAR
|
||||||
) INHERITS (edit_generic) WITHOUT OIDS;
|
) INHERITS (edit_generic) WITHOUT OIDS;
|
||||||
|
|||||||
@@ -7,10 +7,10 @@
|
|||||||
|
|
||||||
-- DROP TABLE edit_menu_group;
|
-- DROP TABLE edit_menu_group;
|
||||||
CREATE TABLE edit_menu_group (
|
CREATE TABLE edit_menu_group (
|
||||||
edit_menu_group_id SERIAL PRIMARY KEY,
|
edit_menu_group_id SERIAL PRIMARY KEY,
|
||||||
name VARCHAR,
|
name VARCHAR,
|
||||||
flag VARCHAR,
|
flag VARCHAR,
|
||||||
order_number INT NOT NULL
|
order_number INT NOT NULL
|
||||||
) INHERITS (edit_generic) WITHOUT OIDS;
|
) INHERITS (edit_generic) WITHOUT OIDS;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -7,16 +7,16 @@
|
|||||||
|
|
||||||
-- DROP TABLE edit_page;
|
-- DROP TABLE edit_page;
|
||||||
CREATE TABLE edit_page (
|
CREATE TABLE edit_page (
|
||||||
edit_page_id SERIAL PRIMARY KEY,
|
edit_page_id SERIAL PRIMARY KEY,
|
||||||
content_alias_edit_page_id INT, -- alias for page content, if the page content is defined on a different page, ege for ajax backend pages
|
content_alias_edit_page_id INT, -- alias for page content, if the page content is defined on a different page, ege for ajax backend pages
|
||||||
FOREIGN KEY (content_alias_edit_page_id) REFERENCES edit_page (edit_page_id) MATCH FULL ON DELETE RESTRICT ON UPDATE CASCADE,
|
FOREIGN KEY (content_alias_edit_page_id) REFERENCES edit_page (edit_page_id) MATCH FULL ON DELETE RESTRICT ON UPDATE CASCADE,
|
||||||
filename VARCHAR,
|
filename VARCHAR,
|
||||||
name VARCHAR UNIQUE,
|
name VARCHAR UNIQUE,
|
||||||
order_number INT NOT NULL,
|
order_number INT NOT NULL,
|
||||||
online SMALLINT NOT NULL DEFAULT 0,
|
online SMALLINT NOT NULL DEFAULT 0,
|
||||||
menu SMALLINT NOT NULL DEFAULT 0,
|
menu SMALLINT NOT NULL DEFAULT 0,
|
||||||
popup SMALLINT NOT NULL DEFAULT 0,
|
popup SMALLINT NOT NULL DEFAULT 0,
|
||||||
popup_x SMALLINT,
|
popup_x SMALLINT,
|
||||||
popup_y SMALLINT,
|
popup_y SMALLINT,
|
||||||
hostname VARCHAR
|
hostname VARCHAR
|
||||||
) INHERITS (edit_generic) WITHOUT OIDS;
|
) INHERITS (edit_generic) WITHOUT OIDS;
|
||||||
|
|||||||
@@ -7,14 +7,14 @@
|
|||||||
|
|
||||||
-- DROP TABLE edit_page_access;
|
-- DROP TABLE edit_page_access;
|
||||||
CREATE TABLE edit_page_access (
|
CREATE TABLE edit_page_access (
|
||||||
edit_page_access_id SERIAL PRIMARY KEY,
|
edit_page_access_id SERIAL PRIMARY KEY,
|
||||||
edit_group_id INT NOT NULL,
|
edit_group_id INT NOT NULL,
|
||||||
FOREIGN KEY (edit_group_id) REFERENCES edit_group (edit_group_id) MATCH FULL ON DELETE CASCADE ON UPDATE CASCADE,
|
FOREIGN KEY (edit_group_id) REFERENCES edit_group (edit_group_id) MATCH FULL ON DELETE CASCADE ON UPDATE CASCADE,
|
||||||
edit_page_id INT NOT NULL,
|
edit_page_id INT NOT NULL,
|
||||||
FOREIGN KEY (edit_page_id) REFERENCES edit_page (edit_page_id) MATCH FULL ON DELETE CASCADE ON UPDATE CASCADE,
|
FOREIGN KEY (edit_page_id) REFERENCES edit_page (edit_page_id) MATCH FULL ON DELETE CASCADE ON UPDATE CASCADE,
|
||||||
edit_access_right_id INT NOT NULL,
|
edit_access_right_id INT NOT NULL,
|
||||||
FOREIGN KEY (edit_access_right_id) REFERENCES edit_access_right (edit_access_right_id) MATCH FULL ON DELETE CASCADE ON UPDATE CASCADE,
|
FOREIGN KEY (edit_access_right_id) REFERENCES edit_access_right (edit_access_right_id) MATCH FULL ON DELETE CASCADE ON UPDATE CASCADE,
|
||||||
enabled SMALLINT NOT NULL DEFAULT 0
|
enabled SMALLINT NOT NULL DEFAULT 0
|
||||||
) INHERITS (edit_generic) WITHOUT OIDS;
|
) INHERITS (edit_generic) WITHOUT OIDS;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -8,13 +8,13 @@
|
|||||||
|
|
||||||
-- DROP TABLE edit_page_content;
|
-- DROP TABLE edit_page_content;
|
||||||
CREATE TABLE edit_page_content (
|
CREATE TABLE edit_page_content (
|
||||||
edit_page_content_id SERIAL PRIMARY KEY,
|
edit_page_content_id SERIAL PRIMARY KEY,
|
||||||
edit_page_id INT NOT NULL,
|
edit_page_id INT NOT NULL,
|
||||||
FOREIGN KEY (edit_page_id) REFERENCES edit_page (edit_page_id) MATCH FULL ON DELETE CASCADE ON UPDATE CASCADE,
|
FOREIGN KEY (edit_page_id) REFERENCES edit_page (edit_page_id) MATCH FULL ON DELETE CASCADE ON UPDATE CASCADE,
|
||||||
edit_access_right_id INT NOT NULL,
|
edit_access_right_id INT NOT NULL,
|
||||||
FOREIGN KEY (edit_access_right_id) REFERENCES edit_access_right (edit_access_right_id) MATCH FULL ON DELETE CASCADE ON UPDATE CASCADE,
|
FOREIGN KEY (edit_access_right_id) REFERENCES edit_access_right (edit_access_right_id) MATCH FULL ON DELETE CASCADE ON UPDATE CASCADE,
|
||||||
uid VARCHAR UNIQUE,
|
uid VARCHAR UNIQUE,
|
||||||
name VARCHAR,
|
name VARCHAR,
|
||||||
order_number INT NOT NULL,
|
order_number INT NOT NULL,
|
||||||
online SMALLINT NOT NULL DEFAULT 0
|
online SMALLINT NOT NULL DEFAULT 0
|
||||||
) INHERITS (edit_generic) WITHOUT OIDS;
|
) INHERITS (edit_generic) WITHOUT OIDS;
|
||||||
|
|||||||
@@ -7,8 +7,8 @@
|
|||||||
|
|
||||||
-- DROP TABLE edit_page_menu_group;
|
-- DROP TABLE edit_page_menu_group;
|
||||||
CREATE TABLE edit_page_menu_group (
|
CREATE TABLE edit_page_menu_group (
|
||||||
edit_page_id INT NOT NULL,
|
edit_page_id INT NOT NULL,
|
||||||
FOREIGN KEY (edit_page_id) REFERENCES edit_page (edit_page_id) MATCH FULL ON DELETE CASCADE ON UPDATE CASCADE,
|
FOREIGN KEY (edit_page_id) REFERENCES edit_page (edit_page_id) MATCH FULL ON DELETE CASCADE ON UPDATE CASCADE,
|
||||||
edit_menu_group_id INT NOT NULL,
|
edit_menu_group_id INT NOT NULL,
|
||||||
FOREIGN KEY (edit_menu_group_id) REFERENCES edit_menu_group (edit_menu_group_id) MATCH FULL ON DELETE CASCADE ON UPDATE CASCADE
|
FOREIGN KEY (edit_menu_group_id) REFERENCES edit_menu_group (edit_menu_group_id) MATCH FULL ON DELETE CASCADE ON UPDATE CASCADE
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -7,8 +7,8 @@
|
|||||||
|
|
||||||
-- DROP TABLE edit_page_visible_group;
|
-- DROP TABLE edit_page_visible_group;
|
||||||
CREATE TABLE edit_page_visible_group (
|
CREATE TABLE edit_page_visible_group (
|
||||||
edit_page_id INT NOT NULL,
|
edit_page_id INT NOT NULL,
|
||||||
FOREIGN KEY (edit_page_id) REFERENCES edit_page (edit_page_id) MATCH FULL ON DELETE CASCADE ON UPDATE CASCADE,
|
FOREIGN KEY (edit_page_id) REFERENCES edit_page (edit_page_id) MATCH FULL ON DELETE CASCADE ON UPDATE CASCADE,
|
||||||
edit_visible_group_id INT NOT NULL,
|
edit_visible_group_id INT NOT NULL,
|
||||||
FOREIGN KEY (edit_visible_group_id) REFERENCES edit_visible_group (edit_visible_group_id) MATCH FULL ON DELETE CASCADE ON UPDATE CASCADE
|
FOREIGN KEY (edit_visible_group_id) REFERENCES edit_visible_group (edit_visible_group_id) MATCH FULL ON DELETE CASCADE ON UPDATE CASCADE
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -7,11 +7,11 @@
|
|||||||
|
|
||||||
-- DROP TABLE edit_query_string;
|
-- DROP TABLE edit_query_string;
|
||||||
CREATE TABLE edit_query_string (
|
CREATE TABLE edit_query_string (
|
||||||
edit_query_string_id SERIAL PRIMARY KEY,
|
edit_query_string_id SERIAL PRIMARY KEY,
|
||||||
edit_page_id INT NOT NULL,
|
edit_page_id INT NOT NULL,
|
||||||
FOREIGN KEY (edit_page_id) REFERENCES edit_page (edit_page_id) MATCH FULL ON DELETE CASCADE ON UPDATE CASCADE,
|
FOREIGN KEY (edit_page_id) REFERENCES edit_page (edit_page_id) MATCH FULL ON DELETE CASCADE ON UPDATE CASCADE,
|
||||||
enabled SMALLINT NOT NULL DEFAULT 0,
|
enabled SMALLINT NOT NULL DEFAULT 0,
|
||||||
name VARCHAR,
|
name VARCHAR,
|
||||||
value VARCHAR,
|
value VARCHAR,
|
||||||
dynamic SMALLINT NOT NULL DEFAULT 0
|
dynamic SMALLINT NOT NULL DEFAULT 0
|
||||||
) INHERITS (edit_generic) WITHOUT OIDS;
|
) INHERITS (edit_generic) WITHOUT OIDS;
|
||||||
|
|||||||
@@ -7,10 +7,10 @@
|
|||||||
|
|
||||||
-- DROP TABLE edit_scheme;
|
-- DROP TABLE edit_scheme;
|
||||||
CREATE TABLE edit_scheme (
|
CREATE TABLE edit_scheme (
|
||||||
edit_scheme_id SERIAL PRIMARY KEY,
|
edit_scheme_id SERIAL PRIMARY KEY,
|
||||||
enabled SMALLINT NOT NULL DEFAULT 0,
|
enabled SMALLINT NOT NULL DEFAULT 0,
|
||||||
name VARCHAR,
|
name VARCHAR,
|
||||||
header_color VARCHAR,
|
header_color VARCHAR,
|
||||||
css_file VARCHAR,
|
css_file VARCHAR,
|
||||||
template VARCHAR
|
template VARCHAR
|
||||||
) INHERITS (edit_generic) WITHOUT OIDS;
|
) INHERITS (edit_generic) WITHOUT OIDS;
|
||||||
|
|||||||
@@ -7,6 +7,6 @@
|
|||||||
|
|
||||||
-- DROP TABLE temp_files;
|
-- DROP TABLE temp_files;
|
||||||
CREATE TABLE temp_files (
|
CREATE TABLE temp_files (
|
||||||
filename VARCHAR,
|
filename VARCHAR,
|
||||||
folder VARCHAR
|
folder VARCHAR
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -7,63 +7,63 @@
|
|||||||
|
|
||||||
-- DROP TABLE edit_user;
|
-- DROP TABLE edit_user;
|
||||||
CREATE TABLE edit_user (
|
CREATE TABLE edit_user (
|
||||||
edit_user_id SERIAL PRIMARY KEY,
|
edit_user_id SERIAL PRIMARY KEY,
|
||||||
connect_edit_user_id INT, -- possible reference to other user
|
connect_edit_user_id INT, -- possible reference to other user
|
||||||
FOREIGN KEY (connect_edit_user_id) REFERENCES edit_user (edit_user_id) MATCH FULL ON DELETE CASCADE ON UPDATE CASCADE,
|
FOREIGN KEY (connect_edit_user_id) REFERENCES edit_user (edit_user_id) MATCH FULL ON DELETE CASCADE ON UPDATE CASCADE,
|
||||||
edit_language_id INT NOT NULL,
|
edit_language_id INT NOT NULL,
|
||||||
FOREIGN KEY (edit_language_id) REFERENCES edit_language (edit_language_id) MATCH FULL ON DELETE CASCADE ON UPDATE CASCADE,
|
FOREIGN KEY (edit_language_id) REFERENCES edit_language (edit_language_id) MATCH FULL ON DELETE CASCADE ON UPDATE CASCADE,
|
||||||
edit_group_id INT NOT NULL,
|
edit_group_id INT NOT NULL,
|
||||||
FOREIGN KEY (edit_group_id) REFERENCES edit_group (edit_group_id) MATCH FULL ON DELETE CASCADE ON UPDATE CASCADE,
|
FOREIGN KEY (edit_group_id) REFERENCES edit_group (edit_group_id) MATCH FULL ON DELETE CASCADE ON UPDATE CASCADE,
|
||||||
edit_scheme_id INT,
|
edit_scheme_id INT,
|
||||||
FOREIGN KEY (edit_scheme_id) REFERENCES edit_scheme (edit_scheme_id) MATCH FULL ON DELETE CASCADE ON UPDATE CASCADE,
|
FOREIGN KEY (edit_scheme_id) REFERENCES edit_scheme (edit_scheme_id) MATCH FULL ON DELETE CASCADE ON UPDATE CASCADE,
|
||||||
edit_access_right_id INT NOT NULL,
|
edit_access_right_id INT NOT NULL,
|
||||||
FOREIGN KEY (edit_access_right_id) REFERENCES edit_access_right (edit_access_right_id) MATCH FULL ON DELETE CASCADE ON UPDATE CASCADE,
|
FOREIGN KEY (edit_access_right_id) REFERENCES edit_access_right (edit_access_right_id) MATCH FULL ON DELETE CASCADE ON UPDATE CASCADE,
|
||||||
-- username/password
|
-- username/password
|
||||||
username VARCHAR UNIQUE,
|
username VARCHAR UNIQUE,
|
||||||
password VARCHAR,
|
password VARCHAR,
|
||||||
-- name block
|
-- name block
|
||||||
first_name VARCHAR,
|
first_name VARCHAR,
|
||||||
last_name VARCHAR,
|
last_name VARCHAR,
|
||||||
first_name_furigana VARCHAR,
|
first_name_furigana VARCHAR,
|
||||||
last_name_furigana VARCHAR,
|
last_name_furigana VARCHAR,
|
||||||
-- email
|
-- email
|
||||||
email VARCHAR,
|
email VARCHAR,
|
||||||
-- eanbled/deleted flag
|
-- eanbled/deleted flag
|
||||||
enabled SMALLINT NOT NULL DEFAULT 0,
|
enabled SMALLINT NOT NULL DEFAULT 0,
|
||||||
deleted SMALLINT NOT NULL DEFAULT 0,
|
deleted SMALLINT NOT NULL DEFAULT 0,
|
||||||
-- general flags
|
-- general flags
|
||||||
strict SMALLINT DEFAULT 0,
|
strict SMALLINT DEFAULT 0,
|
||||||
locked SMALLINT DEFAULT 0,
|
locked SMALLINT DEFAULT 0,
|
||||||
protected SMALLINT NOT NULL DEFAULT 0,
|
protected SMALLINT NOT NULL DEFAULT 0,
|
||||||
-- legacy, debug flags
|
-- legacy, debug flags
|
||||||
debug SMALLINT NOT NULL DEFAULT 0,
|
debug SMALLINT NOT NULL DEFAULT 0,
|
||||||
db_debug SMALLINT NOT NULL DEFAULT 0,
|
db_debug SMALLINT NOT NULL DEFAULT 0,
|
||||||
-- is admin user
|
-- is admin user
|
||||||
admin SMALLINT NOT NULL DEFAULT 0,
|
admin SMALLINT NOT NULL DEFAULT 0,
|
||||||
-- last login log
|
-- last login log
|
||||||
last_login TIMESTAMP WITHOUT TIME ZONE,
|
last_login TIMESTAMP WITHOUT TIME ZONE,
|
||||||
-- login error
|
-- login error
|
||||||
login_error_count INT DEFAULT 0,
|
login_error_count INT DEFAULT 0,
|
||||||
login_error_date_last TIMESTAMP WITHOUT TIME ZONE,
|
login_error_date_last TIMESTAMP WITHOUT TIME ZONE,
|
||||||
login_error_date_first TIMESTAMP WITHOUT TIME ZONE,
|
login_error_date_first TIMESTAMP WITHOUT TIME ZONE,
|
||||||
-- time locked
|
-- time locked
|
||||||
lock_until TIMESTAMP WITHOUT TIME ZONE,
|
lock_until TIMESTAMP WITHOUT TIME ZONE,
|
||||||
lock_after TIMESTAMP WITHOUT TIME ZONE,
|
lock_after TIMESTAMP WITHOUT TIME ZONE,
|
||||||
-- password change
|
-- password change
|
||||||
password_change_date TIMESTAMP WITHOUT TIME ZONE, -- only when password is first set or changed
|
password_change_date TIMESTAMP WITHOUT TIME ZONE, -- only when password is first set or changed
|
||||||
password_change_interval INTERVAL, -- null if no change is needed, or d/m/y time interval
|
password_change_interval INTERVAL, -- null if no change is needed, or d/m/y time interval
|
||||||
password_reset_time TIMESTAMP WITHOUT TIME ZONE, -- when the password reset was requested
|
password_reset_time TIMESTAMP WITHOUT TIME ZONE, -- when the password reset was requested
|
||||||
password_reset_uid VARCHAR, -- the uid to access the password reset page
|
password_reset_uid VARCHAR, -- the uid to access the password reset page
|
||||||
-- _GET login id for direct login
|
-- _GET login id for direct login
|
||||||
login_user_id VARCHAR UNIQUE, -- the loginUserId, at least 32 chars
|
login_user_id VARCHAR UNIQUE, -- the loginUserId, at least 32 chars
|
||||||
login_user_id_set_date TIMESTAMP WITHOUT TIME ZONE, -- when above uid was set
|
login_user_id_set_date TIMESTAMP WITHOUT TIME ZONE, -- when above uid was set
|
||||||
login_user_id_last_revalidate TIMESTAMP WITHOUT TIME ZONE, -- when the last login was done with user name and password
|
login_user_id_last_revalidate TIMESTAMP WITHOUT TIME ZONE, -- when the last login was done with user name and password
|
||||||
login_user_id_valid_from TIMESTAMP WITHOUT TIME ZONE, -- if set, from when the above uid is valid
|
login_user_id_valid_from TIMESTAMP WITHOUT TIME ZONE, -- if set, from when the above uid is valid
|
||||||
login_user_id_valid_until TIMESTAMP WITHOUT TIME ZONE, -- if set, until when the above uid is valid
|
login_user_id_valid_until TIMESTAMP WITHOUT TIME ZONE, -- if set, until when the above uid is valid
|
||||||
login_user_id_revalidate_after INTERVAL, -- user must login to revalidated loginUserId after set days, 0 for forever
|
login_user_id_revalidate_after INTERVAL, -- user must login to revalidated loginUserId after set days, 0 for forever
|
||||||
login_user_id_locked SMALLINT DEFAULT 0, -- lock for loginUserId, but still allow normal login
|
login_user_id_locked SMALLINT DEFAULT 0, -- lock for loginUserId, but still allow normal login
|
||||||
-- additional ACL json block
|
-- additional ACL json block
|
||||||
additional_acl JSONB -- additional ACL as JSON string (can be set by other pages)
|
additional_acl JSONB -- additional ACL as JSON string (can be set by other pages)
|
||||||
) INHERITS (edit_generic) WITHOUT OIDS;
|
) INHERITS (edit_generic) WITHOUT OIDS;
|
||||||
|
|
||||||
-- create unique index
|
-- create unique index
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
-- DROP TABLE edit_visible_group;
|
-- DROP TABLE edit_visible_group;
|
||||||
CREATE TABLE edit_visible_group (
|
CREATE TABLE edit_visible_group (
|
||||||
edit_visible_group_id SERIAL PRIMARY KEY,
|
edit_visible_group_id SERIAL PRIMARY KEY,
|
||||||
name VARCHAR,
|
name VARCHAR,
|
||||||
flag VARCHAR
|
flag VARCHAR
|
||||||
) INHERITS (edit_generic) WITHOUT OIDS;
|
) INHERITS (edit_generic) WITHOUT OIDS;
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
-- DROP TABLE generic;
|
-- DROP TABLE generic;
|
||||||
CREATE TABLE generic (
|
CREATE TABLE generic (
|
||||||
date_created TIMESTAMP WITHOUT TIME ZONE DEFAULT clock_timestamp(),
|
date_created TIMESTAMP WITHOUT TIME ZONE DEFAULT clock_timestamp(),
|
||||||
date_updated TIMESTAMP WITHOUT TIME ZONE,
|
date_updated TIMESTAMP WITHOUT TIME ZONE,
|
||||||
uid VARCHAR
|
uid VARCHAR
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ use PHPUnit\Framework\TestCase;
|
|||||||
*/
|
*/
|
||||||
final class CoreLibsConvertByteTest extends TestCase
|
final class CoreLibsConvertByteTest extends TestCase
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Undocumented function
|
* Undocumented function
|
||||||
*
|
*
|
||||||
@@ -24,7 +23,31 @@ final class CoreLibsConvertByteTest extends TestCase
|
|||||||
*/
|
*/
|
||||||
public function byteProvider(): array
|
public function byteProvider(): array
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
|
* 0: input string
|
||||||
|
* 1: default flags
|
||||||
|
* 2: BYTE_FORMAT_SI
|
||||||
|
* 3: BYTE_FORMAT_NOSPACE
|
||||||
|
* 4: BYTE_FORMAT_ADJUST
|
||||||
|
* 5: BYTE_FORMAT_SI | BYTE_FORMAT_NOSPACE
|
||||||
|
*/
|
||||||
return [
|
return [
|
||||||
|
'string number' => [
|
||||||
|
0 => '1024',
|
||||||
|
1 => '1 KB',
|
||||||
|
2 => '1.02 KiB',
|
||||||
|
3 => '1KB',
|
||||||
|
4 => '1.00 KB',
|
||||||
|
5 => '1.02KiB',
|
||||||
|
],
|
||||||
|
'invalud string number' => [
|
||||||
|
0 => '1024 MB',
|
||||||
|
1 => '1024 MB',
|
||||||
|
2 => '1024 MB',
|
||||||
|
3 => '1024 MB',
|
||||||
|
4 => '1024 MB',
|
||||||
|
5 => '1024 MB',
|
||||||
|
],
|
||||||
'negative number' => [
|
'negative number' => [
|
||||||
0 => -123123123,
|
0 => -123123123,
|
||||||
1 => '-117.42 MB',
|
1 => '-117.42 MB',
|
||||||
|
|||||||
@@ -113,7 +113,10 @@ final class CoreLibsCreateEmailTest extends TestCase
|
|||||||
'日本語カタカナパ',
|
'日本語カタカナパ',
|
||||||
'ISO-2022-JP',
|
'ISO-2022-JP',
|
||||||
true,
|
true,
|
||||||
'"=?ISO-2022-JP?B?GyRCRnxLXDhsGyhCPz8/Pz8=?=" <test@test.com>'
|
// was ok php 8.1
|
||||||
|
// '"=?ISO-2022-JP?B?GyRCRnxLXDhsGyhCPz8/Pz8=?=" <test@test.com>'
|
||||||
|
// below ok php 8.1.12, 2022/12/9
|
||||||
|
'"=?ISO-2022-JP?B?GyRCRnxLXDhsGyhCPz8/Pz8/?=" <test@test.com>'
|
||||||
]
|
]
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
@@ -124,6 +127,11 @@ final class CoreLibsCreateEmailTest extends TestCase
|
|||||||
* @dataProvider encodeEmailNameProvider
|
* @dataProvider encodeEmailNameProvider
|
||||||
* @testdox encode email $email, name $name, encoding $encoding, folding $kv_folding will be $expected [$_dataName]
|
* @testdox encode email $email, name $name, encoding $encoding, folding $kv_folding will be $expected [$_dataName]
|
||||||
*
|
*
|
||||||
|
* @param string $email
|
||||||
|
* @param string|null $name
|
||||||
|
* @param string|null $encoding
|
||||||
|
* @param bool|null $kv_folding
|
||||||
|
* @param string $expected
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testEncodeEmailName(
|
public function testEncodeEmailName(
|
||||||
|
|||||||
@@ -1189,7 +1189,13 @@ final class CoreLibsDBIOTest extends TestCase
|
|||||||
|
|
||||||
$this->assertEquals(
|
$this->assertEquals(
|
||||||
$expected,
|
$expected,
|
||||||
$db->dbEscapeBytea($input)
|
$db->dbEscapeBytea($input),
|
||||||
|
'Assert error to bytea'
|
||||||
|
);
|
||||||
|
$this->assertEquals(
|
||||||
|
$input,
|
||||||
|
$db->dbUnescapeBytea($expected),
|
||||||
|
'Assert error from bytes'
|
||||||
);
|
);
|
||||||
|
|
||||||
$db->dbClose();
|
$db->dbClose();
|
||||||
|
|||||||
@@ -26,22 +26,22 @@ CREATE OR REPLACE FUNCTION set_login_user_id_set_date()
|
|||||||
RETURNS TRIGGER AS
|
RETURNS TRIGGER AS
|
||||||
$$
|
$$
|
||||||
BEGIN
|
BEGIN
|
||||||
-- if new is not null/empty
|
-- if new is not null/empty
|
||||||
-- and old one is null or old one different new one
|
-- and old one is null or old one different new one
|
||||||
-- set NOW()
|
-- set NOW()
|
||||||
-- if new one is NULL
|
-- if new one is NULL
|
||||||
-- set NULL
|
-- set NULL
|
||||||
IF
|
IF
|
||||||
NEW.login_user_id IS NOT NULL AND NEW.login_user_id <> '' AND
|
NEW.login_user_id IS NOT NULL AND NEW.login_user_id <> '' AND
|
||||||
(OLD.login_user_id IS NULL OR NEW.login_user_id <> OLD.login_user_id)
|
(OLD.login_user_id IS NULL OR NEW.login_user_id <> OLD.login_user_id)
|
||||||
THEN
|
THEN
|
||||||
NEW.login_user_id_set_date = NOW();
|
NEW.login_user_id_set_date = NOW();
|
||||||
NEW.login_user_id_last_revalidate = NOW();
|
NEW.login_user_id_last_revalidate = NOW();
|
||||||
ELSIF NEW.login_user_id IS NULL OR NEW.login_user_id = '' THEN
|
ELSIF NEW.login_user_id IS NULL OR NEW.login_user_id = '' THEN
|
||||||
NEW.login_user_id_set_date = NULL;
|
NEW.login_user_id_set_date = NULL;
|
||||||
NEW.login_user_id_last_revalidate = NULL;
|
NEW.login_user_id_last_revalidate = NULL;
|
||||||
END IF;
|
END IF;
|
||||||
RETURN NEW;
|
RETURN NEW;
|
||||||
END;
|
END;
|
||||||
$$
|
$$
|
||||||
LANGUAGE 'plpgsql';
|
LANGUAGE 'plpgsql';
|
||||||
|
|||||||
@@ -19,5 +19,4 @@ lib/CoreLibs/DB/Extended/ArrayIO.php
|
|||||||
lib/CoreLibs/Convert/MimeEncode.php
|
lib/CoreLibs/Convert/MimeEncode.php
|
||||||
lib/CoreLibs/Create/Email.php
|
lib/CoreLibs/Create/Email.php
|
||||||
lib/CoreLibs/Output/Form/Generate.php
|
lib/CoreLibs/Output/Form/Generate.php
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -50,21 +50,22 @@ print '<div><h1>' . $PAGE_NAME . '</h1></div>';
|
|||||||
$byte = 254779258;
|
$byte = 254779258;
|
||||||
$string = '242.98 MB';
|
$string = '242.98 MB';
|
||||||
// static
|
// static
|
||||||
print "S::BYTE TO: $byte: " . $byte_class::humanReadableByteFormat($byte) . "<br>";
|
print "S::BYTE TO (calls as var): $byte: " . $byte_class::humanReadableByteFormat($byte) . "<br>";
|
||||||
print "S::BYTE TO: $byte: " . $byte_class::humanReadableByteFormat($byte, Byte::BYTE_FORMAT_SI) . "<br>";
|
print "S::BYTE TO: $byte: " . Byte::humanReadableByteFormat($byte) . "<br>";
|
||||||
print "S::BYTE TO: $byte: " . $byte_class::humanReadableByteFormat($byte, Byte::BYTE_FORMAT_ADJUST) . "<br>";
|
print "S::BYTE TO: $byte: " . Byte::humanReadableByteFormat($byte, Byte::BYTE_FORMAT_SI) . "<br>";
|
||||||
print "S::BYTE TO: $byte: " . $byte_class::humanReadableByteFormat($byte, Byte::BYTE_FORMAT_NOSPACE) . "<br>";
|
print "S::BYTE TO: $byte: " . Byte::humanReadableByteFormat($byte, Byte::BYTE_FORMAT_ADJUST) . "<br>";
|
||||||
print "S::BYTE FROM: $string: " . $byte_class::stringByteFormat($string) . "<br>";
|
print "S::BYTE TO: $byte: " . Byte::humanReadableByteFormat($byte, Byte::BYTE_FORMAT_NOSPACE) . "<br>";
|
||||||
|
print "S::BYTE FROM: $string: " . Byte::stringByteFormat($string) . "<br>";
|
||||||
//
|
//
|
||||||
$byte = 314572800;
|
$byte = 314572800;
|
||||||
$string = '300 MB';
|
$string = '300 MB';
|
||||||
print "S::BYTE TO: $byte: " . $byte_class::humanReadableByteFormat($byte) . "<br>";
|
print "S::BYTE TO: $byte: " . Byte::humanReadableByteFormat($byte) . "<br>";
|
||||||
print "S::BYTE TO: $byte: " . $byte_class::humanReadableByteFormat($byte, Byte::BYTE_FORMAT_SI) . "<br>";
|
print "S::BYTE TO: $byte: " . Byte::humanReadableByteFormat($byte, Byte::BYTE_FORMAT_SI) . "<br>";
|
||||||
print "S::BYTE TO: $byte: " . $byte_class::humanReadableByteFormat($byte, Byte::BYTE_FORMAT_ADJUST) . "<br>";
|
print "S::BYTE TO: $byte: " . Byte::humanReadableByteFormat($byte, Byte::BYTE_FORMAT_ADJUST) . "<br>";
|
||||||
print "S::BYTE TO: $byte: "
|
print "S::BYTE TO: $byte: "
|
||||||
. $byte_class::humanReadableByteFormat($byte, Byte::BYTE_FORMAT_ADJUST | Byte::BYTE_FORMAT_NOSPACE) . "<br>";
|
. Byte::humanReadableByteFormat($byte, Byte::BYTE_FORMAT_ADJUST | Byte::BYTE_FORMAT_NOSPACE) . "<br>";
|
||||||
print "S::BYTE TO: $byte: " . $byte_class::humanReadableByteFormat($byte, Byte::BYTE_FORMAT_NOSPACE) . "<br>";
|
print "S::BYTE TO: $byte: " . Byte::humanReadableByteFormat($byte, Byte::BYTE_FORMAT_NOSPACE) . "<br>";
|
||||||
print "S::BYTE FROM: $string: " . $byte_class::stringByteFormat($string) . "<br>";
|
print "S::BYTE FROM: $string: " . Byte::stringByteFormat($string) . "<br>";
|
||||||
|
|
||||||
// *** BYTES TEST ***
|
// *** BYTES TEST ***
|
||||||
$bytes = [
|
$bytes = [
|
||||||
|
|||||||
60
www/composer.lock
generated
60
www/composer.lock
generated
@@ -623,16 +623,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "phpunit/phpunit",
|
"name": "phpunit/phpunit",
|
||||||
"version": "9.5.24",
|
"version": "9.5.25",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/sebastianbergmann/phpunit.git",
|
"url": "https://github.com/sebastianbergmann/phpunit.git",
|
||||||
"reference": "d0aa6097bef9fd42458a9b3c49da32c6ce6129c5"
|
"reference": "3e6f90ca7e3d02025b1d147bd8d4a89fd4ca8a1d"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/d0aa6097bef9fd42458a9b3c49da32c6ce6129c5",
|
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/3e6f90ca7e3d02025b1d147bd8d4a89fd4ca8a1d",
|
||||||
"reference": "d0aa6097bef9fd42458a9b3c49da32c6ce6129c5",
|
"reference": "3e6f90ca7e3d02025b1d147bd8d4a89fd4ca8a1d",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -654,14 +654,14 @@
|
|||||||
"phpunit/php-timer": "^5.0.2",
|
"phpunit/php-timer": "^5.0.2",
|
||||||
"sebastian/cli-parser": "^1.0.1",
|
"sebastian/cli-parser": "^1.0.1",
|
||||||
"sebastian/code-unit": "^1.0.6",
|
"sebastian/code-unit": "^1.0.6",
|
||||||
"sebastian/comparator": "^4.0.5",
|
"sebastian/comparator": "^4.0.8",
|
||||||
"sebastian/diff": "^4.0.3",
|
"sebastian/diff": "^4.0.3",
|
||||||
"sebastian/environment": "^5.1.3",
|
"sebastian/environment": "^5.1.3",
|
||||||
"sebastian/exporter": "^4.0.3",
|
"sebastian/exporter": "^4.0.5",
|
||||||
"sebastian/global-state": "^5.0.1",
|
"sebastian/global-state": "^5.0.1",
|
||||||
"sebastian/object-enumerator": "^4.0.3",
|
"sebastian/object-enumerator": "^4.0.3",
|
||||||
"sebastian/resource-operations": "^3.0.3",
|
"sebastian/resource-operations": "^3.0.3",
|
||||||
"sebastian/type": "^3.1",
|
"sebastian/type": "^3.2",
|
||||||
"sebastian/version": "^3.0.2"
|
"sebastian/version": "^3.0.2"
|
||||||
},
|
},
|
||||||
"suggest": {
|
"suggest": {
|
||||||
@@ -705,7 +705,7 @@
|
|||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/sebastianbergmann/phpunit/issues",
|
"issues": "https://github.com/sebastianbergmann/phpunit/issues",
|
||||||
"source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.24"
|
"source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.25"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
@@ -715,9 +715,13 @@
|
|||||||
{
|
{
|
||||||
"url": "https://github.com/sebastianbergmann",
|
"url": "https://github.com/sebastianbergmann",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://tidelift.com/funding/github/packagist/phpunit/phpunit",
|
||||||
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2022-08-30T07:42:16+00:00"
|
"time": "2022-09-25T03:44:45+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "sebastian/cli-parser",
|
"name": "sebastian/cli-parser",
|
||||||
@@ -888,16 +892,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "sebastian/comparator",
|
"name": "sebastian/comparator",
|
||||||
"version": "4.0.6",
|
"version": "4.0.8",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/sebastianbergmann/comparator.git",
|
"url": "https://github.com/sebastianbergmann/comparator.git",
|
||||||
"reference": "55f4261989e546dc112258c7a75935a81a7ce382"
|
"reference": "fa0f136dd2334583309d32b62544682ee972b51a"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/55f4261989e546dc112258c7a75935a81a7ce382",
|
"url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/fa0f136dd2334583309d32b62544682ee972b51a",
|
||||||
"reference": "55f4261989e546dc112258c7a75935a81a7ce382",
|
"reference": "fa0f136dd2334583309d32b62544682ee972b51a",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -950,7 +954,7 @@
|
|||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/sebastianbergmann/comparator/issues",
|
"issues": "https://github.com/sebastianbergmann/comparator/issues",
|
||||||
"source": "https://github.com/sebastianbergmann/comparator/tree/4.0.6"
|
"source": "https://github.com/sebastianbergmann/comparator/tree/4.0.8"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
@@ -958,7 +962,7 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2020-10-26T15:49:45+00:00"
|
"time": "2022-09-14T12:41:17+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "sebastian/complexity",
|
"name": "sebastian/complexity",
|
||||||
@@ -1148,16 +1152,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "sebastian/exporter",
|
"name": "sebastian/exporter",
|
||||||
"version": "4.0.4",
|
"version": "4.0.5",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/sebastianbergmann/exporter.git",
|
"url": "https://github.com/sebastianbergmann/exporter.git",
|
||||||
"reference": "65e8b7db476c5dd267e65eea9cab77584d3cfff9"
|
"reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/65e8b7db476c5dd267e65eea9cab77584d3cfff9",
|
"url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d",
|
||||||
"reference": "65e8b7db476c5dd267e65eea9cab77584d3cfff9",
|
"reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -1213,7 +1217,7 @@
|
|||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/sebastianbergmann/exporter/issues",
|
"issues": "https://github.com/sebastianbergmann/exporter/issues",
|
||||||
"source": "https://github.com/sebastianbergmann/exporter/tree/4.0.4"
|
"source": "https://github.com/sebastianbergmann/exporter/tree/4.0.5"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
@@ -1221,7 +1225,7 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2021-11-11T14:18:36+00:00"
|
"time": "2022-09-14T06:03:37+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "sebastian/global-state",
|
"name": "sebastian/global-state",
|
||||||
@@ -1576,16 +1580,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "sebastian/type",
|
"name": "sebastian/type",
|
||||||
"version": "3.1.0",
|
"version": "3.2.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/sebastianbergmann/type.git",
|
"url": "https://github.com/sebastianbergmann/type.git",
|
||||||
"reference": "fb44e1cc6e557418387ad815780360057e40753e"
|
"reference": "fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/sebastianbergmann/type/zipball/fb44e1cc6e557418387ad815780360057e40753e",
|
"url": "https://api.github.com/repos/sebastianbergmann/type/zipball/fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e",
|
||||||
"reference": "fb44e1cc6e557418387ad815780360057e40753e",
|
"reference": "fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -1597,7 +1601,7 @@
|
|||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
"branch-alias": {
|
"branch-alias": {
|
||||||
"dev-master": "3.1-dev"
|
"dev-master": "3.2-dev"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
@@ -1620,7 +1624,7 @@
|
|||||||
"homepage": "https://github.com/sebastianbergmann/type",
|
"homepage": "https://github.com/sebastianbergmann/type",
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/sebastianbergmann/type/issues",
|
"issues": "https://github.com/sebastianbergmann/type/issues",
|
||||||
"source": "https://github.com/sebastianbergmann/type/tree/3.1.0"
|
"source": "https://github.com/sebastianbergmann/type/tree/3.2.0"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
@@ -1628,7 +1632,7 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2022-08-29T06:55:37+00:00"
|
"time": "2022-09-12T14:47:03+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "sebastian/version",
|
"name": "sebastian/version",
|
||||||
|
|||||||
@@ -249,7 +249,7 @@ if ($is_secure) {
|
|||||||
define('HOST_PROTOCOL', 'http://');
|
define('HOST_PROTOCOL', 'http://');
|
||||||
}
|
}
|
||||||
// define the db config set name, the db config and the db schema
|
// define the db config set name, the db config and the db schema
|
||||||
define('DB_CONFIG_NAME', $SITE_CONFIG[HOST_NAME]['db_host']);
|
define('DB_CONFIG_NAME', $SITE_CONFIG[HOST_NAME]['db_host'] ?? '');
|
||||||
define('DB_CONFIG', $DB_CONFIG[DB_CONFIG_NAME] ?? []);
|
define('DB_CONFIG', $DB_CONFIG[DB_CONFIG_NAME] ?? []);
|
||||||
// because we can't change constant, but we want to for db debug flag
|
// because we can't change constant, but we want to for db debug flag
|
||||||
$GLOBALS['DB_CONFIG_SET'] = DB_CONFIG;
|
$GLOBALS['DB_CONFIG_SET'] = DB_CONFIG;
|
||||||
@@ -268,9 +268,9 @@ define('SITE_ENCODING', $SITE_CONFIG[HOST_NAME]['site_encoding'] ?? DEFAULT_ENCO
|
|||||||
define('LOGIN_ENABLED', $SITE_CONFIG[HOST_NAME]['login_enabled'] ?? false);
|
define('LOGIN_ENABLED', $SITE_CONFIG[HOST_NAME]['login_enabled'] ?? false);
|
||||||
define('AUTH', $SITE_CONFIG[HOST_NAME]['auth'] ?? false);
|
define('AUTH', $SITE_CONFIG[HOST_NAME]['auth'] ?? false);
|
||||||
// paths
|
// paths
|
||||||
// define('CSV_PATH', $PATHS[TARGET]['csv_path']);
|
// define('CSV_PATH', $PATHS[TARGET]['csv_path'] ?? '');
|
||||||
// define('EXPORT_SCRIPT', $PATHS[TARGET]['perl_bin']);
|
// define('EXPORT_SCRIPT', $PATHS[TARGET]['perl_bin'] ?? '');
|
||||||
// define('REDIRECT_URL', $PATHS[TARGET]['redirect_url']);
|
// define('REDIRECT_URL', $PATHS[TARGET]['redirect_url'] ?? '');
|
||||||
|
|
||||||
// show all errors if debug_all & show_error_handling are enabled
|
// show all errors if debug_all & show_error_handling are enabled
|
||||||
define('SHOW_ALL_ERRORS', true);
|
define('SHOW_ALL_ERRORS', true);
|
||||||
|
|||||||
@@ -112,10 +112,11 @@ if (defined('LAYOUT')) {
|
|||||||
}
|
}
|
||||||
// set table width
|
// set table width
|
||||||
$table_width = '100%';
|
$table_width = '100%';
|
||||||
|
$ADMIN_STYLESHEET = 'edit.css';
|
||||||
// define all needed smarty stuff for the general HTML/page building
|
// define all needed smarty stuff for the general HTML/page building
|
||||||
$HEADER['CSS'] = CSS;
|
$HEADER['CSS'] = CSS;
|
||||||
$HEADER['DEFAULT_ENCODING'] = DEFAULT_ENCODING;
|
$HEADER['DEFAULT_ENCODING'] = DEFAULT_ENCODING;
|
||||||
|
/** @phpstan-ignore-next-line because ADMIN_STYLESHEET can be null */
|
||||||
$HEADER['STYLESHEET'] = $ADMIN_STYLESHEET ?? ADMIN_STYLESHEET;
|
$HEADER['STYLESHEET'] = $ADMIN_STYLESHEET ?? ADMIN_STYLESHEET;
|
||||||
|
|
||||||
if ($form->my_page_name == 'edit_order') {
|
if ($form->my_page_name == 'edit_order') {
|
||||||
@@ -457,6 +458,8 @@ if ($form->my_page_name == 'edit_order') {
|
|||||||
$pathinfo = pathinfo($output_file);
|
$pathinfo = pathinfo($output_file);
|
||||||
if (!empty($pathinfo['dirname'])) {
|
if (!empty($pathinfo['dirname'])) {
|
||||||
$pathinfo['dirname'] .= DIRECTORY_SEPARATOR;
|
$pathinfo['dirname'] .= DIRECTORY_SEPARATOR;
|
||||||
|
} else {
|
||||||
|
$pathinfo['dirname'] = '';
|
||||||
}
|
}
|
||||||
if ($t_q) {
|
if ($t_q) {
|
||||||
$t_q .= ', ';
|
$t_q .= ', ';
|
||||||
|
|||||||
@@ -159,9 +159,9 @@ input[type="text"]:focus, textarea:focus, select:focus {
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.warning {
|
.warning, .warn {
|
||||||
border: 1px solid #df7700;
|
border: 1px solid #ffa947;
|
||||||
color: #d57200;
|
color: #ffa947;
|
||||||
margin: 5px;
|
margin: 5px;
|
||||||
padding: 2px;
|
padding: 2px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
@@ -181,8 +181,8 @@ input[type="text"]:focus, textarea:focus, select:focus {
|
|||||||
margin-top: 1px;
|
margin-top: 1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.div_warning {
|
.div_warning, .div_warn {
|
||||||
border: 1px solid #df7700;
|
border: 1px solid #ffa947;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* borders */
|
/* borders */
|
||||||
|
|||||||
@@ -974,7 +974,7 @@ function phfo(tree)
|
|||||||
if (tree.id) {
|
if (tree.id) {
|
||||||
line += ' id="' + tree.id + '"';
|
line += ' id="' + tree.id + '"';
|
||||||
// if anything input (input, textarea, select then add name too)
|
// if anything input (input, textarea, select then add name too)
|
||||||
if (['input', 'textarea', 'select'].includes(tree.tag)) {
|
if (['input', 'textarea', 'select', 'button'].includes(tree.tag)) {
|
||||||
line += ' name="' + (tree.name ? tree.name : tree.id) + '"';
|
line += ' name="' + (tree.name ? tree.name : tree.id) + '"';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1329,11 +1329,12 @@ function createLoginRow(login_string, header_id = 'mainHeader') // eslint-disabl
|
|||||||
}
|
}
|
||||||
// clear out just in case for first entry
|
// clear out just in case for first entry
|
||||||
// fill with div name & login/logout button
|
// fill with div name & login/logout button
|
||||||
$('#loginRow').html(phfo(cel('div', '', login_string)));
|
$('#loginRow').html(phfo(cel('div', 'loginRow-name', login_string)));
|
||||||
|
$('#loginRow').append(phfo(cel('div', 'loginRow-info', '')));
|
||||||
$('#loginRow').append(phfo(
|
$('#loginRow').append(phfo(
|
||||||
aelx(
|
aelx(
|
||||||
// outer div
|
// outer div
|
||||||
cel('div'),
|
cel('div', 'loginRow-logout'),
|
||||||
// inner element
|
// inner element
|
||||||
cel('input', 'logout', '', [], {
|
cel('input', 'logout', '', [], {
|
||||||
value: __('Logout'),
|
value: __('Logout'),
|
||||||
@@ -1386,6 +1387,8 @@ function createNavMenu(nav_menu, header_id = 'mainHeader') // eslint-disable-lin
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
$('#menuRow').html(content.join(''));
|
$('#menuRow').html(content.join(''));
|
||||||
|
} else {
|
||||||
|
$('#menuRow').hide();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ class Basic
|
|||||||
// logging interface, Debug\Logging class
|
// logging interface, Debug\Logging class
|
||||||
/** @var \CoreLibs\Debug\Logging */
|
/** @var \CoreLibs\Debug\Logging */
|
||||||
public $log;
|
public $log;
|
||||||
/** @var\CoreLibs\Create\Session */
|
/** @var \CoreLibs\Create\Session */
|
||||||
public $session;
|
public $session;
|
||||||
|
|
||||||
// email valid checks
|
// email valid checks
|
||||||
|
|||||||
@@ -312,16 +312,17 @@ class DateTime
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* plits & checks date, wrap around for check_date function
|
* compares two dates, tries to convert them via strtotime to timestamps
|
||||||
* returns int in:
|
* returns int/bool in:
|
||||||
* -1 if the first date is smaller the last
|
* -1 if the first date is smaller the last
|
||||||
* 0 if both are equal
|
* 0 if both are equal
|
||||||
* 1 if the first date is bigger than the last
|
* 1 if the first date is bigger than the last
|
||||||
* false (bool): error
|
* false if date validation/conversion failed
|
||||||
*
|
*
|
||||||
* @param string $start_date start date string in YYYY-MM-DD
|
* @param string $start_date start date string in YYYY-MM-DD
|
||||||
* @param string $end_date end date string in YYYY-MM-DD
|
* @param string $end_date end date string in YYYY-MM-DD
|
||||||
* @return int|bool false on error, or int -1/0/1 as difference
|
* @return int|bool false on error
|
||||||
|
* or int -1 (s<e)/0 (s=e)/1 (s>e) as difference
|
||||||
*/
|
*/
|
||||||
public static function compareDate($start_date, $end_date)
|
public static function compareDate($start_date, $end_date)
|
||||||
{
|
{
|
||||||
@@ -354,16 +355,17 @@ class DateTime
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* compares the two dates + times. if seconds missing in one set,
|
* compares the two dates + times. if seconds missing in one set,
|
||||||
* add :00, converts / to -
|
* adds :00, converts date + times via strtotime to timestamps
|
||||||
* returns int/bool in:
|
* returns int/bool in:
|
||||||
* -1 if the first date is smaller the last
|
* -1 if the first date is smaller the last
|
||||||
* 0 if both are equal
|
* 0 if both are equal
|
||||||
* 1 if the first date is bigger than the last
|
* 1 if the first date is bigger than the last
|
||||||
* false if no valid date/times chould be found
|
* false if date/times validation/conversion failed
|
||||||
*
|
*
|
||||||
* @param string $start_datetime start date/time in YYYY-MM-DD HH:mm:ss
|
* @param string $start_datetime start date/time in YYYY-MM-DD HH:mm:ss
|
||||||
* @param string $end_datetime end date/time in YYYY-MM-DD HH:mm:ss
|
* @param string $end_datetime end date/time in YYYY-MM-DD HH:mm:ss
|
||||||
* @return int|bool false for error or -1/0/1 as difference
|
* @return int|bool false for error
|
||||||
|
* or -1 (s<e)/0 (s=e)/1 (s>e) as difference
|
||||||
*/
|
*/
|
||||||
public static function compareDateTime($start_datetime, $end_datetime)
|
public static function compareDateTime($start_datetime, $end_datetime)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -26,13 +26,16 @@ class Byte
|
|||||||
* Source Idea: SOURCE: https://programming.guide/worlds-most-copied-so-snippet.html
|
* Source Idea: SOURCE: https://programming.guide/worlds-most-copied-so-snippet.html
|
||||||
*
|
*
|
||||||
* The class itself hast the following defined
|
* The class itself hast the following defined
|
||||||
* BYTE_FORMAT_NOSPACE [1] turn off spaces between number and extension
|
* BYTE_FORMAT_NOSPACE [1] turn off spaces between number and suffix
|
||||||
* BYTE_FORMAT_ADJUST [2] use sprintf to always print two decimals
|
* BYTE_FORMAT_ADJUST [2] use sprintf to always print two decimals
|
||||||
* BYTE_FORMAT_SI [3] use si standard 1000 instead of bytes 1024
|
* BYTE_FORMAT_SI [3] use si standard 1000 instead of bytes 1024
|
||||||
* To use the constant from outside use class::CONSTANT
|
* To use the constant from outside use class::CONSTANT
|
||||||
*
|
*
|
||||||
* @param string|int|float $bytes bytes as string int or pure int
|
* @param string|int|float $bytes bytes as string int or pure int
|
||||||
* @param int $flags bitwise flag with use space turned on
|
* @param int $flags bitwise flag with use space turned on
|
||||||
|
* BYTE_FORMAT_NOSPACE: no space between number and suffix
|
||||||
|
* BYTE_FORMAT_ADJUST: sprintf adjusted two 2 decimals
|
||||||
|
* BYTE_FORMAT_SI: use 1000 instead of 1024
|
||||||
* @return string converted byte number (float) with suffix
|
* @return string converted byte number (float) with suffix
|
||||||
*/
|
*/
|
||||||
public static function humanReadableByteFormat($bytes, int $flags = 0): string
|
public static function humanReadableByteFormat($bytes, int $flags = 0): string
|
||||||
@@ -62,7 +65,7 @@ class Byte
|
|||||||
// si or normal
|
// si or normal
|
||||||
$unit = $si ? 1000 : 1024;
|
$unit = $si ? 1000 : 1024;
|
||||||
// always positive
|
// always positive
|
||||||
$abs_bytes = $bytes == PHP_INT_MIN ? PHP_INT_MAX : abs($bytes);
|
$abs_bytes = $bytes == PHP_INT_MIN ? PHP_INT_MAX : abs((float)$bytes);
|
||||||
// smaller than unit is always B
|
// smaller than unit is always B
|
||||||
if ($abs_bytes < $unit) {
|
if ($abs_bytes < $unit) {
|
||||||
return $bytes . 'B';
|
return $bytes . 'B';
|
||||||
@@ -110,6 +113,7 @@ class Byte
|
|||||||
*
|
*
|
||||||
* @param string|int|float $number any string or number to convert
|
* @param string|int|float $number any string or number to convert
|
||||||
* @param int $flags bitwise flag with use space turned on
|
* @param int $flags bitwise flag with use space turned on
|
||||||
|
* BYTE_FORMAT_SI: use 1000 instead of 1024
|
||||||
* @return string|int|float converted value or original value
|
* @return string|int|float converted value or original value
|
||||||
*/
|
*/
|
||||||
public static function stringByteFormat($number, int $flags = 0)
|
public static function stringByteFormat($number, int $flags = 0)
|
||||||
@@ -134,7 +138,7 @@ class Byte
|
|||||||
// remove all non valid characters from the number
|
// remove all non valid characters from the number
|
||||||
$number = preg_replace('/[^0-9\.]/', '', $matches[2]);
|
$number = preg_replace('/[^0-9\.]/', '', $matches[2]);
|
||||||
// final clean up and convert to float
|
// final clean up and convert to float
|
||||||
$number = (float)trim($number);
|
$number = (float)trim((string)$number);
|
||||||
// convert any mb/gb/etc to single m/b
|
// convert any mb/gb/etc to single m/b
|
||||||
$unit = preg_replace('/[^bkmgtpezy]/i', '', $matches[3]);
|
$unit = preg_replace('/[^bkmgtpezy]/i', '', $matches[3]);
|
||||||
if ($unit) {
|
if ($unit) {
|
||||||
|
|||||||
@@ -1481,19 +1481,29 @@ class IO
|
|||||||
* @param string $string string to escape
|
* @param string $string string to escape
|
||||||
* @return string escaped string
|
* @return string escaped string
|
||||||
*/
|
*/
|
||||||
public function dbEscapeIdentifier($string): string
|
public function dbEscapeIdentifier(string $string): string
|
||||||
{
|
{
|
||||||
return $this->db_functions->__dbEscapeIdentifier($string);
|
return $this->db_functions->__dbEscapeIdentifier($string);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* escape data for writing to bytea type column field
|
* escape data for writing to bytea type column field
|
||||||
* @param string $bytea bytea to escape
|
* @param string $data data to escape to bytea
|
||||||
* @return string escaped bytea
|
* @return string escaped bytea string
|
||||||
*/
|
*/
|
||||||
public function dbEscapeBytea($bytea)
|
public function dbEscapeBytea(string $data): string
|
||||||
{
|
{
|
||||||
return $this->db_functions->__dbEscapeBytea($bytea);
|
return $this->db_functions->__dbEscapeBytea($data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* unescape bytea data back to normal binrary data
|
||||||
|
* @param string $bytea bytea data stream
|
||||||
|
* @return string binary data string
|
||||||
|
*/
|
||||||
|
public function dbUnescapeBytea(string $bytea): string
|
||||||
|
{
|
||||||
|
return $this->db_functions->__dbUnescapeBytea($bytea);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1811,6 +1821,7 @@ class IO
|
|||||||
|
|
||||||
// if cursor exists ...
|
// if cursor exists ...
|
||||||
if ($this->cursor_ext[$query_hash]['cursor']) {
|
if ($this->cursor_ext[$query_hash]['cursor']) {
|
||||||
|
/** @phpstan-ignore-next-line claims this is always false, but can be true */
|
||||||
if ($first_call === true) {
|
if ($first_call === true) {
|
||||||
$this->cursor_ext[$query_hash]['log'][] = 'First call';
|
$this->cursor_ext[$query_hash]['log'][] = 'First call';
|
||||||
// count the rows returned (if select)
|
// count the rows returned (if select)
|
||||||
|
|||||||
@@ -559,15 +559,26 @@ class PgSQL implements \CoreLibs\DB\SQL\SqlInterface\SqlFunctions
|
|||||||
/**
|
/**
|
||||||
* wrapper for pg_escape_byte
|
* wrapper for pg_escape_byte
|
||||||
*
|
*
|
||||||
* @param string $bytea bytea data stream
|
* @param string $data data stream
|
||||||
* @return string escaped bytea string
|
* @return string escaped bytea string
|
||||||
*/
|
*/
|
||||||
public function __dbEscapeBytea(string $bytea): string
|
public function __dbEscapeBytea(string $data): string
|
||||||
{
|
{
|
||||||
if ($this->dbh === false || is_bool($this->dbh)) {
|
if ($this->dbh === false || is_bool($this->dbh)) {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
return pg_escape_bytea($this->dbh, $bytea);
|
return pg_escape_bytea($this->dbh, $data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* unescape bytea data from postgesql
|
||||||
|
*
|
||||||
|
* @param string $bytea Bytea data stream
|
||||||
|
* @return string Unescaped bytea data
|
||||||
|
*/
|
||||||
|
public function __dbUnescapeBytea(string $bytea): string
|
||||||
|
{
|
||||||
|
return pg_unescape_bytea($bytea);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -779,7 +790,6 @@ class PgSQL implements \CoreLibs\DB\SQL\SqlInterface\SqlFunctions
|
|||||||
}
|
}
|
||||||
// get result
|
// get result
|
||||||
$db_schema = $this->__dbFetchArray($cursor, PGSQL_ASSOC);
|
$db_schema = $this->__dbFetchArray($cursor, PGSQL_ASSOC);
|
||||||
/** @phpstan-ignore-next-line Cannot access offset string on array|bool */
|
|
||||||
return $db_schema[$show_string] ?? '';
|
return $db_schema[$show_string] ?? '';
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -806,7 +816,6 @@ class PgSQL implements \CoreLibs\DB\SQL\SqlInterface\SqlFunctions
|
|||||||
}
|
}
|
||||||
// check if schema does not exists
|
// check if schema does not exists
|
||||||
$row = $this->__dbFetchArray($cursor, PGSQL_ASSOC);
|
$row = $this->__dbFetchArray($cursor, PGSQL_ASSOC);
|
||||||
/** @phpstan-ignore-next-line */
|
|
||||||
if (empty($row['exists']) || $row['exists'] == 'f') {
|
if (empty($row['exists']) || $row['exists'] == 'f') {
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -214,10 +214,18 @@ interface SqlFunctions
|
|||||||
/**
|
/**
|
||||||
* Undocumented function
|
* Undocumented function
|
||||||
*
|
*
|
||||||
* @param string $bytea
|
* @param string $data
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function __dbEscapeBytea(string $bytea): string;
|
public function __dbEscapeBytea(string $data): string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Undocumented function
|
||||||
|
*
|
||||||
|
* @param string $bytea
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function __dbUnescapeBytea(string $bytea): string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Undocumented function
|
* Undocumented function
|
||||||
|
|||||||
@@ -105,6 +105,8 @@ class SmartyExtend extends \Smarty
|
|||||||
public $CSS_TEMPLATE_NAME;
|
public $CSS_TEMPLATE_NAME;
|
||||||
/** @var string|null */
|
/** @var string|null */
|
||||||
public $TEMPLATE_TRANSLATE;
|
public $TEMPLATE_TRANSLATE;
|
||||||
|
/** @var string|null */
|
||||||
|
public $JS_TRANSLATE;
|
||||||
// core group
|
// core group
|
||||||
/** @var string */
|
/** @var string */
|
||||||
public $JS_CORE_TEMPLATE_NAME;
|
public $JS_CORE_TEMPLATE_NAME;
|
||||||
@@ -317,14 +319,14 @@ class SmartyExtend extends \Smarty
|
|||||||
}
|
}
|
||||||
// javascript translate data as template for auto translate
|
// javascript translate data as template for auto translate
|
||||||
if (empty($this->TEMPLATE_TRANSLATE)) {
|
if (empty($this->TEMPLATE_TRANSLATE)) {
|
||||||
$this->TEMPLATE_TRANSLATE = 'jsTranslate_'
|
$this->TEMPLATE_TRANSLATE = 'jsTranslate-'
|
||||||
. $this->locale_set . '.' . $this->encoding
|
. $this->locale_set . '.' . $this->encoding
|
||||||
. '.tpl';
|
. '.tpl';
|
||||||
} else {
|
} else {
|
||||||
// we assume we have some fixed set
|
// we assume we have some fixed set
|
||||||
// we must add _<$this->lang>
|
// we must add _<locale>.<encoding>
|
||||||
// if .tpl, put before .tpl
|
// if .tpl, put before .tpl
|
||||||
// if not .tpl, add _<$this->lang>.tpl
|
// if not .tpl, add _<locale>.<encoding>.tpl
|
||||||
if (strpos($this->TEMPLATE_TRANSLATE, '.tpl')) {
|
if (strpos($this->TEMPLATE_TRANSLATE, '.tpl')) {
|
||||||
$this->TEMPLATE_TRANSLATE = str_replace(
|
$this->TEMPLATE_TRANSLATE = str_replace(
|
||||||
'.tpl',
|
'.tpl',
|
||||||
@@ -332,7 +334,7 @@ class SmartyExtend extends \Smarty
|
|||||||
$this->TEMPLATE_TRANSLATE
|
$this->TEMPLATE_TRANSLATE
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
$this->TEMPLATE_TRANSLATE .= '_'
|
$this->TEMPLATE_TRANSLATE .= '-'
|
||||||
. $this->locale_set . '.' . $this->encoding
|
. $this->locale_set . '.' . $this->encoding
|
||||||
. '.tpl';
|
. '.tpl';
|
||||||
}
|
}
|
||||||
@@ -341,6 +343,31 @@ class SmartyExtend extends \Smarty
|
|||||||
if (!file_exists($this->getTemplateDir()[0] . DIRECTORY_SEPARATOR . $this->TEMPLATE_TRANSLATE)) {
|
if (!file_exists($this->getTemplateDir()[0] . DIRECTORY_SEPARATOR . $this->TEMPLATE_TRANSLATE)) {
|
||||||
$this->TEMPLATE_TRANSLATE = null;
|
$this->TEMPLATE_TRANSLATE = null;
|
||||||
}
|
}
|
||||||
|
if (empty($this->JS_TRANSLATE)) {
|
||||||
|
$this->JS_TRANSLATE = 'translate-'
|
||||||
|
. $this->locale_set . '.' . $this->encoding . '.js';
|
||||||
|
} else {
|
||||||
|
// we assume we have some fixed set
|
||||||
|
// we must add _<locale>.<encoding>
|
||||||
|
// if .js, put before .js
|
||||||
|
// if not .js, add _<locale>.<encoding>.js
|
||||||
|
if (strpos($this->JS_TRANSLATE, '.js')) {
|
||||||
|
$this->JS_TRANSLATE = str_replace(
|
||||||
|
'.js',
|
||||||
|
'-' . $this->locale_set . '.' . $this->encoding . '.js',
|
||||||
|
$this->JS_TRANSLATE
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
$this->JS_TRANSLATE .= '-'
|
||||||
|
. $this->locale_set . '.' . $this->encoding
|
||||||
|
. '.js';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!file_exists($this->JAVASCRIPT . $this->JS_TRANSLATE)) {
|
||||||
|
$this->JS_TRANSLATE = null;
|
||||||
|
} else {
|
||||||
|
$this->JS_TRANSLATE = $this->JAVASCRIPT . $this->JS_TRANSLATE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -438,7 +465,7 @@ class SmartyExtend extends \Smarty
|
|||||||
$this->HEADER['JAVASCRIPT'] = $this->ADMIN_JAVASCRIPT ? $this->ADMIN_JAVASCRIPT : ADMIN_JAVASCRIPT;
|
$this->HEADER['JAVASCRIPT'] = $this->ADMIN_JAVASCRIPT ? $this->ADMIN_JAVASCRIPT : ADMIN_JAVASCRIPT;
|
||||||
// the page name
|
// the page name
|
||||||
$this->DATA['page_name'] = $this->page_name;
|
$this->DATA['page_name'] = $this->page_name;
|
||||||
$this->DATA['table_width'] = empty($this->PAGE_WIDTH) ?: PAGE_WIDTH;
|
$this->DATA['table_width'] = !empty($this->PAGE_WIDTH) ?: PAGE_WIDTH;
|
||||||
$this->DATA['form_name'] = $this->DATA['FORM_NAME'];
|
$this->DATA['form_name'] = $this->DATA['FORM_NAME'];
|
||||||
// for tinymce special
|
// for tinymce special
|
||||||
$this->DATA['TINYMCE_LANG'] = $this->lang_short;
|
$this->DATA['TINYMCE_LANG'] = $this->lang_short;
|
||||||
@@ -469,6 +496,7 @@ class SmartyExtend extends \Smarty
|
|||||||
$this->DATA['TEMPLATE_NAME'] = $this->TEMPLATE_NAME;
|
$this->DATA['TEMPLATE_NAME'] = $this->TEMPLATE_NAME;
|
||||||
$this->DATA['CONTENT_INCLUDE'] = $this->CONTENT_INCLUDE;
|
$this->DATA['CONTENT_INCLUDE'] = $this->CONTENT_INCLUDE;
|
||||||
$this->DATA['TEMPLATE_TRANSLATE'] = $this->TEMPLATE_TRANSLATE ?? null;
|
$this->DATA['TEMPLATE_TRANSLATE'] = $this->TEMPLATE_TRANSLATE ?? null;
|
||||||
|
$this->DATA['JS_TRANSLATE'] = $this->JS_TRANSLATE ?? null;
|
||||||
$this->DATA['PAGE_FILE_NAME'] = str_replace('.php', '', $this->page_name) . '.tpl';
|
$this->DATA['PAGE_FILE_NAME'] = str_replace('.php', '', $this->page_name) . '.tpl';
|
||||||
// render page
|
// render page
|
||||||
$this->renderSmarty();
|
$this->renderSmarty();
|
||||||
|
|||||||
2
www/vendor/composer/autoload_classmap.php
vendored
2
www/vendor/composer/autoload_classmap.php
vendored
@@ -367,6 +367,7 @@ return array(
|
|||||||
'PHPUnit\\Util\\Annotation\\DocBlock' => $vendorDir . '/phpunit/phpunit/src/Util/Annotation/DocBlock.php',
|
'PHPUnit\\Util\\Annotation\\DocBlock' => $vendorDir . '/phpunit/phpunit/src/Util/Annotation/DocBlock.php',
|
||||||
'PHPUnit\\Util\\Annotation\\Registry' => $vendorDir . '/phpunit/phpunit/src/Util/Annotation/Registry.php',
|
'PHPUnit\\Util\\Annotation\\Registry' => $vendorDir . '/phpunit/phpunit/src/Util/Annotation/Registry.php',
|
||||||
'PHPUnit\\Util\\Blacklist' => $vendorDir . '/phpunit/phpunit/src/Util/Blacklist.php',
|
'PHPUnit\\Util\\Blacklist' => $vendorDir . '/phpunit/phpunit/src/Util/Blacklist.php',
|
||||||
|
'PHPUnit\\Util\\Cloner' => $vendorDir . '/phpunit/phpunit/src/Util/Cloner.php',
|
||||||
'PHPUnit\\Util\\Color' => $vendorDir . '/phpunit/phpunit/src/Util/Color.php',
|
'PHPUnit\\Util\\Color' => $vendorDir . '/phpunit/phpunit/src/Util/Color.php',
|
||||||
'PHPUnit\\Util\\ErrorHandler' => $vendorDir . '/phpunit/phpunit/src/Util/ErrorHandler.php',
|
'PHPUnit\\Util\\ErrorHandler' => $vendorDir . '/phpunit/phpunit/src/Util/ErrorHandler.php',
|
||||||
'PHPUnit\\Util\\Exception' => $vendorDir . '/phpunit/phpunit/src/Util/Exception.php',
|
'PHPUnit\\Util\\Exception' => $vendorDir . '/phpunit/phpunit/src/Util/Exception.php',
|
||||||
@@ -668,6 +669,7 @@ return array(
|
|||||||
'SebastianBergmann\\Type\\NeverType' => $vendorDir . '/sebastian/type/src/type/NeverType.php',
|
'SebastianBergmann\\Type\\NeverType' => $vendorDir . '/sebastian/type/src/type/NeverType.php',
|
||||||
'SebastianBergmann\\Type\\NullType' => $vendorDir . '/sebastian/type/src/type/NullType.php',
|
'SebastianBergmann\\Type\\NullType' => $vendorDir . '/sebastian/type/src/type/NullType.php',
|
||||||
'SebastianBergmann\\Type\\ObjectType' => $vendorDir . '/sebastian/type/src/type/ObjectType.php',
|
'SebastianBergmann\\Type\\ObjectType' => $vendorDir . '/sebastian/type/src/type/ObjectType.php',
|
||||||
|
'SebastianBergmann\\Type\\Parameter' => $vendorDir . '/sebastian/type/src/Parameter.php',
|
||||||
'SebastianBergmann\\Type\\ReflectionMapper' => $vendorDir . '/sebastian/type/src/ReflectionMapper.php',
|
'SebastianBergmann\\Type\\ReflectionMapper' => $vendorDir . '/sebastian/type/src/ReflectionMapper.php',
|
||||||
'SebastianBergmann\\Type\\RuntimeException' => $vendorDir . '/sebastian/type/src/exception/RuntimeException.php',
|
'SebastianBergmann\\Type\\RuntimeException' => $vendorDir . '/sebastian/type/src/exception/RuntimeException.php',
|
||||||
'SebastianBergmann\\Type\\SimpleType' => $vendorDir . '/sebastian/type/src/type/SimpleType.php',
|
'SebastianBergmann\\Type\\SimpleType' => $vendorDir . '/sebastian/type/src/type/SimpleType.php',
|
||||||
|
|||||||
2
www/vendor/composer/autoload_static.php
vendored
2
www/vendor/composer/autoload_static.php
vendored
@@ -400,6 +400,7 @@ class ComposerStaticInit10fe8fe2ec4017b8644d2b64bcf398b9
|
|||||||
'PHPUnit\\Util\\Annotation\\DocBlock' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Annotation/DocBlock.php',
|
'PHPUnit\\Util\\Annotation\\DocBlock' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Annotation/DocBlock.php',
|
||||||
'PHPUnit\\Util\\Annotation\\Registry' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Annotation/Registry.php',
|
'PHPUnit\\Util\\Annotation\\Registry' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Annotation/Registry.php',
|
||||||
'PHPUnit\\Util\\Blacklist' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Blacklist.php',
|
'PHPUnit\\Util\\Blacklist' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Blacklist.php',
|
||||||
|
'PHPUnit\\Util\\Cloner' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Cloner.php',
|
||||||
'PHPUnit\\Util\\Color' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Color.php',
|
'PHPUnit\\Util\\Color' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Color.php',
|
||||||
'PHPUnit\\Util\\ErrorHandler' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/ErrorHandler.php',
|
'PHPUnit\\Util\\ErrorHandler' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/ErrorHandler.php',
|
||||||
'PHPUnit\\Util\\Exception' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Exception.php',
|
'PHPUnit\\Util\\Exception' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Exception.php',
|
||||||
@@ -701,6 +702,7 @@ class ComposerStaticInit10fe8fe2ec4017b8644d2b64bcf398b9
|
|||||||
'SebastianBergmann\\Type\\NeverType' => __DIR__ . '/..' . '/sebastian/type/src/type/NeverType.php',
|
'SebastianBergmann\\Type\\NeverType' => __DIR__ . '/..' . '/sebastian/type/src/type/NeverType.php',
|
||||||
'SebastianBergmann\\Type\\NullType' => __DIR__ . '/..' . '/sebastian/type/src/type/NullType.php',
|
'SebastianBergmann\\Type\\NullType' => __DIR__ . '/..' . '/sebastian/type/src/type/NullType.php',
|
||||||
'SebastianBergmann\\Type\\ObjectType' => __DIR__ . '/..' . '/sebastian/type/src/type/ObjectType.php',
|
'SebastianBergmann\\Type\\ObjectType' => __DIR__ . '/..' . '/sebastian/type/src/type/ObjectType.php',
|
||||||
|
'SebastianBergmann\\Type\\Parameter' => __DIR__ . '/..' . '/sebastian/type/src/Parameter.php',
|
||||||
'SebastianBergmann\\Type\\ReflectionMapper' => __DIR__ . '/..' . '/sebastian/type/src/ReflectionMapper.php',
|
'SebastianBergmann\\Type\\ReflectionMapper' => __DIR__ . '/..' . '/sebastian/type/src/ReflectionMapper.php',
|
||||||
'SebastianBergmann\\Type\\RuntimeException' => __DIR__ . '/..' . '/sebastian/type/src/exception/RuntimeException.php',
|
'SebastianBergmann\\Type\\RuntimeException' => __DIR__ . '/..' . '/sebastian/type/src/exception/RuntimeException.php',
|
||||||
'SebastianBergmann\\Type\\SimpleType' => __DIR__ . '/..' . '/sebastian/type/src/type/SimpleType.php',
|
'SebastianBergmann\\Type\\SimpleType' => __DIR__ . '/..' . '/sebastian/type/src/type/SimpleType.php',
|
||||||
|
|||||||
68
www/vendor/composer/installed.json
vendored
68
www/vendor/composer/installed.json
vendored
@@ -646,17 +646,17 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "phpunit/phpunit",
|
"name": "phpunit/phpunit",
|
||||||
"version": "9.5.24",
|
"version": "9.5.25",
|
||||||
"version_normalized": "9.5.24.0",
|
"version_normalized": "9.5.25.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/sebastianbergmann/phpunit.git",
|
"url": "https://github.com/sebastianbergmann/phpunit.git",
|
||||||
"reference": "d0aa6097bef9fd42458a9b3c49da32c6ce6129c5"
|
"reference": "3e6f90ca7e3d02025b1d147bd8d4a89fd4ca8a1d"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/d0aa6097bef9fd42458a9b3c49da32c6ce6129c5",
|
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/3e6f90ca7e3d02025b1d147bd8d4a89fd4ca8a1d",
|
||||||
"reference": "d0aa6097bef9fd42458a9b3c49da32c6ce6129c5",
|
"reference": "3e6f90ca7e3d02025b1d147bd8d4a89fd4ca8a1d",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -678,21 +678,21 @@
|
|||||||
"phpunit/php-timer": "^5.0.2",
|
"phpunit/php-timer": "^5.0.2",
|
||||||
"sebastian/cli-parser": "^1.0.1",
|
"sebastian/cli-parser": "^1.0.1",
|
||||||
"sebastian/code-unit": "^1.0.6",
|
"sebastian/code-unit": "^1.0.6",
|
||||||
"sebastian/comparator": "^4.0.5",
|
"sebastian/comparator": "^4.0.8",
|
||||||
"sebastian/diff": "^4.0.3",
|
"sebastian/diff": "^4.0.3",
|
||||||
"sebastian/environment": "^5.1.3",
|
"sebastian/environment": "^5.1.3",
|
||||||
"sebastian/exporter": "^4.0.3",
|
"sebastian/exporter": "^4.0.5",
|
||||||
"sebastian/global-state": "^5.0.1",
|
"sebastian/global-state": "^5.0.1",
|
||||||
"sebastian/object-enumerator": "^4.0.3",
|
"sebastian/object-enumerator": "^4.0.3",
|
||||||
"sebastian/resource-operations": "^3.0.3",
|
"sebastian/resource-operations": "^3.0.3",
|
||||||
"sebastian/type": "^3.1",
|
"sebastian/type": "^3.2",
|
||||||
"sebastian/version": "^3.0.2"
|
"sebastian/version": "^3.0.2"
|
||||||
},
|
},
|
||||||
"suggest": {
|
"suggest": {
|
||||||
"ext-soap": "*",
|
"ext-soap": "*",
|
||||||
"ext-xdebug": "*"
|
"ext-xdebug": "*"
|
||||||
},
|
},
|
||||||
"time": "2022-08-30T07:42:16+00:00",
|
"time": "2022-09-25T03:44:45+00:00",
|
||||||
"bin": [
|
"bin": [
|
||||||
"phpunit"
|
"phpunit"
|
||||||
],
|
],
|
||||||
@@ -731,7 +731,7 @@
|
|||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/sebastianbergmann/phpunit/issues",
|
"issues": "https://github.com/sebastianbergmann/phpunit/issues",
|
||||||
"source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.24"
|
"source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.25"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
@@ -741,6 +741,10 @@
|
|||||||
{
|
{
|
||||||
"url": "https://github.com/sebastianbergmann",
|
"url": "https://github.com/sebastianbergmann",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://tidelift.com/funding/github/packagist/phpunit/phpunit",
|
||||||
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"install-path": "../phpunit/phpunit"
|
"install-path": "../phpunit/phpunit"
|
||||||
@@ -923,17 +927,17 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "sebastian/comparator",
|
"name": "sebastian/comparator",
|
||||||
"version": "4.0.6",
|
"version": "4.0.8",
|
||||||
"version_normalized": "4.0.6.0",
|
"version_normalized": "4.0.8.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/sebastianbergmann/comparator.git",
|
"url": "https://github.com/sebastianbergmann/comparator.git",
|
||||||
"reference": "55f4261989e546dc112258c7a75935a81a7ce382"
|
"reference": "fa0f136dd2334583309d32b62544682ee972b51a"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/55f4261989e546dc112258c7a75935a81a7ce382",
|
"url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/fa0f136dd2334583309d32b62544682ee972b51a",
|
||||||
"reference": "55f4261989e546dc112258c7a75935a81a7ce382",
|
"reference": "fa0f136dd2334583309d32b62544682ee972b51a",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -944,7 +948,7 @@
|
|||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpunit/phpunit": "^9.3"
|
"phpunit/phpunit": "^9.3"
|
||||||
},
|
},
|
||||||
"time": "2020-10-26T15:49:45+00:00",
|
"time": "2022-09-14T12:41:17+00:00",
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
"branch-alias": {
|
"branch-alias": {
|
||||||
@@ -988,7 +992,7 @@
|
|||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/sebastianbergmann/comparator/issues",
|
"issues": "https://github.com/sebastianbergmann/comparator/issues",
|
||||||
"source": "https://github.com/sebastianbergmann/comparator/tree/4.0.6"
|
"source": "https://github.com/sebastianbergmann/comparator/tree/4.0.8"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
@@ -1195,17 +1199,17 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "sebastian/exporter",
|
"name": "sebastian/exporter",
|
||||||
"version": "4.0.4",
|
"version": "4.0.5",
|
||||||
"version_normalized": "4.0.4.0",
|
"version_normalized": "4.0.5.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/sebastianbergmann/exporter.git",
|
"url": "https://github.com/sebastianbergmann/exporter.git",
|
||||||
"reference": "65e8b7db476c5dd267e65eea9cab77584d3cfff9"
|
"reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/65e8b7db476c5dd267e65eea9cab77584d3cfff9",
|
"url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d",
|
||||||
"reference": "65e8b7db476c5dd267e65eea9cab77584d3cfff9",
|
"reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -1216,7 +1220,7 @@
|
|||||||
"ext-mbstring": "*",
|
"ext-mbstring": "*",
|
||||||
"phpunit/phpunit": "^9.3"
|
"phpunit/phpunit": "^9.3"
|
||||||
},
|
},
|
||||||
"time": "2021-11-11T14:18:36+00:00",
|
"time": "2022-09-14T06:03:37+00:00",
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
"branch-alias": {
|
"branch-alias": {
|
||||||
@@ -1263,7 +1267,7 @@
|
|||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/sebastianbergmann/exporter/issues",
|
"issues": "https://github.com/sebastianbergmann/exporter/issues",
|
||||||
"source": "https://github.com/sebastianbergmann/exporter/tree/4.0.4"
|
"source": "https://github.com/sebastianbergmann/exporter/tree/4.0.5"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
@@ -1644,17 +1648,17 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "sebastian/type",
|
"name": "sebastian/type",
|
||||||
"version": "3.1.0",
|
"version": "3.2.0",
|
||||||
"version_normalized": "3.1.0.0",
|
"version_normalized": "3.2.0.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/sebastianbergmann/type.git",
|
"url": "https://github.com/sebastianbergmann/type.git",
|
||||||
"reference": "fb44e1cc6e557418387ad815780360057e40753e"
|
"reference": "fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/sebastianbergmann/type/zipball/fb44e1cc6e557418387ad815780360057e40753e",
|
"url": "https://api.github.com/repos/sebastianbergmann/type/zipball/fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e",
|
||||||
"reference": "fb44e1cc6e557418387ad815780360057e40753e",
|
"reference": "fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -1663,11 +1667,11 @@
|
|||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpunit/phpunit": "^9.5"
|
"phpunit/phpunit": "^9.5"
|
||||||
},
|
},
|
||||||
"time": "2022-08-29T06:55:37+00:00",
|
"time": "2022-09-12T14:47:03+00:00",
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
"branch-alias": {
|
"branch-alias": {
|
||||||
"dev-master": "3.1-dev"
|
"dev-master": "3.2-dev"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"installation-source": "dist",
|
"installation-source": "dist",
|
||||||
@@ -1691,7 +1695,7 @@
|
|||||||
"homepage": "https://github.com/sebastianbergmann/type",
|
"homepage": "https://github.com/sebastianbergmann/type",
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/sebastianbergmann/type/issues",
|
"issues": "https://github.com/sebastianbergmann/type/issues",
|
||||||
"source": "https://github.com/sebastianbergmann/type/tree/3.1.0"
|
"source": "https://github.com/sebastianbergmann/type/tree/3.2.0"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
|
|||||||
24
www/vendor/composer/installed.php
vendored
24
www/vendor/composer/installed.php
vendored
@@ -110,12 +110,12 @@
|
|||||||
'dev_requirement' => true,
|
'dev_requirement' => true,
|
||||||
),
|
),
|
||||||
'phpunit/phpunit' => array(
|
'phpunit/phpunit' => array(
|
||||||
'pretty_version' => '9.5.24',
|
'pretty_version' => '9.5.25',
|
||||||
'version' => '9.5.24.0',
|
'version' => '9.5.25.0',
|
||||||
'type' => 'library',
|
'type' => 'library',
|
||||||
'install_path' => __DIR__ . '/../phpunit/phpunit',
|
'install_path' => __DIR__ . '/../phpunit/phpunit',
|
||||||
'aliases' => array(),
|
'aliases' => array(),
|
||||||
'reference' => 'd0aa6097bef9fd42458a9b3c49da32c6ce6129c5',
|
'reference' => '3e6f90ca7e3d02025b1d147bd8d4a89fd4ca8a1d',
|
||||||
'dev_requirement' => true,
|
'dev_requirement' => true,
|
||||||
),
|
),
|
||||||
'sebastian/cli-parser' => array(
|
'sebastian/cli-parser' => array(
|
||||||
@@ -146,12 +146,12 @@
|
|||||||
'dev_requirement' => true,
|
'dev_requirement' => true,
|
||||||
),
|
),
|
||||||
'sebastian/comparator' => array(
|
'sebastian/comparator' => array(
|
||||||
'pretty_version' => '4.0.6',
|
'pretty_version' => '4.0.8',
|
||||||
'version' => '4.0.6.0',
|
'version' => '4.0.8.0',
|
||||||
'type' => 'library',
|
'type' => 'library',
|
||||||
'install_path' => __DIR__ . '/../sebastian/comparator',
|
'install_path' => __DIR__ . '/../sebastian/comparator',
|
||||||
'aliases' => array(),
|
'aliases' => array(),
|
||||||
'reference' => '55f4261989e546dc112258c7a75935a81a7ce382',
|
'reference' => 'fa0f136dd2334583309d32b62544682ee972b51a',
|
||||||
'dev_requirement' => true,
|
'dev_requirement' => true,
|
||||||
),
|
),
|
||||||
'sebastian/complexity' => array(
|
'sebastian/complexity' => array(
|
||||||
@@ -182,12 +182,12 @@
|
|||||||
'dev_requirement' => true,
|
'dev_requirement' => true,
|
||||||
),
|
),
|
||||||
'sebastian/exporter' => array(
|
'sebastian/exporter' => array(
|
||||||
'pretty_version' => '4.0.4',
|
'pretty_version' => '4.0.5',
|
||||||
'version' => '4.0.4.0',
|
'version' => '4.0.5.0',
|
||||||
'type' => 'library',
|
'type' => 'library',
|
||||||
'install_path' => __DIR__ . '/../sebastian/exporter',
|
'install_path' => __DIR__ . '/../sebastian/exporter',
|
||||||
'aliases' => array(),
|
'aliases' => array(),
|
||||||
'reference' => '65e8b7db476c5dd267e65eea9cab77584d3cfff9',
|
'reference' => 'ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d',
|
||||||
'dev_requirement' => true,
|
'dev_requirement' => true,
|
||||||
),
|
),
|
||||||
'sebastian/global-state' => array(
|
'sebastian/global-state' => array(
|
||||||
@@ -245,12 +245,12 @@
|
|||||||
'dev_requirement' => true,
|
'dev_requirement' => true,
|
||||||
),
|
),
|
||||||
'sebastian/type' => array(
|
'sebastian/type' => array(
|
||||||
'pretty_version' => '3.1.0',
|
'pretty_version' => '3.2.0',
|
||||||
'version' => '3.1.0.0',
|
'version' => '3.2.0.0',
|
||||||
'type' => 'library',
|
'type' => 'library',
|
||||||
'install_path' => __DIR__ . '/../sebastian/type',
|
'install_path' => __DIR__ . '/../sebastian/type',
|
||||||
'aliases' => array(),
|
'aliases' => array(),
|
||||||
'reference' => 'fb44e1cc6e557418387ad815780360057e40753e',
|
'reference' => 'fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e',
|
||||||
'dev_requirement' => true,
|
'dev_requirement' => true,
|
||||||
),
|
),
|
||||||
'sebastian/version' => array(
|
'sebastian/version' => array(
|
||||||
|
|||||||
9
www/vendor/phpunit/phpunit/ChangeLog-8.5.md
vendored
9
www/vendor/phpunit/phpunit/ChangeLog-8.5.md
vendored
@@ -2,11 +2,16 @@
|
|||||||
|
|
||||||
All notable changes of the PHPUnit 8.5 release series are documented in this file using the [Keep a CHANGELOG](https://keepachangelog.com/) principles.
|
All notable changes of the PHPUnit 8.5 release series are documented in this file using the [Keep a CHANGELOG](https://keepachangelog.com/) principles.
|
||||||
|
|
||||||
## [8.5.30] - 2022-MM-DD
|
## [8.5.30] - 2022-09-25
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
* The configuration generator now asks for a cache directory
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
* [#4913](https://github.com/sebastianbergmann/phpunit/issues/4913): Failed `assert()` should show a backtrace
|
* [#4913](https://github.com/sebastianbergmann/phpunit/issues/4913): Failed `assert()` should show a backtrace
|
||||||
|
* [#4966](https://github.com/sebastianbergmann/phpunit/issues/4966): `TestCase::assertSame()` (and related exact comparisons) must compare `float` exactly
|
||||||
|
|
||||||
## [8.5.29] - 2022-08-22
|
## [8.5.29] - 2022-08-22
|
||||||
|
|
||||||
@@ -245,7 +250,7 @@ All notable changes of the PHPUnit 8.5 release series are documented in this fil
|
|||||||
* [#3967](https://github.com/sebastianbergmann/phpunit/issues/3967): Cannot double interface that extends interface that extends `\Throwable`
|
* [#3967](https://github.com/sebastianbergmann/phpunit/issues/3967): Cannot double interface that extends interface that extends `\Throwable`
|
||||||
* [#3968](https://github.com/sebastianbergmann/phpunit/pull/3968): Test class run in a separate PHP process are passing when `exit` called inside
|
* [#3968](https://github.com/sebastianbergmann/phpunit/pull/3968): Test class run in a separate PHP process are passing when `exit` called inside
|
||||||
|
|
||||||
[8.5.30]: https://github.com/sebastianbergmann/phpunit/compare/8.5.29...8.5
|
[8.5.30]: https://github.com/sebastianbergmann/phpunit/compare/8.5.29...8.5.30
|
||||||
[8.5.29]: https://github.com/sebastianbergmann/phpunit/compare/8.5.28...8.5.29
|
[8.5.29]: https://github.com/sebastianbergmann/phpunit/compare/8.5.28...8.5.29
|
||||||
[8.5.28]: https://github.com/sebastianbergmann/phpunit/compare/8.5.27...8.5.28
|
[8.5.28]: https://github.com/sebastianbergmann/phpunit/compare/8.5.27...8.5.28
|
||||||
[8.5.27]: https://github.com/sebastianbergmann/phpunit/compare/8.5.26...8.5.27
|
[8.5.27]: https://github.com/sebastianbergmann/phpunit/compare/8.5.26...8.5.27
|
||||||
|
|||||||
11
www/vendor/phpunit/phpunit/ChangeLog-9.5.md
vendored
11
www/vendor/phpunit/phpunit/ChangeLog-9.5.md
vendored
@@ -2,6 +2,16 @@
|
|||||||
|
|
||||||
All notable changes of the PHPUnit 9.5 release series are documented in this file using the [Keep a CHANGELOG](https://keepachangelog.com/) principles.
|
All notable changes of the PHPUnit 9.5 release series are documented in this file using the [Keep a CHANGELOG](https://keepachangelog.com/) principles.
|
||||||
|
|
||||||
|
## [9.5.25] - 2022-09-25
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
* [#5042](https://github.com/sebastianbergmann/phpunit/issues/5042): Support Disjunctive Normal Form types
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
* [#4966](https://github.com/sebastianbergmann/phpunit/issues/4966): `TestCase::assertSame()` (and related exact comparisons) must compare `float` exactly
|
||||||
|
|
||||||
## [9.5.24] - 2022-08-30
|
## [9.5.24] - 2022-08-30
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
@@ -190,6 +200,7 @@ All notable changes of the PHPUnit 9.5 release series are documented in this fil
|
|||||||
|
|
||||||
* [#4535](https://github.com/sebastianbergmann/phpunit/issues/4535): `getMockFromWsdl()` does not handle methods that do not have parameters correctly
|
* [#4535](https://github.com/sebastianbergmann/phpunit/issues/4535): `getMockFromWsdl()` does not handle methods that do not have parameters correctly
|
||||||
|
|
||||||
|
[9.5.25]: https://github.com/sebastianbergmann/phpunit/compare/9.5.24...9.5.25
|
||||||
[9.5.24]: https://github.com/sebastianbergmann/phpunit/compare/9.5.23...9.5.24
|
[9.5.24]: https://github.com/sebastianbergmann/phpunit/compare/9.5.23...9.5.24
|
||||||
[9.5.23]: https://github.com/sebastianbergmann/phpunit/compare/9.5.22...9.5.23
|
[9.5.23]: https://github.com/sebastianbergmann/phpunit/compare/9.5.22...9.5.23
|
||||||
[9.5.22]: https://github.com/sebastianbergmann/phpunit/compare/9.5.21...9.5.22
|
[9.5.22]: https://github.com/sebastianbergmann/phpunit/compare/9.5.21...9.5.22
|
||||||
|
|||||||
46
www/vendor/phpunit/phpunit/LICENSE
vendored
46
www/vendor/phpunit/phpunit/LICENSE
vendored
@@ -1,33 +1,29 @@
|
|||||||
PHPUnit
|
BSD 3-Clause License
|
||||||
|
|
||||||
Copyright (c) 2001-2022, Sebastian Bergmann <sebastian@phpunit.de>.
|
Copyright (c) 2001-2022, Sebastian Bergmann
|
||||||
All rights reserved.
|
All rights reserved.
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without
|
Redistribution and use in source and binary forms, with or without
|
||||||
modification, are permitted provided that the following conditions
|
modification, are permitted provided that the following conditions are met:
|
||||||
are met:
|
|
||||||
|
|
||||||
* Redistributions of source code must retain the above copyright
|
1. Redistributions of source code must retain the above copyright notice, this
|
||||||
notice, this list of conditions and the following disclaimer.
|
list of conditions and the following disclaimer.
|
||||||
|
|
||||||
* Redistributions in binary form must reproduce the above copyright
|
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||||
notice, this list of conditions and the following disclaimer in
|
this list of conditions and the following disclaimer in the documentation
|
||||||
the documentation and/or other materials provided with the
|
and/or other materials provided with the distribution.
|
||||||
distribution.
|
|
||||||
|
|
||||||
* Neither the name of Sebastian Bergmann nor the names of his
|
3. Neither the name of the copyright holder nor the names of its
|
||||||
contributors may be used to endorse or promote products derived
|
contributors may be used to endorse or promote products derived from
|
||||||
from this software without specific prior written permission.
|
this software without specific prior written permission.
|
||||||
|
|
||||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||||
COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||||
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||||
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
|
|||||||
11
www/vendor/phpunit/phpunit/SECURITY.md
vendored
Normal file
11
www/vendor/phpunit/phpunit/SECURITY.md
vendored
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
# Security Policy
|
||||||
|
|
||||||
|
PHPUnit is a framework for writing as well as a commandline tool for running tests. Writing and running tests is a development-time activity. There is no reason why PHPUnit should be installed on a webserver.
|
||||||
|
|
||||||
|
**If you upload PHPUnit to a webserver then your deployment process is broken. On a more general note, if your `vendor` directory is publicly accessible on your webserver then your deployment process is also broken.**
|
||||||
|
|
||||||
|
Please note that if you upload PHPUnit to a webserver "bad things" may happen. [You have been warned.](https://thephp.cc/articles/phpunit-a-security-risk)
|
||||||
|
|
||||||
|
## Security Contact Information
|
||||||
|
|
||||||
|
After the above, if you still would like to report a security vulnerability, please email `sebastian@phpunit.de`.
|
||||||
6
www/vendor/phpunit/phpunit/composer.json
vendored
6
www/vendor/phpunit/phpunit/composer.json
vendored
@@ -39,14 +39,14 @@
|
|||||||
"phpunit/php-timer": "^5.0.2",
|
"phpunit/php-timer": "^5.0.2",
|
||||||
"sebastian/cli-parser": "^1.0.1",
|
"sebastian/cli-parser": "^1.0.1",
|
||||||
"sebastian/code-unit": "^1.0.6",
|
"sebastian/code-unit": "^1.0.6",
|
||||||
"sebastian/comparator": "^4.0.5",
|
"sebastian/comparator": "^4.0.8",
|
||||||
"sebastian/diff": "^4.0.3",
|
"sebastian/diff": "^4.0.3",
|
||||||
"sebastian/environment": "^5.1.3",
|
"sebastian/environment": "^5.1.3",
|
||||||
"sebastian/exporter": "^4.0.3",
|
"sebastian/exporter": "^4.0.5",
|
||||||
"sebastian/global-state": "^5.0.1",
|
"sebastian/global-state": "^5.0.1",
|
||||||
"sebastian/object-enumerator": "^4.0.3",
|
"sebastian/object-enumerator": "^4.0.3",
|
||||||
"sebastian/resource-operations": "^3.0.3",
|
"sebastian/resource-operations": "^3.0.3",
|
||||||
"sebastian/type": "^3.1",
|
"sebastian/type": "^3.2",
|
||||||
"sebastian/version": "^3.0.2"
|
"sebastian/version": "^3.0.2"
|
||||||
},
|
},
|
||||||
"config": {
|
"config": {
|
||||||
|
|||||||
@@ -1321,7 +1321,9 @@ abstract class Assert
|
|||||||
* @throws ExpectationFailedException
|
* @throws ExpectationFailedException
|
||||||
*
|
*
|
||||||
* @psalm-template ExpectedType
|
* @psalm-template ExpectedType
|
||||||
|
*
|
||||||
* @psalm-param ExpectedType $expected
|
* @psalm-param ExpectedType $expected
|
||||||
|
*
|
||||||
* @psalm-assert =ExpectedType $actual
|
* @psalm-assert =ExpectedType $actual
|
||||||
*/
|
*/
|
||||||
public static function assertSame($expected, $actual, string $message = ''): void
|
public static function assertSame($expected, $actual, string $message = ''): void
|
||||||
@@ -1364,7 +1366,9 @@ abstract class Assert
|
|||||||
* @throws ExpectationFailedException
|
* @throws ExpectationFailedException
|
||||||
*
|
*
|
||||||
* @psalm-template ExpectedType of object
|
* @psalm-template ExpectedType of object
|
||||||
|
*
|
||||||
* @psalm-param class-string<ExpectedType> $expected
|
* @psalm-param class-string<ExpectedType> $expected
|
||||||
|
*
|
||||||
* @psalm-assert =ExpectedType $actual
|
* @psalm-assert =ExpectedType $actual
|
||||||
*/
|
*/
|
||||||
public static function assertInstanceOf(string $expected, $actual, string $message = ''): void
|
public static function assertInstanceOf(string $expected, $actual, string $message = ''): void
|
||||||
@@ -1388,7 +1392,9 @@ abstract class Assert
|
|||||||
* @throws ExpectationFailedException
|
* @throws ExpectationFailedException
|
||||||
*
|
*
|
||||||
* @psalm-template ExpectedType of object
|
* @psalm-template ExpectedType of object
|
||||||
|
*
|
||||||
* @psalm-param class-string<ExpectedType> $expected
|
* @psalm-param class-string<ExpectedType> $expected
|
||||||
|
*
|
||||||
* @psalm-assert !ExpectedType $actual
|
* @psalm-assert !ExpectedType $actual
|
||||||
*/
|
*/
|
||||||
public static function assertNotInstanceOf(string $expected, $actual, string $message = ''): void
|
public static function assertNotInstanceOf(string $expected, $actual, string $message = ''): void
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
namespace PHPUnit\Framework;
|
namespace PHPUnit\Framework;
|
||||||
|
|
||||||
use function func_get_args;
|
use function func_get_args;
|
||||||
|
use function function_exists;
|
||||||
use ArrayAccess;
|
use ArrayAccess;
|
||||||
use Countable;
|
use Countable;
|
||||||
use DOMDocument;
|
use DOMDocument;
|
||||||
@@ -1453,7 +1454,9 @@ if (!function_exists('PHPUnit\Framework\assertSame')) {
|
|||||||
* @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
|
* @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
|
||||||
*
|
*
|
||||||
* @psalm-template ExpectedType
|
* @psalm-template ExpectedType
|
||||||
|
*
|
||||||
* @psalm-param ExpectedType $expected
|
* @psalm-param ExpectedType $expected
|
||||||
|
*
|
||||||
* @psalm-assert =ExpectedType $actual
|
* @psalm-assert =ExpectedType $actual
|
||||||
*
|
*
|
||||||
* @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
|
* @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
|
||||||
@@ -1494,7 +1497,9 @@ if (!function_exists('PHPUnit\Framework\assertInstanceOf')) {
|
|||||||
* @throws Exception
|
* @throws Exception
|
||||||
*
|
*
|
||||||
* @psalm-template ExpectedType of object
|
* @psalm-template ExpectedType of object
|
||||||
|
*
|
||||||
* @psalm-param class-string<ExpectedType> $expected
|
* @psalm-param class-string<ExpectedType> $expected
|
||||||
|
*
|
||||||
* @psalm-assert =ExpectedType $actual
|
* @psalm-assert =ExpectedType $actual
|
||||||
*
|
*
|
||||||
* @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
|
* @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
|
||||||
@@ -1516,7 +1521,9 @@ if (!function_exists('PHPUnit\Framework\assertNotInstanceOf')) {
|
|||||||
* @throws Exception
|
* @throws Exception
|
||||||
*
|
*
|
||||||
* @psalm-template ExpectedType of object
|
* @psalm-template ExpectedType of object
|
||||||
|
*
|
||||||
* @psalm-param class-string<ExpectedType> $expected
|
* @psalm-param class-string<ExpectedType> $expected
|
||||||
|
*
|
||||||
* @psalm-assert !ExpectedType $actual
|
* @psalm-assert !ExpectedType $actual
|
||||||
*
|
*
|
||||||
* @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
|
* @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
|
||||||
|
|||||||
@@ -82,6 +82,7 @@ abstract class Constraint implements Countable, SelfDescribing
|
|||||||
* This method can be overridden to implement the evaluation algorithm.
|
* This method can be overridden to implement the evaluation algorithm.
|
||||||
*
|
*
|
||||||
* @param mixed $other value or object to evaluate
|
* @param mixed $other value or object to evaluate
|
||||||
|
*
|
||||||
* @codeCoverageIgnore
|
* @codeCoverageIgnore
|
||||||
*/
|
*/
|
||||||
protected function matches($other): bool
|
protected function matches($other): bool
|
||||||
|
|||||||
@@ -9,13 +9,8 @@
|
|||||||
*/
|
*/
|
||||||
namespace PHPUnit\Framework\Constraint;
|
namespace PHPUnit\Framework\Constraint;
|
||||||
|
|
||||||
use const PHP_FLOAT_EPSILON;
|
|
||||||
use function abs;
|
|
||||||
use function get_class;
|
use function get_class;
|
||||||
use function is_array;
|
use function is_array;
|
||||||
use function is_float;
|
|
||||||
use function is_infinite;
|
|
||||||
use function is_nan;
|
|
||||||
use function is_object;
|
use function is_object;
|
||||||
use function is_string;
|
use function is_string;
|
||||||
use function sprintf;
|
use function sprintf;
|
||||||
@@ -52,13 +47,7 @@ final class IsIdentical extends Constraint
|
|||||||
*/
|
*/
|
||||||
public function evaluate($other, string $description = '', bool $returnResult = false): ?bool
|
public function evaluate($other, string $description = '', bool $returnResult = false): ?bool
|
||||||
{
|
{
|
||||||
if (is_float($this->value) && is_float($other) &&
|
$success = $this->value === $other;
|
||||||
!is_infinite($this->value) && !is_infinite($other) &&
|
|
||||||
!is_nan($this->value) && !is_nan($other)) {
|
|
||||||
$success = abs($this->value - $other) < PHP_FLOAT_EPSILON;
|
|
||||||
} else {
|
|
||||||
$success = $this->value === $other;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($returnResult) {
|
if ($returnResult) {
|
||||||
return $success;
|
return $success;
|
||||||
|
|||||||
@@ -9,6 +9,9 @@
|
|||||||
*/
|
*/
|
||||||
namespace PHPUnit\Framework\MockObject;
|
namespace PHPUnit\Framework\MockObject;
|
||||||
|
|
||||||
|
use function array_diff_assoc;
|
||||||
|
use function array_unique;
|
||||||
|
use function implode;
|
||||||
use function sprintf;
|
use function sprintf;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -9,6 +9,9 @@
|
|||||||
*/
|
*/
|
||||||
namespace PHPUnit\Framework\MockObject;
|
namespace PHPUnit\Framework\MockObject;
|
||||||
|
|
||||||
|
use function get_class;
|
||||||
|
use function gettype;
|
||||||
|
use function is_object;
|
||||||
use function sprintf;
|
use function sprintf;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -9,6 +9,8 @@
|
|||||||
*/
|
*/
|
||||||
namespace PHPUnit\Framework\MockObject;
|
namespace PHPUnit\Framework\MockObject;
|
||||||
|
|
||||||
|
use function sprintf;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @internal This class is not covered by the backward compatibility promise for PHPUnit
|
* @internal This class is not covered by the backward compatibility promise for PHPUnit
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -291,7 +291,9 @@ EOT;
|
|||||||
* Concrete methods to mock can be specified with the $mockedMethods parameter.
|
* Concrete methods to mock can be specified with the $mockedMethods parameter.
|
||||||
*
|
*
|
||||||
* @psalm-template RealInstanceType of object
|
* @psalm-template RealInstanceType of object
|
||||||
|
*
|
||||||
* @psalm-param class-string<RealInstanceType> $originalClassName
|
* @psalm-param class-string<RealInstanceType> $originalClassName
|
||||||
|
*
|
||||||
* @psalm-return MockObject&RealInstanceType
|
* @psalm-return MockObject&RealInstanceType
|
||||||
*
|
*
|
||||||
* @throws \PHPUnit\Framework\InvalidArgumentException
|
* @throws \PHPUnit\Framework\InvalidArgumentException
|
||||||
|
|||||||
@@ -13,6 +13,8 @@ use function array_map;
|
|||||||
use function explode;
|
use function explode;
|
||||||
use function get_class;
|
use function get_class;
|
||||||
use function implode;
|
use function implode;
|
||||||
|
use function in_array;
|
||||||
|
use function interface_exists;
|
||||||
use function is_object;
|
use function is_object;
|
||||||
use function sprintf;
|
use function sprintf;
|
||||||
use function strpos;
|
use function strpos;
|
||||||
@@ -20,7 +22,7 @@ use function strtolower;
|
|||||||
use function substr;
|
use function substr;
|
||||||
use Doctrine\Instantiator\Instantiator;
|
use Doctrine\Instantiator\Instantiator;
|
||||||
use PHPUnit\Framework\SelfDescribing;
|
use PHPUnit\Framework\SelfDescribing;
|
||||||
use PHPUnit\Util\Type;
|
use PHPUnit\Util\Cloner;
|
||||||
use SebastianBergmann\Exporter\Exporter;
|
use SebastianBergmann\Exporter\Exporter;
|
||||||
use stdClass;
|
use stdClass;
|
||||||
use Throwable;
|
use Throwable;
|
||||||
@@ -90,7 +92,7 @@ final class Invocation implements SelfDescribing
|
|||||||
|
|
||||||
foreach ($this->parameters as $key => $value) {
|
foreach ($this->parameters as $key => $value) {
|
||||||
if (is_object($value)) {
|
if (is_object($value)) {
|
||||||
$this->parameters[$key] = $this->cloneObject($value);
|
$this->parameters[$key] = Cloner::clone($value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -121,12 +123,17 @@ final class Invocation implements SelfDescribing
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
$intersection = false;
|
$intersection = false;
|
||||||
$union = false;
|
$union = false;
|
||||||
|
$unionContainsIntersections = false;
|
||||||
|
|
||||||
if (strpos($this->returnType, '|') !== false) {
|
if (strpos($this->returnType, '|') !== false) {
|
||||||
$types = explode('|', $this->returnType);
|
$types = explode('|', $this->returnType);
|
||||||
$union = true;
|
$union = true;
|
||||||
|
|
||||||
|
if (strpos($this->returnType, '(') !== false) {
|
||||||
|
$unionContainsIntersections = true;
|
||||||
|
}
|
||||||
} elseif (strpos($this->returnType, '&') !== false) {
|
} elseif (strpos($this->returnType, '&') !== false) {
|
||||||
$types = explode('&', $this->returnType);
|
$types = explode('&', $this->returnType);
|
||||||
$intersection = true;
|
$intersection = true;
|
||||||
@@ -136,7 +143,7 @@ final class Invocation implements SelfDescribing
|
|||||||
|
|
||||||
$types = array_map('strtolower', $types);
|
$types = array_map('strtolower', $types);
|
||||||
|
|
||||||
if (!$intersection) {
|
if (!$intersection && !$unionContainsIntersections) {
|
||||||
if (in_array('', $types, true) ||
|
if (in_array('', $types, true) ||
|
||||||
in_array('null', $types, true) ||
|
in_array('null', $types, true) ||
|
||||||
in_array('mixed', $types, true) ||
|
in_array('mixed', $types, true) ||
|
||||||
@@ -220,38 +227,28 @@ final class Invocation implements SelfDescribing
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($intersection && $this->onlyInterfaces($types)) {
|
||||||
|
try {
|
||||||
|
return (new Generator)->getMockForInterfaces($types);
|
||||||
|
} catch (Throwable $t) {
|
||||||
|
throw new RuntimeException(
|
||||||
|
sprintf(
|
||||||
|
'Return value for %s::%s() cannot be generated: %s',
|
||||||
|
$this->className,
|
||||||
|
$this->methodName,
|
||||||
|
$t->getMessage(),
|
||||||
|
),
|
||||||
|
(int) $t->getCode(),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$reason = '';
|
$reason = '';
|
||||||
|
|
||||||
if ($union) {
|
if ($union) {
|
||||||
$reason = ' because the declared return type is a union';
|
$reason = ' because the declared return type is a union';
|
||||||
} elseif ($intersection) {
|
} elseif ($intersection) {
|
||||||
$reason = ' because the declared return type is an intersection';
|
$reason = ' because the declared return type is an intersection';
|
||||||
|
|
||||||
$onlyInterfaces = true;
|
|
||||||
|
|
||||||
foreach ($types as $type) {
|
|
||||||
if (!interface_exists($type)) {
|
|
||||||
$onlyInterfaces = false;
|
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($onlyInterfaces) {
|
|
||||||
try {
|
|
||||||
return (new Generator)->getMockForInterfaces($types);
|
|
||||||
} catch (Throwable $t) {
|
|
||||||
throw new RuntimeException(
|
|
||||||
sprintf(
|
|
||||||
'Return value for %s::%s() cannot be generated: %s',
|
|
||||||
$this->className,
|
|
||||||
$this->methodName,
|
|
||||||
$t->getMessage(),
|
|
||||||
),
|
|
||||||
(int) $t->getCode(),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
throw new RuntimeException(
|
throw new RuntimeException(
|
||||||
@@ -288,12 +285,17 @@ final class Invocation implements SelfDescribing
|
|||||||
return $this->object;
|
return $this->object;
|
||||||
}
|
}
|
||||||
|
|
||||||
private function cloneObject(object $original): object
|
/**
|
||||||
|
* @psalm-param non-empty-list<string> $types
|
||||||
|
*/
|
||||||
|
private function onlyInterfaces(array $types): bool
|
||||||
{
|
{
|
||||||
if (Type::isCloneable($original)) {
|
foreach ($types as $type) {
|
||||||
return clone $original;
|
if (!interface_exists($type)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $original;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,11 +23,8 @@ use function substr;
|
|||||||
use function substr_count;
|
use function substr_count;
|
||||||
use function trim;
|
use function trim;
|
||||||
use function var_export;
|
use function var_export;
|
||||||
use ReflectionIntersectionType;
|
|
||||||
use ReflectionMethod;
|
use ReflectionMethod;
|
||||||
use ReflectionNamedType;
|
|
||||||
use ReflectionParameter;
|
use ReflectionParameter;
|
||||||
use ReflectionUnionType;
|
|
||||||
use SebastianBergmann\Template\Exception as TemplateException;
|
use SebastianBergmann\Template\Exception as TemplateException;
|
||||||
use SebastianBergmann\Template\Template;
|
use SebastianBergmann\Template\Template;
|
||||||
use SebastianBergmann\Type\ReflectionMapper;
|
use SebastianBergmann\Type\ReflectionMapper;
|
||||||
@@ -274,6 +271,7 @@ final class MockMethod
|
|||||||
private static function getMethodParametersForDeclaration(ReflectionMethod $method): string
|
private static function getMethodParametersForDeclaration(ReflectionMethod $method): string
|
||||||
{
|
{
|
||||||
$parameters = [];
|
$parameters = [];
|
||||||
|
$types = (new ReflectionMapper)->fromParameterTypes($method);
|
||||||
|
|
||||||
foreach ($method->getParameters() as $i => $parameter) {
|
foreach ($method->getParameters() as $i => $parameter) {
|
||||||
$name = '$' . $parameter->getName();
|
$name = '$' . $parameter->getName();
|
||||||
@@ -285,19 +283,16 @@ final class MockMethod
|
|||||||
$name = '$arg' . $i;
|
$name = '$arg' . $i;
|
||||||
}
|
}
|
||||||
|
|
||||||
$nullable = '';
|
|
||||||
$default = '';
|
$default = '';
|
||||||
$reference = '';
|
$reference = '';
|
||||||
$typeDeclaration = '';
|
$typeDeclaration = '';
|
||||||
$type = null;
|
|
||||||
$typeName = null;
|
|
||||||
|
|
||||||
if ($parameter->hasType()) {
|
if (!$types[$i]->type()->isUnknown()) {
|
||||||
$type = $parameter->getType();
|
$typeDeclaration = $types[$i]->type()->asString() . ' ';
|
||||||
|
}
|
||||||
|
|
||||||
if ($type instanceof ReflectionNamedType) {
|
if ($parameter->isPassedByReference()) {
|
||||||
$typeName = $type->getName();
|
$reference = '&';
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($parameter->isVariadic()) {
|
if ($parameter->isVariadic()) {
|
||||||
@@ -308,34 +303,7 @@ final class MockMethod
|
|||||||
$default = ' = null';
|
$default = ' = null';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($type !== null) {
|
$parameters[] = $typeDeclaration . $reference . $name . $default;
|
||||||
if ($typeName !== 'mixed' &&
|
|
||||||
$typeName !== 'null' &&
|
|
||||||
!$type instanceof ReflectionIntersectionType &&
|
|
||||||
!$type instanceof ReflectionUnionType &&
|
|
||||||
$parameter->allowsNull()) {
|
|
||||||
$nullable = '?';
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($typeName === 'self') {
|
|
||||||
$typeDeclaration = $method->getDeclaringClass()->getName() . ' ';
|
|
||||||
} elseif ($typeName !== null) {
|
|
||||||
$typeDeclaration = $typeName . ' ';
|
|
||||||
} elseif ($type instanceof ReflectionUnionType) {
|
|
||||||
$typeDeclaration = self::unionTypeAsString(
|
|
||||||
$type,
|
|
||||||
$method->getDeclaringClass()->getName()
|
|
||||||
);
|
|
||||||
} elseif ($type instanceof ReflectionIntersectionType) {
|
|
||||||
$typeDeclaration = self::intersectionTypeAsString($type);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($parameter->isPassedByReference()) {
|
|
||||||
$reference = '&';
|
|
||||||
}
|
|
||||||
|
|
||||||
$parameters[] = $nullable . $typeDeclaration . $reference . $name . $default;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return implode(', ', $parameters);
|
return implode(', ', $parameters);
|
||||||
@@ -409,30 +377,4 @@ final class MockMethod
|
|||||||
}
|
}
|
||||||
// @codeCoverageIgnoreEnd
|
// @codeCoverageIgnoreEnd
|
||||||
}
|
}
|
||||||
|
|
||||||
private static function unionTypeAsString(ReflectionUnionType $union, string $self): string
|
|
||||||
{
|
|
||||||
$types = [];
|
|
||||||
|
|
||||||
foreach ($union->getTypes() as $type) {
|
|
||||||
if ((string) $type === 'self') {
|
|
||||||
$types[] = $self;
|
|
||||||
} else {
|
|
||||||
$types[] = $type;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return implode('|', $types) . ' ';
|
|
||||||
}
|
|
||||||
|
|
||||||
private static function intersectionTypeAsString(ReflectionIntersectionType $intersection): string
|
|
||||||
{
|
|
||||||
$types = [];
|
|
||||||
|
|
||||||
foreach ($intersection->getTypes() as $type) {
|
|
||||||
$types[] = $type;
|
|
||||||
}
|
|
||||||
|
|
||||||
return implode('&', $types) . ' ';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ use PHPUnit\Framework\MockObject\Invocation as BaseInvocation;
|
|||||||
* @internal This class is not covered by the backward compatibility promise for PHPUnit
|
* @internal This class is not covered by the backward compatibility promise for PHPUnit
|
||||||
*
|
*
|
||||||
* @deprecated https://github.com/sebastianbergmann/phpunit/issues/4297
|
* @deprecated https://github.com/sebastianbergmann/phpunit/issues/4297
|
||||||
|
*
|
||||||
* @codeCoverageIgnore
|
* @codeCoverageIgnore
|
||||||
*/
|
*/
|
||||||
final class InvokedAtIndex extends InvocationOrder
|
final class InvokedAtIndex extends InvocationOrder
|
||||||
|
|||||||
@@ -91,11 +91,11 @@ use PHPUnit\Framework\MockObject\Stub\ReturnStub;
|
|||||||
use PHPUnit\Framework\MockObject\Stub\ReturnValueMap as ReturnValueMapStub;
|
use PHPUnit\Framework\MockObject\Stub\ReturnValueMap as ReturnValueMapStub;
|
||||||
use PHPUnit\Runner\BaseTestRunner;
|
use PHPUnit\Runner\BaseTestRunner;
|
||||||
use PHPUnit\Runner\PhptTestCase;
|
use PHPUnit\Runner\PhptTestCase;
|
||||||
|
use PHPUnit\Util\Cloner;
|
||||||
use PHPUnit\Util\Exception as UtilException;
|
use PHPUnit\Util\Exception as UtilException;
|
||||||
use PHPUnit\Util\GlobalState;
|
use PHPUnit\Util\GlobalState;
|
||||||
use PHPUnit\Util\PHP\AbstractPhpProcess;
|
use PHPUnit\Util\PHP\AbstractPhpProcess;
|
||||||
use PHPUnit\Util\Test as TestUtil;
|
use PHPUnit\Util\Test as TestUtil;
|
||||||
use PHPUnit\Util\Type;
|
|
||||||
use Prophecy\Exception\Prediction\PredictionException;
|
use Prophecy\Exception\Prediction\PredictionException;
|
||||||
use Prophecy\Prophecy\MethodProphecy;
|
use Prophecy\Prophecy\MethodProphecy;
|
||||||
use Prophecy\Prophecy\ObjectProphecy;
|
use Prophecy\Prophecy\ObjectProphecy;
|
||||||
@@ -417,6 +417,7 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T
|
|||||||
* at the given index.
|
* at the given index.
|
||||||
*
|
*
|
||||||
* @deprecated https://github.com/sebastianbergmann/phpunit/issues/4297
|
* @deprecated https://github.com/sebastianbergmann/phpunit/issues/4297
|
||||||
|
*
|
||||||
* @codeCoverageIgnore
|
* @codeCoverageIgnore
|
||||||
*/
|
*/
|
||||||
public static function at(int $index): InvokedAtIndexMatcher
|
public static function at(int $index): InvokedAtIndexMatcher
|
||||||
@@ -912,7 +913,9 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T
|
|||||||
* Returns a builder object to create mock objects using a fluent interface.
|
* Returns a builder object to create mock objects using a fluent interface.
|
||||||
*
|
*
|
||||||
* @psalm-template RealInstanceType of object
|
* @psalm-template RealInstanceType of object
|
||||||
|
*
|
||||||
* @psalm-param class-string<RealInstanceType> $className
|
* @psalm-param class-string<RealInstanceType> $className
|
||||||
|
*
|
||||||
* @psalm-return MockBuilder<RealInstanceType>
|
* @psalm-return MockBuilder<RealInstanceType>
|
||||||
*/
|
*/
|
||||||
public function getMockBuilder(string $className): MockBuilder
|
public function getMockBuilder(string $className): MockBuilder
|
||||||
@@ -1699,7 +1702,9 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T
|
|||||||
* Makes configurable stub for the specified class.
|
* Makes configurable stub for the specified class.
|
||||||
*
|
*
|
||||||
* @psalm-template RealInstanceType of object
|
* @psalm-template RealInstanceType of object
|
||||||
|
*
|
||||||
* @psalm-param class-string<RealInstanceType> $originalClassName
|
* @psalm-param class-string<RealInstanceType> $originalClassName
|
||||||
|
*
|
||||||
* @psalm-return Stub&RealInstanceType
|
* @psalm-return Stub&RealInstanceType
|
||||||
*/
|
*/
|
||||||
protected function createStub(string $originalClassName): Stub
|
protected function createStub(string $originalClassName): Stub
|
||||||
@@ -1711,7 +1716,9 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T
|
|||||||
* Returns a mock object for the specified class.
|
* Returns a mock object for the specified class.
|
||||||
*
|
*
|
||||||
* @psalm-template RealInstanceType of object
|
* @psalm-template RealInstanceType of object
|
||||||
|
*
|
||||||
* @psalm-param class-string<RealInstanceType> $originalClassName
|
* @psalm-param class-string<RealInstanceType> $originalClassName
|
||||||
|
*
|
||||||
* @psalm-return MockObject&RealInstanceType
|
* @psalm-return MockObject&RealInstanceType
|
||||||
*/
|
*/
|
||||||
protected function createMock(string $originalClassName): MockObject
|
protected function createMock(string $originalClassName): MockObject
|
||||||
@@ -1723,7 +1730,9 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T
|
|||||||
* Returns a configured mock object for the specified class.
|
* Returns a configured mock object for the specified class.
|
||||||
*
|
*
|
||||||
* @psalm-template RealInstanceType of object
|
* @psalm-template RealInstanceType of object
|
||||||
|
*
|
||||||
* @psalm-param class-string<RealInstanceType> $originalClassName
|
* @psalm-param class-string<RealInstanceType> $originalClassName
|
||||||
|
*
|
||||||
* @psalm-return MockObject&RealInstanceType
|
* @psalm-return MockObject&RealInstanceType
|
||||||
*/
|
*/
|
||||||
protected function createConfiguredMock(string $originalClassName, array $configuration): MockObject
|
protected function createConfiguredMock(string $originalClassName, array $configuration): MockObject
|
||||||
@@ -1743,7 +1752,9 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T
|
|||||||
* @param string[] $methods
|
* @param string[] $methods
|
||||||
*
|
*
|
||||||
* @psalm-template RealInstanceType of object
|
* @psalm-template RealInstanceType of object
|
||||||
|
*
|
||||||
* @psalm-param class-string<RealInstanceType> $originalClassName
|
* @psalm-param class-string<RealInstanceType> $originalClassName
|
||||||
|
*
|
||||||
* @psalm-return MockObject&RealInstanceType
|
* @psalm-return MockObject&RealInstanceType
|
||||||
*/
|
*/
|
||||||
protected function createPartialMock(string $originalClassName, array $methods): MockObject
|
protected function createPartialMock(string $originalClassName, array $methods): MockObject
|
||||||
@@ -1791,7 +1802,9 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T
|
|||||||
* Returns a test proxy for the specified class.
|
* Returns a test proxy for the specified class.
|
||||||
*
|
*
|
||||||
* @psalm-template RealInstanceType of object
|
* @psalm-template RealInstanceType of object
|
||||||
|
*
|
||||||
* @psalm-param class-string<RealInstanceType> $originalClassName
|
* @psalm-param class-string<RealInstanceType> $originalClassName
|
||||||
|
*
|
||||||
* @psalm-return MockObject&RealInstanceType
|
* @psalm-return MockObject&RealInstanceType
|
||||||
*/
|
*/
|
||||||
protected function createTestProxy(string $originalClassName, array $constructorArguments = []): MockObject
|
protected function createTestProxy(string $originalClassName, array $constructorArguments = []): MockObject
|
||||||
@@ -1808,7 +1821,9 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T
|
|||||||
* @param null|array $methods $methods
|
* @param null|array $methods $methods
|
||||||
*
|
*
|
||||||
* @psalm-template RealInstanceType of object
|
* @psalm-template RealInstanceType of object
|
||||||
|
*
|
||||||
* @psalm-param class-string<RealInstanceType>|string $originalClassName
|
* @psalm-param class-string<RealInstanceType>|string $originalClassName
|
||||||
|
*
|
||||||
* @psalm-return class-string<MockObject&RealInstanceType>
|
* @psalm-return class-string<MockObject&RealInstanceType>
|
||||||
*/
|
*/
|
||||||
protected function getMockClass(string $originalClassName, $methods = [], array $arguments = [], string $mockClassName = '', bool $callOriginalConstructor = false, bool $callOriginalClone = true, bool $callAutoload = true, bool $cloneArguments = false): string
|
protected function getMockClass(string $originalClassName, $methods = [], array $arguments = [], string $mockClassName = '', bool $callOriginalConstructor = false, bool $callOriginalClone = true, bool $callAutoload = true, bool $cloneArguments = false): string
|
||||||
@@ -1835,7 +1850,9 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T
|
|||||||
* To mock concrete methods, use the 7th parameter ($mockedMethods).
|
* To mock concrete methods, use the 7th parameter ($mockedMethods).
|
||||||
*
|
*
|
||||||
* @psalm-template RealInstanceType of object
|
* @psalm-template RealInstanceType of object
|
||||||
|
*
|
||||||
* @psalm-param class-string<RealInstanceType> $originalClassName
|
* @psalm-param class-string<RealInstanceType> $originalClassName
|
||||||
|
*
|
||||||
* @psalm-return MockObject&RealInstanceType
|
* @psalm-return MockObject&RealInstanceType
|
||||||
*/
|
*/
|
||||||
protected function getMockForAbstractClass(string $originalClassName, array $arguments = [], string $mockClassName = '', bool $callOriginalConstructor = true, bool $callOriginalClone = true, bool $callAutoload = true, array $mockedMethods = [], bool $cloneArguments = false): MockObject
|
protected function getMockForAbstractClass(string $originalClassName, array $arguments = [], string $mockClassName = '', bool $callOriginalConstructor = true, bool $callOriginalClone = true, bool $callAutoload = true, array $mockedMethods = [], bool $cloneArguments = false): MockObject
|
||||||
@@ -1862,7 +1879,9 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T
|
|||||||
* Returns a mock object based on the given WSDL file.
|
* Returns a mock object based on the given WSDL file.
|
||||||
*
|
*
|
||||||
* @psalm-template RealInstanceType of object
|
* @psalm-template RealInstanceType of object
|
||||||
|
*
|
||||||
* @psalm-param class-string<RealInstanceType>|string $originalClassName
|
* @psalm-param class-string<RealInstanceType>|string $originalClassName
|
||||||
|
*
|
||||||
* @psalm-return MockObject&RealInstanceType
|
* @psalm-return MockObject&RealInstanceType
|
||||||
*/
|
*/
|
||||||
protected function getMockFromWsdl(string $wsdlFile, string $originalClassName = '', string $mockClassName = '', array $methods = [], bool $callOriginalConstructor = true, array $options = []): MockObject
|
protected function getMockFromWsdl(string $wsdlFile, string $originalClassName = '', string $mockClassName = '', array $methods = [], bool $callOriginalConstructor = true, array $options = []): MockObject
|
||||||
@@ -2434,9 +2453,7 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T
|
|||||||
} else {
|
} else {
|
||||||
foreach ($testArguments as $testArgument) {
|
foreach ($testArguments as $testArgument) {
|
||||||
if ($testArgument instanceof MockObject) {
|
if ($testArgument instanceof MockObject) {
|
||||||
if (Type::isCloneable($testArgument)) {
|
$testArgument = Cloner::clone($testArgument);
|
||||||
$testArgument = clone $testArgument;
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->registerMockObject($testArgument);
|
$this->registerMockObject($testArgument);
|
||||||
} elseif (is_array($testArgument) && !in_array($testArgument, $visited, true)) {
|
} elseif (is_array($testArgument) && !in_array($testArgument, $visited, true)) {
|
||||||
@@ -2569,7 +2586,9 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @psalm-template RealInstanceType of object
|
* @psalm-template RealInstanceType of object
|
||||||
|
*
|
||||||
* @psalm-param class-string<RealInstanceType> $originalClassName
|
* @psalm-param class-string<RealInstanceType> $originalClassName
|
||||||
|
*
|
||||||
* @psalm-return MockObject&RealInstanceType
|
* @psalm-return MockObject&RealInstanceType
|
||||||
*/
|
*/
|
||||||
private function createMockObject(string $originalClassName): MockObject
|
private function createMockObject(string $originalClassName): MockObject
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ use Throwable;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @deprecated The `TestListener` interface is deprecated
|
* @deprecated The `TestListener` interface is deprecated
|
||||||
|
*
|
||||||
* @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
|
* @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
|
||||||
*/
|
*/
|
||||||
trait TestListenerDefaultImplementation
|
trait TestListenerDefaultImplementation
|
||||||
|
|||||||
@@ -10,7 +10,9 @@
|
|||||||
namespace PHPUnit\Framework;
|
namespace PHPUnit\Framework;
|
||||||
|
|
||||||
use const PHP_EOL;
|
use const PHP_EOL;
|
||||||
|
use function class_exists;
|
||||||
use function count;
|
use function count;
|
||||||
|
use function extension_loaded;
|
||||||
use function function_exists;
|
use function function_exists;
|
||||||
use function get_class;
|
use function get_class;
|
||||||
use function sprintf;
|
use function sprintf;
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ use const PHP_EOL;
|
|||||||
use function array_keys;
|
use function array_keys;
|
||||||
use function array_map;
|
use function array_map;
|
||||||
use function array_merge;
|
use function array_merge;
|
||||||
|
use function array_slice;
|
||||||
use function array_unique;
|
use function array_unique;
|
||||||
use function basename;
|
use function basename;
|
||||||
use function call_user_func;
|
use function call_user_func;
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ use function is_dir;
|
|||||||
use function is_file;
|
use function is_file;
|
||||||
use function json_decode;
|
use function json_decode;
|
||||||
use function json_encode;
|
use function json_encode;
|
||||||
|
use function sprintf;
|
||||||
use PHPUnit\Util\Filesystem;
|
use PHPUnit\Util\Filesystem;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -100,6 +100,7 @@ final class ExtensionHandler
|
|||||||
if ($extensionConfiguration->hasSourceFile()) {
|
if ($extensionConfiguration->hasSourceFile()) {
|
||||||
/**
|
/**
|
||||||
* @noinspection PhpIncludeInspection
|
* @noinspection PhpIncludeInspection
|
||||||
|
*
|
||||||
* @psalm-suppress UnresolvableInclude
|
* @psalm-suppress UnresolvableInclude
|
||||||
*/
|
*/
|
||||||
require_once $extensionConfiguration->sourceFile();
|
require_once $extensionConfiguration->sourceFile();
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
*/
|
*/
|
||||||
namespace PHPUnit\Runner\Extension;
|
namespace PHPUnit\Runner\Extension;
|
||||||
|
|
||||||
|
use function is_file;
|
||||||
use PharIo\Manifest\ApplicationName;
|
use PharIo\Manifest\ApplicationName;
|
||||||
use PharIo\Manifest\Exception as ManifestException;
|
use PharIo\Manifest\Exception as ManifestException;
|
||||||
use PharIo\Manifest\ManifestLoader;
|
use PharIo\Manifest\ManifestLoader;
|
||||||
@@ -60,6 +61,7 @@ final class PharLoader
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @noinspection PhpIncludeInspection
|
* @noinspection PhpIncludeInspection
|
||||||
|
*
|
||||||
* @psalm-suppress UnresolvableInclude
|
* @psalm-suppress UnresolvableInclude
|
||||||
*/
|
*/
|
||||||
require $file;
|
require $file;
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ final class Version
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (self::$version === '') {
|
if (self::$version === '') {
|
||||||
self::$version = (new VersionId('9.5.24', dirname(__DIR__, 2)))->getVersion();
|
self::$version = (new VersionId('9.5.25', dirname(__DIR__, 2)))->getVersion();
|
||||||
}
|
}
|
||||||
|
|
||||||
return self::$version;
|
return self::$version;
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ use PHPUnit\TextUI\XmlConfiguration\Extension;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @internal This class is not covered by the backward compatibility promise for PHPUnit
|
* @internal This class is not covered by the backward compatibility promise for PHPUnit
|
||||||
|
*
|
||||||
* @psalm-immutable
|
* @psalm-immutable
|
||||||
*/
|
*/
|
||||||
final class Configuration
|
final class Configuration
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ use function get_class;
|
|||||||
use function getcwd;
|
use function getcwd;
|
||||||
use function ini_get;
|
use function ini_get;
|
||||||
use function ini_set;
|
use function ini_set;
|
||||||
|
use function is_array;
|
||||||
use function is_callable;
|
use function is_callable;
|
||||||
use function is_dir;
|
use function is_dir;
|
||||||
use function is_file;
|
use function is_file;
|
||||||
@@ -437,6 +438,7 @@ class Command
|
|||||||
if ($loaderFile) {
|
if ($loaderFile) {
|
||||||
/**
|
/**
|
||||||
* @noinspection PhpIncludeInspection
|
* @noinspection PhpIncludeInspection
|
||||||
|
*
|
||||||
* @psalm-suppress UnresolvableInclude
|
* @psalm-suppress UnresolvableInclude
|
||||||
*/
|
*/
|
||||||
require $loaderFile;
|
require $loaderFile;
|
||||||
@@ -498,6 +500,7 @@ class Command
|
|||||||
if ($printerFile) {
|
if ($printerFile) {
|
||||||
/**
|
/**
|
||||||
* @noinspection PhpIncludeInspection
|
* @noinspection PhpIncludeInspection
|
||||||
|
*
|
||||||
* @psalm-suppress UnresolvableInclude
|
* @psalm-suppress UnresolvableInclude
|
||||||
*/
|
*/
|
||||||
require $printerFile;
|
require $printerFile;
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ use PHPUnit\TextUI\XmlConfiguration\FileCollection;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @internal This class is not covered by the backward compatibility promise for PHPUnit
|
* @internal This class is not covered by the backward compatibility promise for PHPUnit
|
||||||
|
*
|
||||||
* @psalm-immutable
|
* @psalm-immutable
|
||||||
*/
|
*/
|
||||||
final class CodeCoverage
|
final class CodeCoverage
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ namespace PHPUnit\TextUI\XmlConfiguration\CodeCoverage\Filter;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @internal This class is not covered by the backward compatibility promise for PHPUnit
|
* @internal This class is not covered by the backward compatibility promise for PHPUnit
|
||||||
|
*
|
||||||
* @psalm-immutable
|
* @psalm-immutable
|
||||||
*/
|
*/
|
||||||
final class Directory
|
final class Directory
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ use IteratorAggregate;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @internal This class is not covered by the backward compatibility promise for PHPUnit
|
* @internal This class is not covered by the backward compatibility promise for PHPUnit
|
||||||
|
*
|
||||||
* @psalm-immutable
|
* @psalm-immutable
|
||||||
*/
|
*/
|
||||||
final class DirectoryCollection implements Countable, IteratorAggregate
|
final class DirectoryCollection implements Countable, IteratorAggregate
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ use PHPUnit\TextUI\XmlConfiguration\File;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @internal This class is not covered by the backward compatibility promise for PHPUnit
|
* @internal This class is not covered by the backward compatibility promise for PHPUnit
|
||||||
|
*
|
||||||
* @psalm-immutable
|
* @psalm-immutable
|
||||||
*/
|
*/
|
||||||
final class Clover
|
final class Clover
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ use PHPUnit\TextUI\XmlConfiguration\File;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @internal This class is not covered by the backward compatibility promise for PHPUnit
|
* @internal This class is not covered by the backward compatibility promise for PHPUnit
|
||||||
|
*
|
||||||
* @psalm-immutable
|
* @psalm-immutable
|
||||||
*/
|
*/
|
||||||
final class Cobertura
|
final class Cobertura
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ use PHPUnit\TextUI\XmlConfiguration\File;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @internal This class is not covered by the backward compatibility promise for PHPUnit
|
* @internal This class is not covered by the backward compatibility promise for PHPUnit
|
||||||
|
*
|
||||||
* @psalm-immutable
|
* @psalm-immutable
|
||||||
*/
|
*/
|
||||||
final class Crap4j
|
final class Crap4j
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ use PHPUnit\TextUI\XmlConfiguration\Directory;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @internal This class is not covered by the backward compatibility promise for PHPUnit
|
* @internal This class is not covered by the backward compatibility promise for PHPUnit
|
||||||
|
*
|
||||||
* @psalm-immutable
|
* @psalm-immutable
|
||||||
*/
|
*/
|
||||||
final class Html
|
final class Html
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ use PHPUnit\TextUI\XmlConfiguration\File;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @internal This class is not covered by the backward compatibility promise for PHPUnit
|
* @internal This class is not covered by the backward compatibility promise for PHPUnit
|
||||||
|
*
|
||||||
* @psalm-immutable
|
* @psalm-immutable
|
||||||
*/
|
*/
|
||||||
final class Php
|
final class Php
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ use PHPUnit\TextUI\XmlConfiguration\File;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @internal This class is not covered by the backward compatibility promise for PHPUnit
|
* @internal This class is not covered by the backward compatibility promise for PHPUnit
|
||||||
|
*
|
||||||
* @psalm-immutable
|
* @psalm-immutable
|
||||||
*/
|
*/
|
||||||
final class Text
|
final class Text
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ use PHPUnit\TextUI\XmlConfiguration\Directory;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @internal This class is not covered by the backward compatibility promise for PHPUnit
|
* @internal This class is not covered by the backward compatibility promise for PHPUnit
|
||||||
|
*
|
||||||
* @psalm-immutable
|
* @psalm-immutable
|
||||||
*/
|
*/
|
||||||
final class Xml
|
final class Xml
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ use PHPUnit\Util\Xml\ValidationResult;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @internal This class is not covered by the backward compatibility promise for PHPUnit
|
* @internal This class is not covered by the backward compatibility promise for PHPUnit
|
||||||
|
*
|
||||||
* @psalm-immutable
|
* @psalm-immutable
|
||||||
*/
|
*/
|
||||||
final class Configuration
|
final class Configuration
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ namespace PHPUnit\TextUI\XmlConfiguration;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @internal This class is not covered by the backward compatibility promise for PHPUnit
|
* @internal This class is not covered by the backward compatibility promise for PHPUnit
|
||||||
|
*
|
||||||
* @psalm-immutable
|
* @psalm-immutable
|
||||||
*/
|
*/
|
||||||
final class Directory
|
final class Directory
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ use IteratorAggregate;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @internal This class is not covered by the backward compatibility promise for PHPUnit
|
* @internal This class is not covered by the backward compatibility promise for PHPUnit
|
||||||
|
*
|
||||||
* @psalm-immutable
|
* @psalm-immutable
|
||||||
*/
|
*/
|
||||||
final class DirectoryCollection implements Countable, IteratorAggregate
|
final class DirectoryCollection implements Countable, IteratorAggregate
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ namespace PHPUnit\TextUI\XmlConfiguration;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @internal This class is not covered by the backward compatibility promise for PHPUnit
|
* @internal This class is not covered by the backward compatibility promise for PHPUnit
|
||||||
|
*
|
||||||
* @psalm-immutable
|
* @psalm-immutable
|
||||||
*/
|
*/
|
||||||
final class File
|
final class File
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ use IteratorAggregate;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @internal This class is not covered by the backward compatibility promise for PHPUnit
|
* @internal This class is not covered by the backward compatibility promise for PHPUnit
|
||||||
|
*
|
||||||
* @psalm-immutable
|
* @psalm-immutable
|
||||||
*/
|
*/
|
||||||
final class FileCollection implements Countable, IteratorAggregate
|
final class FileCollection implements Countable, IteratorAggregate
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ namespace PHPUnit\TextUI\XmlConfiguration;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @internal This class is not covered by the backward compatibility promise for PHPUnit
|
* @internal This class is not covered by the backward compatibility promise for PHPUnit
|
||||||
|
*
|
||||||
* @psalm-immutable
|
* @psalm-immutable
|
||||||
*/
|
*/
|
||||||
final class Group
|
final class Group
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ use IteratorAggregate;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @internal This class is not covered by the backward compatibility promise for PHPUnit
|
* @internal This class is not covered by the backward compatibility promise for PHPUnit
|
||||||
|
*
|
||||||
* @psalm-immutable
|
* @psalm-immutable
|
||||||
*/
|
*/
|
||||||
final class GroupCollection implements IteratorAggregate
|
final class GroupCollection implements IteratorAggregate
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ namespace PHPUnit\TextUI\XmlConfiguration;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @internal This class is not covered by the backward compatibility promise for PHPUnit
|
* @internal This class is not covered by the backward compatibility promise for PHPUnit
|
||||||
|
*
|
||||||
* @psalm-immutable
|
* @psalm-immutable
|
||||||
*/
|
*/
|
||||||
final class Groups
|
final class Groups
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ use PHPUnit\TextUI\XmlConfiguration\File;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @internal This class is not covered by the backward compatibility promise for PHPUnit
|
* @internal This class is not covered by the backward compatibility promise for PHPUnit
|
||||||
|
*
|
||||||
* @psalm-immutable
|
* @psalm-immutable
|
||||||
*/
|
*/
|
||||||
final class Junit
|
final class Junit
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ use PHPUnit\TextUI\XmlConfiguration\Logging\TestDox\Xml as TestDoxXml;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @internal This class is not covered by the backward compatibility promise for PHPUnit
|
* @internal This class is not covered by the backward compatibility promise for PHPUnit
|
||||||
|
*
|
||||||
* @psalm-immutable
|
* @psalm-immutable
|
||||||
*/
|
*/
|
||||||
final class Logging
|
final class Logging
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ use PHPUnit\TextUI\XmlConfiguration\File;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @internal This class is not covered by the backward compatibility promise for PHPUnit
|
* @internal This class is not covered by the backward compatibility promise for PHPUnit
|
||||||
|
*
|
||||||
* @psalm-immutable
|
* @psalm-immutable
|
||||||
*/
|
*/
|
||||||
final class TeamCity
|
final class TeamCity
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user