From 6d5f922f543f9be0cc2ae72d0c1808b00edde9c5 Mon Sep 17 00:00:00 2001 From: Nikolaos Dimopoulos Date: Fri, 10 Jul 2026 07:14:38 -0500 Subject: [PATCH 1/9] restructuring docker environments Assisted-by: Claude Code --- docker-compose.yml | 39 +++++------------- resources/docker/8.1/.bashrc | 72 --------------------------------- resources/docker/8.1/Dockerfile | 38 ----------------- resources/docker/8.1/extra.ini | 4 -- resources/docker/8.2/.bashrc | 72 --------------------------------- resources/docker/8.2/Dockerfile | 38 ----------------- resources/docker/8.2/extra.ini | 4 -- resources/docker/8.3/.bashrc | 72 --------------------------------- resources/docker/8.3/Dockerfile | 38 ----------------- resources/docker/8.3/extra.ini | 4 -- resources/docker/8.4/.bashrc | 72 --------------------------------- resources/docker/8.4/Dockerfile | 38 ----------------- resources/docker/8.4/extra.ini | 4 -- 13 files changed, 10 insertions(+), 485 deletions(-) delete mode 100644 resources/docker/8.1/.bashrc delete mode 100644 resources/docker/8.1/Dockerfile delete mode 100644 resources/docker/8.1/extra.ini delete mode 100644 resources/docker/8.2/.bashrc delete mode 100644 resources/docker/8.2/Dockerfile delete mode 100644 resources/docker/8.2/extra.ini delete mode 100644 resources/docker/8.3/.bashrc delete mode 100644 resources/docker/8.3/Dockerfile delete mode 100644 resources/docker/8.3/extra.ini delete mode 100644 resources/docker/8.4/.bashrc delete mode 100644 resources/docker/8.4/Dockerfile delete mode 100644 resources/docker/8.4/extra.ini diff --git a/docker-compose.yml b/docker-compose.yml index dc77f2b..ad126c1 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,33 +1,14 @@ services: - - phalcon-traits-8.1: - container_name: phalcon-traits-8.1 - hostname: phalcon-81 - build: resources/docker/8.1 - working_dir: /srv - volumes: - - .:/srv - - phalcon-traits-8.2: - container_name: phalcon-traits-8.2 - hostname: phalcon-82 - build: resources/docker/8.2 - working_dir: /srv - volumes: - - .:/srv - - phalcon-traits-8.3: - container_name: phalcon-traits-8.3 - hostname: phalcon-83 - build: resources/docker/8.3 - working_dir: /srv - volumes: - - .:/srv - - phalcon-traits-8.4: - container_name: phalcon-traits-8.4 - hostname: phalcon-84 - build: resources/docker/8.4 + app: + build: + context: . + dockerfile: resources/docker/Dockerfile + args: + PHP_VERSION: ${PHP_VERSION:-8.4} + UID: ${UID:-1000} + GID: ${GID:-1000} + container_name: ${PROJECT_PREFIX:-phalcon-traits}-app + hostname: ${PROJECT_PREFIX:-phalcon-traits}-app working_dir: /srv volumes: - .:/srv diff --git a/resources/docker/8.1/.bashrc b/resources/docker/8.1/.bashrc deleted file mode 100644 index 78889d1..0000000 --- a/resources/docker/8.1/.bashrc +++ /dev/null @@ -1,72 +0,0 @@ -#!/bin/bash - -# Easier navigation: .., ..., ...., ....., ~ and - -alias ..="cd .." -alias ...="cd ../.." -alias ....="cd ../../.." -alias .....="cd ../../../.." -alias ~="cd ~" # `cd` is probably faster to type though -alias -- -="cd -" - -# Shortcuts -alias g="git" -alias h="history" - -# Detect which `ls` flavor is in use -if ls --color > /dev/null 2>&1; then # GNU `ls` - colorflag="--color" -else # OS X `ls` - colorflag="-G" -fi - -# List all files colorized in long format -# shellcheck disable=SC2139 -alias l="ls -lF ${colorflag}" - -# List all files colorized in long format, including dot files -# shellcheck disable=SC2139 -alias la="ls -laF ${colorflag}" - -# List only directories -# shellcheck disable=SC2139 -alias lsd="ls -lF ${colorflag} | grep --color=never '^d'" - -# See: https://superuser.com/a/656746/280737 -alias ll='LC_ALL="C.UTF-8" ls -alF' - -# Always use color output for `ls` -# shellcheck disable=SC2139 -alias ls="command ls ${colorflag}" -export LS_COLORS='no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.avi=01;35:*.fli=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.ogg=01;35:*.mp3=01;35:*.wav=01;35:' - -# Always enable colored `grep` output -alias grep='grep --color=auto ' - -# Enable aliases to be sudo’ed -alias sudo='sudo ' - -# Get week number -alias week='date +%V' - -# Stopwatch -alias timer='echo "Timer started. Stop with Ctrl-D." && date && time cat && date' - -# Canonical hex dump; some systems have this symlinked -command -v hd > /dev/null || alias hd="hexdump -C" - -# vhosts -alias hosts='sudo nano /etc/hosts' - -# copy working directory -alias cwd='pwd | tr -d "\r\n" | xclip -selection clipboard' - -# copy file interactive -alias cp='cp -i' - -# move file interactive -alias mv='mv -i' - -# untar -alias untar='tar xvf' - -PATH=$PATH:./vendor/bin diff --git a/resources/docker/8.1/Dockerfile b/resources/docker/8.1/Dockerfile deleted file mode 100644 index 8f0157a..0000000 --- a/resources/docker/8.1/Dockerfile +++ /dev/null @@ -1,38 +0,0 @@ -FROM composer:2.8.5 AS composer -FROM php:8.1-fpm - -COPY extra.ini /usr/local/etc/php/conf.d/ - -# User/Group globals -ENV MY_USER="phalcon" \ - MY_GROUP="phalcon" \ - MY_UID="1000" \ - MY_GID="1000" \ - PHP_VERSION="8.1" - -# User and Group -RUN set -eux && \ - groupadd -g ${MY_GID} -r ${MY_GROUP} && \ - useradd -u ${MY_UID} -m -s /bin/bash -g ${MY_GROUP} ${MY_USER} && \ - apt update -y && \ - apt install -y \ - apt-utils \ - git \ - libzip-dev \ - nano \ - sudo \ - wget \ - zip && \ - rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/* && \ - pecl install xdebug && \ - docker-php-ext-install \ - zip && \ - docker-php-ext-enable \ - xdebug - -# Composer -COPY --from=composer /usr/bin/composer /usr/local/bin/composer -# Bash script with helper aliases -COPY .bashrc /root/.bashrc - -CMD ["php-fpm"] diff --git a/resources/docker/8.1/extra.ini b/resources/docker/8.1/extra.ini deleted file mode 100644 index dd4c161..0000000 --- a/resources/docker/8.1/extra.ini +++ /dev/null @@ -1,4 +0,0 @@ -memory_limit=512M -apc.enable_cli="On" -session.save_path="/tmp" -xdebug.mode="coverage" diff --git a/resources/docker/8.2/.bashrc b/resources/docker/8.2/.bashrc deleted file mode 100644 index 78889d1..0000000 --- a/resources/docker/8.2/.bashrc +++ /dev/null @@ -1,72 +0,0 @@ -#!/bin/bash - -# Easier navigation: .., ..., ...., ....., ~ and - -alias ..="cd .." -alias ...="cd ../.." -alias ....="cd ../../.." -alias .....="cd ../../../.." -alias ~="cd ~" # `cd` is probably faster to type though -alias -- -="cd -" - -# Shortcuts -alias g="git" -alias h="history" - -# Detect which `ls` flavor is in use -if ls --color > /dev/null 2>&1; then # GNU `ls` - colorflag="--color" -else # OS X `ls` - colorflag="-G" -fi - -# List all files colorized in long format -# shellcheck disable=SC2139 -alias l="ls -lF ${colorflag}" - -# List all files colorized in long format, including dot files -# shellcheck disable=SC2139 -alias la="ls -laF ${colorflag}" - -# List only directories -# shellcheck disable=SC2139 -alias lsd="ls -lF ${colorflag} | grep --color=never '^d'" - -# See: https://superuser.com/a/656746/280737 -alias ll='LC_ALL="C.UTF-8" ls -alF' - -# Always use color output for `ls` -# shellcheck disable=SC2139 -alias ls="command ls ${colorflag}" -export LS_COLORS='no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.avi=01;35:*.fli=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.ogg=01;35:*.mp3=01;35:*.wav=01;35:' - -# Always enable colored `grep` output -alias grep='grep --color=auto ' - -# Enable aliases to be sudo’ed -alias sudo='sudo ' - -# Get week number -alias week='date +%V' - -# Stopwatch -alias timer='echo "Timer started. Stop with Ctrl-D." && date && time cat && date' - -# Canonical hex dump; some systems have this symlinked -command -v hd > /dev/null || alias hd="hexdump -C" - -# vhosts -alias hosts='sudo nano /etc/hosts' - -# copy working directory -alias cwd='pwd | tr -d "\r\n" | xclip -selection clipboard' - -# copy file interactive -alias cp='cp -i' - -# move file interactive -alias mv='mv -i' - -# untar -alias untar='tar xvf' - -PATH=$PATH:./vendor/bin diff --git a/resources/docker/8.2/Dockerfile b/resources/docker/8.2/Dockerfile deleted file mode 100644 index fafde68..0000000 --- a/resources/docker/8.2/Dockerfile +++ /dev/null @@ -1,38 +0,0 @@ -FROM composer:2.8.5 AS composer -FROM php:8.2-fpm - -COPY extra.ini /usr/local/etc/php/conf.d/ - -# User/Group globals -ENV MY_USER="phalcon" \ - MY_GROUP="phalcon" \ - MY_UID="1000" \ - MY_GID="1000" \ - PHP_VERSION="8.1" - -# User and Group -RUN set -eux && \ - groupadd -g ${MY_GID} -r ${MY_GROUP} && \ - useradd -u ${MY_UID} -m -s /bin/bash -g ${MY_GROUP} ${MY_USER} && \ - apt update -y && \ - apt install -y \ - apt-utils \ - git \ - libzip-dev \ - nano \ - sudo \ - wget \ - zip && \ - rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/* && \ - pecl install xdebug && \ - docker-php-ext-install \ - zip && \ - docker-php-ext-enable \ - xdebug - -# Composer -COPY --from=composer /usr/bin/composer /usr/local/bin/composer -# Bash script with helper aliases -COPY .bashrc /root/.bashrc - -CMD ["php-fpm"] diff --git a/resources/docker/8.2/extra.ini b/resources/docker/8.2/extra.ini deleted file mode 100644 index dd4c161..0000000 --- a/resources/docker/8.2/extra.ini +++ /dev/null @@ -1,4 +0,0 @@ -memory_limit=512M -apc.enable_cli="On" -session.save_path="/tmp" -xdebug.mode="coverage" diff --git a/resources/docker/8.3/.bashrc b/resources/docker/8.3/.bashrc deleted file mode 100644 index 78889d1..0000000 --- a/resources/docker/8.3/.bashrc +++ /dev/null @@ -1,72 +0,0 @@ -#!/bin/bash - -# Easier navigation: .., ..., ...., ....., ~ and - -alias ..="cd .." -alias ...="cd ../.." -alias ....="cd ../../.." -alias .....="cd ../../../.." -alias ~="cd ~" # `cd` is probably faster to type though -alias -- -="cd -" - -# Shortcuts -alias g="git" -alias h="history" - -# Detect which `ls` flavor is in use -if ls --color > /dev/null 2>&1; then # GNU `ls` - colorflag="--color" -else # OS X `ls` - colorflag="-G" -fi - -# List all files colorized in long format -# shellcheck disable=SC2139 -alias l="ls -lF ${colorflag}" - -# List all files colorized in long format, including dot files -# shellcheck disable=SC2139 -alias la="ls -laF ${colorflag}" - -# List only directories -# shellcheck disable=SC2139 -alias lsd="ls -lF ${colorflag} | grep --color=never '^d'" - -# See: https://superuser.com/a/656746/280737 -alias ll='LC_ALL="C.UTF-8" ls -alF' - -# Always use color output for `ls` -# shellcheck disable=SC2139 -alias ls="command ls ${colorflag}" -export LS_COLORS='no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.avi=01;35:*.fli=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.ogg=01;35:*.mp3=01;35:*.wav=01;35:' - -# Always enable colored `grep` output -alias grep='grep --color=auto ' - -# Enable aliases to be sudo’ed -alias sudo='sudo ' - -# Get week number -alias week='date +%V' - -# Stopwatch -alias timer='echo "Timer started. Stop with Ctrl-D." && date && time cat && date' - -# Canonical hex dump; some systems have this symlinked -command -v hd > /dev/null || alias hd="hexdump -C" - -# vhosts -alias hosts='sudo nano /etc/hosts' - -# copy working directory -alias cwd='pwd | tr -d "\r\n" | xclip -selection clipboard' - -# copy file interactive -alias cp='cp -i' - -# move file interactive -alias mv='mv -i' - -# untar -alias untar='tar xvf' - -PATH=$PATH:./vendor/bin diff --git a/resources/docker/8.3/Dockerfile b/resources/docker/8.3/Dockerfile deleted file mode 100644 index e08bc7f..0000000 --- a/resources/docker/8.3/Dockerfile +++ /dev/null @@ -1,38 +0,0 @@ -FROM composer:2.8.5 AS composer -FROM php:8.3-fpm - -COPY extra.ini /usr/local/etc/php/conf.d/ - -# User/Group globals -ENV MY_USER="phalcon" \ - MY_GROUP="phalcon" \ - MY_UID="1000" \ - MY_GID="1000" \ - PHP_VERSION="8.1" - -# User and Group -RUN set -eux && \ - groupadd -g ${MY_GID} -r ${MY_GROUP} && \ - useradd -u ${MY_UID} -m -s /bin/bash -g ${MY_GROUP} ${MY_USER} && \ - apt update -y && \ - apt install -y \ - apt-utils \ - git \ - libzip-dev \ - nano \ - sudo \ - wget \ - zip && \ - rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/* && \ - pecl install xdebug && \ - docker-php-ext-install \ - zip && \ - docker-php-ext-enable \ - xdebug - -# Composer -COPY --from=composer /usr/bin/composer /usr/local/bin/composer -# Bash script with helper aliases -COPY .bashrc /root/.bashrc - -CMD ["php-fpm"] diff --git a/resources/docker/8.3/extra.ini b/resources/docker/8.3/extra.ini deleted file mode 100644 index dd4c161..0000000 --- a/resources/docker/8.3/extra.ini +++ /dev/null @@ -1,4 +0,0 @@ -memory_limit=512M -apc.enable_cli="On" -session.save_path="/tmp" -xdebug.mode="coverage" diff --git a/resources/docker/8.4/.bashrc b/resources/docker/8.4/.bashrc deleted file mode 100644 index 78889d1..0000000 --- a/resources/docker/8.4/.bashrc +++ /dev/null @@ -1,72 +0,0 @@ -#!/bin/bash - -# Easier navigation: .., ..., ...., ....., ~ and - -alias ..="cd .." -alias ...="cd ../.." -alias ....="cd ../../.." -alias .....="cd ../../../.." -alias ~="cd ~" # `cd` is probably faster to type though -alias -- -="cd -" - -# Shortcuts -alias g="git" -alias h="history" - -# Detect which `ls` flavor is in use -if ls --color > /dev/null 2>&1; then # GNU `ls` - colorflag="--color" -else # OS X `ls` - colorflag="-G" -fi - -# List all files colorized in long format -# shellcheck disable=SC2139 -alias l="ls -lF ${colorflag}" - -# List all files colorized in long format, including dot files -# shellcheck disable=SC2139 -alias la="ls -laF ${colorflag}" - -# List only directories -# shellcheck disable=SC2139 -alias lsd="ls -lF ${colorflag} | grep --color=never '^d'" - -# See: https://superuser.com/a/656746/280737 -alias ll='LC_ALL="C.UTF-8" ls -alF' - -# Always use color output for `ls` -# shellcheck disable=SC2139 -alias ls="command ls ${colorflag}" -export LS_COLORS='no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.avi=01;35:*.fli=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.ogg=01;35:*.mp3=01;35:*.wav=01;35:' - -# Always enable colored `grep` output -alias grep='grep --color=auto ' - -# Enable aliases to be sudo’ed -alias sudo='sudo ' - -# Get week number -alias week='date +%V' - -# Stopwatch -alias timer='echo "Timer started. Stop with Ctrl-D." && date && time cat && date' - -# Canonical hex dump; some systems have this symlinked -command -v hd > /dev/null || alias hd="hexdump -C" - -# vhosts -alias hosts='sudo nano /etc/hosts' - -# copy working directory -alias cwd='pwd | tr -d "\r\n" | xclip -selection clipboard' - -# copy file interactive -alias cp='cp -i' - -# move file interactive -alias mv='mv -i' - -# untar -alias untar='tar xvf' - -PATH=$PATH:./vendor/bin diff --git a/resources/docker/8.4/Dockerfile b/resources/docker/8.4/Dockerfile deleted file mode 100644 index f9cced1..0000000 --- a/resources/docker/8.4/Dockerfile +++ /dev/null @@ -1,38 +0,0 @@ -FROM composer:2.8.5 AS composer -FROM php:8.4-fpm - -COPY extra.ini /usr/local/etc/php/conf.d/ - -# User/Group globals -ENV MY_USER="phalcon" \ - MY_GROUP="phalcon" \ - MY_UID="1000" \ - MY_GID="1000" \ - PHP_VERSION="8.1" - -# User and Group -RUN set -eux && \ - groupadd -g ${MY_GID} -r ${MY_GROUP} && \ - useradd -u ${MY_UID} -m -s /bin/bash -g ${MY_GROUP} ${MY_USER} && \ - apt update -y && \ - apt install -y \ - apt-utils \ - git \ - libzip-dev \ - nano \ - sudo \ - wget \ - zip && \ - rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/* && \ - pecl install xdebug && \ - docker-php-ext-install \ - zip && \ - docker-php-ext-enable \ - xdebug - -# Composer -COPY --from=composer /usr/bin/composer /usr/local/bin/composer -# Bash script with helper aliases -COPY .bashrc /root/.bashrc - -CMD ["php-fpm"] diff --git a/resources/docker/8.4/extra.ini b/resources/docker/8.4/extra.ini deleted file mode 100644 index dd4c161..0000000 --- a/resources/docker/8.4/extra.ini +++ /dev/null @@ -1,4 +0,0 @@ -memory_limit=512M -apc.enable_cli="On" -session.save_path="/tmp" -xdebug.mode="coverage" From 73b6447168d94c16fc3dcb4587a0ac29d227674b Mon Sep 17 00:00:00 2001 From: Nikolaos Dimopoulos Date: Fri, 10 Jul 2026 07:25:54 -0500 Subject: [PATCH 2/9] quality tools reorg and CI Assisted-by: Claude Code --- .editorconfig | 21 + .github/dependabot.yml | 20 + .github/stale.yml | 57 - .github/workflows/main.yml | 223 +- CODE_OWNERS.TXT | 24 + composer.json | 95 +- composer.lock | 4351 +++++++++++++++--------- config/.env.example | 1 - config/.gitkeep | 0 phpunit.php | 19 - resources/docker/.bashrc | 74 + resources/docker/Dockerfile | 61 + resources/docker/extra.ini | 7 + resources/infection.json5 | 19 + resources/octocov.pr.yml | 32 + resources/octocov.yml | 33 + resources/php-cs-fixer.php | 58 + {config => resources}/phpcs.xml | 0 {config => resources}/phpstan.neon | 1 + {config => resources}/phpunit.xml.dist | 11 +- 20 files changed, 3277 insertions(+), 1830 deletions(-) create mode 100644 .editorconfig create mode 100644 .github/dependabot.yml delete mode 100644 .github/stale.yml create mode 100644 CODE_OWNERS.TXT delete mode 100644 config/.env.example delete mode 100644 config/.gitkeep delete mode 100644 phpunit.php create mode 100644 resources/docker/.bashrc create mode 100644 resources/docker/Dockerfile create mode 100644 resources/docker/extra.ini create mode 100644 resources/infection.json5 create mode 100644 resources/octocov.pr.yml create mode 100644 resources/octocov.yml create mode 100644 resources/php-cs-fixer.php rename {config => resources}/phpcs.xml (100%) rename {config => resources}/phpstan.neon (65%) rename {config => resources}/phpunit.xml.dist (60%) diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..c5d33b2 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,21 @@ +# EditorConfig is awesome: http://EditorConfig.org + +# top-most EditorConfig file +root = true +charset = utf-8 +trim_trailing_whitespace = true + +[*] +indent_style = space +indent_size = 4 +end_of_line = lf +insert_final_newline = true + +[*.md] +trim_trailing_whitespace = false + +[*.sh] +indent_style = tab + +[*.yml] +indent_size = 2 diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..fa2cbe2 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,20 @@ +version: 2 +updates: + - package-ecosystem: "composer" + directory: "/" + schedule: + interval: "weekly" + + # Keep the SHA-pinned GitHub Actions current. Dependabot opens reviewable + # pull requests that bump both the commit SHA and the trailing "# version" + # comment; it never merges on its own. + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" + open-pull-requests-limit: 10 + + - package-ecosystem: "docker" + directory: "/resources/docker" + schedule: + interval: "weekly" diff --git a/.github/stale.yml b/.github/stale.yml deleted file mode 100644 index c423a7c..0000000 --- a/.github/stale.yml +++ /dev/null @@ -1,57 +0,0 @@ -# Configuration for probot-stale - https://github.com/probot/stale - -# Number of days of inactivity before an Issue or Pull Request becomes stale -daysUntilStale: 90 - -# Number of days of inactivity before a stale Issue or Pull Request is closed. -# Set to false to disable. If disabled, issues still need to be closed manually, but will remain marked as stale. -daysUntilClose: 1 - -# Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable -exemptLabels: - - "status: high" - - "status: medium" - - "status: low" - - "bug" - - "wip" - - Locked - - "new feature request" - - "enhancement" - -# Set to true to ignore issues in a project (defaults to false) -exemptProjects: false - -# Set to true to ignore issues in a milestone (defaults to false) -exemptMilestones: true - -# Label to use when marking as stale -staleLabel: stale - -# Comment to post when marking as stale. Set to `false` to disable -markComment: > - Thank you for contributing to this issue. As it has been 90 days since the last activity, we are automatically closing the issue. This is often because the request was already solved in some way and it just wasn't updated or it's no longer applicable. If that's not the case, please feel free to either reopen this issue or open a new one. We will be more than happy to look at it again! You can read more here: https://blog.phalcon.io/post/github-closing-old-issues -# Comment to post when removing the stale label. -# unmarkComment: > -# Your comment here. - -# Comment to post when closing a stale Issue or Pull Request. -#closeComment: > -# Thank you for contributing to this issue. As it has been 90 days since the last activity, we are automatically closing the issue. This is often because the request was already solved in some way and it just wasn't updated or it's no longer applicable. If that's not the case, please feel free to either reopen this issue or open a new one. We will be more than happy to look at it again! You can read more here: https://blog.phalcon.io/post/github-closing-old-issues - -# Limit the number of actions per hour, from 1-30. Default is 30 -limitPerRun: 30 - -# Limit to only `issues` or `pulls` -only: issues - -# Optionally, specify configuration settings that are specific to just 'issues' or 'pulls': -# pulls: -# daysUntilStale: 30 -# markComment: > -# This pull request has been automatically marked as stale because it has not had -# recent activity. It will be closed if no further activity occurs. Thank you -# for your contributions! - -# issues: -# exemptLabels: -# - confirmed diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 29c3358..ff656e7 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -5,182 +5,155 @@ # For the full copyright and license information, please view # the LICENSE file that was distributed with this source code. -name: "Phalcon CI" +name: "Phalcon Traits CI" on: - schedule: - - cron: '0 2 * * *' # Daily at 02:00 runs only on default branch push: paths-ignore: - '**.md' - - '**.txt' pull_request: workflow_dispatch: -env: - fail-fast: true +permissions: { } - # For tests - LANG: en_US.UTF-8 - LANGUAGE: en_US.UTF-8 - LC_ALL: en_US.UTF-8 +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.ref != 'refs/heads/master' }} - # PHP extensions required by Composer - EXTENSIONS: intl, json, mbstring, msgpack +env: + EXTENSIONS: "apcu, gettext, igbinary, mbstring, msgpack, yaml" -permissions: { } jobs: - # PHP CodeSniffer inspection - phpcs: - name: "Validate Tests code style" - if: "!contains(github.event.head_commit.message, 'ci skip')" - + quality: + name: "Code quality (phpcs + phpstan + php-cs-fixer)" permissions: contents: read - runs-on: ubuntu-latest - - strategy: - fail-fast: true - matrix: - php: - - '8.1' - - '8.2' - - '8.3' - - '8.4' - steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 + with: + ref: ${{ github.event.pull_request.head.sha || github.sha }} + fetch-depth: 1 - name: "Setup PHP" - uses: shivammathur/setup-php@v2 + uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2 with: - php-version: ${{ matrix.php }} - extensions: ${{ env.EXTENSIONS }} - ini-values: apc.enable_cli=on, session.save_path=/tmp - tools: pecl, composer:v2 - env: - COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }} + php-version: '8.4' + extensions: mbstring + tools: composer:v2 + coverage: none + + - name: "Validate composer" + run: composer validate --no-check-all --no-check-publish - - name: "Install development dependencies with Composer" - uses: "ramsey/composer-install@v3" + - name: "Install dependencies" + uses: ramsey/composer-install@26d8a556604053a9612623447203a691f406fbe6 # v4 with: composer-options: "--prefer-dist" - - name: "Code Sniffer" - run: | - composer cs - - - name: "Code Analysis" - run: | - composer cs + - name: "PHPCS" + run: composer cs + - name: "PHPStan" + run: composer analyze - unit-tests: - needs: phpcs + - name: "PHP CS Fixer (dry-run)" + run: composer cs-fixer + tests: + name: "Tests / PHP ${{ matrix.php }}" permissions: - contents: read # to fetch code (actions/checkout) - - name: Unit tests / PHP-${{ matrix.php }} + contents: read runs-on: ubuntu-latest - + needs: + - quality strategy: + fail-fast: false matrix: - php: - - '8.1' - - '8.2' - - '8.3' - - '8.4' - + php: ['8.1', '8.2', '8.3', '8.4'] steps: - - uses: actions/checkout@v4 - - name: "Setup platform specific environment" - shell: pwsh - run: | - git config --global core.autocrlf false + - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 + with: + ref: ${{ github.event.pull_request.head.sha || github.sha }} + fetch-depth: 1 - name: "Setup PHP" - uses: shivammathur/setup-php@v2 + uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2 with: php-version: ${{ matrix.php }} extensions: ${{ env.EXTENSIONS }} - ini-values: apc.enable_cli=on - tools: pecl, composer:v2 - coverage: pcov - env: - PHPTS: ${{ matrix.ts }} - COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: "Validate composer" - run: composer validate --no-check-all --no-check-publish + ini-values: apc.enable_cli=1 + tools: composer:v2 + coverage: none - - name: "Install development dependencies with Composer" - uses: "ramsey/composer-install@v3" + - name: "Install dependencies" + uses: ramsey/composer-install@26d8a556604053a9612623447203a691f406fbe6 # v4 with: composer-options: "--prefer-dist" - - name: "Setup Tests" - shell: bash - run: | - cp -v config/.env.example .env - - - name: "Run Unit Tests" - if: always() - run: | - composer test-unit-coverage - - - name: "Upload coverage file artifact" - uses: "actions/upload-artifact@v4" - with: - name: "unit-${{ matrix.php }}.coverage" - path: "tests/_output/coverage.xml" + - name: "Run unit tests" + run: composer test - upload-coverage: + coverage: + name: "Coverage (SonarCloud + octocov)" permissions: contents: read - - name: "Upload coverage to Sonarcloud" + pull-requests: write + actions: read + needs: tests runs-on: ubuntu-latest - needs: - - "unit-tests" - steps: - - name: "Checkout" - uses: "actions/checkout@v4" + - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 with: + ref: ${{ github.event.pull_request.head.sha || github.sha }} + # SonarCloud needs full history for blame/new-code detection; + # octocov uses it for the base-branch diff. fetch-depth: 0 - - name: "Display structure of downloaded files" - run: | - mkdir -p cv + - name: "Setup PHP" + uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2 + with: + php-version: '8.4' + extensions: ${{ env.EXTENSIONS }} + ini-values: apc.enable_cli=1 + coverage: pcov + tools: composer:v2 - - name: "Download coverage files" - uses: "actions/download-artifact@v4" + - name: "Install dependencies" + uses: ramsey/composer-install@26d8a556604053a9612623447203a691f406fbe6 # v4 with: - path: "cv" - - - name: "Display structure of downloaded files" - run: | - mv cv/unit-8.1.coverage/coverage.xml cv/01.xml - mv cv/unit-8.2.coverage/coverage.xml cv/02.xml - mv cv/unit-8.3.coverage/coverage.xml cv/03.xml - mv cv/unit-8.4.coverage/coverage.xml cv/04.xml - ls -la cv/ - - - name: SonarCloud Scan - uses: SonarSource/sonarqube-scan-action@v4.2.1 + composer-options: "--prefer-dist" + + - name: "Tests with coverage" + run: composer test-coverage + + # SonarCloud first (push only) so a failing octocov gate can't skip the upload. + - name: "SonarQube Scan" + if: github.event_name == 'push' + uses: SonarSource/sonarqube-scan-action@713881670b6b3676cda39549040e2d88c70d582e # v8.2.0 env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} with: - projectBaseDir: ./ args: > - -Dsonar.organization=${{ secrets.SONAR_ORGANIZATION }} - -Dsonar.projectKey=${{ secrets.SONAR_PROJECT_KEY }} - -Dsonar.sources=src/ - -Dsonar.exclusions=vendor/**,cv/**,tests/** - -Dsonar.sourceEncoding=UTF-8 - -Dsonar.language=php - -Dsonar.tests=tests/ - -Dsonar.php.coverage.reportPaths=cv/01.xml,cv/02.xml,cv/03.xml,cv/04.xml + -Dsonar.organization=phalcon + -Dsonar.projectKey=phalcon_traits + -Dsonar.sources=src + -Dsonar.tests=tests + -Dsonar.exclusions=resources/** + -Dsonar.php.coverage.reportPaths=tests/_output/coverage.xml + + # octocov last: PR comment + coverage gate (strict on PRs via + # resources/octocov.pr.yml, floor only on pushes via resources/octocov.yml), + # stores the baseline report on the default branch, and writes the badge SVG. + - name: "octocov" + uses: k1LoW/octocov-action@b3b6ee60482a667950f87553abf1df63217235d9 # v1.5.1 + with: + config: ${{ github.event_name == 'pull_request' && 'resources/octocov.pr.yml' || 'resources/octocov.yml' }} + + - name: "Upload coverage badge" + if: always() + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 + with: + name: coverage-badge + path: tests/_output/coverage.svg + if-no-files-found: ignore diff --git a/CODE_OWNERS.TXT b/CODE_OWNERS.TXT new file mode 100644 index 0000000..a307b41 --- /dev/null +++ b/CODE_OWNERS.TXT @@ -0,0 +1,24 @@ +This file is a list of the people responsible for ensuring that patches for a +particular part of Phalcon are reviewed, either by themselves or by someone +else. They are also the gatekeepers for their part of Phalcon, with the final +word on what goes in or not. + +The list is sorted by last name and formatted to allow easy grepping and +beautification by scripts. The fields are: name (N), email (E), web-address +(W), PGP key ID and fingerprint (P), description (D), and snail-mail address +(S). + +The sample of querying command to search PECL keyword: + awk -v RS='' -v ORS='\n\n' '/\nD: .*PECL/' CODE_OWNERS.TXT + +N: Anton Vasiliev +E: anton@phalcon.io +W: +P: +D: Maintenance and design + +N: Nikolaos Dimopoulos +E: niden@phalcon.io +W: https://niden.net +P: 0x93F8CA07B9C8C41D +D: Maintenance and design diff --git a/composer.json b/composer.json index b506def..2f62927 100644 --- a/composer.json +++ b/composer.json @@ -1,50 +1,95 @@ { "name": "phalcon/traits", - "description": "Phalcon Framework Traits", + "type": "library", + "description": "Phalcon Framework reusable traits", "keywords": [ "php", "framework", + "phalcon", "traits" ], - "license": "MIT", + "homepage": "https://phalcon.io", + "license": "BSD-3-Clause", + "authors": [ + { + "name": "Phalcon Team", + "email": "team@phalcon.io", + "homepage": "https://phalcon.io/en/team" + }, + { + "name": "Contributors", + "homepage": "https://github.com/phalcon/traits/graphs/contributors" + } + ], "require": { "php": ">=8.1 <9.0", "ext-json": "*", "ext-mbstring": "*" }, "suggest": { - "ext-yaml": "*", - "ext-gettext": "*" + "ext-apcu": "For Php\\ApcuTrait", + "ext-gettext": "For the gettext-based translation helpers", + "ext-igbinary": "For Php\\IgbinaryTrait", + "ext-msgpack": "For Php\\MsgpackTrait", + "ext-yaml": "For Php\\YamlTrait" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^3.75", + "infection/infection": "^0.29.9", + "pds/composer-script-names": "^1.0", + "pds/skeleton": "^1.0", + "phalcon/talon": "^0.6", + "phpstan/phpstan": "^2.2", + "phpunit/phpunit": "^10.5", + "squizlabs/php_codesniffer": "^4.0" + }, + "config": { + "optimize-autoloader": true, + "platform": { + "php": "8.1.99" + }, + "preferred-install": "dist", + "sort-packages": true, + "allow-plugins": { + "infection/extension-installer": true, + "pds/skeleton": false + } }, "autoload": { "psr-4": { - "Phalcon\\Traits\\": "src/", + "Phalcon\\Traits\\": "src/" + } + }, + "autoload-dev": { + "psr-4": { "Phalcon\\Tests\\Fixtures\\": "tests/support/fixtures/", "Phalcon\\Tests\\Unit\\": "tests/unit/" } }, - "config": { - "optimize-autoloader": true, - "preferred-install": "dist", - "sort-packages": true + "minimum-stability": "dev", + "prefer-stable": true, + "support": { + "issues": "https://github.com/phalcon/traits/issues", + "discord": "https://phalcon.io/discord/", + "source": "https://github.com/phalcon/traits" }, - "require-dev": { - "codeception/codeception": "^5.0", - "codeception/module-asserts": "^3.0", - "codeception/module-filesystem": "^3.0", - "codeception/module-phpbrowser": "^3.0", - "pds/skeleton": "^1.0", - "phpstan/phpstan": "^1.9", - "phpunit/phpunit": "^10.5", - "squizlabs/php_codesniffer": "^3.7", - "vlucas/phpdotenv": "^5.5" + "archive": { + "exclude": [ + "/.github", + "/resources", + "/tests", + "docker-compose.yml" + ] }, "scripts": { - "analyze": "vendor/bin/phpstan analyse -c config/phpstan.neon", - "cs": "vendor/bin/phpcs --standard=./config/phpcs.xml", - "cs-fix": "vendor/bin/phpcbf --standard=./config/phpcs.xml", - "test-unit": "vendor/bin/phpunit -c ./config/phpunit.xml.dist", - "test-unit-coverage": "vendor/bin/phpunit -c ./config/phpunit.xml.dist --coverage-clover tests/_output/coverage.xml", - "test-unit-coverage-html": "vendor/bin/phpunit -c ./config/phpunit.xml.dist --coverage-html tests/_output/coverage/" + "analyze": "phpstan analyse -c resources/phpstan.neon --memory-limit 1024M", + "cs": "phpcs --standard=resources/phpcs.xml", + "cs-fix": "phpcbf --standard=resources/phpcs.xml", + "cs-fixer": "php-cs-fixer fix --config=resources/php-cs-fixer.php --dry-run --diff", + "cs-fixer-fix": "php-cs-fixer fix --config=resources/php-cs-fixer.php", + "test": "talon run", + "test-coverage": "talon run unit -- --coverage-clover tests/_output/coverage.xml", + "test-coverage-html": "talon run unit -- --coverage-html tests/_output/coverage", + "test-mutation": "infection --configuration=resources/infection.json5 --threads=max" } } diff --git a/composer.lock b/composer.lock index ecc902d..55afd6e 100644 --- a/composer.lock +++ b/composer.lock @@ -4,43 +4,35 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "9fdd3db9246abcd02611ea0c524b0132", + "content-hash": "a94c523db14ce3c7940ba9e41ea17cab", "packages": [], "packages-dev": [ { - "name": "behat/gherkin", - "version": "v4.11.0", + "name": "clue/ndjson-react", + "version": "v1.3.0", "source": { "type": "git", - "url": "https://github.com/Behat/Gherkin.git", - "reference": "32821a17b12620951e755b5d49328a6421a5b5b5" + "url": "https://github.com/clue/reactphp-ndjson.git", + "reference": "392dc165fce93b5bb5c637b67e59619223c931b0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Behat/Gherkin/zipball/32821a17b12620951e755b5d49328a6421a5b5b5", - "reference": "32821a17b12620951e755b5d49328a6421a5b5b5", + "url": "https://api.github.com/repos/clue/reactphp-ndjson/zipball/392dc165fce93b5bb5c637b67e59619223c931b0", + "reference": "392dc165fce93b5bb5c637b67e59619223c931b0", "shasum": "" }, "require": { - "php": "8.1.* || 8.2.* || 8.3.* || 8.4.*" + "php": ">=5.3", + "react/stream": "^1.2" }, "require-dev": { - "cucumber/cucumber": "dev-gherkin-24.1.0", - "phpunit/phpunit": "^9.6", - "symfony/yaml": "^5.4 || ^6.4 || ^7.0" - }, - "suggest": { - "symfony/yaml": "If you want to parse features, represented in YAML files" + "phpunit/phpunit": "^9.5 || ^5.7 || ^4.8.35", + "react/event-loop": "^1.2" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.x-dev" - } - }, "autoload": { - "psr-0": { - "Behat\\Gherkin": "src/" + "psr-4": { + "Clue\\React\\NDJson\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -49,110 +41,79 @@ ], "authors": [ { - "name": "Konstantin Kudryashov", - "email": "ever.zet@gmail.com", - "homepage": "http://everzet.com" + "name": "Christian Lück", + "email": "christian@clue.engineering" } ], - "description": "Gherkin DSL parser for PHP", - "homepage": "http://behat.org/", + "description": "Streaming newline-delimited JSON (NDJSON) parser and encoder for ReactPHP.", + "homepage": "https://github.com/clue/reactphp-ndjson", "keywords": [ - "BDD", - "Behat", - "Cucumber", - "DSL", - "gherkin", - "parser" + "NDJSON", + "json", + "jsonlines", + "newline", + "reactphp", + "streaming" ], "support": { - "issues": "https://github.com/Behat/Gherkin/issues", - "source": "https://github.com/Behat/Gherkin/tree/v4.11.0" + "issues": "https://github.com/clue/reactphp-ndjson/issues", + "source": "https://github.com/clue/reactphp-ndjson/tree/v1.3.0" }, - "time": "2024-12-06T10:07:25+00:00" + "funding": [ + { + "url": "https://clue.engineering/support", + "type": "custom" + }, + { + "url": "https://github.com/clue", + "type": "github" + } + ], + "time": "2022-12-23T10:58:28+00:00" }, { - "name": "codeception/codeception", - "version": "5.1.2", + "name": "colinodell/json5", + "version": "v3.0.0", "source": { "type": "git", - "url": "https://github.com/Codeception/Codeception.git", - "reference": "3b2d7d1a88e7e1d9dc0acb6d3c8f0acda0a37374" + "url": "https://github.com/colinodell/json5.git", + "reference": "5724d21bc5c910c2560af1b8915f0cc0163579c8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Codeception/Codeception/zipball/3b2d7d1a88e7e1d9dc0acb6d3c8f0acda0a37374", - "reference": "3b2d7d1a88e7e1d9dc0acb6d3c8f0acda0a37374", + "url": "https://api.github.com/repos/colinodell/json5/zipball/5724d21bc5c910c2560af1b8915f0cc0163579c8", + "reference": "5724d21bc5c910c2560af1b8915f0cc0163579c8", "shasum": "" }, "require": { - "behat/gherkin": "^4.6.2", - "codeception/lib-asserts": "^2.0", - "codeception/stub": "^4.1", - "ext-curl": "*", "ext-json": "*", "ext-mbstring": "*", - "php": "^8.0", - "phpunit/php-code-coverage": "^9.2 || ^10.0 || ^11.0", - "phpunit/php-text-template": "^2.0 || ^3.0 || ^4.0", - "phpunit/php-timer": "^5.0.3 || ^6.0 || ^7.0", - "phpunit/phpunit": "^9.5.20 || ^10.0 || ^11.0", - "psy/psysh": "^0.11.2 || ^0.12", - "sebastian/comparator": "^4.0.5 || ^5.0 || ^6.0", - "sebastian/diff": "^4.0.3 || ^5.0 || ^6.0", - "symfony/console": ">=4.4.24 <8.0", - "symfony/css-selector": ">=4.4.24 <8.0", - "symfony/event-dispatcher": ">=4.4.24 <8.0", - "symfony/finder": ">=4.4.24 <8.0", - "symfony/var-dumper": ">=4.4.24 <8.0", - "symfony/yaml": ">=4.4.24 <8.0" - }, - "conflict": { - "codeception/lib-innerbrowser": "<3.1.3", - "codeception/module-filesystem": "<3.0", - "codeception/module-phpbrowser": "<2.5" - }, - "replace": { - "codeception/phpunit-wrapper": "*" + "php": "^8.0" }, "require-dev": { - "codeception/lib-innerbrowser": "*@dev", - "codeception/lib-web": "^1.0", - "codeception/module-asserts": "*@dev", - "codeception/module-cli": "*@dev", - "codeception/module-db": "*@dev", - "codeception/module-filesystem": "*@dev", - "codeception/module-phpbrowser": "*@dev", - "codeception/util-universalframework": "*@dev", - "ext-simplexml": "*", - "jetbrains/phpstorm-attributes": "^1.0", - "symfony/dotenv": ">=4.4.24 <8.0", - "symfony/process": ">=4.4.24 <8.0", - "vlucas/phpdotenv": "^5.1" - }, - "suggest": { - "codeception/specify": "BDD-style code blocks", - "codeception/verify": "BDD-style assertions", - "ext-simplexml": "For loading params from XML files", - "stecman/symfony-console-completion": "For BASH autocompletion", - "symfony/dotenv": "For loading params from .env files", - "symfony/phpunit-bridge": "For phpunit-bridge support", - "vlucas/phpdotenv": "For loading params from .env files" + "mikehaertl/php-shellcommand": "^1.7.0", + "phpstan/phpstan": "^1.10.57", + "scrutinizer/ocular": "^1.9", + "squizlabs/php_codesniffer": "^3.8.1", + "symfony/finder": "^6.0|^7.0", + "symfony/phpunit-bridge": "^7.0.3" }, "bin": [ - "codecept" + "bin/json5" ], "type": "library", + "extra": { + "branch-alias": { + "dev-main": "4.0-dev" + } + }, "autoload": { "files": [ - "functions.php" + "src/global.php" ], "psr-4": { - "Codeception\\": "src/Codeception", - "Codeception\\Extension\\": "ext" - }, - "classmap": [ - "src/PHPUnit/TestCase.php" - ] + "ColinODell\\Json5\\": "src" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -160,56 +121,85 @@ ], "authors": [ { - "name": "Michael Bodnarchuk", - "email": "davert.ua@gmail.com", - "homepage": "https://codeception.com" + "name": "Colin O'Dell", + "email": "colinodell@gmail.com", + "homepage": "https://www.colinodell.com", + "role": "Developer" } ], - "description": "BDD-style testing framework", - "homepage": "https://codeception.com/", + "description": "UTF-8 compatible JSON5 parser for PHP", + "homepage": "https://github.com/colinodell/json5", "keywords": [ - "BDD", - "TDD", - "acceptance testing", - "functional testing", - "unit testing" + "JSON5", + "json", + "json5_decode", + "json_decode" ], "support": { - "issues": "https://github.com/Codeception/Codeception/issues", - "source": "https://github.com/Codeception/Codeception/tree/5.1.2" + "issues": "https://github.com/colinodell/json5/issues", + "source": "https://github.com/colinodell/json5/tree/v3.0.0" }, "funding": [ { - "url": "https://opencollective.com/codeception", - "type": "open_collective" + "url": "https://www.colinodell.com/sponsor", + "type": "custom" + }, + { + "url": "https://www.paypal.me/colinpodell/10.00", + "type": "custom" + }, + { + "url": "https://github.com/colinodell", + "type": "github" + }, + { + "url": "https://www.patreon.com/colinodell", + "type": "patreon" } ], - "time": "2024-03-07T07:19:42+00:00" + "time": "2024-02-09T13:06:12+00:00" }, { - "name": "codeception/lib-asserts", - "version": "2.1.0", + "name": "composer/pcre", + "version": "3.4.0", "source": { "type": "git", - "url": "https://github.com/Codeception/lib-asserts.git", - "reference": "b8c7dff552249e560879c682ba44a4b963af91bc" + "url": "https://github.com/composer/pcre.git", + "reference": "d5a341b3fb61f3001970940afb1d332968a183ed" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Codeception/lib-asserts/zipball/b8c7dff552249e560879c682ba44a4b963af91bc", - "reference": "b8c7dff552249e560879c682ba44a4b963af91bc", + "url": "https://api.github.com/repos/composer/pcre/zipball/d5a341b3fb61f3001970940afb1d332968a183ed", + "reference": "d5a341b3fb61f3001970940afb1d332968a183ed", "shasum": "" }, "require": { - "codeception/phpunit-wrapper": "^7.7.1 | ^8.0.3 | ^9.0", - "ext-dom": "*", - "php": "^7.4 | ^8.0" + "php": "^7.4 || ^8.0" + }, + "conflict": { + "phpstan/phpstan": "<2.2.2" + }, + "require-dev": { + "phpstan/phpstan": "^2", + "phpstan/phpstan-deprecation-rules": "^2", + "phpstan/phpstan-strict-rules": "^2", + "phpunit/phpunit": "^9" }, "type": "library", + "extra": { + "phpstan": { + "includes": [ + "extension.neon" + ] + }, + "branch-alias": { + "dev-main": "3.x-dev" + } + }, "autoload": { - "classmap": [ - "src/" - ] + "psr-4": { + "Composer\\Pcre\\": "src" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -217,62 +207,65 @@ ], "authors": [ { - "name": "Michael Bodnarchuk", - "email": "davert@mail.ua", - "homepage": "http://codegyre.com" - }, - { - "name": "Gintautas Miselis" - }, - { - "name": "Gustavo Nieves", - "homepage": "https://medium.com/@ganieves" + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" } ], - "description": "Assertion methods used by Codeception core and Asserts module", - "homepage": "https://codeception.com/", + "description": "PCRE wrapping library that offers type-safe preg_* replacements.", "keywords": [ - "codeception" + "PCRE", + "preg", + "regex", + "regular expression" ], "support": { - "issues": "https://github.com/Codeception/lib-asserts/issues", - "source": "https://github.com/Codeception/lib-asserts/tree/2.1.0" + "issues": "https://github.com/composer/pcre/issues", + "source": "https://github.com/composer/pcre/tree/3.4.0" }, - "time": "2023-02-10T18:36:23+00:00" + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + } + ], + "time": "2026-06-07T11:47:49+00:00" }, { - "name": "codeception/lib-innerbrowser", - "version": "4.0.5", + "name": "composer/semver", + "version": "3.4.4", "source": { "type": "git", - "url": "https://github.com/Codeception/lib-innerbrowser.git", - "reference": "66b66d62b2b7f8595e257760b897190474cfb892" + "url": "https://github.com/composer/semver.git", + "reference": "198166618906cb2de69b95d7d47e5fa8aa1b2b95" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Codeception/lib-innerbrowser/zipball/66b66d62b2b7f8595e257760b897190474cfb892", - "reference": "66b66d62b2b7f8595e257760b897190474cfb892", + "url": "https://api.github.com/repos/composer/semver/zipball/198166618906cb2de69b95d7d47e5fa8aa1b2b95", + "reference": "198166618906cb2de69b95d7d47e5fa8aa1b2b95", "shasum": "" }, "require": { - "codeception/codeception": "^5.0.8", - "codeception/lib-web": "^1.0.1", - "ext-dom": "*", - "ext-json": "*", - "ext-mbstring": "*", - "php": "^8.1", - "phpunit/phpunit": "^10.0 || ^11.0", - "symfony/browser-kit": "^4.4.24 || ^5.4 || ^6.0 || ^7.0", - "symfony/dom-crawler": "^4.4.30 || ^5.4 || ^6.0 || ^7.0" + "php": "^5.3.2 || ^7.0 || ^8.0" }, "require-dev": { - "codeception/util-universalframework": "^1.0" + "phpstan/phpstan": "^1.11", + "symfony/phpunit-bridge": "^3 || ^7" }, "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.x-dev" + } + }, "autoload": { - "classmap": [ - "src/" - ] + "psr-4": { + "Composer\\Semver\\": "src" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -280,57 +273,74 @@ ], "authors": [ { - "name": "Michael Bodnarchuk", - "email": "davert@mail.ua", - "homepage": "https://codegyre.com" + "name": "Nils Adermann", + "email": "naderman@naderman.de", + "homepage": "http://www.naderman.de" }, { - "name": "Gintautas Miselis" + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + }, + { + "name": "Rob Bast", + "email": "rob.bast@gmail.com", + "homepage": "http://robbast.nl" } ], - "description": "Parent library for all Codeception framework modules and PhpBrowser", - "homepage": "https://codeception.com/", + "description": "Semver library that offers utilities, version constraint parsing and validation.", "keywords": [ - "codeception" + "semantic", + "semver", + "validation", + "versioning" ], "support": { - "issues": "https://github.com/Codeception/lib-innerbrowser/issues", - "source": "https://github.com/Codeception/lib-innerbrowser/tree/4.0.5" + "irc": "ircs://irc.libera.chat:6697/composer", + "issues": "https://github.com/composer/semver/issues", + "source": "https://github.com/composer/semver/tree/3.4.4" }, - "time": "2024-09-13T05:08:15+00:00" + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + } + ], + "time": "2025-08-20T19:15:30+00:00" }, { - "name": "codeception/lib-web", - "version": "1.0.6", + "name": "composer/xdebug-handler", + "version": "3.0.5", "source": { "type": "git", - "url": "https://github.com/Codeception/lib-web.git", - "reference": "01ff7f9ed8760ba0b0805a0b3a843b4e74165a60" + "url": "https://github.com/composer/xdebug-handler.git", + "reference": "6c1925561632e83d60a44492e0b344cf48ab85ef" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Codeception/lib-web/zipball/01ff7f9ed8760ba0b0805a0b3a843b4e74165a60", - "reference": "01ff7f9ed8760ba0b0805a0b3a843b4e74165a60", + "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/6c1925561632e83d60a44492e0b344cf48ab85ef", + "reference": "6c1925561632e83d60a44492e0b344cf48ab85ef", "shasum": "" }, "require": { - "ext-mbstring": "*", - "guzzlehttp/psr7": "^2.0", - "php": "^8.0", - "phpunit/phpunit": "^9.5 | ^10.0 | ^11.0", - "symfony/css-selector": ">=4.4.24 <8.0" - }, - "conflict": { - "codeception/codeception": "<5.0.0-alpha3" + "composer/pcre": "^1 || ^2 || ^3", + "php": "^7.2.5 || ^8.0", + "psr/log": "^1 || ^2 || ^3" }, "require-dev": { - "php-webdriver/webdriver": "^1.12" + "phpstan/phpstan": "^1.0", + "phpstan/phpstan-strict-rules": "^1.1", + "phpunit/phpunit": "^8.5 || ^9.6 || ^10.5" }, "type": "library", "autoload": { - "classmap": [ - "src/" - ] + "psr-4": { + "Composer\\XdebugHandler\\": "src" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -338,47 +348,84 @@ ], "authors": [ { - "name": "Gintautas Miselis" + "name": "John Stevenson", + "email": "john-stevenson@blueyonder.co.uk" } ], - "description": "Library containing files used by module-webdriver and lib-innerbrowser or module-phpbrowser", - "homepage": "https://codeception.com/", + "description": "Restarts a process without Xdebug.", "keywords": [ - "codeception" + "Xdebug", + "performance" ], "support": { - "issues": "https://github.com/Codeception/lib-web/issues", - "source": "https://github.com/Codeception/lib-web/tree/1.0.6" + "irc": "ircs://irc.libera.chat:6697/composer", + "issues": "https://github.com/composer/xdebug-handler/issues", + "source": "https://github.com/composer/xdebug-handler/tree/3.0.5" }, - "time": "2024-02-06T20:50:08+00:00" + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2024-05-06T16:37:16+00:00" }, { - "name": "codeception/module-asserts", - "version": "3.0.0", + "name": "ergebnis/agent-detector", + "version": "1.2.0", "source": { "type": "git", - "url": "https://github.com/Codeception/module-asserts.git", - "reference": "1b6b150b30586c3614e7e5761b31834ed7968603" + "url": "https://github.com/ergebnis/agent-detector.git", + "reference": "e211f17928c8b95a51e06040792d57f5462fb271" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Codeception/module-asserts/zipball/1b6b150b30586c3614e7e5761b31834ed7968603", - "reference": "1b6b150b30586c3614e7e5761b31834ed7968603", + "url": "https://api.github.com/repos/ergebnis/agent-detector/zipball/e211f17928c8b95a51e06040792d57f5462fb271", + "reference": "e211f17928c8b95a51e06040792d57f5462fb271", "shasum": "" }, "require": { - "codeception/codeception": "*@dev", - "codeception/lib-asserts": "^2.0", - "php": "^8.0" + "php": "~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0 || ~8.6.0" }, - "conflict": { - "codeception/codeception": "<5.0" + "require-dev": { + "ergebnis/composer-normalize": "^2.51.0", + "ergebnis/license": "^2.7.0", + "ergebnis/php-cs-fixer-config": "^6.60.2", + "ergebnis/phpstan-rules": "^2.13.1", + "ergebnis/phpunit-slow-test-detector": "^2.24.0", + "ergebnis/rector-rules": "^1.18.1", + "fakerphp/faker": "^1.24.1", + "infection/infection": "^0.26.6", + "phpstan/extension-installer": "^1.4.3", + "phpstan/phpstan": "^2.1.54", + "phpstan/phpstan-deprecation-rules": "^2.0.4", + "phpstan/phpstan-phpunit": "^2.0.16", + "phpstan/phpstan-strict-rules": "^2.0.10", + "phpunit/phpunit": "^9.6.34", + "rector/rector": "^2.4.2" }, "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.2-dev" + }, + "composer-normalize": { + "indent-size": 2, + "indent-style": "space" + } + }, "autoload": { - "classmap": [ - "src/" - ] + "psr-4": { + "Ergebnis\\AgentDetector\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -386,56 +433,45 @@ ], "authors": [ { - "name": "Michael Bodnarchuk" - }, - { - "name": "Gintautas Miselis" - }, - { - "name": "Gustavo Nieves", - "homepage": "https://medium.com/@ganieves" + "name": "Andreas Möller", + "email": "am@localheinz.com", + "homepage": "https://localheinz.com" } ], - "description": "Codeception module containing various assertions", - "homepage": "https://codeception.com/", - "keywords": [ - "assertions", - "asserts", - "codeception" - ], + "description": "Provides a detector for detecting the presence of an agent.", + "homepage": "https://github.com/ergebnis/agent-detector", "support": { - "issues": "https://github.com/Codeception/module-asserts/issues", - "source": "https://github.com/Codeception/module-asserts/tree/3.0.0" + "issues": "https://github.com/ergebnis/agent-detector/issues", + "security": "https://github.com/ergebnis/agent-detector/blob/main/.github/SECURITY.md", + "source": "https://github.com/ergebnis/agent-detector" }, - "time": "2022-02-16T19:48:08+00:00" + "time": "2026-05-07T08:19:07+00:00" }, { - "name": "codeception/module-filesystem", - "version": "3.0.1", + "name": "evenement/evenement", + "version": "v3.0.2", "source": { "type": "git", - "url": "https://github.com/Codeception/module-filesystem.git", - "reference": "0fd78cf941cb72dc2a650c6132c5999c26ad4f9a" + "url": "https://github.com/igorw/evenement.git", + "reference": "0a16b0d71ab13284339abb99d9d2bd813640efbc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Codeception/module-filesystem/zipball/0fd78cf941cb72dc2a650c6132c5999c26ad4f9a", - "reference": "0fd78cf941cb72dc2a650c6132c5999c26ad4f9a", + "url": "https://api.github.com/repos/igorw/evenement/zipball/0a16b0d71ab13284339abb99d9d2bd813640efbc", + "reference": "0a16b0d71ab13284339abb99d9d2bd813640efbc", "shasum": "" }, "require": { - "codeception/codeception": "*@dev", - "php": "^8.0", - "symfony/finder": "^4.4 || ^5.4 || ^6.0 || ^7.0" + "php": ">=7.0" }, - "conflict": { - "codeception/codeception": "<5.0" + "require-dev": { + "phpunit/phpunit": "^9 || ^6" }, "type": "library", "autoload": { - "classmap": [ - "src/" - ] + "psr-4": { + "Evenement\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -443,63 +479,54 @@ ], "authors": [ { - "name": "Michael Bodnarchuk" - }, - { - "name": "Gintautas Miselis" + "name": "Igor Wiedler", + "email": "igor@wiedler.ch" } ], - "description": "Codeception module for testing local filesystem", - "homepage": "https://codeception.com/", + "description": "Événement is a very simple event dispatching library for PHP", "keywords": [ - "codeception", - "filesystem" + "event-dispatcher", + "event-emitter" ], "support": { - "issues": "https://github.com/Codeception/module-filesystem/issues", - "source": "https://github.com/Codeception/module-filesystem/tree/3.0.1" + "issues": "https://github.com/igorw/evenement/issues", + "source": "https://github.com/igorw/evenement/tree/v3.0.2" }, - "time": "2023-12-08T19:23:28+00:00" + "time": "2023-08-08T05:53:35+00:00" }, { - "name": "codeception/module-phpbrowser", - "version": "3.0.1", + "name": "fidry/cpu-core-counter", + "version": "1.3.0", "source": { "type": "git", - "url": "https://github.com/Codeception/module-phpbrowser.git", - "reference": "a972411f60cd00d00d5e5e3b35496ba4a23bcffc" + "url": "https://github.com/theofidry/cpu-core-counter.git", + "reference": "db9508f7b1474469d9d3c53b86f817e344732678" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Codeception/module-phpbrowser/zipball/a972411f60cd00d00d5e5e3b35496ba4a23bcffc", - "reference": "a972411f60cd00d00d5e5e3b35496ba4a23bcffc", + "url": "https://api.github.com/repos/theofidry/cpu-core-counter/zipball/db9508f7b1474469d9d3c53b86f817e344732678", + "reference": "db9508f7b1474469d9d3c53b86f817e344732678", "shasum": "" }, "require": { - "codeception/codeception": "*@dev", - "codeception/lib-innerbrowser": "*@dev", - "ext-json": "*", - "guzzlehttp/guzzle": "^7.4", - "php": "^8.0", - "symfony/browser-kit": "^5.4 || ^6.0 || ^7.0" - }, - "conflict": { - "codeception/codeception": "<5.0", - "codeception/lib-innerbrowser": "<3.0" + "php": "^7.2 || ^8.0" }, "require-dev": { - "aws/aws-sdk-php": "^3.199", - "codeception/module-rest": "^2.0 || *@dev", - "ext-curl": "*" - }, - "suggest": { - "codeception/phpbuiltinserver": "Start and stop PHP built-in web server for your tests" + "fidry/makefile": "^0.2.0", + "fidry/php-cs-fixer-config": "^1.1.2", + "phpstan/extension-installer": "^1.2.0", + "phpstan/phpstan": "^2.0", + "phpstan/phpstan-deprecation-rules": "^2.0.0", + "phpstan/phpstan-phpunit": "^2.0", + "phpstan/phpstan-strict-rules": "^2.0", + "phpunit/phpunit": "^8.5.31 || ^9.5.26", + "webmozarts/strict-phpunit": "^7.5" }, "type": "library", "autoload": { - "classmap": [ - "src/" - ] + "psr-4": { + "Fidry\\CpuCoreCounter\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -507,465 +534,568 @@ ], "authors": [ { - "name": "Michael Bodnarchuk" - }, - { - "name": "Gintautas Miselis" + "name": "Théo FIDRY", + "email": "theo.fidry@gmail.com" } ], - "description": "Codeception module for testing web application over HTTP", - "homepage": "https://codeception.com/", + "description": "Tiny utility to get the number of CPU cores.", "keywords": [ - "codeception", - "functional-testing", - "http" + "CPU", + "core" ], "support": { - "issues": "https://github.com/Codeception/module-phpbrowser/issues", - "source": "https://github.com/Codeception/module-phpbrowser/tree/3.0.1" + "issues": "https://github.com/theofidry/cpu-core-counter/issues", + "source": "https://github.com/theofidry/cpu-core-counter/tree/1.3.0" }, - "time": "2023-12-08T19:41:28+00:00" + "funding": [ + { + "url": "https://github.com/theofidry", + "type": "github" + } + ], + "time": "2025-08-14T07:29:31+00:00" }, { - "name": "codeception/stub", - "version": "4.1.3", + "name": "friendsofphp/php-cs-fixer", + "version": "v3.95.13", "source": { "type": "git", - "url": "https://github.com/Codeception/Stub.git", - "reference": "4fcad2c165f365377486dc3fd8703b07f1f2fcae" + "url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git", + "reference": "ea941114a002eb5e5876f190223deec1066c482c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Codeception/Stub/zipball/4fcad2c165f365377486dc3fd8703b07f1f2fcae", - "reference": "4fcad2c165f365377486dc3fd8703b07f1f2fcae", + "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/ea941114a002eb5e5876f190223deec1066c482c", + "reference": "ea941114a002eb5e5876f190223deec1066c482c", "shasum": "" }, "require": { - "php": "^7.4 | ^8.0", - "phpunit/phpunit": "^8.4 | ^9.0 | ^10.0 | ^11" - }, - "conflict": { - "codeception/codeception": "<5.0.6" + "clue/ndjson-react": "^1.3", + "composer/semver": "^3.4", + "composer/xdebug-handler": "^3.0.5", + "ergebnis/agent-detector": "^1.2", + "ext-filter": "*", + "ext-hash": "*", + "ext-json": "*", + "ext-tokenizer": "*", + "fidry/cpu-core-counter": "^1.3", + "php": "^7.4 || ^8.0", + "react/child-process": "^0.6.6", + "react/event-loop": "^1.5", + "react/socket": "^1.16", + "react/stream": "^1.4", + "sebastian/diff": "^4.0.6 || ^5.1.1 || ^6.0.2 || ^7.0 || ^8.0 || ^9.0", + "symfony/console": "^5.4.47 || ^6.4.24 || ^7.0 || ^8.0", + "symfony/event-dispatcher": "^5.4.45 || ^6.4.24 || ^7.0 || ^8.0", + "symfony/filesystem": "^5.4.45 || ^6.4.24 || ^7.0 || ^8.0", + "symfony/finder": "^5.4.45 || ^6.4.24 || ^7.0 || ^8.0", + "symfony/options-resolver": "^5.4.45 || ^6.4.24 || ^7.0 || ^8.0", + "symfony/polyfill-mbstring": "^1.37", + "symfony/polyfill-php80": "^1.37", + "symfony/polyfill-php81": "^1.37", + "symfony/polyfill-php84": "^1.37", + "symfony/process": "^5.4.47 || ^6.4.24 || ^7.2 || ^8.0", + "symfony/stopwatch": "^5.4.45 || ^6.4.24 || ^7.0 || ^8.0" }, "require-dev": { - "consolidation/robo": "^3.0" + "facile-it/paraunit": "^1.3.1 || ^2.11.0", + "infection/infection": "^0.32.7", + "justinrainbow/json-schema": "^6.10.0", + "keradus/cli-executor": "^2.3", + "mikey179/vfsstream": "^1.6.12", + "php-coveralls/php-coveralls": "^2.9.1", + "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.8", + "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.8", + "phpunit/phpunit": "^9.6.35 || ^10.5.64 || ^11.5.56", + "symfony/polyfill-php85": "^1.38", + "symfony/var-dumper": "^5.4.48 || ^6.4.36 || ^7.4.8 || ^8.1.0", + "symfony/yaml": "^5.4.53 || ^6.4.41 || ^7.4.13 || ^8.1.0" }, - "type": "library", + "suggest": { + "ext-dom": "For handling output formats in XML", + "ext-mbstring": "For handling non-UTF8 characters." + }, + "bin": [ + "php-cs-fixer" + ], + "type": "application", "autoload": { "psr-4": { - "Codeception\\": "src/" - } + "PhpCsFixer\\": "src/" + }, + "exclude-from-classmap": [ + "src/**/Internal/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], - "description": "Flexible Stub wrapper for PHPUnit's Mock Builder", + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Dariusz Rumiński", + "email": "dariusz.ruminski@gmail.com" + } + ], + "description": "A tool to automatically fix PHP code style", + "keywords": [ + "Static code analysis", + "fixer", + "standards", + "static analysis" + ], "support": { - "issues": "https://github.com/Codeception/Stub/issues", - "source": "https://github.com/Codeception/Stub/tree/4.1.3" + "issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues", + "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.95.13" }, - "time": "2024-02-02T19:21:00+00:00" + "funding": [ + { + "url": "https://github.com/keradus", + "type": "github" + } + ], + "time": "2026-07-10T09:23:21+00:00" }, { - "name": "graham-campbell/result-type", - "version": "v1.1.3", + "name": "infection/abstract-testframework-adapter", + "version": "0.5.0", "source": { "type": "git", - "url": "https://github.com/GrahamCampbell/Result-Type.git", - "reference": "3ba905c11371512af9d9bdd27d99b782216b6945" + "url": "https://github.com/infection/abstract-testframework-adapter.git", + "reference": "18925e20d15d1a5995bb85c9dc09e8751e1e069b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/GrahamCampbell/Result-Type/zipball/3ba905c11371512af9d9bdd27d99b782216b6945", - "reference": "3ba905c11371512af9d9bdd27d99b782216b6945", + "url": "https://api.github.com/repos/infection/abstract-testframework-adapter/zipball/18925e20d15d1a5995bb85c9dc09e8751e1e069b", + "reference": "18925e20d15d1a5995bb85c9dc09e8751e1e069b", "shasum": "" }, "require": { - "php": "^7.2.5 || ^8.0", - "phpoption/phpoption": "^1.9.3" + "php": "^7.4 || ^8.0" }, "require-dev": { - "phpunit/phpunit": "^8.5.39 || ^9.6.20 || ^10.5.28" + "ergebnis/composer-normalize": "^2.8", + "friendsofphp/php-cs-fixer": "^2.17", + "phpunit/phpunit": "^9.5" }, "type": "library", "autoload": { "psr-4": { - "GrahamCampbell\\ResultType\\": "src/" + "Infection\\AbstractTestFramework\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Graham Campbell", - "email": "hello@gjcampbell.co.uk", - "homepage": "https://github.com/GrahamCampbell" + "name": "Maks Rafalko", + "email": "maks.rafalko@gmail.com" } ], - "description": "An Implementation Of The Result Type", - "keywords": [ - "Graham Campbell", - "GrahamCampbell", - "Result Type", - "Result-Type", - "result" - ], + "description": "Abstract Test Framework Adapter for Infection", "support": { - "issues": "https://github.com/GrahamCampbell/Result-Type/issues", - "source": "https://github.com/GrahamCampbell/Result-Type/tree/v1.1.3" + "issues": "https://github.com/infection/abstract-testframework-adapter/issues", + "source": "https://github.com/infection/abstract-testframework-adapter/tree/0.5.0" }, "funding": [ { - "url": "https://github.com/GrahamCampbell", + "url": "https://github.com/infection", "type": "github" }, { - "url": "https://tidelift.com/funding/github/packagist/graham-campbell/result-type", - "type": "tidelift" + "url": "https://opencollective.com/infection", + "type": "open_collective" } ], - "time": "2024-07-20T21:45:45+00:00" + "time": "2021-08-17T18:49:12+00:00" }, { - "name": "guzzlehttp/guzzle", - "version": "7.9.2", + "name": "infection/extension-installer", + "version": "0.1.2", "source": { "type": "git", - "url": "https://github.com/guzzle/guzzle.git", - "reference": "d281ed313b989f213357e3be1a179f02196ac99b" + "url": "https://github.com/infection/extension-installer.git", + "reference": "9b351d2910b9a23ab4815542e93d541e0ca0cdcf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/d281ed313b989f213357e3be1a179f02196ac99b", - "reference": "d281ed313b989f213357e3be1a179f02196ac99b", + "url": "https://api.github.com/repos/infection/extension-installer/zipball/9b351d2910b9a23ab4815542e93d541e0ca0cdcf", + "reference": "9b351d2910b9a23ab4815542e93d541e0ca0cdcf", "shasum": "" }, "require": { - "ext-json": "*", - "guzzlehttp/promises": "^1.5.3 || ^2.0.3", - "guzzlehttp/psr7": "^2.7.0", - "php": "^7.2.5 || ^8.0", - "psr/http-client": "^1.0", - "symfony/deprecation-contracts": "^2.2 || ^3.0" - }, - "provide": { - "psr/http-client-implementation": "1.0" + "composer-plugin-api": "^1.1 || ^2.0" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.8.2", - "ext-curl": "*", - "guzzle/client-integration-tests": "3.0.2", - "php-http/message-factory": "^1.1", - "phpunit/phpunit": "^8.5.39 || ^9.6.20", - "psr/log": "^1.1 || ^2.0 || ^3.0" - }, - "suggest": { - "ext-curl": "Required for CURL handler support", - "ext-intl": "Required for Internationalized Domain Name (IDN) support", - "psr/log": "Required for using the Log middleware" - }, - "type": "library", + "composer/composer": "^1.9 || ^2.0", + "friendsofphp/php-cs-fixer": "^2.18, <2.19", + "infection/infection": "^0.15.2", + "php-coveralls/php-coveralls": "^2.4", + "phpstan/extension-installer": "^1.0", + "phpstan/phpstan": "^0.12.10", + "phpstan/phpstan-phpunit": "^0.12.6", + "phpstan/phpstan-strict-rules": "^0.12.2", + "phpstan/phpstan-webmozart-assert": "^0.12.2", + "phpunit/phpunit": "^9.5", + "vimeo/psalm": "^4.8" + }, + "type": "composer-plugin", "extra": { - "bamarni-bin": { - "bin-links": true, - "forward-command": false - } + "class": "Infection\\ExtensionInstaller\\Plugin" }, "autoload": { - "files": [ - "src/functions_include.php" - ], "psr-4": { - "GuzzleHttp\\": "src/" + "Infection\\ExtensionInstaller\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Graham Campbell", - "email": "hello@gjcampbell.co.uk", - "homepage": "https://github.com/GrahamCampbell" - }, - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - }, - { - "name": "Jeremy Lindblom", - "email": "jeremeamia@gmail.com", - "homepage": "https://github.com/jeremeamia" - }, - { - "name": "George Mponos", - "email": "gmponos@gmail.com", - "homepage": "https://github.com/gmponos" - }, - { - "name": "Tobias Nyholm", - "email": "tobias.nyholm@gmail.com", - "homepage": "https://github.com/Nyholm" - }, - { - "name": "Márk Sági-Kazár", - "email": "mark.sagikazar@gmail.com", - "homepage": "https://github.com/sagikazarmark" - }, - { - "name": "Tobias Schultze", - "email": "webmaster@tubo-world.de", - "homepage": "https://github.com/Tobion" + "name": "Maks Rafalko", + "email": "maks.rafalko@gmail.com" } ], - "description": "Guzzle is a PHP HTTP client library", - "keywords": [ - "client", - "curl", - "framework", - "http", - "http client", - "psr-18", - "psr-7", - "rest", - "web service" - ], + "description": "Infection Extension Installer", "support": { - "issues": "https://github.com/guzzle/guzzle/issues", - "source": "https://github.com/guzzle/guzzle/tree/7.9.2" + "issues": "https://github.com/infection/extension-installer/issues", + "source": "https://github.com/infection/extension-installer/tree/0.1.2" }, "funding": [ { - "url": "https://github.com/GrahamCampbell", - "type": "github" - }, - { - "url": "https://github.com/Nyholm", + "url": "https://github.com/infection", "type": "github" }, { - "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/guzzle", - "type": "tidelift" + "url": "https://opencollective.com/infection", + "type": "open_collective" } ], - "time": "2024-07-24T11:22:20+00:00" + "time": "2021-10-20T22:08:34+00:00" }, { - "name": "guzzlehttp/promises", - "version": "2.0.4", + "name": "infection/include-interceptor", + "version": "0.2.5", "source": { "type": "git", - "url": "https://github.com/guzzle/promises.git", - "reference": "f9c436286ab2892c7db7be8c8da4ef61ccf7b455" + "url": "https://github.com/infection/include-interceptor.git", + "reference": "0cc76d95a79d9832d74e74492b0a30139904bdf7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/f9c436286ab2892c7db7be8c8da4ef61ccf7b455", - "reference": "f9c436286ab2892c7db7be8c8da4ef61ccf7b455", + "url": "https://api.github.com/repos/infection/include-interceptor/zipball/0cc76d95a79d9832d74e74492b0a30139904bdf7", + "reference": "0cc76d95a79d9832d74e74492b0a30139904bdf7", "shasum": "" }, - "require": { - "php": "^7.2.5 || ^8.0" - }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.8.2", - "phpunit/phpunit": "^8.5.39 || ^9.6.20" + "friendsofphp/php-cs-fixer": "^2.16", + "infection/infection": "^0.15.0", + "phan/phan": "^2.4 || ^3", + "php-coveralls/php-coveralls": "^2.2", + "phpstan/phpstan": "^0.12.8", + "phpunit/phpunit": "^8.5", + "vimeo/psalm": "^3.8" }, "type": "library", - "extra": { - "bamarni-bin": { - "bin-links": true, - "forward-command": false - } - }, "autoload": { "psr-4": { - "GuzzleHttp\\Promise\\": "src/" + "Infection\\StreamWrapper\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Graham Campbell", - "email": "hello@gjcampbell.co.uk", - "homepage": "https://github.com/GrahamCampbell" - }, - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - }, - { - "name": "Tobias Nyholm", - "email": "tobias.nyholm@gmail.com", - "homepage": "https://github.com/Nyholm" - }, - { - "name": "Tobias Schultze", - "email": "webmaster@tubo-world.de", - "homepage": "https://github.com/Tobion" + "name": "Maks Rafalko", + "email": "maks.rafalko@gmail.com" } ], - "description": "Guzzle promises library", - "keywords": [ - "promise" - ], + "description": "Stream Wrapper: Include Interceptor. Allows to replace included (autoloaded) file with another one.", "support": { - "issues": "https://github.com/guzzle/promises/issues", - "source": "https://github.com/guzzle/promises/tree/2.0.4" + "issues": "https://github.com/infection/include-interceptor/issues", + "source": "https://github.com/infection/include-interceptor/tree/0.2.5" }, "funding": [ { - "url": "https://github.com/GrahamCampbell", - "type": "github" - }, - { - "url": "https://github.com/Nyholm", + "url": "https://github.com/infection", "type": "github" }, { - "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/promises", - "type": "tidelift" + "url": "https://opencollective.com/infection", + "type": "open_collective" } ], - "time": "2024-10-17T10:06:22+00:00" + "time": "2021-08-09T10:03:57+00:00" }, { - "name": "guzzlehttp/psr7", - "version": "2.7.0", + "name": "infection/infection", + "version": "0.29.9", "source": { "type": "git", - "url": "https://github.com/guzzle/psr7.git", - "reference": "a70f5c95fb43bc83f07c9c948baa0dc1829bf201" + "url": "https://github.com/infection/infection.git", + "reference": "beac2ca971b37dd7feb92fe2d3e705c175b2360b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/a70f5c95fb43bc83f07c9c948baa0dc1829bf201", - "reference": "a70f5c95fb43bc83f07c9c948baa0dc1829bf201", + "url": "https://api.github.com/repos/infection/infection/zipball/beac2ca971b37dd7feb92fe2d3e705c175b2360b", + "reference": "beac2ca971b37dd7feb92fe2d3e705c175b2360b", "shasum": "" }, "require": { - "php": "^7.2.5 || ^8.0", - "psr/http-factory": "^1.0", - "psr/http-message": "^1.1 || ^2.0", - "ralouphie/getallheaders": "^3.0" + "colinodell/json5": "^2.2 || ^3.0", + "composer-runtime-api": "^2.0", + "composer/xdebug-handler": "^2.0 || ^3.0", + "ext-dom": "*", + "ext-json": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "fidry/cpu-core-counter": "^0.4.0 || ^0.5.0 || ^1.0", + "infection/abstract-testframework-adapter": "^0.5.0", + "infection/extension-installer": "^0.1.0", + "infection/include-interceptor": "^0.2.5", + "infection/mutator": "^0.4", + "justinrainbow/json-schema": "^5.3", + "nikic/php-parser": "^5.3", + "ondram/ci-detector": "^4.1.0", + "php": "^8.1", + "sanmai/later": "^0.1.1", + "sanmai/pipeline": "^5.1 || ^6", + "sebastian/diff": "^3.0.2 || ^4.0 || ^5.0 || ^6.0", + "symfony/console": "^5.4 || ^6.0 || ^7.0", + "symfony/filesystem": "^5.4 || ^6.0 || ^7.0", + "symfony/finder": "^5.4 || ^6.0 || ^7.0", + "symfony/process": "^5.4 || ^6.0 || ^7.0", + "thecodingmachine/safe": "dev-master as 2.5.0", + "webmozart/assert": "^1.11" }, - "provide": { - "psr/http-factory-implementation": "1.0", - "psr/http-message-implementation": "1.0" + "conflict": { + "antecedent/patchwork": "<2.1.25", + "dg/bypass-finals": "<1.4.1", + "phpunit/php-code-coverage": ">9,<9.1.4 || >9.2.17,<9.2.21" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.8.2", - "http-interop/http-factory-tests": "0.9.0", - "phpunit/phpunit": "^8.5.39 || ^9.6.20" - }, - "suggest": { - "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" + "ext-simplexml": "*", + "fidry/makefile": "^1.0", + "helmich/phpunit-json-assert": "^3.0", + "phpstan/extension-installer": "^1.1.0", + "phpstan/phpstan": "^1.10.15", + "phpstan/phpstan-phpunit": "^1.0.0", + "phpstan/phpstan-strict-rules": "^1.1.0", + "phpstan/phpstan-webmozart-assert": "^1.0.2", + "phpunit/phpunit": "^10.5", + "rector/rector": "^1.0", + "sidz/phpstan-rules": "^0.4", + "symfony/yaml": "^5.4 || ^6.0 || ^7.0", + "thecodingmachine/phpstan-safe-rule": "^1.2.0" }, + "bin": [ + "bin/infection" + ], "type": "library", - "extra": { - "bamarni-bin": { - "bin-links": true, - "forward-command": false - } - }, "autoload": { "psr-4": { - "GuzzleHttp\\Psr7\\": "src/" + "Infection\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Graham Campbell", - "email": "hello@gjcampbell.co.uk", - "homepage": "https://github.com/GrahamCampbell" - }, - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" + "name": "Maks Rafalko", + "email": "maks.rafalko@gmail.com", + "homepage": "https://twitter.com/maks_rafalko" }, { - "name": "George Mponos", - "email": "gmponos@gmail.com", - "homepage": "https://github.com/gmponos" + "name": "Oleg Zhulnev", + "homepage": "https://github.com/sidz" }, { - "name": "Tobias Nyholm", - "email": "tobias.nyholm@gmail.com", - "homepage": "https://github.com/Nyholm" + "name": "Gert de Pagter", + "homepage": "https://github.com/BackEndTea" }, { - "name": "Márk Sági-Kazár", - "email": "mark.sagikazar@gmail.com", - "homepage": "https://github.com/sagikazarmark" + "name": "Théo FIDRY", + "email": "theo.fidry@gmail.com", + "homepage": "https://twitter.com/tfidry" }, { - "name": "Tobias Schultze", - "email": "webmaster@tubo-world.de", - "homepage": "https://github.com/Tobion" + "name": "Alexey Kopytko", + "email": "alexey@kopytko.com", + "homepage": "https://www.alexeykopytko.com" }, { - "name": "Márk Sági-Kazár", - "email": "mark.sagikazar@gmail.com", - "homepage": "https://sagikazarmark.hu" + "name": "Andreas Möller", + "email": "am@localheinz.com", + "homepage": "https://localheinz.com" } ], - "description": "PSR-7 message implementation that also provides common utility methods", + "description": "Infection is a Mutation Testing framework for PHP. The mutation adequacy score can be used to measure the effectiveness of a test set in terms of its ability to detect faults.", "keywords": [ - "http", - "message", - "psr-7", - "request", - "response", - "stream", - "uri", - "url" + "coverage", + "mutant", + "mutation framework", + "mutation testing", + "testing", + "unit testing" ], "support": { - "issues": "https://github.com/guzzle/psr7/issues", - "source": "https://github.com/guzzle/psr7/tree/2.7.0" + "issues": "https://github.com/infection/infection/issues", + "source": "https://github.com/infection/infection/tree/0.29.9" }, "funding": [ { - "url": "https://github.com/GrahamCampbell", + "url": "https://github.com/infection", "type": "github" }, { - "url": "https://github.com/Nyholm", + "url": "https://opencollective.com/infection", + "type": "open_collective" + } + ], + "time": "2024-12-08T22:23:44+00:00" + }, + { + "name": "infection/mutator", + "version": "0.4.1", + "source": { + "type": "git", + "url": "https://github.com/infection/mutator.git", + "reference": "3c976d721b02b32f851ee4e15d553ef1e9186d1d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/infection/mutator/zipball/3c976d721b02b32f851ee4e15d553ef1e9186d1d", + "reference": "3c976d721b02b32f851ee4e15d553ef1e9186d1d", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^5.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.6 || ^10" + }, + "type": "library", + "autoload": { + "psr-4": { + "Infection\\Mutator\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Maks Rafalko", + "email": "maks.rafalko@gmail.com" + } + ], + "description": "Mutator interface to implement custom mutators (mutation operators) for Infection", + "support": { + "issues": "https://github.com/infection/mutator/issues", + "source": "https://github.com/infection/mutator/tree/0.4.1" + }, + "funding": [ + { + "url": "https://github.com/infection", "type": "github" }, { - "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/psr7", - "type": "tidelift" + "url": "https://opencollective.com/infection", + "type": "open_collective" + } + ], + "time": "2025-04-29T08:19:52+00:00" + }, + { + "name": "justinrainbow/json-schema", + "version": "5.3.4", + "source": { + "type": "git", + "url": "https://github.com/jsonrainbow/json-schema.git", + "reference": "7df70ffaf31d98726801b4bc099e1fbdbe2e5e54" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/jsonrainbow/json-schema/zipball/7df70ffaf31d98726801b4bc099e1fbdbe2e5e54", + "reference": "7df70ffaf31d98726801b4bc099e1fbdbe2e5e54", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "~2.2.20||~2.15.1", + "json-schema/json-schema-test-suite": "1.2.0", + "phpunit/phpunit": "^4.8.35" + }, + "bin": [ + "bin/validate-json" + ], + "type": "library", + "autoload": { + "psr-4": { + "JsonSchema\\": "src/JsonSchema/" } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bruno Prieto Reis", + "email": "bruno.p.reis@gmail.com" + }, + { + "name": "Justin Rainbow", + "email": "justin.rainbow@gmail.com" + }, + { + "name": "Igor Wiedler", + "email": "igor@wiedler.ch" + }, + { + "name": "Robert Schönthal", + "email": "seroscho@googlemail.com" + } + ], + "description": "A library to validate a json schema.", + "homepage": "https://github.com/justinrainbow/json-schema", + "keywords": [ + "json", + "schema" ], - "time": "2024-07-18T11:15:46+00:00" + "support": { + "issues": "https://github.com/jsonrainbow/json-schema/issues", + "source": "https://github.com/jsonrainbow/json-schema/tree/5.3.4" + }, + "time": "2026-05-04T18:54:58+00:00" }, { "name": "masterminds/html5", - "version": "2.9.0", + "version": "2.10.1", "source": { "type": "git", "url": "https://github.com/Masterminds/html5-php.git", - "reference": "f5ac2c0b0a2eefca70b2ce32a5809992227e75a6" + "reference": "fd5018f6815fff903946d0564977b44ce8010e29" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Masterminds/html5-php/zipball/f5ac2c0b0a2eefca70b2ce32a5809992227e75a6", - "reference": "f5ac2c0b0a2eefca70b2ce32a5809992227e75a6", + "url": "https://api.github.com/repos/Masterminds/html5-php/zipball/fd5018f6815fff903946d0564977b44ce8010e29", + "reference": "fd5018f6815fff903946d0564977b44ce8010e29", "shasum": "" }, "require": { @@ -973,7 +1103,7 @@ "php": ">=5.3.0" }, "require-dev": { - "phpunit/phpunit": "^4.8.35 || ^5.7.21 || ^6 || ^7 || ^8 || ^9" + "phpunit/phpunit": "^4.8.35 || ^5.7.21 || ^6 || ^7 || ^8 || ^9 || ^10" }, "type": "library", "extra": { @@ -1017,22 +1147,22 @@ ], "support": { "issues": "https://github.com/Masterminds/html5-php/issues", - "source": "https://github.com/Masterminds/html5-php/tree/2.9.0" + "source": "https://github.com/Masterminds/html5-php/tree/2.10.1" }, - "time": "2024-03-31T07:05:07+00:00" + "time": "2026-06-23T18:43:15+00:00" }, { "name": "myclabs/deep-copy", - "version": "1.12.1", + "version": "1.13.4", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "123267b2c49fbf30d78a7b2d333f6be754b94845" + "reference": "07d290f0c47959fd5eed98c95ee5602db07e0b6a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/123267b2c49fbf30d78a7b2d333f6be754b94845", - "reference": "123267b2c49fbf30d78a7b2d333f6be754b94845", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/07d290f0c47959fd5eed98c95ee5602db07e0b6a", + "reference": "07d290f0c47959fd5eed98c95ee5602db07e0b6a", "shasum": "" }, "require": { @@ -1071,7 +1201,7 @@ ], "support": { "issues": "https://github.com/myclabs/DeepCopy/issues", - "source": "https://github.com/myclabs/DeepCopy/tree/1.12.1" + "source": "https://github.com/myclabs/DeepCopy/tree/1.13.4" }, "funding": [ { @@ -1079,24 +1209,23 @@ "type": "tidelift" } ], - "time": "2024-11-08T17:47:46+00:00" + "time": "2025-08-01T08:46:24+00:00" }, { "name": "nikic/php-parser", - "version": "v5.4.0", + "version": "v5.8.0", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "447a020a1f875a434d62f2a401f53b82a396e494" + "reference": "044a6a392ff8ad0d61f14370a5fbbd0a0107152f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/447a020a1f875a434d62f2a401f53b82a396e494", - "reference": "447a020a1f875a434d62f2a401f53b82a396e494", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/044a6a392ff8ad0d61f14370a5fbbd0a0107152f", + "reference": "044a6a392ff8ad0d61f14370a5fbbd0a0107152f", "shasum": "" }, "require": { - "ext-ctype": "*", "ext-json": "*", "ext-tokenizer": "*", "php": ">=7.4" @@ -1111,7 +1240,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "5.0-dev" + "dev-master": "5.x-dev" } }, "autoload": { @@ -1135,9 +1264,114 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v5.4.0" + "source": "https://github.com/nikic/PHP-Parser/tree/v5.8.0" + }, + "time": "2026-07-04T14:30:18+00:00" + }, + { + "name": "ondram/ci-detector", + "version": "4.2.0", + "source": { + "type": "git", + "url": "https://github.com/OndraM/ci-detector.git", + "reference": "8b0223b5ed235fd377c75fdd1bfcad05c0f168b8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/OndraM/ci-detector/zipball/8b0223b5ed235fd377c75fdd1bfcad05c0f168b8", + "reference": "8b0223b5ed235fd377c75fdd1bfcad05c0f168b8", + "shasum": "" + }, + "require": { + "php": "^7.4 || ^8.0" + }, + "require-dev": { + "ergebnis/composer-normalize": "^2.13.2", + "lmc/coding-standard": "^3.0.0", + "php-parallel-lint/php-parallel-lint": "^1.2", + "phpstan/extension-installer": "^1.1.0", + "phpstan/phpstan": "^1.2.0", + "phpstan/phpstan-phpunit": "^1.0.0", + "phpunit/phpunit": "^9.6.13" + }, + "type": "library", + "autoload": { + "psr-4": { + "OndraM\\CiDetector\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ondřej Machulda", + "email": "ondrej.machulda@gmail.com" + } + ], + "description": "Detect continuous integration environment and provide unified access to properties of current build", + "keywords": [ + "CircleCI", + "Codeship", + "Wercker", + "adapter", + "appveyor", + "aws", + "aws codebuild", + "azure", + "azure devops", + "azure pipelines", + "bamboo", + "bitbucket", + "buddy", + "ci-info", + "codebuild", + "continuous integration", + "continuousphp", + "devops", + "drone", + "github", + "gitlab", + "interface", + "jenkins", + "pipelines", + "sourcehut", + "teamcity", + "travis" + ], + "support": { + "issues": "https://github.com/OndraM/ci-detector/issues", + "source": "https://github.com/OndraM/ci-detector/tree/4.2.0" + }, + "time": "2024-03-12T13:22:30+00:00" + }, + { + "name": "pds/composer-script-names", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-pds/composer-script-names.git", + "reference": "e6a78aaeaee7cef82a995718ab2f5d0445ef8073" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-pds/composer-script-names/zipball/e6a78aaeaee7cef82a995718ab2f5d0445ef8073", + "reference": "e6a78aaeaee7cef82a995718ab2f5d0445ef8073", + "shasum": "" + }, + "type": "standard", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "CC-BY-SA-4.0" + ], + "description": "Standard for Composer script names.", + "homepage": "https://github.com/php-pds/composer-script-names", + "support": { + "issues": "https://github.com/php-pds/composer-script-names/issues", + "source": "https://github.com/php-pds/composer-script-names/tree/1.0.0" }, - "time": "2024-12-30T11:07:19+00:00" + "time": "2023-04-06T13:42:16+00:00" }, { "name": "pds/skeleton", @@ -1174,6 +1408,162 @@ }, "time": "2017-01-25T23:30:41+00:00" }, + { + "name": "phalcon/cli-options-parser", + "version": "v2.0.0", + "source": { + "type": "git", + "url": "https://github.com/phalcon/cli-options-parser.git", + "reference": "ec4d4cd0b7e61046b88957a4028ad01dfa14f4e6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phalcon/cli-options-parser/zipball/ec4d4cd0b7e61046b88957a4028ad01dfa14f4e6", + "reference": "ec4d4cd0b7e61046b88957a4028ad01dfa14f4e6", + "shasum": "" + }, + "require": { + "php": ">=8.0" + }, + "require-dev": { + "pds/skeleton": "^1.0", + "phpstan/phpstan": "^1.10", + "phpunit/phpunit": "^9.6", + "squizlabs/php_codesniffer": "^3.7" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + }, + "autoload": { + "psr-4": { + "Phalcon\\Cop\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Phalcon Team", + "email": "team@phalconphp.com", + "homepage": "https://phalconphp.com/en/team" + }, + { + "name": "Contributors", + "homepage": "https://github.com/phalcon/cli-options-parser/graphs/contributors" + } + ], + "description": "Command line arguments/options parser.", + "homepage": "https://phalconphp.com", + "keywords": [ + "argparse", + "cli", + "command", + "command-line", + "getopt", + "line", + "option", + "optparse", + "parser", + "terminal" + ], + "support": { + "discord": "https://phalcon.io/discord/", + "issues": "https://github.com/phalcon/cli-options-parser/issues", + "source": "https://github.com/phalcon/cli-options-parser" + }, + "funding": [ + { + "url": "https://github.com/phalcon", + "type": "github" + }, + { + "url": "https://opencollective.com/phalcon", + "type": "open_collective" + } + ], + "time": "2023-11-24T16:04:00+00:00" + }, + { + "name": "phalcon/talon", + "version": "v0.6.0", + "source": { + "type": "git", + "url": "https://github.com/phalcon/talon.git", + "reference": "93018138c2c50f7225d5994bc506b35069b2de36" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phalcon/talon/zipball/93018138c2c50f7225d5994bc506b35069b2de36", + "reference": "93018138c2c50f7225d5994bc506b35069b2de36", + "shasum": "" + }, + "require": { + "phalcon/cli-options-parser": "^2.0", + "php": "^8.1", + "symfony/browser-kit": "^6.4 || ^7.0", + "symfony/dom-crawler": "^6.4 || ^7.0" + }, + "require-dev": { + "ext-pdo": "*", + "ext-sqlite3": "*", + "friendsofphp/php-cs-fixer": "^3", + "infection/infection": "^0.29.9", + "pds/composer-script-names": "^1", + "pds/skeleton": "^1", + "phalcon/phalcon": "^6.0@alpha", + "phpstan/phpstan": "^2", + "phpunit/phpunit": "^10.5", + "predis/predis": "^2 || ^3", + "squizlabs/php_codesniffer": "^3 || ^4" + }, + "suggest": { + "ext-memcached": "For the Services (Memcached) helpers", + "ext-phalcon": "Phalcon C extension (^5) - one of ext-phalcon or phalcon/phalcon is required", + "phalcon/phalcon": "Phalcon PHP implementation (^6) - alternative to the C extension", + "predis/predis": "For the Services (Redis) helpers" + }, + "bin": [ + "bin/talon" + ], + "type": "library", + "autoload": { + "psr-4": { + "Phalcon\\Talon\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "Test harness and Phalcon bootstrapping for PHPUnit and beyond", + "keywords": [ + "harness", + "phalcon", + "phpunit", + "test", + "testing" + ], + "support": { + "issues": "https://github.com/phalcon/talon/issues", + "source": "https://github.com/phalcon/talon/tree/v0.6.0" + }, + "funding": [ + { + "url": "https://github.com/phalcon", + "type": "github" + }, + { + "url": "https://opencollective.com/phalcon", + "type": "open_collective" + } + ], + "time": "2026-07-02T20:38:17+00:00" + }, { "name": "phar-io/manifest", "version": "2.0.4", @@ -1293,114 +1683,45 @@ "time": "2022-02-21T01:04:05+00:00" }, { - "name": "phpoption/phpoption", - "version": "1.9.3", - "source": { - "type": "git", - "url": "https://github.com/schmittjoh/php-option.git", - "reference": "e3fac8b24f56113f7cb96af14958c0dd16330f54" - }, + "name": "phpstan/phpstan", + "version": "2.2.5", "dist": { "type": "zip", - "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/e3fac8b24f56113f7cb96af14958c0dd16330f54", - "reference": "e3fac8b24f56113f7cb96af14958c0dd16330f54", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/909c1e5fef7989ac0d0c1c5c42e32a5c4f6198a0", + "reference": "909c1e5fef7989ac0d0c1c5c42e32a5c4f6198a0", "shasum": "" }, "require": { - "php": "^7.2.5 || ^8.0" + "php": "^7.4|^8.0" }, - "require-dev": { - "bamarni/composer-bin-plugin": "^1.8.2", - "phpunit/phpunit": "^8.5.39 || ^9.6.20 || ^10.5.28" + "conflict": { + "phpstan/phpstan-shim": "*" }, + "bin": [ + "phpstan", + "phpstan.phar" + ], "type": "library", - "extra": { - "bamarni-bin": { - "bin-links": true, - "forward-command": false - }, - "branch-alias": { - "dev-master": "1.9-dev" - } - }, "autoload": { - "psr-4": { - "PhpOption\\": "src/PhpOption/" - } + "files": [ + "bootstrap.php" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "Apache-2.0" + "MIT" ], "authors": [ { - "name": "Johannes M. Schmitt", - "email": "schmittjoh@gmail.com", - "homepage": "https://github.com/schmittjoh" + "name": "Ondřej Mirtes" }, { - "name": "Graham Campbell", - "email": "hello@gjcampbell.co.uk", - "homepage": "https://github.com/GrahamCampbell" - } - ], - "description": "Option Type for PHP", - "keywords": [ - "language", - "option", - "php", - "type" - ], - "support": { - "issues": "https://github.com/schmittjoh/php-option/issues", - "source": "https://github.com/schmittjoh/php-option/tree/1.9.3" - }, - "funding": [ - { - "url": "https://github.com/GrahamCampbell", - "type": "github" + "name": "Markus Staab" }, { - "url": "https://tidelift.com/funding/github/packagist/phpoption/phpoption", - "type": "tidelift" + "name": "Vincent Langlet" } ], - "time": "2024-07-20T21:41:07+00:00" - }, - { - "name": "phpstan/phpstan", - "version": "1.12.17", - "source": { - "type": "git", - "url": "https://github.com/phpstan/phpstan.git", - "reference": "7027b3b0270bf392de0cfba12825979768d728bf" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/7027b3b0270bf392de0cfba12825979768d728bf", - "reference": "7027b3b0270bf392de0cfba12825979768d728bf", - "shasum": "" - }, - "require": { - "php": "^7.2|^8.0" - }, - "conflict": { - "phpstan/phpstan-shim": "*" - }, - "bin": [ - "phpstan", - "phpstan.phar" - ], - "type": "library", - "autoload": { - "files": [ - "bootstrap.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], "description": "PHPStan - PHP Static Analysis Tool", "keywords": [ "dev", @@ -1423,7 +1744,7 @@ "type": "github" } ], - "time": "2025-02-07T15:01:57+00:00" + "time": "2026-07-05T06:31:06+00:00" }, { "name": "phpunit/php-code-coverage", @@ -1748,26 +2069,26 @@ }, { "name": "phpunit/phpunit", - "version": "10.5.45", + "version": "10.5.64", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "bd68a781d8e30348bc297449f5234b3458267ae8" + "reference": "0e8c1d19cea35ad97d4887f363d07c78e30fbf06" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/bd68a781d8e30348bc297449f5234b3458267ae8", - "reference": "bd68a781d8e30348bc297449f5234b3458267ae8", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/0e8c1d19cea35ad97d4887f363d07c78e30fbf06", + "reference": "0e8c1d19cea35ad97d4887f363d07c78e30fbf06", "shasum": "" }, "require": { "ext-dom": "*", + "ext-filter": "*", "ext-json": "*", "ext-libxml": "*", "ext-mbstring": "*", - "ext-xml": "*", "ext-xmlwriter": "*", - "myclabs/deep-copy": "^1.12.1", + "myclabs/deep-copy": "^1.13.4", "phar-io/manifest": "^2.0.4", "phar-io/version": "^3.2.1", "php": ">=8.1", @@ -1778,13 +2099,13 @@ "phpunit/php-timer": "^6.0.0", "sebastian/cli-parser": "^2.0.1", "sebastian/code-unit": "^2.0.0", - "sebastian/comparator": "^5.0.3", + "sebastian/comparator": "^5.0.5", "sebastian/diff": "^5.1.1", "sebastian/environment": "^6.1.0", - "sebastian/exporter": "^5.1.2", + "sebastian/exporter": "^5.1.4", "sebastian/global-state": "^6.0.2", "sebastian/object-enumerator": "^5.0.0", - "sebastian/recursion-context": "^5.0.0", + "sebastian/recursion-context": "^5.0.1", "sebastian/type": "^4.0.0", "sebastian/version": "^4.0.1" }, @@ -1829,23 +2150,15 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.45" + "source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.64" }, "funding": [ { - "url": "https://phpunit.de/sponsors.html", - "type": "custom" - }, - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/phpunit/phpunit", - "type": "tidelift" + "url": "https://phpunit.de/sponsoring.html", + "type": "other" } ], - "time": "2025-02-06T16:08:12+00:00" + "time": "2026-07-06T14:50:35+00:00" }, { "name": "psr/container", @@ -1951,32 +2264,31 @@ "time": "2019-01-08T18:20:26+00:00" }, { - "name": "psr/http-client", - "version": "1.0.3", + "name": "psr/log", + "version": "3.0.2", "source": { "type": "git", - "url": "https://github.com/php-fig/http-client.git", - "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90" + "url": "https://github.com/php-fig/log.git", + "reference": "f16e1d5863e37f8d8c2a01719f5b34baa2b714d3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-client/zipball/bb5906edc1c324c9a05aa0873d40117941e5fa90", - "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90", + "url": "https://api.github.com/repos/php-fig/log/zipball/f16e1d5863e37f8d8c2a01719f5b34baa2b714d3", + "reference": "f16e1d5863e37f8d8c2a01719f5b34baa2b714d3", "shasum": "" }, "require": { - "php": "^7.0 || ^8.0", - "psr/http-message": "^1.0 || ^2.0" + "php": ">=8.0.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "3.x-dev" } }, "autoload": { "psr-4": { - "Psr\\Http\\Client\\": "src/" + "Psr\\Log\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -1989,46 +2301,43 @@ "homepage": "https://www.php-fig.org/" } ], - "description": "Common interface for HTTP clients", - "homepage": "https://github.com/php-fig/http-client", + "description": "Common interface for logging libraries", + "homepage": "https://github.com/php-fig/log", "keywords": [ - "http", - "http-client", + "log", "psr", - "psr-18" + "psr-3" ], "support": { - "source": "https://github.com/php-fig/http-client" + "source": "https://github.com/php-fig/log/tree/3.0.2" }, - "time": "2023-09-23T14:17:50+00:00" + "time": "2024-09-11T13:17:53+00:00" }, { - "name": "psr/http-factory", - "version": "1.1.0", + "name": "react/cache", + "version": "v1.2.0", "source": { "type": "git", - "url": "https://github.com/php-fig/http-factory.git", - "reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a" + "url": "https://github.com/reactphp/cache.git", + "reference": "d47c472b64aa5608225f47965a484b75c7817d5b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-factory/zipball/2b4765fddfe3b508ac62f829e852b1501d3f6e8a", - "reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a", + "url": "https://api.github.com/repos/reactphp/cache/zipball/d47c472b64aa5608225f47965a484b75c7817d5b", + "reference": "d47c472b64aa5608225f47965a484b75c7817d5b", "shasum": "" }, "require": { - "php": ">=7.1", - "psr/http-message": "^1.0 || ^2.0" + "php": ">=5.3.0", + "react/promise": "^3.0 || ^2.0 || ^1.1" }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } + "require-dev": { + "phpunit/phpunit": "^9.5 || ^5.7 || ^4.8.35" }, + "type": "library", "autoload": { "psr-4": { - "Psr\\Http\\Message\\": "src/" + "React\\Cache\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -2037,52 +2346,74 @@ ], "authors": [ { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" + "name": "Christian Lück", + "email": "christian@clue.engineering", + "homepage": "https://clue.engineering/" + }, + { + "name": "Cees-Jan Kiewiet", + "email": "reactphp@ceesjankiewiet.nl", + "homepage": "https://wyrihaximus.net/" + }, + { + "name": "Jan Sorgalla", + "email": "jsorgalla@gmail.com", + "homepage": "https://sorgalla.com/" + }, + { + "name": "Chris Boden", + "email": "cboden@gmail.com", + "homepage": "https://cboden.dev/" } ], - "description": "PSR-17: Common interfaces for PSR-7 HTTP message factories", + "description": "Async, Promise-based cache interface for ReactPHP", "keywords": [ - "factory", - "http", - "message", - "psr", - "psr-17", - "psr-7", - "request", - "response" + "cache", + "caching", + "promise", + "reactphp" ], "support": { - "source": "https://github.com/php-fig/http-factory" + "issues": "https://github.com/reactphp/cache/issues", + "source": "https://github.com/reactphp/cache/tree/v1.2.0" }, - "time": "2024-04-15T12:06:14+00:00" + "funding": [ + { + "url": "https://opencollective.com/reactphp", + "type": "open_collective" + } + ], + "time": "2022-11-30T15:59:55+00:00" }, { - "name": "psr/http-message", - "version": "2.0", + "name": "react/child-process", + "version": "v0.6.7", "source": { "type": "git", - "url": "https://github.com/php-fig/http-message.git", - "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71" + "url": "https://github.com/reactphp/child-process.git", + "reference": "970f0e71945556422ee4570ccbabaedc3cf04ad3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-message/zipball/402d35bcb92c70c026d1a6a9883f06b2ead23d71", - "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71", + "url": "https://api.github.com/repos/reactphp/child-process/zipball/970f0e71945556422ee4570ccbabaedc3cf04ad3", + "reference": "970f0e71945556422ee4570ccbabaedc3cf04ad3", "shasum": "" }, "require": { - "php": "^7.2 || ^8.0" + "evenement/evenement": "^3.0 || ^2.0 || ^1.0", + "php": ">=5.3.0", + "react/event-loop": "^1.2", + "react/stream": "^1.4" }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } + "require-dev": { + "phpunit/phpunit": "^9.6 || ^5.7 || ^4.8.36", + "react/socket": "^1.16", + "sebastian/environment": "^5.0 || ^3.0 || ^2.0 || ^1.0" }, + "type": "library", "autoload": { "psr-4": { - "Psr\\Http\\Message\\": "src/" + "React\\ChildProcess\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -2091,77 +2422,73 @@ ], "authors": [ { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" + "name": "Christian Lück", + "email": "christian@clue.engineering", + "homepage": "https://clue.engineering/" + }, + { + "name": "Cees-Jan Kiewiet", + "email": "reactphp@ceesjankiewiet.nl", + "homepage": "https://wyrihaximus.net/" + }, + { + "name": "Jan Sorgalla", + "email": "jsorgalla@gmail.com", + "homepage": "https://sorgalla.com/" + }, + { + "name": "Chris Boden", + "email": "cboden@gmail.com", + "homepage": "https://cboden.dev/" } ], - "description": "Common interface for HTTP messages", - "homepage": "https://github.com/php-fig/http-message", + "description": "Event-driven library for executing child processes with ReactPHP.", "keywords": [ - "http", - "http-message", - "psr", - "psr-7", - "request", - "response" + "event-driven", + "process", + "reactphp" ], "support": { - "source": "https://github.com/php-fig/http-message/tree/2.0" + "issues": "https://github.com/reactphp/child-process/issues", + "source": "https://github.com/reactphp/child-process/tree/v0.6.7" }, - "time": "2023-04-04T09:54:51+00:00" + "funding": [ + { + "url": "https://opencollective.com/reactphp", + "type": "open_collective" + } + ], + "time": "2025-12-23T15:25:20+00:00" }, { - "name": "psy/psysh", - "version": "v0.12.7", + "name": "react/dns", + "version": "v1.14.0", "source": { "type": "git", - "url": "https://github.com/bobthecow/psysh.git", - "reference": "d73fa3c74918ef4522bb8a3bf9cab39161c4b57c" + "url": "https://github.com/reactphp/dns.git", + "reference": "7562c05391f42701c1fccf189c8225fece1cd7c3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/bobthecow/psysh/zipball/d73fa3c74918ef4522bb8a3bf9cab39161c4b57c", - "reference": "d73fa3c74918ef4522bb8a3bf9cab39161c4b57c", + "url": "https://api.github.com/repos/reactphp/dns/zipball/7562c05391f42701c1fccf189c8225fece1cd7c3", + "reference": "7562c05391f42701c1fccf189c8225fece1cd7c3", "shasum": "" }, "require": { - "ext-json": "*", - "ext-tokenizer": "*", - "nikic/php-parser": "^5.0 || ^4.0", - "php": "^8.0 || ^7.4", - "symfony/console": "^7.0 || ^6.0 || ^5.0 || ^4.0 || ^3.4", - "symfony/var-dumper": "^7.0 || ^6.0 || ^5.0 || ^4.0 || ^3.4" - }, - "conflict": { - "symfony/console": "4.4.37 || 5.3.14 || 5.3.15 || 5.4.3 || 5.4.4 || 6.0.3 || 6.0.4" + "php": ">=5.3.0", + "react/cache": "^1.0 || ^0.6 || ^0.5", + "react/event-loop": "^1.2", + "react/promise": "^3.2 || ^2.7 || ^1.2.1" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.2" - }, - "suggest": { - "ext-pcntl": "Enabling the PCNTL extension makes PsySH a lot happier :)", - "ext-pdo-sqlite": "The doc command requires SQLite to work.", - "ext-posix": "If you have PCNTL, you'll want the POSIX extension as well." + "phpunit/phpunit": "^9.6 || ^5.7 || ^4.8.36", + "react/async": "^4.3 || ^3 || ^2", + "react/promise-timer": "^1.11" }, - "bin": [ - "bin/psysh" - ], "type": "library", - "extra": { - "bamarni-bin": { - "bin-links": false, - "forward-command": false - }, - "branch-alias": { - "dev-main": "0.12.x-dev" - } - }, "autoload": { - "files": [ - "src/functions.php" - ], "psr-4": { - "Psy\\": "src/" + "React\\Dns\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -2170,51 +2497,73 @@ ], "authors": [ { - "name": "Justin Hileman", - "email": "justin@justinhileman.info", - "homepage": "http://justinhileman.com" + "name": "Christian Lück", + "email": "christian@clue.engineering", + "homepage": "https://clue.engineering/" + }, + { + "name": "Cees-Jan Kiewiet", + "email": "reactphp@ceesjankiewiet.nl", + "homepage": "https://wyrihaximus.net/" + }, + { + "name": "Jan Sorgalla", + "email": "jsorgalla@gmail.com", + "homepage": "https://sorgalla.com/" + }, + { + "name": "Chris Boden", + "email": "cboden@gmail.com", + "homepage": "https://cboden.dev/" } ], - "description": "An interactive shell for modern PHP.", - "homepage": "http://psysh.org", + "description": "Async DNS resolver for ReactPHP", "keywords": [ - "REPL", - "console", - "interactive", - "shell" + "async", + "dns", + "dns-resolver", + "reactphp" ], "support": { - "issues": "https://github.com/bobthecow/psysh/issues", - "source": "https://github.com/bobthecow/psysh/tree/v0.12.7" + "issues": "https://github.com/reactphp/dns/issues", + "source": "https://github.com/reactphp/dns/tree/v1.14.0" }, - "time": "2024-12-10T01:58:33+00:00" + "funding": [ + { + "url": "https://opencollective.com/reactphp", + "type": "open_collective" + } + ], + "time": "2025-11-18T19:34:28+00:00" }, { - "name": "ralouphie/getallheaders", - "version": "3.0.3", + "name": "react/event-loop", + "version": "v1.6.0", "source": { "type": "git", - "url": "https://github.com/ralouphie/getallheaders.git", - "reference": "120b605dfeb996808c31b6477290a714d356e822" + "url": "https://github.com/reactphp/event-loop.git", + "reference": "ba276bda6083df7e0050fd9b33f66ad7a4ac747a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822", - "reference": "120b605dfeb996808c31b6477290a714d356e822", + "url": "https://api.github.com/repos/reactphp/event-loop/zipball/ba276bda6083df7e0050fd9b33f66ad7a4ac747a", + "reference": "ba276bda6083df7e0050fd9b33f66ad7a4ac747a", "shasum": "" }, "require": { - "php": ">=5.6" + "php": ">=5.3.0" }, "require-dev": { - "php-coveralls/php-coveralls": "^2.1", - "phpunit/phpunit": "^5 || ^6.5" + "phpunit/phpunit": "^9.6 || ^5.7 || ^4.8.36" + }, + "suggest": { + "ext-pcntl": "For signal handling support when using the StreamSelectLoop" }, "type": "library", "autoload": { - "files": [ - "src/getallheaders.php" - ] + "psr-4": { + "React\\EventLoop\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -2222,278 +2571,418 @@ ], "authors": [ { - "name": "Ralph Khattar", - "email": "ralph.khattar@gmail.com" + "name": "Christian Lück", + "email": "christian@clue.engineering", + "homepage": "https://clue.engineering/" + }, + { + "name": "Cees-Jan Kiewiet", + "email": "reactphp@ceesjankiewiet.nl", + "homepage": "https://wyrihaximus.net/" + }, + { + "name": "Jan Sorgalla", + "email": "jsorgalla@gmail.com", + "homepage": "https://sorgalla.com/" + }, + { + "name": "Chris Boden", + "email": "cboden@gmail.com", + "homepage": "https://cboden.dev/" } ], - "description": "A polyfill for getallheaders.", + "description": "ReactPHP's core reactor event loop that libraries can use for evented I/O.", + "keywords": [ + "asynchronous", + "event-loop" + ], "support": { - "issues": "https://github.com/ralouphie/getallheaders/issues", - "source": "https://github.com/ralouphie/getallheaders/tree/develop" + "issues": "https://github.com/reactphp/event-loop/issues", + "source": "https://github.com/reactphp/event-loop/tree/v1.6.0" }, - "time": "2019-03-08T08:55:37+00:00" + "funding": [ + { + "url": "https://opencollective.com/reactphp", + "type": "open_collective" + } + ], + "time": "2025-11-17T20:46:25+00:00" }, { - "name": "sebastian/cli-parser", - "version": "2.0.1", + "name": "react/promise", + "version": "v3.3.0", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/cli-parser.git", - "reference": "c34583b87e7b7a8055bf6c450c2c77ce32a24084" + "url": "https://github.com/reactphp/promise.git", + "reference": "23444f53a813a3296c1368bb104793ce8d88f04a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/c34583b87e7b7a8055bf6c450c2c77ce32a24084", - "reference": "c34583b87e7b7a8055bf6c450c2c77ce32a24084", + "url": "https://api.github.com/repos/reactphp/promise/zipball/23444f53a813a3296c1368bb104793ce8d88f04a", + "reference": "23444f53a813a3296c1368bb104793ce8d88f04a", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=7.1.0" }, "require-dev": { - "phpunit/phpunit": "^10.0" + "phpstan/phpstan": "1.12.28 || 1.4.10", + "phpunit/phpunit": "^9.6 || ^7.5" }, "type": "library", - "extra": { - "branch-alias": { - "dev-main": "2.0-dev" - } - }, "autoload": { - "classmap": [ - "src/" - ] + "files": [ + "src/functions_include.php" + ], + "psr-4": { + "React\\Promise\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" + "name": "Jan Sorgalla", + "email": "jsorgalla@gmail.com", + "homepage": "https://sorgalla.com/" + }, + { + "name": "Christian Lück", + "email": "christian@clue.engineering", + "homepage": "https://clue.engineering/" + }, + { + "name": "Cees-Jan Kiewiet", + "email": "reactphp@ceesjankiewiet.nl", + "homepage": "https://wyrihaximus.net/" + }, + { + "name": "Chris Boden", + "email": "cboden@gmail.com", + "homepage": "https://cboden.dev/" } ], - "description": "Library for parsing CLI options", - "homepage": "https://github.com/sebastianbergmann/cli-parser", + "description": "A lightweight implementation of CommonJS Promises/A for PHP", + "keywords": [ + "promise", + "promises" + ], "support": { - "issues": "https://github.com/sebastianbergmann/cli-parser/issues", - "security": "https://github.com/sebastianbergmann/cli-parser/security/policy", - "source": "https://github.com/sebastianbergmann/cli-parser/tree/2.0.1" + "issues": "https://github.com/reactphp/promise/issues", + "source": "https://github.com/reactphp/promise/tree/v3.3.0" }, "funding": [ { - "url": "https://github.com/sebastianbergmann", - "type": "github" + "url": "https://opencollective.com/reactphp", + "type": "open_collective" } ], - "time": "2024-03-02T07:12:49+00:00" + "time": "2025-08-19T18:57:03+00:00" }, { - "name": "sebastian/code-unit", - "version": "2.0.0", + "name": "react/socket", + "version": "v1.17.0", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/code-unit.git", - "reference": "a81fee9eef0b7a76af11d121767abc44c104e503" + "url": "https://github.com/reactphp/socket.git", + "reference": "ef5b17b81f6f60504c539313f94f2d826c5faa08" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/a81fee9eef0b7a76af11d121767abc44c104e503", - "reference": "a81fee9eef0b7a76af11d121767abc44c104e503", + "url": "https://api.github.com/repos/reactphp/socket/zipball/ef5b17b81f6f60504c539313f94f2d826c5faa08", + "reference": "ef5b17b81f6f60504c539313f94f2d826c5faa08", "shasum": "" }, "require": { - "php": ">=8.1" + "evenement/evenement": "^3.0 || ^2.0 || ^1.0", + "php": ">=5.3.0", + "react/dns": "^1.13", + "react/event-loop": "^1.2", + "react/promise": "^3.2 || ^2.6 || ^1.2.1", + "react/stream": "^1.4" }, "require-dev": { - "phpunit/phpunit": "^10.0" + "phpunit/phpunit": "^9.6 || ^5.7 || ^4.8.36", + "react/async": "^4.3 || ^3.3 || ^2", + "react/promise-stream": "^1.4", + "react/promise-timer": "^1.11" }, "type": "library", - "extra": { - "branch-alias": { - "dev-main": "2.0-dev" - } - }, "autoload": { - "classmap": [ - "src/" - ] + "psr-4": { + "React\\Socket\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" + "name": "Christian Lück", + "email": "christian@clue.engineering", + "homepage": "https://clue.engineering/" + }, + { + "name": "Cees-Jan Kiewiet", + "email": "reactphp@ceesjankiewiet.nl", + "homepage": "https://wyrihaximus.net/" + }, + { + "name": "Jan Sorgalla", + "email": "jsorgalla@gmail.com", + "homepage": "https://sorgalla.com/" + }, + { + "name": "Chris Boden", + "email": "cboden@gmail.com", + "homepage": "https://cboden.dev/" } ], - "description": "Collection of value objects that represent the PHP code units", - "homepage": "https://github.com/sebastianbergmann/code-unit", + "description": "Async, streaming plaintext TCP/IP and secure TLS socket server and client connections for ReactPHP", + "keywords": [ + "Connection", + "Socket", + "async", + "reactphp", + "stream" + ], "support": { - "issues": "https://github.com/sebastianbergmann/code-unit/issues", - "source": "https://github.com/sebastianbergmann/code-unit/tree/2.0.0" + "issues": "https://github.com/reactphp/socket/issues", + "source": "https://github.com/reactphp/socket/tree/v1.17.0" }, "funding": [ { - "url": "https://github.com/sebastianbergmann", - "type": "github" + "url": "https://opencollective.com/reactphp", + "type": "open_collective" } ], - "time": "2023-02-03T06:58:43+00:00" + "time": "2025-11-19T20:47:34+00:00" }, { - "name": "sebastian/code-unit-reverse-lookup", - "version": "3.0.0", + "name": "react/stream", + "version": "v1.4.0", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "5e3a687f7d8ae33fb362c5c0743794bbb2420a1d" + "url": "https://github.com/reactphp/stream.git", + "reference": "1e5b0acb8fe55143b5b426817155190eb6f5b18d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/5e3a687f7d8ae33fb362c5c0743794bbb2420a1d", - "reference": "5e3a687f7d8ae33fb362c5c0743794bbb2420a1d", + "url": "https://api.github.com/repos/reactphp/stream/zipball/1e5b0acb8fe55143b5b426817155190eb6f5b18d", + "reference": "1e5b0acb8fe55143b5b426817155190eb6f5b18d", "shasum": "" }, "require": { - "php": ">=8.1" + "evenement/evenement": "^3.0 || ^2.0 || ^1.0", + "php": ">=5.3.8", + "react/event-loop": "^1.2" }, "require-dev": { - "phpunit/phpunit": "^10.0" + "clue/stream-filter": "~1.2", + "phpunit/phpunit": "^9.6 || ^5.7 || ^4.8.36" }, "type": "library", - "extra": { - "branch-alias": { - "dev-main": "3.0-dev" - } - }, "autoload": { - "classmap": [ - "src/" - ] + "psr-4": { + "React\\Stream\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Looks up which function or method a line of code belongs to", - "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", - "support": { - "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", - "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/3.0.0" + "name": "Christian Lück", + "email": "christian@clue.engineering", + "homepage": "https://clue.engineering/" + }, + { + "name": "Cees-Jan Kiewiet", + "email": "reactphp@ceesjankiewiet.nl", + "homepage": "https://wyrihaximus.net/" + }, + { + "name": "Jan Sorgalla", + "email": "jsorgalla@gmail.com", + "homepage": "https://sorgalla.com/" + }, + { + "name": "Chris Boden", + "email": "cboden@gmail.com", + "homepage": "https://cboden.dev/" + } + ], + "description": "Event-driven readable and writable streams for non-blocking I/O in ReactPHP", + "keywords": [ + "event-driven", + "io", + "non-blocking", + "pipe", + "reactphp", + "readable", + "stream", + "writable" + ], + "support": { + "issues": "https://github.com/reactphp/stream/issues", + "source": "https://github.com/reactphp/stream/tree/v1.4.0" }, "funding": [ { - "url": "https://github.com/sebastianbergmann", - "type": "github" + "url": "https://opencollective.com/reactphp", + "type": "open_collective" } ], - "time": "2023-02-03T06:59:15+00:00" + "time": "2024-06-11T12:45:25+00:00" }, { - "name": "sebastian/comparator", - "version": "5.0.3", + "name": "sanmai/later", + "version": "0.1.5", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "a18251eb0b7a2dcd2f7aa3d6078b18545ef0558e" + "url": "https://github.com/sanmai/later.git", + "reference": "cf5164557d19930295892094996f049ea12ba14d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/a18251eb0b7a2dcd2f7aa3d6078b18545ef0558e", - "reference": "a18251eb0b7a2dcd2f7aa3d6078b18545ef0558e", + "url": "https://api.github.com/repos/sanmai/later/zipball/cf5164557d19930295892094996f049ea12ba14d", + "reference": "cf5164557d19930295892094996f049ea12ba14d", "shasum": "" }, "require": { - "ext-dom": "*", - "ext-mbstring": "*", - "php": ">=8.1", - "sebastian/diff": "^5.0", - "sebastian/exporter": "^5.0" + "php": ">=7.4" }, "require-dev": { - "phpunit/phpunit": "^10.5" + "ergebnis/composer-normalize": "^2.8", + "friendsofphp/php-cs-fixer": "^3.35.1", + "infection/infection": ">=0.27.6", + "phan/phan": ">=2", + "php-coveralls/php-coveralls": "^2.0", + "phpstan/phpstan": ">=1.4.5", + "phpunit/phpunit": ">=9.5 <10", + "vimeo/psalm": ">=2" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "5.0-dev" + "dev-main": "0.1.x-dev" } }, "autoload": { - "classmap": [ - "src/" - ] + "files": [ + "src/functions.php" + ], + "psr-4": { + "Later\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "Apache-2.0" ], "authors": [ { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, + "name": "Alexey Kopytko", + "email": "alexey@kopytko.com" + } + ], + "description": "Later: deferred wrapper object", + "support": { + "issues": "https://github.com/sanmai/later/issues", + "source": "https://github.com/sanmai/later/tree/0.1.5" + }, + "funding": [ { - "name": "Bernhard Schussek", - "email": "bschussek@2bepublished.at" + "url": "https://github.com/sanmai", + "type": "github" } ], - "description": "Provides the functionality to compare PHP values for equality", - "homepage": "https://github.com/sebastianbergmann/comparator", - "keywords": [ - "comparator", - "compare", - "equality" + "time": "2024-12-06T02:36:26+00:00" + }, + { + "name": "sanmai/pipeline", + "version": "6.12", + "source": { + "type": "git", + "url": "https://github.com/sanmai/pipeline.git", + "reference": "ad7dbc3f773eeafb90d5459522fbd8f188532e25" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sanmai/pipeline/zipball/ad7dbc3f773eeafb90d5459522fbd8f188532e25", + "reference": "ad7dbc3f773eeafb90d5459522fbd8f188532e25", + "shasum": "" + }, + "require": { + "php": "^7.4 || ^8.0" + }, + "require-dev": { + "ergebnis/composer-normalize": "^2.8", + "friendsofphp/php-cs-fixer": "^3.17", + "infection/infection": ">=0.10.5", + "league/pipeline": "^0.3 || ^1.0", + "phan/phan": ">=1.1", + "php-coveralls/php-coveralls": "^2.4.1", + "phpstan/phpstan": ">=0.10", + "phpunit/phpunit": ">=9.4", + "vimeo/psalm": ">=2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "v6.x-dev" + } + }, + "autoload": { + "files": [ + "src/functions.php" + ], + "psr-4": { + "Pipeline\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "Alexey Kopytko", + "email": "alexey@kopytko.com" + } ], + "description": "General-purpose collections pipeline", "support": { - "issues": "https://github.com/sebastianbergmann/comparator/issues", - "security": "https://github.com/sebastianbergmann/comparator/security/policy", - "source": "https://github.com/sebastianbergmann/comparator/tree/5.0.3" + "issues": "https://github.com/sanmai/pipeline/issues", + "source": "https://github.com/sanmai/pipeline/tree/6.12" }, "funding": [ { - "url": "https://github.com/sebastianbergmann", + "url": "https://github.com/sanmai", "type": "github" } ], - "time": "2024-10-18T14:56:07+00:00" + "time": "2024-10-17T02:22:57+00:00" }, { - "name": "sebastian/complexity", - "version": "3.2.0", + "name": "sebastian/cli-parser", + "version": "2.0.1", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/complexity.git", - "reference": "68ff824baeae169ec9f2137158ee529584553799" + "url": "https://github.com/sebastianbergmann/cli-parser.git", + "reference": "c34583b87e7b7a8055bf6c450c2c77ce32a24084" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/68ff824baeae169ec9f2137158ee529584553799", - "reference": "68ff824baeae169ec9f2137158ee529584553799", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/c34583b87e7b7a8055bf6c450c2c77ce32a24084", + "reference": "c34583b87e7b7a8055bf6c450c2c77ce32a24084", "shasum": "" }, "require": { - "nikic/php-parser": "^4.18 || ^5.0", "php": ">=8.1" }, "require-dev": { @@ -2502,7 +2991,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "3.2-dev" + "dev-main": "2.0-dev" } }, "autoload": { @@ -2521,12 +3010,12 @@ "role": "lead" } ], - "description": "Library for calculating the complexity of PHP code units", - "homepage": "https://github.com/sebastianbergmann/complexity", + "description": "Library for parsing CLI options", + "homepage": "https://github.com/sebastianbergmann/cli-parser", "support": { - "issues": "https://github.com/sebastianbergmann/complexity/issues", - "security": "https://github.com/sebastianbergmann/complexity/security/policy", - "source": "https://github.com/sebastianbergmann/complexity/tree/3.2.0" + "issues": "https://github.com/sebastianbergmann/cli-parser/issues", + "security": "https://github.com/sebastianbergmann/cli-parser/security/policy", + "source": "https://github.com/sebastianbergmann/cli-parser/tree/2.0.1" }, "funding": [ { @@ -2534,33 +3023,32 @@ "type": "github" } ], - "time": "2023-12-21T08:37:17+00:00" + "time": "2024-03-02T07:12:49+00:00" }, { - "name": "sebastian/diff", - "version": "5.1.1", + "name": "sebastian/code-unit", + "version": "2.0.0", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "c41e007b4b62af48218231d6c2275e4c9b975b2e" + "url": "https://github.com/sebastianbergmann/code-unit.git", + "reference": "a81fee9eef0b7a76af11d121767abc44c104e503" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/c41e007b4b62af48218231d6c2275e4c9b975b2e", - "reference": "c41e007b4b62af48218231d6c2275e4c9b975b2e", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/a81fee9eef0b7a76af11d121767abc44c104e503", + "reference": "a81fee9eef0b7a76af11d121767abc44c104e503", "shasum": "" }, "require": { "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^10.0", - "symfony/process": "^6.4" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "5.1-dev" + "dev-main": "2.0-dev" } }, "autoload": { @@ -2575,25 +3063,15 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Kore Nordmann", - "email": "mail@kore-nordmann.de" + "email": "sebastian@phpunit.de", + "role": "lead" } ], - "description": "Diff implementation", - "homepage": "https://github.com/sebastianbergmann/diff", - "keywords": [ - "diff", - "udiff", - "unidiff", - "unified diff" - ], + "description": "Collection of value objects that represent the PHP code units", + "homepage": "https://github.com/sebastianbergmann/code-unit", "support": { - "issues": "https://github.com/sebastianbergmann/diff/issues", - "security": "https://github.com/sebastianbergmann/diff/security/policy", - "source": "https://github.com/sebastianbergmann/diff/tree/5.1.1" + "issues": "https://github.com/sebastianbergmann/code-unit/issues", + "source": "https://github.com/sebastianbergmann/code-unit/tree/2.0.0" }, "funding": [ { @@ -2601,20 +3079,20 @@ "type": "github" } ], - "time": "2024-03-02T07:15:17+00:00" + "time": "2023-02-03T06:58:43+00:00" }, { - "name": "sebastian/environment", - "version": "6.1.0", + "name": "sebastian/code-unit-reverse-lookup", + "version": "3.0.0", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "8074dbcd93529b357029f5cc5058fd3e43666984" + "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", + "reference": "5e3a687f7d8ae33fb362c5c0743794bbb2420a1d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/8074dbcd93529b357029f5cc5058fd3e43666984", - "reference": "8074dbcd93529b357029f5cc5058fd3e43666984", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/5e3a687f7d8ae33fb362c5c0743794bbb2420a1d", + "reference": "5e3a687f7d8ae33fb362c5c0743794bbb2420a1d", "shasum": "" }, "require": { @@ -2623,13 +3101,10 @@ "require-dev": { "phpunit/phpunit": "^10.0" }, - "suggest": { - "ext-posix": "*" - }, "type": "library", "extra": { "branch-alias": { - "dev-main": "6.1-dev" + "dev-main": "3.0-dev" } }, "autoload": { @@ -2647,17 +3122,11 @@ "email": "sebastian@phpunit.de" } ], - "description": "Provides functionality to handle HHVM/PHP environments", - "homepage": "https://github.com/sebastianbergmann/environment", - "keywords": [ - "Xdebug", - "environment", - "hhvm" - ], + "description": "Looks up which function or method a line of code belongs to", + "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", "support": { - "issues": "https://github.com/sebastianbergmann/environment/issues", - "security": "https://github.com/sebastianbergmann/environment/security/policy", - "source": "https://github.com/sebastianbergmann/environment/tree/6.1.0" + "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", + "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/3.0.0" }, "funding": [ { @@ -2665,34 +3134,36 @@ "type": "github" } ], - "time": "2024-03-23T08:47:14+00:00" + "time": "2023-02-03T06:59:15+00:00" }, { - "name": "sebastian/exporter", - "version": "5.1.2", + "name": "sebastian/comparator", + "version": "5.0.5", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "955288482d97c19a372d3f31006ab3f37da47adf" + "url": "https://github.com/sebastianbergmann/comparator.git", + "reference": "55dfef806eb7dfeb6e7a6935601fef866f8ca48d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/955288482d97c19a372d3f31006ab3f37da47adf", - "reference": "955288482d97c19a372d3f31006ab3f37da47adf", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/55dfef806eb7dfeb6e7a6935601fef866f8ca48d", + "reference": "55dfef806eb7dfeb6e7a6935601fef866f8ca48d", "shasum": "" }, "require": { + "ext-dom": "*", "ext-mbstring": "*", "php": ">=8.1", - "sebastian/recursion-context": "^5.0" + "sebastian/diff": "^5.0", + "sebastian/exporter": "^5.0" }, "require-dev": { - "phpunit/phpunit": "^10.0" + "phpunit/phpunit": "^10.5" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "5.1-dev" + "dev-main": "5.0-dev" } }, "autoload": { @@ -2717,61 +3188,68 @@ "name": "Volker Dusch", "email": "github@wallbash.com" }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - }, { "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" + "email": "bschussek@2bepublished.at" } ], - "description": "Provides the functionality to export PHP variables for visualization", - "homepage": "https://www.github.com/sebastianbergmann/exporter", + "description": "Provides the functionality to compare PHP values for equality", + "homepage": "https://github.com/sebastianbergmann/comparator", "keywords": [ - "export", - "exporter" + "comparator", + "compare", + "equality" ], "support": { - "issues": "https://github.com/sebastianbergmann/exporter/issues", - "security": "https://github.com/sebastianbergmann/exporter/security/policy", - "source": "https://github.com/sebastianbergmann/exporter/tree/5.1.2" + "issues": "https://github.com/sebastianbergmann/comparator/issues", + "security": "https://github.com/sebastianbergmann/comparator/security/policy", + "source": "https://github.com/sebastianbergmann/comparator/tree/5.0.5" }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/sebastian/comparator", + "type": "tidelift" } ], - "time": "2024-03-02T07:17:12+00:00" + "time": "2026-01-24T09:25:16+00:00" }, { - "name": "sebastian/global-state", - "version": "6.0.2", + "name": "sebastian/complexity", + "version": "3.2.0", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "987bafff24ecc4c9ac418cab1145b96dd6e9cbd9" + "url": "https://github.com/sebastianbergmann/complexity.git", + "reference": "68ff824baeae169ec9f2137158ee529584553799" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/987bafff24ecc4c9ac418cab1145b96dd6e9cbd9", - "reference": "987bafff24ecc4c9ac418cab1145b96dd6e9cbd9", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/68ff824baeae169ec9f2137158ee529584553799", + "reference": "68ff824baeae169ec9f2137158ee529584553799", "shasum": "" }, "require": { - "php": ">=8.1", - "sebastian/object-reflector": "^3.0", - "sebastian/recursion-context": "^5.0" + "nikic/php-parser": "^4.18 || ^5.0", + "php": ">=8.1" }, "require-dev": { - "ext-dom": "*", "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "6.0-dev" + "dev-main": "3.2-dev" } }, "autoload": { @@ -2786,18 +3264,16 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" + "email": "sebastian@phpunit.de", + "role": "lead" } ], - "description": "Snapshotting of global state", - "homepage": "https://www.github.com/sebastianbergmann/global-state", - "keywords": [ - "global state" - ], + "description": "Library for calculating the complexity of PHP code units", + "homepage": "https://github.com/sebastianbergmann/complexity", "support": { - "issues": "https://github.com/sebastianbergmann/global-state/issues", - "security": "https://github.com/sebastianbergmann/global-state/security/policy", - "source": "https://github.com/sebastianbergmann/global-state/tree/6.0.2" + "issues": "https://github.com/sebastianbergmann/complexity/issues", + "security": "https://github.com/sebastianbergmann/complexity/security/policy", + "source": "https://github.com/sebastianbergmann/complexity/tree/3.2.0" }, "funding": [ { @@ -2805,33 +3281,33 @@ "type": "github" } ], - "time": "2024-03-02T07:19:19+00:00" + "time": "2023-12-21T08:37:17+00:00" }, { - "name": "sebastian/lines-of-code", - "version": "2.0.2", + "name": "sebastian/diff", + "version": "5.1.1", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/lines-of-code.git", - "reference": "856e7f6a75a84e339195d48c556f23be2ebf75d0" + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "c41e007b4b62af48218231d6c2275e4c9b975b2e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/856e7f6a75a84e339195d48c556f23be2ebf75d0", - "reference": "856e7f6a75a84e339195d48c556f23be2ebf75d0", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/c41e007b4b62af48218231d6c2275e4c9b975b2e", + "reference": "c41e007b4b62af48218231d6c2275e4c9b975b2e", "shasum": "" }, "require": { - "nikic/php-parser": "^4.18 || ^5.0", "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^10.0" + "phpunit/phpunit": "^10.0", + "symfony/process": "^6.4" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "2.0-dev" + "dev-main": "5.1-dev" } }, "autoload": { @@ -2846,16 +3322,25 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" + "email": "sebastian@phpunit.de" + }, + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" } ], - "description": "Library for counting the lines of code in PHP source code", - "homepage": "https://github.com/sebastianbergmann/lines-of-code", + "description": "Diff implementation", + "homepage": "https://github.com/sebastianbergmann/diff", + "keywords": [ + "diff", + "udiff", + "unidiff", + "unified diff" + ], "support": { - "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", - "security": "https://github.com/sebastianbergmann/lines-of-code/security/policy", - "source": "https://github.com/sebastianbergmann/lines-of-code/tree/2.0.2" + "issues": "https://github.com/sebastianbergmann/diff/issues", + "security": "https://github.com/sebastianbergmann/diff/security/policy", + "source": "https://github.com/sebastianbergmann/diff/tree/5.1.1" }, "funding": [ { @@ -2863,34 +3348,35 @@ "type": "github" } ], - "time": "2023-12-21T08:38:20+00:00" + "time": "2024-03-02T07:15:17+00:00" }, { - "name": "sebastian/object-enumerator", - "version": "5.0.0", + "name": "sebastian/environment", + "version": "6.1.0", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "202d0e344a580d7f7d04b3fafce6933e59dae906" + "url": "https://github.com/sebastianbergmann/environment.git", + "reference": "8074dbcd93529b357029f5cc5058fd3e43666984" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/202d0e344a580d7f7d04b3fafce6933e59dae906", - "reference": "202d0e344a580d7f7d04b3fafce6933e59dae906", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/8074dbcd93529b357029f5cc5058fd3e43666984", + "reference": "8074dbcd93529b357029f5cc5058fd3e43666984", "shasum": "" }, "require": { - "php": ">=8.1", - "sebastian/object-reflector": "^3.0", - "sebastian/recursion-context": "^5.0" + "php": ">=8.1" }, "require-dev": { "phpunit/phpunit": "^10.0" }, + "suggest": { + "ext-posix": "*" + }, "type": "library", "extra": { "branch-alias": { - "dev-main": "5.0-dev" + "dev-main": "6.1-dev" } }, "autoload": { @@ -2908,11 +3394,17 @@ "email": "sebastian@phpunit.de" } ], - "description": "Traverses array structures and object graphs to enumerate all referenced objects", - "homepage": "https://github.com/sebastianbergmann/object-enumerator/", + "description": "Provides functionality to handle HHVM/PHP environments", + "homepage": "https://github.com/sebastianbergmann/environment", + "keywords": [ + "Xdebug", + "environment", + "hhvm" + ], "support": { - "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", - "source": "https://github.com/sebastianbergmann/object-enumerator/tree/5.0.0" + "issues": "https://github.com/sebastianbergmann/environment/issues", + "security": "https://github.com/sebastianbergmann/environment/security/policy", + "source": "https://github.com/sebastianbergmann/environment/tree/6.1.0" }, "funding": [ { @@ -2920,32 +3412,34 @@ "type": "github" } ], - "time": "2023-02-03T07:08:32+00:00" + "time": "2024-03-23T08:47:14+00:00" }, { - "name": "sebastian/object-reflector", - "version": "3.0.0", + "name": "sebastian/exporter", + "version": "5.1.4", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/object-reflector.git", - "reference": "24ed13d98130f0e7122df55d06c5c4942a577957" + "url": "https://github.com/sebastianbergmann/exporter.git", + "reference": "0735b90f4da94969541dac1da743446e276defa6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/24ed13d98130f0e7122df55d06c5c4942a577957", - "reference": "24ed13d98130f0e7122df55d06c5c4942a577957", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/0735b90f4da94969541dac1da743446e276defa6", + "reference": "0735b90f4da94969541dac1da743446e276defa6", "shasum": "" }, "require": { - "php": ">=8.1" + "ext-mbstring": "*", + "php": ">=8.1", + "sebastian/recursion-context": "^5.0" }, "require-dev": { - "phpunit/phpunit": "^10.0" + "phpunit/phpunit": "^10.5" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "3.0-dev" + "dev-main": "5.1-dev" } }, "autoload": { @@ -2961,46 +3455,82 @@ { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" } ], - "description": "Allows reflection of object attributes, including inherited and non-public ones", - "homepage": "https://github.com/sebastianbergmann/object-reflector/", + "description": "Provides the functionality to export PHP variables for visualization", + "homepage": "https://www.github.com/sebastianbergmann/exporter", + "keywords": [ + "export", + "exporter" + ], "support": { - "issues": "https://github.com/sebastianbergmann/object-reflector/issues", - "source": "https://github.com/sebastianbergmann/object-reflector/tree/3.0.0" + "issues": "https://github.com/sebastianbergmann/exporter/issues", + "security": "https://github.com/sebastianbergmann/exporter/security/policy", + "source": "https://github.com/sebastianbergmann/exporter/tree/5.1.4" }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/sebastian/exporter", + "type": "tidelift" } ], - "time": "2023-02-03T07:06:18+00:00" + "time": "2025-09-24T06:09:11+00:00" }, { - "name": "sebastian/recursion-context", - "version": "5.0.0", + "name": "sebastian/global-state", + "version": "6.0.2", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "05909fb5bc7df4c52992396d0116aed689f93712" + "url": "https://github.com/sebastianbergmann/global-state.git", + "reference": "987bafff24ecc4c9ac418cab1145b96dd6e9cbd9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/05909fb5bc7df4c52992396d0116aed689f93712", - "reference": "05909fb5bc7df4c52992396d0116aed689f93712", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/987bafff24ecc4c9ac418cab1145b96dd6e9cbd9", + "reference": "987bafff24ecc4c9ac418cab1145b96dd6e9cbd9", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=8.1", + "sebastian/object-reflector": "^3.0", + "sebastian/recursion-context": "^5.0" }, "require-dev": { + "ext-dom": "*", "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "5.0-dev" + "dev-main": "6.0-dev" } }, "autoload": { @@ -3016,21 +3546,17 @@ { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de" - }, - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" } ], - "description": "Provides functionality to recursively process PHP variables", - "homepage": "https://github.com/sebastianbergmann/recursion-context", + "description": "Snapshotting of global state", + "homepage": "https://www.github.com/sebastianbergmann/global-state", + "keywords": [ + "global state" + ], "support": { - "issues": "https://github.com/sebastianbergmann/recursion-context/issues", - "source": "https://github.com/sebastianbergmann/recursion-context/tree/5.0.0" + "issues": "https://github.com/sebastianbergmann/global-state/issues", + "security": "https://github.com/sebastianbergmann/global-state/security/policy", + "source": "https://github.com/sebastianbergmann/global-state/tree/6.0.2" }, "funding": [ { @@ -3038,23 +3564,24 @@ "type": "github" } ], - "time": "2023-02-03T07:05:40+00:00" + "time": "2024-03-02T07:19:19+00:00" }, { - "name": "sebastian/type", - "version": "4.0.0", + "name": "sebastian/lines-of-code", + "version": "2.0.2", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/type.git", - "reference": "462699a16464c3944eefc02ebdd77882bd3925bf" + "url": "https://github.com/sebastianbergmann/lines-of-code.git", + "reference": "856e7f6a75a84e339195d48c556f23be2ebf75d0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/462699a16464c3944eefc02ebdd77882bd3925bf", - "reference": "462699a16464c3944eefc02ebdd77882bd3925bf", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/856e7f6a75a84e339195d48c556f23be2ebf75d0", + "reference": "856e7f6a75a84e339195d48c556f23be2ebf75d0", "shasum": "" }, "require": { + "nikic/php-parser": "^4.18 || ^5.0", "php": ">=8.1" }, "require-dev": { @@ -3063,7 +3590,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "4.0-dev" + "dev-main": "2.0-dev" } }, "autoload": { @@ -3082,11 +3609,12 @@ "role": "lead" } ], - "description": "Collection of value objects that represent the types of the PHP type system", - "homepage": "https://github.com/sebastianbergmann/type", + "description": "Library for counting the lines of code in PHP source code", + "homepage": "https://github.com/sebastianbergmann/lines-of-code", "support": { - "issues": "https://github.com/sebastianbergmann/type/issues", - "source": "https://github.com/sebastianbergmann/type/tree/4.0.0" + "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", + "security": "https://github.com/sebastianbergmann/lines-of-code/security/policy", + "source": "https://github.com/sebastianbergmann/lines-of-code/tree/2.0.2" }, "funding": [ { @@ -3094,29 +3622,34 @@ "type": "github" } ], - "time": "2023-02-03T07:10:45+00:00" + "time": "2023-12-21T08:38:20+00:00" }, { - "name": "sebastian/version", - "version": "4.0.1", + "name": "sebastian/object-enumerator", + "version": "5.0.0", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/version.git", - "reference": "c51fa83a5d8f43f1402e3f32a005e6262244ef17" + "url": "https://github.com/sebastianbergmann/object-enumerator.git", + "reference": "202d0e344a580d7f7d04b3fafce6933e59dae906" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c51fa83a5d8f43f1402e3f32a005e6262244ef17", - "reference": "c51fa83a5d8f43f1402e3f32a005e6262244ef17", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/202d0e344a580d7f7d04b3fafce6933e59dae906", + "reference": "202d0e344a580d7f7d04b3fafce6933e59dae906", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=8.1", + "sebastian/object-reflector": "^3.0", + "sebastian/recursion-context": "^5.0" + }, + "require-dev": { + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "4.0-dev" + "dev-main": "5.0-dev" } }, "autoload": { @@ -3131,15 +3664,14 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" + "email": "sebastian@phpunit.de" } ], - "description": "Library that helps with managing the version number of Git-hosted PHP projects", - "homepage": "https://github.com/sebastianbergmann/version", + "description": "Traverses array structures and object graphs to enumerate all referenced objects", + "homepage": "https://github.com/sebastianbergmann/object-enumerator/", "support": { - "issues": "https://github.com/sebastianbergmann/version/issues", - "source": "https://github.com/sebastianbergmann/version/tree/4.0.1" + "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", + "source": "https://github.com/sebastianbergmann/object-enumerator/tree/5.0.0" }, "funding": [ { @@ -3147,41 +3679,276 @@ "type": "github" } ], - "time": "2023-02-07T11:34:05+00:00" + "time": "2023-02-03T07:08:32+00:00" }, { - "name": "squizlabs/php_codesniffer", - "version": "3.11.3", + "name": "sebastian/object-reflector", + "version": "3.0.0", "source": { "type": "git", - "url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git", - "reference": "ba05f990e79cbe69b9f35c8c1ac8dca7eecc3a10" + "url": "https://github.com/sebastianbergmann/object-reflector.git", + "reference": "24ed13d98130f0e7122df55d06c5c4942a577957" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/ba05f990e79cbe69b9f35c8c1ac8dca7eecc3a10", - "reference": "ba05f990e79cbe69b9f35c8c1ac8dca7eecc3a10", - "shasum": "" + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/24ed13d98130f0e7122df55d06c5c4942a577957", + "reference": "24ed13d98130f0e7122df55d06c5c4942a577957", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "require-dev": { + "phpunit/phpunit": "^10.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Allows reflection of object attributes, including inherited and non-public ones", + "homepage": "https://github.com/sebastianbergmann/object-reflector/", + "support": { + "issues": "https://github.com/sebastianbergmann/object-reflector/issues", + "source": "https://github.com/sebastianbergmann/object-reflector/tree/3.0.0" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-02-03T07:06:18+00:00" + }, + { + "name": "sebastian/recursion-context", + "version": "5.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "47e34210757a2f37a97dcd207d032e1b01e64c7a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/47e34210757a2f37a97dcd207d032e1b01e64c7a", + "reference": "47e34210757a2f37a97dcd207d032e1b01e64c7a", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "require-dev": { + "phpunit/phpunit": "^10.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "5.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides functionality to recursively process PHP variables", + "homepage": "https://github.com/sebastianbergmann/recursion-context", + "support": { + "issues": "https://github.com/sebastianbergmann/recursion-context/issues", + "security": "https://github.com/sebastianbergmann/recursion-context/security/policy", + "source": "https://github.com/sebastianbergmann/recursion-context/tree/5.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/sebastian/recursion-context", + "type": "tidelift" + } + ], + "time": "2025-08-10T07:50:56+00:00" + }, + { + "name": "sebastian/type", + "version": "4.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/type.git", + "reference": "462699a16464c3944eefc02ebdd77882bd3925bf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/462699a16464c3944eefc02ebdd77882bd3925bf", + "reference": "462699a16464c3944eefc02ebdd77882bd3925bf", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "require-dev": { + "phpunit/phpunit": "^10.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Collection of value objects that represent the types of the PHP type system", + "homepage": "https://github.com/sebastianbergmann/type", + "support": { + "issues": "https://github.com/sebastianbergmann/type/issues", + "source": "https://github.com/sebastianbergmann/type/tree/4.0.0" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-02-03T07:10:45+00:00" + }, + { + "name": "sebastian/version", + "version": "4.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/version.git", + "reference": "c51fa83a5d8f43f1402e3f32a005e6262244ef17" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c51fa83a5d8f43f1402e3f32a005e6262244ef17", + "reference": "c51fa83a5d8f43f1402e3f32a005e6262244ef17", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that helps with managing the version number of Git-hosted PHP projects", + "homepage": "https://github.com/sebastianbergmann/version", + "support": { + "issues": "https://github.com/sebastianbergmann/version/issues", + "source": "https://github.com/sebastianbergmann/version/tree/4.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-02-07T11:34:05+00:00" + }, + { + "name": "squizlabs/php_codesniffer", + "version": "4.0.1", + "source": { + "type": "git", + "url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git", + "reference": "0525c73950de35ded110cffafb9892946d7771b5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/0525c73950de35ded110cffafb9892946d7771b5", + "reference": "0525c73950de35ded110cffafb9892946d7771b5", + "shasum": "" }, "require": { "ext-simplexml": "*", "ext-tokenizer": "*", "ext-xmlwriter": "*", - "php": ">=5.4.0" + "php": ">=7.2.0" }, "require-dev": { - "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.3.4" + "phpunit/phpunit": "^8.4.0 || ^9.3.4 || ^10.5.32 || 11.3.3 - 11.5.28 || ^11.5.31" }, "bin": [ "bin/phpcbf", "bin/phpcs" ], "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.x-dev" - } - }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" @@ -3200,7 +3967,7 @@ "homepage": "https://github.com/PHPCSStandards/PHP_CodeSniffer/graphs/contributors" } ], - "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", + "description": "PHP_CodeSniffer tokenizes PHP files and detects violations of a defined set of coding standards.", "homepage": "https://github.com/PHPCSStandards/PHP_CodeSniffer", "keywords": [ "phpcs", @@ -3227,24 +3994,24 @@ "type": "open_collective" }, { - "url": "https://thanks.dev/phpcsstandards", + "url": "https://thanks.dev/u/gh/phpcsstandards", "type": "thanks_dev" } ], - "time": "2025-01-23T17:04:15+00:00" + "time": "2025-11-10T16:43:36+00:00" }, { "name": "symfony/browser-kit", - "version": "v6.4.13", + "version": "v6.4.42", "source": { "type": "git", "url": "https://github.com/symfony/browser-kit.git", - "reference": "65d4b3fd9556e4b5b41287bef93c671f8f9f86ab" + "reference": "94d0d5413126d81bffcd0de509fb9daf0363babd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/browser-kit/zipball/65d4b3fd9556e4b5b41287bef93c671f8f9f86ab", - "reference": "65d4b3fd9556e4b5b41287bef93c671f8f9f86ab", + "url": "https://api.github.com/repos/symfony/browser-kit/zipball/94d0d5413126d81bffcd0de509fb9daf0363babd", + "reference": "94d0d5413126d81bffcd0de509fb9daf0363babd", "shasum": "" }, "require": { @@ -3260,7 +4027,331 @@ "type": "library", "autoload": { "psr-4": { - "Symfony\\Component\\BrowserKit\\": "" + "Symfony\\Component\\BrowserKit\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Simulates the behavior of a web browser, allowing you to make requests, click on links and submit forms programmatically", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/browser-kit/tree/v6.4.42" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2026-06-08T07:06:12+00:00" + }, + { + "name": "symfony/console", + "version": "v6.4.42", + "source": { + "type": "git", + "url": "https://github.com/symfony/console.git", + "reference": "9ef84af84a7b66396da483634227650506428639" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/console/zipball/9ef84af84a7b66396da483634227650506428639", + "reference": "9ef84af84a7b66396da483634227650506428639", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/polyfill-mbstring": "~1.0", + "symfony/service-contracts": "^2.5|^3", + "symfony/string": "^5.4|^6.0|^7.0" + }, + "conflict": { + "symfony/dependency-injection": "<5.4", + "symfony/dotenv": "<5.4", + "symfony/event-dispatcher": "<5.4", + "symfony/lock": "<5.4", + "symfony/process": "<5.4" + }, + "provide": { + "psr/log-implementation": "1.0|2.0|3.0" + }, + "require-dev": { + "psr/log": "^1|^2|^3", + "symfony/config": "^5.4|^6.0|^7.0", + "symfony/dependency-injection": "^5.4|^6.0|^7.0", + "symfony/event-dispatcher": "^5.4|^6.0|^7.0", + "symfony/http-foundation": "^6.4|^7.0", + "symfony/http-kernel": "^6.4|^7.0", + "symfony/lock": "^5.4|^6.0|^7.0", + "symfony/messenger": "^5.4|^6.0|^7.0", + "symfony/process": "^5.4|^6.0|^7.0", + "symfony/stopwatch": "^5.4|^6.0|^7.0", + "symfony/var-dumper": "^5.4|^6.0|^7.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Console\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Eases the creation of beautiful and testable command line interfaces", + "homepage": "https://symfony.com", + "keywords": [ + "cli", + "command-line", + "console", + "terminal" + ], + "support": { + "source": "https://github.com/symfony/console/tree/v6.4.42" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2026-06-15T05:35:29+00:00" + }, + { + "name": "symfony/deprecation-contracts", + "version": "v3.7.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/deprecation-contracts.git", + "reference": "f3202fa1b5097b0af062dc978b32ecf63404e31d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/f3202fa1b5097b0af062dc978b32ecf63404e31d", + "reference": "f3202fa1b5097b0af062dc978b32ecf63404e31d", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/contracts", + "name": "symfony/contracts" + }, + "branch-alias": { + "dev-main": "3.7-dev" + } + }, + "autoload": { + "files": [ + "function.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "A generic function and convention to trigger deprecation notices", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.7.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2026-06-05T06:23:12+00:00" + }, + { + "name": "symfony/dom-crawler", + "version": "v6.4.40", + "source": { + "type": "git", + "url": "https://github.com/symfony/dom-crawler.git", + "reference": "7e65f76c28f5ed8d933f2c86698a3e2bf0de1b10" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/7e65f76c28f5ed8d933f2c86698a3e2bf0de1b10", + "reference": "7e65f76c28f5ed8d933f2c86698a3e2bf0de1b10", + "shasum": "" + }, + "require": { + "masterminds/html5": "^2.6", + "php": ">=8.1", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-mbstring": "~1.0" + }, + "require-dev": { + "symfony/css-selector": "^5.4|^6.0|^7.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\DomCrawler\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Eases DOM navigation for HTML and XML documents", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/dom-crawler/tree/v6.4.40" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2026-05-19T20:33:22+00:00" + }, + { + "name": "symfony/event-dispatcher", + "version": "v6.4.37", + "source": { + "type": "git", + "url": "https://github.com/symfony/event-dispatcher.git", + "reference": "2e3bf817ba9347341ab15926700fb6320367c0e1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/2e3bf817ba9347341ab15926700fb6320367c0e1", + "reference": "2e3bf817ba9347341ab15926700fb6320367c0e1", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "symfony/event-dispatcher-contracts": "^2.5|^3" + }, + "conflict": { + "symfony/dependency-injection": "<5.4", + "symfony/service-contracts": "<2.5" + }, + "provide": { + "psr/event-dispatcher-implementation": "1.0", + "symfony/event-dispatcher-implementation": "2.0|3.0" + }, + "require-dev": { + "psr/log": "^1|^2|^3", + "symfony/config": "^5.4|^6.0|^7.0", + "symfony/dependency-injection": "^5.4|^6.0|^7.0", + "symfony/error-handler": "^5.4|^6.0|^7.0", + "symfony/expression-language": "^5.4|^6.0|^7.0", + "symfony/http-foundation": "^5.4|^6.0|^7.0", + "symfony/service-contracts": "^2.5|^3", + "symfony/stopwatch": "^5.4|^6.0|^7.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\EventDispatcher\\": "" }, "exclude-from-classmap": [ "/Tests/" @@ -3280,10 +4371,10 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Simulates the behavior of a web browser, allowing you to make requests, click on links and submit forms programmatically", + "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/browser-kit/tree/v6.4.13" + "source": "https://github.com/symfony/event-dispatcher/tree/v6.4.37" }, "funding": [ { @@ -3294,65 +4385,49 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], - "time": "2024-10-25T15:07:50+00:00" + "time": "2026-04-13T14:11:12+00:00" }, { - "name": "symfony/console", - "version": "v6.4.17", + "name": "symfony/event-dispatcher-contracts", + "version": "v3.7.1", "source": { "type": "git", - "url": "https://github.com/symfony/console.git", - "reference": "799445db3f15768ecc382ac5699e6da0520a0a04" + "url": "https://github.com/symfony/event-dispatcher-contracts.git", + "reference": "c7de7a00ffb67842132da02ea92988a39ccd9f4e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/799445db3f15768ecc382ac5699e6da0520a0a04", - "reference": "799445db3f15768ecc382ac5699e6da0520a0a04", + "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/c7de7a00ffb67842132da02ea92988a39ccd9f4e", + "reference": "c7de7a00ffb67842132da02ea92988a39ccd9f4e", "shasum": "" }, "require": { "php": ">=8.1", - "symfony/deprecation-contracts": "^2.5|^3", - "symfony/polyfill-mbstring": "~1.0", - "symfony/service-contracts": "^2.5|^3", - "symfony/string": "^5.4|^6.0|^7.0" - }, - "conflict": { - "symfony/dependency-injection": "<5.4", - "symfony/dotenv": "<5.4", - "symfony/event-dispatcher": "<5.4", - "symfony/lock": "<5.4", - "symfony/process": "<5.4" - }, - "provide": { - "psr/log-implementation": "1.0|2.0|3.0" - }, - "require-dev": { - "psr/log": "^1|^2|^3", - "symfony/config": "^5.4|^6.0|^7.0", - "symfony/dependency-injection": "^5.4|^6.0|^7.0", - "symfony/event-dispatcher": "^5.4|^6.0|^7.0", - "symfony/http-foundation": "^6.4|^7.0", - "symfony/http-kernel": "^6.4|^7.0", - "symfony/lock": "^5.4|^6.0|^7.0", - "symfony/messenger": "^5.4|^6.0|^7.0", - "symfony/process": "^5.4|^6.0|^7.0", - "symfony/stopwatch": "^5.4|^6.0|^7.0", - "symfony/var-dumper": "^5.4|^6.0|^7.0" + "psr/event-dispatcher": "^1" }, "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/contracts", + "name": "symfony/contracts" + }, + "branch-alias": { + "dev-main": "3.7-dev" + } + }, "autoload": { "psr-4": { - "Symfony\\Component\\Console\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] + "Symfony\\Contracts\\EventDispatcher\\": "" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -3360,24 +4435,26 @@ ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "name": "Nicolas Grekas", + "email": "p@tchwork.com" }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" } ], - "description": "Eases the creation of beautiful and testable command line interfaces", + "description": "Generic abstractions related to dispatching event", "homepage": "https://symfony.com", "keywords": [ - "cli", - "command-line", - "console", - "terminal" + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" ], "support": { - "source": "https://github.com/symfony/console/tree/v6.4.17" + "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.7.1" }, "funding": [ { @@ -3388,34 +4465,43 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], - "time": "2024-12-07T12:07:30+00:00" + "time": "2026-06-05T06:23:12+00:00" }, { - "name": "symfony/css-selector", - "version": "v6.4.13", + "name": "symfony/filesystem", + "version": "v6.4.39", "source": { "type": "git", - "url": "https://github.com/symfony/css-selector.git", - "reference": "cb23e97813c5837a041b73a6d63a9ddff0778f5e" + "url": "https://github.com/symfony/filesystem.git", + "reference": "c507b077756b4e3e09adbbe7975fac81cd3722ca" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/css-selector/zipball/cb23e97813c5837a041b73a6d63a9ddff0778f5e", - "reference": "cb23e97813c5837a041b73a6d63a9ddff0778f5e", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/c507b077756b4e3e09adbbe7975fac81cd3722ca", + "reference": "c507b077756b4e3e09adbbe7975fac81cd3722ca", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=8.1", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-mbstring": "~1.8" + }, + "require-dev": { + "symfony/process": "^5.4|^6.4|^7.0" }, "type": "library", "autoload": { "psr-4": { - "Symfony\\Component\\CssSelector\\": "" + "Symfony\\Component\\Filesystem\\": "" }, "exclude-from-classmap": [ "/Tests/" @@ -3430,19 +4516,15 @@ "name": "Fabien Potencier", "email": "fabien@symfony.com" }, - { - "name": "Jean-François Simon", - "email": "jeanfrancois.simon@sensiolabs.com" - }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" } ], - "description": "Converts CSS selectors to XPath expressions", + "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/css-selector/tree/v6.4.13" + "source": "https://github.com/symfony/filesystem/tree/v6.4.39" }, "funding": [ { @@ -3453,43 +4535,44 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], - "time": "2024-09-25T14:18:03+00:00" + "time": "2026-05-07T13:11:42+00:00" }, { - "name": "symfony/deprecation-contracts", - "version": "v3.5.1", + "name": "symfony/finder", + "version": "v6.4.42", "source": { "type": "git", - "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6" + "url": "https://github.com/symfony/finder.git", + "reference": "0b73dac42493acbadbba644207a715b254e9b029" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6", - "reference": "74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6", + "url": "https://api.github.com/repos/symfony/finder/zipball/0b73dac42493acbadbba644207a715b254e9b029", + "reference": "0b73dac42493acbadbba644207a715b254e9b029", "shasum": "" }, "require": { "php": ">=8.1" }, - "type": "library", - "extra": { - "thanks": { - "url": "https://github.com/symfony/contracts", - "name": "symfony/contracts" - }, - "branch-alias": { - "dev-main": "3.5-dev" - } + "require-dev": { + "symfony/filesystem": "^6.0|^7.0" }, + "type": "library", "autoload": { - "files": [ - "function.php" + "psr-4": { + "Symfony\\Component\\Finder\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" ] }, "notification-url": "https://packagist.org/downloads/", @@ -3498,18 +4581,18 @@ ], "authors": [ { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" + "name": "Fabien Potencier", + "email": "fabien@symfony.com" }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" } ], - "description": "A generic function and convention to trigger deprecation notices", + "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v3.5.1" + "source": "https://github.com/symfony/finder/tree/v6.4.42" }, "funding": [ { @@ -3520,40 +4603,39 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], - "time": "2024-09-25T14:20:29+00:00" + "time": "2026-06-26T15:18:24+00:00" }, { - "name": "symfony/dom-crawler", - "version": "v6.4.18", + "name": "symfony/options-resolver", + "version": "v6.4.30", "source": { "type": "git", - "url": "https://github.com/symfony/dom-crawler.git", - "reference": "fd07959d3e8992795029bdab3605c2e8e895034e" + "url": "https://github.com/symfony/options-resolver.git", + "reference": "eeaa8cabe54c7b3516938c72a4a161c0cc80a34f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/fd07959d3e8992795029bdab3605c2e8e895034e", - "reference": "fd07959d3e8992795029bdab3605c2e8e895034e", + "url": "https://api.github.com/repos/symfony/options-resolver/zipball/eeaa8cabe54c7b3516938c72a4a161c0cc80a34f", + "reference": "eeaa8cabe54c7b3516938c72a4a161c0cc80a34f", "shasum": "" }, "require": { - "masterminds/html5": "^2.6", "php": ">=8.1", - "symfony/polyfill-ctype": "~1.8", - "symfony/polyfill-mbstring": "~1.0" - }, - "require-dev": { - "symfony/css-selector": "^5.4|^6.0|^7.0" + "symfony/deprecation-contracts": "^2.5|^3" }, "type": "library", "autoload": { "psr-4": { - "Symfony\\Component\\DomCrawler\\": "" + "Symfony\\Component\\OptionsResolver\\": "" }, "exclude-from-classmap": [ "/Tests/" @@ -3573,10 +4655,15 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Eases DOM navigation for HTML and XML documents", + "description": "Provides an improved replacement for the array_replace PHP function", "homepage": "https://symfony.com", + "keywords": [ + "config", + "configuration", + "options" + ], "support": { - "source": "https://github.com/symfony/dom-crawler/tree/v6.4.18" + "source": "https://github.com/symfony/options-resolver/tree/v6.4.30" }, "funding": [ { @@ -3587,57 +4674,54 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], - "time": "2025-01-09T15:35:00+00:00" + "time": "2025-11-12T13:06:53+00:00" }, { - "name": "symfony/event-dispatcher", - "version": "v6.4.13", + "name": "symfony/polyfill-ctype", + "version": "v1.37.0", "source": { "type": "git", - "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "0ffc48080ab3e9132ea74ef4e09d8dcf26bf897e" + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "141046a8f9477948ff284fa65be2095baafb94f2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/0ffc48080ab3e9132ea74ef4e09d8dcf26bf897e", - "reference": "0ffc48080ab3e9132ea74ef4e09d8dcf26bf897e", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/141046a8f9477948ff284fa65be2095baafb94f2", + "reference": "141046a8f9477948ff284fa65be2095baafb94f2", "shasum": "" }, "require": { - "php": ">=8.1", - "symfony/event-dispatcher-contracts": "^2.5|^3" - }, - "conflict": { - "symfony/dependency-injection": "<5.4", - "symfony/service-contracts": "<2.5" + "php": ">=7.2" }, "provide": { - "psr/event-dispatcher-implementation": "1.0", - "symfony/event-dispatcher-implementation": "2.0|3.0" + "ext-ctype": "*" }, - "require-dev": { - "psr/log": "^1|^2|^3", - "symfony/config": "^5.4|^6.0|^7.0", - "symfony/dependency-injection": "^5.4|^6.0|^7.0", - "symfony/error-handler": "^5.4|^6.0|^7.0", - "symfony/expression-language": "^5.4|^6.0|^7.0", - "symfony/http-foundation": "^5.4|^6.0|^7.0", - "symfony/service-contracts": "^2.5|^3", - "symfony/stopwatch": "^5.4|^6.0|^7.0" + "suggest": { + "ext-ctype": "For best performance" }, "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" + } + }, "autoload": { + "files": [ + "bootstrap.php" + ], "psr-4": { - "Symfony\\Component\\EventDispatcher\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] + "Symfony\\Polyfill\\Ctype\\": "" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -3645,18 +4729,24 @@ ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "name": "Gert de Pagter", + "email": "BackEndTea@gmail.com" }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" } ], - "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", + "description": "Symfony polyfill for ctype functions", "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "ctype", + "polyfill", + "portable" + ], "support": { - "source": "https://github.com/symfony/event-dispatcher/tree/v6.4.13" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.37.0" }, "funding": [ { @@ -3667,44 +4757,50 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], - "time": "2024-09-25T14:18:03+00:00" + "time": "2026-04-10T16:19:22+00:00" }, { - "name": "symfony/event-dispatcher-contracts", - "version": "v3.5.1", + "name": "symfony/polyfill-intl-grapheme", + "version": "v1.38.1", "source": { "type": "git", - "url": "https://github.com/symfony/event-dispatcher-contracts.git", - "reference": "7642f5e970b672283b7823222ae8ef8bbc160b9f" + "url": "https://github.com/symfony/polyfill-intl-grapheme.git", + "reference": "e9247d281d694a5120554d9afaf54e070e88a603" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/7642f5e970b672283b7823222ae8ef8bbc160b9f", - "reference": "7642f5e970b672283b7823222ae8ef8bbc160b9f", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/e9247d281d694a5120554d9afaf54e070e88a603", + "reference": "e9247d281d694a5120554d9afaf54e070e88a603", "shasum": "" }, "require": { - "php": ">=8.1", - "psr/event-dispatcher": "^1" + "php": ">=7.2" + }, + "suggest": { + "ext-intl": "For best performance" }, "type": "library", "extra": { "thanks": { - "url": "https://github.com/symfony/contracts", - "name": "symfony/contracts" - }, - "branch-alias": { - "dev-main": "3.5-dev" + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" } }, "autoload": { + "files": [ + "bootstrap.php" + ], "psr-4": { - "Symfony\\Contracts\\EventDispatcher\\": "" + "Symfony\\Polyfill\\Intl\\Grapheme\\": "" } }, "notification-url": "https://packagist.org/downloads/", @@ -3721,18 +4817,18 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Generic abstractions related to dispatching event", + "description": "Symfony polyfill for intl's grapheme_* functions", "homepage": "https://symfony.com", "keywords": [ - "abstractions", - "contracts", - "decoupling", - "interfaces", - "interoperability", - "standards" + "compatibility", + "grapheme", + "intl", + "polyfill", + "portable", + "shim" ], "support": { - "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.5.1" + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.38.1" }, "funding": [ { @@ -3743,40 +4839,53 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], - "time": "2024-09-25T14:20:29+00:00" + "time": "2026-05-26T05:58:03+00:00" }, { - "name": "symfony/finder", - "version": "v6.4.17", + "name": "symfony/polyfill-intl-normalizer", + "version": "v1.38.0", "source": { "type": "git", - "url": "https://github.com/symfony/finder.git", - "reference": "1d0e8266248c5d9ab6a87e3789e6dc482af3c9c7" + "url": "https://github.com/symfony/polyfill-intl-normalizer.git", + "reference": "2d446c214bdbe5b71bde5011b060a05fece3ae6b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/1d0e8266248c5d9ab6a87e3789e6dc482af3c9c7", - "reference": "1d0e8266248c5d9ab6a87e3789e6dc482af3c9c7", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/2d446c214bdbe5b71bde5011b060a05fece3ae6b", + "reference": "2d446c214bdbe5b71bde5011b060a05fece3ae6b", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=7.2" }, - "require-dev": { - "symfony/filesystem": "^6.0|^7.0" + "suggest": { + "ext-intl": "For best performance" }, "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" + } + }, "autoload": { + "files": [ + "bootstrap.php" + ], "psr-4": { - "Symfony\\Component\\Finder\\": "" + "Symfony\\Polyfill\\Intl\\Normalizer\\": "" }, - "exclude-from-classmap": [ - "/Tests/" + "classmap": [ + "Resources/stubs" ] }, "notification-url": "https://packagist.org/downloads/", @@ -3785,18 +4894,26 @@ ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "name": "Nicolas Grekas", + "email": "p@tchwork.com" }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" } ], - "description": "Finds files and directories via an intuitive fluent interface", + "description": "Symfony polyfill for intl's Normalizer class and related functions", "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "intl", + "normalizer", + "polyfill", + "portable", + "shim" + ], "support": { - "source": "https://github.com/symfony/finder/tree/v6.4.17" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.38.0" }, "funding": [ { @@ -3807,35 +4924,40 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], - "time": "2024-12-29T13:51:37+00:00" + "time": "2026-05-25T13:48:31+00:00" }, { - "name": "symfony/polyfill-ctype", - "version": "v1.31.0", + "name": "symfony/polyfill-mbstring", + "version": "v1.38.2", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "a3cc8b044a6ea513310cbd48ef7333b384945638" + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "d3d318bad5e7a1bfbd026009c8bfb8d8f99ae6b6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/a3cc8b044a6ea513310cbd48ef7333b384945638", - "reference": "a3cc8b044a6ea513310cbd48ef7333b384945638", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/d3d318bad5e7a1bfbd026009c8bfb8d8f99ae6b6", + "reference": "d3d318bad5e7a1bfbd026009c8bfb8d8f99ae6b6", "shasum": "" }, "require": { + "ext-iconv": "*", "php": ">=7.2" }, "provide": { - "ext-ctype": "*" + "ext-mbstring": "*" }, "suggest": { - "ext-ctype": "For best performance" + "ext-mbstring": "For best performance" }, "type": "library", "extra": { @@ -3849,7 +4971,7 @@ "bootstrap.php" ], "psr-4": { - "Symfony\\Polyfill\\Ctype\\": "" + "Symfony\\Polyfill\\Mbstring\\": "" } }, "notification-url": "https://packagist.org/downloads/", @@ -3858,24 +4980,25 @@ ], "authors": [ { - "name": "Gert de Pagter", - "email": "BackEndTea@gmail.com" + "name": "Nicolas Grekas", + "email": "p@tchwork.com" }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony polyfill for ctype functions", + "description": "Symfony polyfill for the Mbstring extension", "homepage": "https://symfony.com", "keywords": [ "compatibility", - "ctype", + "mbstring", "polyfill", - "portable" + "portable", + "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.31.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.38.2" }, "funding": [ { @@ -3886,33 +5009,34 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], - "time": "2024-09-09T11:45:10+00:00" + "time": "2026-05-27T06:59:30+00:00" }, { - "name": "symfony/polyfill-intl-grapheme", - "version": "v1.31.0", + "name": "symfony/polyfill-php80", + "version": "v1.37.0", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "b9123926e3b7bc2f98c02ad54f6a4b02b91a8abe" + "url": "https://github.com/symfony/polyfill-php80.git", + "reference": "dfb55726c3a76ea3b6459fcfda1ec2d80a682411" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/b9123926e3b7bc2f98c02ad54f6a4b02b91a8abe", - "reference": "b9123926e3b7bc2f98c02ad54f6a4b02b91a8abe", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/dfb55726c3a76ea3b6459fcfda1ec2d80a682411", + "reference": "dfb55726c3a76ea3b6459fcfda1ec2d80a682411", "shasum": "" }, "require": { "php": ">=7.2" }, - "suggest": { - "ext-intl": "For best performance" - }, "type": "library", "extra": { "thanks": { @@ -3925,14 +5049,21 @@ "bootstrap.php" ], "psr-4": { - "Symfony\\Polyfill\\Intl\\Grapheme\\": "" - } + "Symfony\\Polyfill\\Php80\\": "" + }, + "classmap": [ + "Resources/stubs" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ + { + "name": "Ion Bazan", + "email": "ion.bazan@gmail.com" + }, { "name": "Nicolas Grekas", "email": "p@tchwork.com" @@ -3942,18 +5073,16 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony polyfill for intl's grapheme_* functions", + "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", "homepage": "https://symfony.com", "keywords": [ "compatibility", - "grapheme", - "intl", "polyfill", "portable", "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.31.0" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.37.0" }, "funding": [ { @@ -3964,33 +5093,34 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], - "time": "2024-09-09T11:45:10+00:00" + "time": "2026-04-10T16:19:22+00:00" }, { - "name": "symfony/polyfill-intl-normalizer", - "version": "v1.31.0", + "name": "symfony/polyfill-php81", + "version": "v1.38.1", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "3833d7255cc303546435cb650316bff708a1c75c" + "url": "https://github.com/symfony/polyfill-php81.git", + "reference": "6bfb9c766cacffbc8e118cb87217d08ed84e5cd7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/3833d7255cc303546435cb650316bff708a1c75c", - "reference": "3833d7255cc303546435cb650316bff708a1c75c", + "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/6bfb9c766cacffbc8e118cb87217d08ed84e5cd7", + "reference": "6bfb9c766cacffbc8e118cb87217d08ed84e5cd7", "shasum": "" }, "require": { "php": ">=7.2" }, - "suggest": { - "ext-intl": "For best performance" - }, "type": "library", "extra": { "thanks": { @@ -4003,7 +5133,7 @@ "bootstrap.php" ], "psr-4": { - "Symfony\\Polyfill\\Intl\\Normalizer\\": "" + "Symfony\\Polyfill\\Php81\\": "" }, "classmap": [ "Resources/stubs" @@ -4023,18 +5153,16 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony polyfill for intl's Normalizer class and related functions", + "description": "Symfony polyfill backporting some PHP 8.1+ features to lower PHP versions", "homepage": "https://symfony.com", "keywords": [ "compatibility", - "intl", - "normalizer", "polyfill", "portable", "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.31.0" + "source": "https://github.com/symfony/polyfill-php81/tree/v1.38.1" }, "funding": [ { @@ -4045,36 +5173,34 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], - "time": "2024-09-09T11:45:10+00:00" + "time": "2026-05-26T12:45:58+00:00" }, { - "name": "symfony/polyfill-mbstring", - "version": "v1.31.0", + "name": "symfony/polyfill-php84", + "version": "v1.38.1", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "85181ba99b2345b0ef10ce42ecac37612d9fd341" + "url": "https://github.com/symfony/polyfill-php84.git", + "reference": "f4e1dfaee5b74aba5964fe1fd4dfc7ba5e3085fa" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/85181ba99b2345b0ef10ce42ecac37612d9fd341", - "reference": "85181ba99b2345b0ef10ce42ecac37612d9fd341", + "url": "https://api.github.com/repos/symfony/polyfill-php84/zipball/f4e1dfaee5b74aba5964fe1fd4dfc7ba5e3085fa", + "reference": "f4e1dfaee5b74aba5964fe1fd4dfc7ba5e3085fa", "shasum": "" }, "require": { "php": ">=7.2" }, - "provide": { - "ext-mbstring": "*" - }, - "suggest": { - "ext-mbstring": "For best performance" - }, "type": "library", "extra": { "thanks": { @@ -4087,8 +5213,11 @@ "bootstrap.php" ], "psr-4": { - "Symfony\\Polyfill\\Mbstring\\": "" - } + "Symfony\\Polyfill\\Php84\\": "" + }, + "classmap": [ + "Resources/stubs" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -4104,17 +5233,16 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony polyfill for the Mbstring extension", + "description": "Symfony polyfill backporting some PHP 8.4+ features to lower PHP versions", "homepage": "https://symfony.com", "keywords": [ "compatibility", - "mbstring", "polyfill", "portable", "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.31.0" + "source": "https://github.com/symfony/polyfill-php84/tree/v1.38.1" }, "funding": [ { @@ -4125,46 +5253,41 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], - "time": "2024-09-09T11:45:10+00:00" + "time": "2026-05-26T12:51:13+00:00" }, { - "name": "symfony/polyfill-php80", - "version": "v1.31.0", + "name": "symfony/process", + "version": "v6.4.41", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "60328e362d4c2c802a54fcbf04f9d3fb892b4cf8" + "url": "https://github.com/symfony/process.git", + "reference": "c8fc09bdfe9fde9aaa89b415a4477feaccec16a7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/60328e362d4c2c802a54fcbf04f9d3fb892b4cf8", - "reference": "60328e362d4c2c802a54fcbf04f9d3fb892b4cf8", + "url": "https://api.github.com/repos/symfony/process/zipball/c8fc09bdfe9fde9aaa89b415a4477feaccec16a7", + "reference": "c8fc09bdfe9fde9aaa89b415a4477feaccec16a7", "shasum": "" }, "require": { - "php": ">=7.2" + "php": ">=8.1" }, "type": "library", - "extra": { - "thanks": { - "url": "https://github.com/symfony/polyfill", - "name": "symfony/polyfill" - } - }, "autoload": { - "files": [ - "bootstrap.php" - ], "psr-4": { - "Symfony\\Polyfill\\Php80\\": "" + "Symfony\\Component\\Process\\": "" }, - "classmap": [ - "Resources/stubs" + "exclude-from-classmap": [ + "/Tests/" ] }, "notification-url": "https://packagist.org/downloads/", @@ -4173,28 +5296,18 @@ ], "authors": [ { - "name": "Ion Bazan", - "email": "ion.bazan@gmail.com" - }, - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" + "name": "Fabien Potencier", + "email": "fabien@symfony.com" }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", + "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.31.0" + "source": "https://github.com/symfony/process/tree/v6.4.41" }, "funding": [ { @@ -4205,25 +5318,29 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], - "time": "2024-09-09T11:45:10+00:00" + "time": "2026-05-23T13:47:21+00:00" }, { "name": "symfony/service-contracts", - "version": "v3.5.1", + "version": "v3.7.1", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "e53260aabf78fb3d63f8d79d69ece59f80d5eda0" + "reference": "c0a284bab1ed8aa0417e3d69250ab437739563a0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/e53260aabf78fb3d63f8d79d69ece59f80d5eda0", - "reference": "e53260aabf78fb3d63f8d79d69ece59f80d5eda0", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/c0a284bab1ed8aa0417e3d69250ab437739563a0", + "reference": "c0a284bab1ed8aa0417e3d69250ab437739563a0", "shasum": "" }, "require": { @@ -4241,7 +5358,7 @@ "name": "symfony/contracts" }, "branch-alias": { - "dev-main": "3.5-dev" + "dev-main": "3.7-dev" } }, "autoload": { @@ -4277,7 +5394,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v3.5.1" + "source": "https://github.com/symfony/service-contracts/tree/v3.7.1" }, "funding": [ { @@ -4288,51 +5405,39 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], - "time": "2024-09-25T14:20:29+00:00" + "time": "2026-06-16T09:55:08+00:00" }, { - "name": "symfony/string", - "version": "v6.4.15", + "name": "symfony/stopwatch", + "version": "v6.4.24", "source": { "type": "git", - "url": "https://github.com/symfony/string.git", - "reference": "73a5e66ea2e1677c98d4449177c5a9cf9d8b4c6f" + "url": "https://github.com/symfony/stopwatch.git", + "reference": "b67e94e06a05d9572c2fa354483b3e13e3cb1898" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/73a5e66ea2e1677c98d4449177c5a9cf9d8b4c6f", - "reference": "73a5e66ea2e1677c98d4449177c5a9cf9d8b4c6f", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/b67e94e06a05d9572c2fa354483b3e13e3cb1898", + "reference": "b67e94e06a05d9572c2fa354483b3e13e3cb1898", "shasum": "" }, "require": { "php": ">=8.1", - "symfony/polyfill-ctype": "~1.8", - "symfony/polyfill-intl-grapheme": "~1.0", - "symfony/polyfill-intl-normalizer": "~1.0", - "symfony/polyfill-mbstring": "~1.0" - }, - "conflict": { - "symfony/translation-contracts": "<2.5" - }, - "require-dev": { - "symfony/error-handler": "^5.4|^6.0|^7.0", - "symfony/http-client": "^5.4|^6.0|^7.0", - "symfony/intl": "^6.2|^7.0", - "symfony/translation-contracts": "^2.5|^3.0", - "symfony/var-exporter": "^5.4|^6.0|^7.0" + "symfony/service-contracts": "^2.5|^3" }, "type": "library", "autoload": { - "files": [ - "Resources/functions.php" - ], "psr-4": { - "Symfony\\Component\\String\\": "" + "Symfony\\Component\\Stopwatch\\": "" }, "exclude-from-classmap": [ "/Tests/" @@ -4344,26 +5449,18 @@ ], "authors": [ { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" + "name": "Fabien Potencier", + "email": "fabien@symfony.com" }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" } ], - "description": "Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grapheme clusters in a unified way", + "description": "Provides a way to profile code", "homepage": "https://symfony.com", - "keywords": [ - "grapheme", - "i18n", - "string", - "unicode", - "utf-8", - "utf8" - ], "support": { - "source": "https://github.com/symfony/string/tree/v6.4.15" + "source": "https://github.com/symfony/stopwatch/tree/v6.4.24" }, "funding": [ { @@ -4374,54 +5471,54 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], - "time": "2024-11-13T13:31:12+00:00" + "time": "2025-07-10T08:14:14+00:00" }, { - "name": "symfony/var-dumper", - "version": "v6.4.18", + "name": "symfony/string", + "version": "v6.4.39", "source": { "type": "git", - "url": "https://github.com/symfony/var-dumper.git", - "reference": "4ad10cf8b020e77ba665305bb7804389884b4837" + "url": "https://github.com/symfony/string.git", + "reference": "62e3c927de664edadb5bef260987eb047a17a113" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/4ad10cf8b020e77ba665305bb7804389884b4837", - "reference": "4ad10cf8b020e77ba665305bb7804389884b4837", + "url": "https://api.github.com/repos/symfony/string/zipball/62e3c927de664edadb5bef260987eb047a17a113", + "reference": "62e3c927de664edadb5bef260987eb047a17a113", "shasum": "" }, "require": { "php": ">=8.1", - "symfony/deprecation-contracts": "^2.5|^3", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-intl-grapheme": "~1.0", + "symfony/polyfill-intl-normalizer": "~1.0", "symfony/polyfill-mbstring": "~1.0" }, "conflict": { - "symfony/console": "<5.4" + "symfony/translation-contracts": "<2.5" }, "require-dev": { - "ext-iconv": "*", - "symfony/console": "^5.4|^6.0|^7.0", - "symfony/error-handler": "^6.3|^7.0", - "symfony/http-kernel": "^5.4|^6.0|^7.0", - "symfony/process": "^5.4|^6.0|^7.0", - "symfony/uid": "^5.4|^6.0|^7.0", - "twig/twig": "^2.13|^3.0.4" + "symfony/http-client": "^5.4|^6.0|^7.0", + "symfony/intl": "^6.2|^7.0", + "symfony/translation-contracts": "^2.5|^3.0", + "symfony/var-exporter": "^5.4|^6.0|^7.0" }, - "bin": [ - "Resources/bin/var-dump-server" - ], "type": "library", "autoload": { "files": [ - "Resources/functions/dump.php" + "Resources/functions.php" ], "psr-4": { - "Symfony\\Component\\VarDumper\\": "" + "Symfony\\Component\\String\\": "" }, "exclude-from-classmap": [ "/Tests/" @@ -4441,14 +5538,18 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Provides mechanisms for walking through any arbitrary PHP variable", + "description": "Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grapheme clusters in a unified way", "homepage": "https://symfony.com", "keywords": [ - "debug", - "dump" + "grapheme", + "i18n", + "string", + "unicode", + "utf-8", + "utf8" ], "support": { - "source": "https://github.com/symfony/var-dumper/tree/v6.4.18" + "source": "https://github.com/symfony/string/tree/v6.4.39" }, "funding": [ { @@ -4459,97 +5560,174 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], - "time": "2025-01-17T11:26:11+00:00" + "time": "2026-05-12T11:44:19+00:00" }, { - "name": "symfony/yaml", - "version": "v6.4.18", + "name": "thecodingmachine/safe", + "version": "dev-master", "source": { "type": "git", - "url": "https://github.com/symfony/yaml.git", - "reference": "bf598c9d9bb4a22f495a4e26e4c4fce2f8ecefc5" + "url": "https://github.com/thecodingmachine/safe.git", + "reference": "6ea6a5bdbe6d94e1e38dfe35e8cc2e4a8fac5f90" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/bf598c9d9bb4a22f495a4e26e4c4fce2f8ecefc5", - "reference": "bf598c9d9bb4a22f495a4e26e4c4fce2f8ecefc5", + "url": "https://api.github.com/repos/thecodingmachine/safe/zipball/6ea6a5bdbe6d94e1e38dfe35e8cc2e4a8fac5f90", + "reference": "6ea6a5bdbe6d94e1e38dfe35e8cc2e4a8fac5f90", "shasum": "" }, "require": { - "php": ">=8.1", - "symfony/deprecation-contracts": "^2.5|^3", - "symfony/polyfill-ctype": "^1.8" - }, - "conflict": { - "symfony/console": "<5.4" + "php": "^8.1" }, "require-dev": { - "symfony/console": "^5.4|^6.0|^7.0" + "php-parallel-lint/php-parallel-lint": "^1.4", + "phpstan/phpstan": "^2", + "phpunit/phpunit": "^10", + "squizlabs/php_codesniffer": "^3.2" }, - "bin": [ - "Resources/bin/yaml-lint" - ], + "default-branch": true, "type": "library", "autoload": { - "psr-4": { - "Symfony\\Component\\Yaml\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" + "files": [ + "lib/special_cases.php", + "generated/apache.php", + "generated/apcu.php", + "generated/array.php", + "generated/bzip2.php", + "generated/calendar.php", + "generated/classobj.php", + "generated/com.php", + "generated/cubrid.php", + "generated/curl.php", + "generated/datetime.php", + "generated/dir.php", + "generated/eio.php", + "generated/errorfunc.php", + "generated/exec.php", + "generated/fileinfo.php", + "generated/filesystem.php", + "generated/filter.php", + "generated/fpm.php", + "generated/ftp.php", + "generated/funchand.php", + "generated/gettext.php", + "generated/gmp.php", + "generated/gnupg.php", + "generated/hash.php", + "generated/ibase.php", + "generated/ibmDb2.php", + "generated/iconv.php", + "generated/image.php", + "generated/imap.php", + "generated/info.php", + "generated/inotify.php", + "generated/json.php", + "generated/ldap.php", + "generated/libxml.php", + "generated/litespeed.php", + "generated/lzf.php", + "generated/mailparse.php", + "generated/mbstring.php", + "generated/misc.php", + "generated/mysql.php", + "generated/mysqli.php", + "generated/network.php", + "generated/oci8.php", + "generated/opcache.php", + "generated/openssl.php", + "generated/outcontrol.php", + "generated/pcntl.php", + "generated/pcre.php", + "generated/pgsql.php", + "generated/posix.php", + "generated/ps.php", + "generated/pspell.php", + "generated/readline.php", + "generated/rnp.php", + "generated/rpminfo.php", + "generated/rrd.php", + "generated/sem.php", + "generated/session.php", + "generated/shmop.php", + "generated/sockets.php", + "generated/sodium.php", + "generated/solr.php", + "generated/spl.php", + "generated/sqlsrv.php", + "generated/ssdeep.php", + "generated/ssh2.php", + "generated/stream.php", + "generated/strings.php", + "generated/swoole.php", + "generated/uodbc.php", + "generated/uopz.php", + "generated/url.php", + "generated/var.php", + "generated/xdiff.php", + "generated/xml.php", + "generated/xmlrpc.php", + "generated/yaml.php", + "generated/yaz.php", + "generated/zip.php", + "generated/zlib.php" + ], + "classmap": [ + "lib/DateTime.php", + "lib/DateTimeImmutable.php", + "lib/Exceptions/", + "generated/Exceptions/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Loads and dumps YAML files", - "homepage": "https://symfony.com", + "description": "PHP core functions that throw exceptions instead of returning FALSE on error", "support": { - "source": "https://github.com/symfony/yaml/tree/v6.4.18" + "issues": "https://github.com/thecodingmachine/safe/issues", + "source": "https://github.com/thecodingmachine/safe/tree/master" }, "funding": [ { - "url": "https://symfony.com/sponsor", - "type": "custom" + "url": "https://github.com/OskarStark", + "type": "github" }, { - "url": "https://github.com/fabpot", + "url": "https://github.com/shish", "type": "github" }, { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" + "url": "https://github.com/silasjoisten", + "type": "github" + }, + { + "url": "https://github.com/staabm", + "type": "github" } ], - "time": "2025-01-07T09:44:41+00:00" + "time": "2026-07-09T20:52:01+00:00" }, { "name": "theseer/tokenizer", - "version": "1.2.3", + "version": "1.3.1", "source": { "type": "git", "url": "https://github.com/theseer/tokenizer.git", - "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2" + "reference": "b7489ce515e168639d17feec34b8847c326b0b3c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2", - "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/b7489ce515e168639d17feec34b8847c326b0b3c", + "reference": "b7489ce515e168639d17feec34b8847c326b0b3c", "shasum": "" }, "require": { @@ -4578,7 +5756,7 @@ "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", "support": { "issues": "https://github.com/theseer/tokenizer/issues", - "source": "https://github.com/theseer/tokenizer/tree/1.2.3" + "source": "https://github.com/theseer/tokenizer/tree/1.3.1" }, "funding": [ { @@ -4586,97 +5764,71 @@ "type": "github" } ], - "time": "2024-03-03T12:36:25+00:00" + "time": "2025-11-17T20:03:58+00:00" }, { - "name": "vlucas/phpdotenv", - "version": "v5.6.1", + "name": "webmozart/assert", + "version": "1.12.1", "source": { "type": "git", - "url": "https://github.com/vlucas/phpdotenv.git", - "reference": "a59a13791077fe3d44f90e7133eb68e7d22eaff2" + "url": "https://github.com/webmozarts/assert.git", + "reference": "9be6926d8b485f55b9229203f962b51ed377ba68" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/a59a13791077fe3d44f90e7133eb68e7d22eaff2", - "reference": "a59a13791077fe3d44f90e7133eb68e7d22eaff2", + "url": "https://api.github.com/repos/webmozarts/assert/zipball/9be6926d8b485f55b9229203f962b51ed377ba68", + "reference": "9be6926d8b485f55b9229203f962b51ed377ba68", "shasum": "" }, "require": { - "ext-pcre": "*", - "graham-campbell/result-type": "^1.1.3", - "php": "^7.2.5 || ^8.0", - "phpoption/phpoption": "^1.9.3", - "symfony/polyfill-ctype": "^1.24", - "symfony/polyfill-mbstring": "^1.24", - "symfony/polyfill-php80": "^1.24" - }, - "require-dev": { - "bamarni/composer-bin-plugin": "^1.8.2", + "ext-ctype": "*", + "ext-date": "*", "ext-filter": "*", - "phpunit/phpunit": "^8.5.34 || ^9.6.13 || ^10.4.2" + "php": "^7.2 || ^8.0" }, "suggest": { - "ext-filter": "Required to use the boolean validator." + "ext-intl": "", + "ext-simplexml": "", + "ext-spl": "" }, "type": "library", "extra": { - "bamarni-bin": { - "bin-links": true, - "forward-command": false - }, "branch-alias": { - "dev-master": "5.6-dev" + "dev-master": "1.10-dev" } }, "autoload": { "psr-4": { - "Dotenv\\": "src/" + "Webmozart\\Assert\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Graham Campbell", - "email": "hello@gjcampbell.co.uk", - "homepage": "https://github.com/GrahamCampbell" - }, - { - "name": "Vance Lucas", - "email": "vance@vancelucas.com", - "homepage": "https://github.com/vlucas" + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" } ], - "description": "Loads environment variables from `.env` to `getenv()`, `$_ENV` and `$_SERVER` automagically.", + "description": "Assertions to validate method input/output with nice error messages.", "keywords": [ - "dotenv", - "env", - "environment" + "assert", + "check", + "validate" ], "support": { - "issues": "https://github.com/vlucas/phpdotenv/issues", - "source": "https://github.com/vlucas/phpdotenv/tree/v5.6.1" + "issues": "https://github.com/webmozarts/assert/issues", + "source": "https://github.com/webmozarts/assert/tree/1.12.1" }, - "funding": [ - { - "url": "https://github.com/GrahamCampbell", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/vlucas/phpdotenv", - "type": "tidelift" - } - ], - "time": "2024-07-20T21:52:34+00:00" + "time": "2025-10-29T15:56:20+00:00" } ], "aliases": [], - "minimum-stability": "stable", + "minimum-stability": "dev", "stability-flags": {}, - "prefer-stable": false, + "prefer-stable": true, "prefer-lowest": false, "platform": { "php": ">=8.1 <9.0", @@ -4684,5 +5836,8 @@ "ext-mbstring": "*" }, "platform-dev": {}, - "plugin-api-version": "2.6.0" + "platform-overrides": { + "php": "8.1.99" + }, + "plugin-api-version": "2.9.0" } diff --git a/config/.env.example b/config/.env.example deleted file mode 100644 index 81a1cb0..0000000 --- a/config/.env.example +++ /dev/null @@ -1 +0,0 @@ -XDEBUG_MODE=coverage diff --git a/config/.gitkeep b/config/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/phpunit.php b/phpunit.php deleted file mode 100644 index 9ee40d6..0000000 --- a/phpunit.php +++ /dev/null @@ -1,19 +0,0 @@ -load(); -} diff --git a/resources/docker/.bashrc b/resources/docker/.bashrc new file mode 100644 index 0000000..9fafb48 --- /dev/null +++ b/resources/docker/.bashrc @@ -0,0 +1,74 @@ +#!/bin/bash + +# Easier navigation: .., ..., ...., ....., ~ and - +alias ..="cd .." +alias ...="cd ../.." +alias ....="cd ../../.." +alias .....="cd ../../../.." +alias ~="cd ~" # `cd` is probably faster to type though +alias -- -="cd -" + +# Shortcuts +alias g="git" +alias h="history" + +# Detect which `ls` flavor is in use +if ls --color > /dev/null 2>&1; then # GNU `ls` + colorflag="--color" +else # OS X `ls` + colorflag="-G" +fi + +# List all files colorized in long format +# shellcheck disable=SC2139 +alias l="ls -lF ${colorflag}" + +# List all files colorized in long format, including dot files +# shellcheck disable=SC2139 +alias la="ls -laF ${colorflag}" + +# List only directories +# shellcheck disable=SC2139 +alias lsd="ls -lF ${colorflag} | grep --color=never '^d'" + +# See: https://superuser.com/a/656746/280737 +alias ll='LC_ALL="C.UTF-8" ls -alF' + +# Always use color output for `ls` +# shellcheck disable=SC2139 +alias ls="command ls ${colorflag}" +export LS_COLORS='no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.avi=01;35:*.fli=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.ogg=01;35:*.mp3=01;35:*.wav=01;35:' + +# Always enable colored `grep` output +alias grep='grep --color=auto ' + +# Enable aliases to be sudo’ed +alias sudo='sudo ' + +# Get week number +alias week='date +%V' + +# Stopwatch +alias timer='echo "Timer started. Stop with Ctrl-D." && date && time cat && date' + +# Canonical hex dump; some systems have this symlinked +command -v hd > /dev/null || alias hd="hexdump -C" + +# vhosts +alias hosts='sudo nano /etc/hosts' + +# copy working directory +alias cwd='pwd | tr -d "\r\n" | xclip -selection clipboard' + +# copy file interactive +alias cp='cp -i' + +# move file interactive +alias mv='mv -i' + +# untar +alias untar='tar xvf' + +# Make project binaries available +PATH=$PATH:./vendor/bin +export PATH diff --git a/resources/docker/Dockerfile b/resources/docker/Dockerfile new file mode 100644 index 0000000..3348ac6 --- /dev/null +++ b/resources/docker/Dockerfile @@ -0,0 +1,61 @@ +# syntax=docker/dockerfile:1 +ARG PHP_VERSION=8.4 + +FROM php:${PHP_VERSION}-cli AS base + +ARG PHP_VERSION=8.4 +ARG UID=1000 +ARG GID=1000 +ARG USER=phalcon +ARG GROUP=phalcon + +# System packages, the PHP extensions the traits wrap, and an unprivileged user. +RUN <= 0), so a PR cannot lower coverage versus the +# base branch. Keep the rest of this file in sync with octocov.yml. +# +# Paths below are relative to THIS file's directory (resources/), so `../`. +coverage: + paths: + - ../tests/_output/coverage.xml + acceptable: "current >= 100% && diff >= 0" + badge: + path: ../tests/_output/coverage.svg +codeToTestRatio: + code: + - ../src/**/*.php + test: + - ../tests/**/*.php +testExecutionTime: + steps: + - Tests with coverage +comment: + if: is_pull_request +summary: + if: true +diff: + datastores: + - artifact://${GITHUB_REPOSITORY} +report: + if: is_default_branch + datastores: + - artifact://${GITHUB_REPOSITORY} diff --git a/resources/octocov.yml b/resources/octocov.yml new file mode 100644 index 0000000..4a395f9 --- /dev/null +++ b/resources/octocov.yml @@ -0,0 +1,33 @@ +# octocov configuration - https://github.com/k1LoW/octocov +# +# Default config: used on pushes (including the default branch). The gate is a +# stable FLOOR only, so a coverage blip on the default branch never red-Xs the +# build. Pull requests use octocov.pr.yml, which adds the no-regression +# (diff >= 0) ratchet on top of this floor. +# +# Paths below are relative to THIS file's directory (resources/), so `../`. +coverage: + paths: + - ../tests/_output/coverage.xml + acceptable: "current >= 100%" + badge: + path: ../tests/_output/coverage.svg +codeToTestRatio: + code: + - ../src/**/*.php + test: + - ../tests/**/*.php +testExecutionTime: + steps: + - Tests with coverage +comment: + if: is_pull_request +summary: + if: true +diff: + datastores: + - artifact://${GITHUB_REPOSITORY} +report: + if: is_default_branch + datastores: + - artifact://${GITHUB_REPOSITORY} diff --git a/resources/php-cs-fixer.php b/resources/php-cs-fixer.php new file mode 100644 index 0000000..44653e1 --- /dev/null +++ b/resources/php-cs-fixer.php @@ -0,0 +1,58 @@ +in( + [ + $root . '/src', + $root . '/tests/unit', + ] + ); + +return (new Config()) + ->setParallelConfig(ParallelConfigFactory::detect()) + ->setRiskyAllowed(false) + ->setUsingCache(true) + ->setCacheFile($root . '/tests/_output/.php-cs-fixer.cache') + ->setRules( + [ + 'ordered_imports' => [ + 'sort_algorithm' => 'alpha', + 'imports_order' => ['class', 'function', 'const'], + ], + 'ordered_class_elements' => [ + 'sort_algorithm' => 'alpha', + 'order' => [ + 'use_trait', + 'case', + 'constant_public', + 'constant_protected', + 'constant_private', + 'property_public_static', + 'property_protected_static', + 'property_private_static', + 'property_public', + 'property_protected', + 'property_private', + 'construct', + 'destruct', + 'magic', + 'phpunit', + 'method_public_static', + 'method_protected_static', + 'method_private_static', + 'method_public', + 'method_protected', + 'method_private', + ], + ], + ] + ) + ->setFinder($finder); diff --git a/config/phpcs.xml b/resources/phpcs.xml similarity index 100% rename from config/phpcs.xml rename to resources/phpcs.xml diff --git a/config/phpstan.neon b/resources/phpstan.neon similarity index 65% rename from config/phpstan.neon rename to resources/phpstan.neon index 4ba6fcb..4fdb0ba 100644 --- a/config/phpstan.neon +++ b/resources/phpstan.neon @@ -2,3 +2,4 @@ parameters: paths: - ../src level: max + tmpDir: ../tests/_output diff --git a/config/phpunit.xml.dist b/resources/phpunit.xml.dist similarity index 60% rename from config/phpunit.xml.dist rename to resources/phpunit.xml.dist index b08c926..e0b73ab 100644 --- a/config/phpunit.xml.dist +++ b/resources/phpunit.xml.dist @@ -1,13 +1,14 @@ + failOnRisky="true" + failOnWarning="true"> - - ../tests/unit/ + + ../tests/unit From 0505080def33918eb653917518300ae1614135c0 Mon Sep 17 00:00:00 2001 From: Nikolaos Dimopoulos Date: Fri, 10 Jul 2026 07:53:43 -0500 Subject: [PATCH 3/9] changing tests to talon Assisted-by: Claude Code --- composer.json | 7 ++++-- composer.lock | 14 ++++++------ tests/unit/AbstractUnitTestCase.php | 22 ++----------------- tests/unit/Factory/FactoryTraitTest.php | 1 - tests/unit/Helper/Arr/FilterTraitTest.php | 2 -- tests/unit/Helper/Str/CamelizeTraitTest.php | 2 -- .../unit/Helper/Str/DirFromFileTraitTest.php | 2 -- .../unit/Helper/Str/DirSeparatorTraitTest.php | 2 -- tests/unit/Helper/Str/EndsWithTraitTest.php | 2 -- .../unit/Helper/Str/InterpolateTraitTest.php | 2 -- tests/unit/Helper/Str/LowerTraitTest.php | 2 -- tests/unit/Helper/Str/StartsWithTraitTest.php | 2 -- tests/unit/Helper/Str/UncamelizeTraitTest.php | 2 -- tests/unit/Helper/Str/UpperTraitTest.php | 2 -- tests/unit/Php/FileTraitTest.php | 1 - tests/unit/Php/InfoTraitTest.php | 1 - tests/unit/Php/IniTraitTest.php | 1 - tests/unit/Php/JsonTraitTest.php | 1 - tests/unit/Php/UrlTraitTest.php | 2 -- 19 files changed, 14 insertions(+), 56 deletions(-) diff --git a/composer.json b/composer.json index 2f62927..8e51e12 100644 --- a/composer.json +++ b/composer.json @@ -38,7 +38,7 @@ "infection/infection": "^0.29.9", "pds/composer-script-names": "^1.0", "pds/skeleton": "^1.0", - "phalcon/talon": "^0.6", + "phalcon/talon": "^0.7", "phpstan/phpstan": "^2.2", "phpunit/phpunit": "^10.5", "squizlabs/php_codesniffer": "^4.0" @@ -64,7 +64,10 @@ "psr-4": { "Phalcon\\Tests\\Fixtures\\": "tests/support/fixtures/", "Phalcon\\Tests\\Unit\\": "tests/unit/" - } + }, + "files": [ + "tests/support/config/functions.php" + ] }, "minimum-stability": "dev", "prefer-stable": true, diff --git a/composer.lock b/composer.lock index 55afd6e..180a1ae 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "a94c523db14ce3c7940ba9e41ea17cab", + "content-hash": "ad519af1c40b4294e71d3fc167eeb48d", "packages": [], "packages-dev": [ { @@ -1490,16 +1490,16 @@ }, { "name": "phalcon/talon", - "version": "v0.6.0", + "version": "v0.7.0", "source": { "type": "git", "url": "https://github.com/phalcon/talon.git", - "reference": "93018138c2c50f7225d5994bc506b35069b2de36" + "reference": "7e5da75bf6fe1e2ff4d861282f562a8f49c6525d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phalcon/talon/zipball/93018138c2c50f7225d5994bc506b35069b2de36", - "reference": "93018138c2c50f7225d5994bc506b35069b2de36", + "url": "https://api.github.com/repos/phalcon/talon/zipball/7e5da75bf6fe1e2ff4d861282f562a8f49c6525d", + "reference": "7e5da75bf6fe1e2ff4d861282f562a8f49c6525d", "shasum": "" }, "require": { @@ -1550,7 +1550,7 @@ ], "support": { "issues": "https://github.com/phalcon/talon/issues", - "source": "https://github.com/phalcon/talon/tree/v0.6.0" + "source": "https://github.com/phalcon/talon/tree/v0.7.0" }, "funding": [ { @@ -1562,7 +1562,7 @@ "type": "open_collective" } ], - "time": "2026-07-02T20:38:17+00:00" + "time": "2026-07-10T12:07:59+00:00" }, { "name": "phar-io/manifest", diff --git a/tests/unit/AbstractUnitTestCase.php b/tests/unit/AbstractUnitTestCase.php index 7f6ebb6..555fdc4 100644 --- a/tests/unit/AbstractUnitTestCase.php +++ b/tests/unit/AbstractUnitTestCase.php @@ -13,33 +13,15 @@ namespace Phalcon\Tests\Unit; -use PHPUnit\Framework\SkippedTestSuiteError; -use PHPUnit\Framework\TestCase; -use ReflectionClass; -use ReflectionException; +use Phalcon\Talon\PHPUnit\AbstractUnitTestCase as TalonUnitTestCase; -use function array_slice; -use function array_unshift; -use function call_user_func_array; -use function extension_loaded; use function file_exists; -use function func_get_args; use function gc_collect_cycles; -use function glob; -use function is_dir; use function is_file; -use function is_object; -use function rmdir; -use function rtrim; -use function sprintf; -use function substr; use function uniqid; use function unlink; -use const DIRECTORY_SEPARATOR; -use const GLOB_MARK; - -abstract class AbstractUnitTestCase extends TestCase +abstract class AbstractUnitTestCase extends TalonUnitTestCase { /** * Returns a unique file name diff --git a/tests/unit/Factory/FactoryTraitTest.php b/tests/unit/Factory/FactoryTraitTest.php index d2ccd05..5003895 100644 --- a/tests/unit/Factory/FactoryTraitTest.php +++ b/tests/unit/Factory/FactoryTraitTest.php @@ -18,7 +18,6 @@ use Phalcon\Tests\Fixtures\Factory\FactoryOneFixture; use Phalcon\Tests\Fixtures\Factory\FactoryThreeFixture; use Phalcon\Tests\Unit\AbstractUnitTestCase; -use PHPUnit\Framework\TestCase; use function spl_object_hash; diff --git a/tests/unit/Helper/Arr/FilterTraitTest.php b/tests/unit/Helper/Arr/FilterTraitTest.php index 0de2afa..53322ae 100644 --- a/tests/unit/Helper/Arr/FilterTraitTest.php +++ b/tests/unit/Helper/Arr/FilterTraitTest.php @@ -13,10 +13,8 @@ namespace Phalcon\Tests\Unit\Helper\Arr; -use Codeception\Example; use Phalcon\Tests\Fixtures\Helper\Arr\FilterFixture; use Phalcon\Tests\Unit\AbstractUnitTestCase; -use PHPUnit\Framework\TestCase; /** * Tests the Filter trait diff --git a/tests/unit/Helper/Str/CamelizeTraitTest.php b/tests/unit/Helper/Str/CamelizeTraitTest.php index 92d6c07..f28c9d5 100644 --- a/tests/unit/Helper/Str/CamelizeTraitTest.php +++ b/tests/unit/Helper/Str/CamelizeTraitTest.php @@ -13,10 +13,8 @@ namespace Phalcon\Tests\Unit\Helper\Str; -use Codeception\Example; use Phalcon\Tests\Fixtures\Helper\Str\CamelizeFixture; use Phalcon\Tests\Unit\AbstractUnitTestCase; -use PHPUnit\Framework\TestCase; final class CamelizeTraitTest extends AbstractUnitTestCase { diff --git a/tests/unit/Helper/Str/DirFromFileTraitTest.php b/tests/unit/Helper/Str/DirFromFileTraitTest.php index beffbf6..f5e8d42 100644 --- a/tests/unit/Helper/Str/DirFromFileTraitTest.php +++ b/tests/unit/Helper/Str/DirFromFileTraitTest.php @@ -13,10 +13,8 @@ namespace Phalcon\Tests\Unit\Helper\Str; -use Codeception\Example; use Phalcon\Tests\Fixtures\Helper\Str\DirFromFileFixture; use Phalcon\Tests\Unit\AbstractUnitTestCase; -use PHPUnit\Framework\TestCase; /** * Tests the DirFromFile trait diff --git a/tests/unit/Helper/Str/DirSeparatorTraitTest.php b/tests/unit/Helper/Str/DirSeparatorTraitTest.php index c1e3d78..be7dbc9 100644 --- a/tests/unit/Helper/Str/DirSeparatorTraitTest.php +++ b/tests/unit/Helper/Str/DirSeparatorTraitTest.php @@ -13,10 +13,8 @@ namespace Phalcon\Tests\Unit\Helper\Str; -use Codeception\Example; use Phalcon\Tests\Fixtures\Helper\Str\DirSeparatorFixture; use Phalcon\Tests\Unit\AbstractUnitTestCase; -use PHPUnit\Framework\TestCase; use const DIRECTORY_SEPARATOR; diff --git a/tests/unit/Helper/Str/EndsWithTraitTest.php b/tests/unit/Helper/Str/EndsWithTraitTest.php index 06b6b46..44cfc21 100644 --- a/tests/unit/Helper/Str/EndsWithTraitTest.php +++ b/tests/unit/Helper/Str/EndsWithTraitTest.php @@ -13,10 +13,8 @@ namespace Phalcon\Tests\Unit\Helper\Str; -use Codeception\Example; use Phalcon\Tests\Fixtures\Helper\Str\EndsWithFixture; use Phalcon\Tests\Unit\AbstractUnitTestCase; -use PHPUnit\Framework\TestCase; /** * Tests the EndsWith trait diff --git a/tests/unit/Helper/Str/InterpolateTraitTest.php b/tests/unit/Helper/Str/InterpolateTraitTest.php index e46f874..a4cc9e8 100644 --- a/tests/unit/Helper/Str/InterpolateTraitTest.php +++ b/tests/unit/Helper/Str/InterpolateTraitTest.php @@ -13,10 +13,8 @@ namespace Phalcon\Tests\Unit\Helper\Str; -use Codeception\Example; use Phalcon\Tests\Fixtures\Helper\Str\InterpolateFixture; use Phalcon\Tests\Unit\AbstractUnitTestCase; -use PHPUnit\Framework\TestCase; /** * Tests the Interpolate trait diff --git a/tests/unit/Helper/Str/LowerTraitTest.php b/tests/unit/Helper/Str/LowerTraitTest.php index d408c61..82d631a 100644 --- a/tests/unit/Helper/Str/LowerTraitTest.php +++ b/tests/unit/Helper/Str/LowerTraitTest.php @@ -13,10 +13,8 @@ namespace Phalcon\Tests\Unit\Helper\Str; -use Codeception\Example; use Phalcon\Tests\Fixtures\Helper\Str\LowerFixture; use Phalcon\Tests\Unit\AbstractUnitTestCase; -use PHPUnit\Framework\TestCase; /** * Tests the Lower trait diff --git a/tests/unit/Helper/Str/StartsWithTraitTest.php b/tests/unit/Helper/Str/StartsWithTraitTest.php index 6e55273..8c89447 100644 --- a/tests/unit/Helper/Str/StartsWithTraitTest.php +++ b/tests/unit/Helper/Str/StartsWithTraitTest.php @@ -13,10 +13,8 @@ namespace Phalcon\Tests\Unit\Helper\Str; -use Codeception\Example; use Phalcon\Tests\Fixtures\Helper\Str\StartsWithFixture; use Phalcon\Tests\Unit\AbstractUnitTestCase; -use PHPUnit\Framework\TestCase; /** * Tests the StartsWith trait diff --git a/tests/unit/Helper/Str/UncamelizeTraitTest.php b/tests/unit/Helper/Str/UncamelizeTraitTest.php index ca5a9c8..350badf 100644 --- a/tests/unit/Helper/Str/UncamelizeTraitTest.php +++ b/tests/unit/Helper/Str/UncamelizeTraitTest.php @@ -13,10 +13,8 @@ namespace Phalcon\Tests\Unit\Helper\Str; -use Codeception\Example; use Phalcon\Tests\Fixtures\Helper\Str\UncamelizeFixture; use Phalcon\Tests\Unit\AbstractUnitTestCase; -use PHPUnit\Framework\TestCase; /** * Class UncamelizeTraitTest extends TestCase diff --git a/tests/unit/Helper/Str/UpperTraitTest.php b/tests/unit/Helper/Str/UpperTraitTest.php index 8437dfa..48b594c 100644 --- a/tests/unit/Helper/Str/UpperTraitTest.php +++ b/tests/unit/Helper/Str/UpperTraitTest.php @@ -13,10 +13,8 @@ namespace Phalcon\Tests\Unit\Helper\Str; -use Codeception\Example; use Phalcon\Tests\Fixtures\Helper\Str\UpperFixture; use Phalcon\Tests\Unit\AbstractUnitTestCase; -use PHPUnit\Framework\TestCase; /** * Tests the Upper trait diff --git a/tests/unit/Php/FileTraitTest.php b/tests/unit/Php/FileTraitTest.php index 067a3f8..2594731 100644 --- a/tests/unit/Php/FileTraitTest.php +++ b/tests/unit/Php/FileTraitTest.php @@ -15,7 +15,6 @@ use Phalcon\Tests\Fixtures\Php\FileFixture; use Phalcon\Tests\Unit\AbstractUnitTestCase; -use PHPUnit\Framework\TestCase; use function dataDir; use function is_resource; diff --git a/tests/unit/Php/InfoTraitTest.php b/tests/unit/Php/InfoTraitTest.php index 187e319..074bfd5 100644 --- a/tests/unit/Php/InfoTraitTest.php +++ b/tests/unit/Php/InfoTraitTest.php @@ -15,7 +15,6 @@ use Phalcon\Tests\Fixtures\Php\InfoFixture; use Phalcon\Tests\Unit\AbstractUnitTestCase; -use PHPUnit\Framework\TestCase; /** * Tests the Info trait diff --git a/tests/unit/Php/IniTraitTest.php b/tests/unit/Php/IniTraitTest.php index 17af3b1..9db6023 100644 --- a/tests/unit/Php/IniTraitTest.php +++ b/tests/unit/Php/IniTraitTest.php @@ -15,7 +15,6 @@ use Phalcon\Tests\Fixtures\Php\IniFixture; use Phalcon\Tests\Unit\AbstractUnitTestCase; -use PHPUnit\Framework\TestCase; use function dataDir; use function ini_get; diff --git a/tests/unit/Php/JsonTraitTest.php b/tests/unit/Php/JsonTraitTest.php index 983ed4c..4aa48e3 100644 --- a/tests/unit/Php/JsonTraitTest.php +++ b/tests/unit/Php/JsonTraitTest.php @@ -15,7 +15,6 @@ use Phalcon\Tests\Fixtures\Php\JsonFixture; use Phalcon\Tests\Unit\AbstractUnitTestCase; -use PHPUnit\Framework\TestCase; /** * Tests the Json trait diff --git a/tests/unit/Php/UrlTraitTest.php b/tests/unit/Php/UrlTraitTest.php index df8b35e..1d170a5 100644 --- a/tests/unit/Php/UrlTraitTest.php +++ b/tests/unit/Php/UrlTraitTest.php @@ -13,11 +13,9 @@ namespace Phalcon\Tests\Unit\Php; -use Codeception\Stub; use Phalcon\Tests\Fixtures\Php\UrlFailFixture; use Phalcon\Tests\Fixtures\Php\UrlFixture; use Phalcon\Tests\Unit\AbstractUnitTestCase; -use PHPUnit\Framework\TestCase; /** * Tests the URL trait From 4ec0bf681bbb116915f7e1cc73ef36d933b96b2a Mon Sep 17 00:00:00 2001 From: Nikolaos Dimopoulos Date: Fri, 10 Jul 2026 11:46:59 -0500 Subject: [PATCH 4/9] adjustments to resources Assisted-by: Claude Code --- resources/phpstan.neon | 3 +++ 1 file changed, 3 insertions(+) diff --git a/resources/phpstan.neon b/resources/phpstan.neon index 4fdb0ba..993f447 100644 --- a/resources/phpstan.neon +++ b/resources/phpstan.neon @@ -1,5 +1,8 @@ parameters: paths: - ../src + - ../tests + excludePaths: + - ../tests/_output level: max tmpDir: ../tests/_output From ed0e6a3ee6eb1cf83e223f648cc1330c22fdedf2 Mon Sep 17 00:00:00 2001 From: Nikolaos Dimopoulos Date: Fri, 10 Jul 2026 11:47:28 -0500 Subject: [PATCH 5/9] refactoring according to cphalcon sync; adjusting tests Assisted-by: Claude Code --- src/Factory/FactoryTrait.php | 9 +- src/Helper/Arr/FilterTrait.php | 57 --------- src/Helper/Str/CamelizeTrait.php | 102 --------------- src/Helper/Str/UncamelizeTrait.php | 52 -------- src/Php/ApcuTrait.php | 120 ++++++++++++++++++ src/Php/Base64Trait.php | 83 ++++++++++++ src/Php/FileTrait.php | 80 ++++++++---- src/Php/HashTrait.php | 70 ++++++++++ src/Php/HeaderTrait.php | 34 +++++ src/Php/IgbinaryTrait.php | 47 +++++++ src/Php/InfoTrait.php | 8 +- src/Php/IniTrait.php | 94 ++------------ src/Php/JsonTrait.php | 59 --------- src/Php/MbCaseTrait.php | 49 +++++++ src/Php/MsgpackTrait.php | 47 +++++++ src/Php/OpensslTrait.php | 47 +++++++ src/Php/SerializeTrait.php | 48 +++++++ src/Php/UrlTrait.php | 85 ++----------- src/Php/YamlTrait.php | 43 +++++++ src/Support/Helper/Arr/FilterTrait.php | 41 ++++++ src/Support/Helper/Arr/GetTrait.php | 50 ++++++++ src/Support/Helper/Json/DecodeTrait.php | 73 +++++++++++ src/Support/Helper/Json/EncodeTrait.php | 70 ++++++++++ src/Support/Helper/Str/CamelizeTrait.php | 70 ++++++++++ .../Helper/Str/DirFromFileTrait.php | 20 ++- .../Helper/Str/DirSeparatorTrait.php | 14 +- .../Helper/Str/EndsWithTrait.php | 23 ++-- .../Helper/Str/InterpolateTrait.php | 28 ++-- src/{ => Support}/Helper/Str/LowerTrait.php | 17 +-- .../Helper/Str/StartsWithTrait.php | 23 ++-- src/Support/Helper/Str/UncamelizeTrait.php | 63 +++++++++ src/{ => Support}/Helper/Str/UpperTrait.php | 17 +-- tests/support/assets/sample.yaml | 3 + tests/support/config/functions.php | 4 +- .../fixtures/Factory/FactoryFixture.php | 10 +- .../fixtures/Helper/Arr/FilterFixture.php | 8 +- .../fixtures/Helper/Arr/GetFixture.php | 38 ++++++ .../fixtures/Helper/Json/DecodeFixture.php | 40 ++++++ .../fixtures/Helper/Json/EncodeFixture.php | 38 ++++++ .../fixtures/Helper/Str/CamelizeFixture.php | 2 +- .../Helper/Str/DirFromFileFixture.php | 7 +- .../Helper/Str/DirSeparatorFixture.php | 2 +- .../fixtures/Helper/Str/EndsWithFixture.php | 2 +- .../Helper/Str/InterpolateFixture.php | 10 +- .../fixtures/Helper/Str/LowerFixture.php | 2 +- .../fixtures/Helper/Str/StartsWithFixture.php | 2 +- .../fixtures/Helper/Str/UncamelizeFixture.php | 5 +- .../fixtures/Helper/Str/UpperFixture.php | 2 +- tests/support/fixtures/Php/ApcuFixture.php | 96 ++++++++++++++ tests/support/fixtures/Php/Base64Fixture.php | 66 ++++++++++ tests/support/fixtures/Php/FileFixture.php | 12 +- tests/support/fixtures/Php/HashFixture.php | 61 +++++++++ tests/support/fixtures/Php/HeaderFixture.php | 31 +++++ .../support/fixtures/Php/IgbinaryFixture.php | 41 ++++++ tests/support/fixtures/Php/IniFixture.php | 2 +- tests/support/fixtures/Php/JsonFixture.php | 54 -------- tests/support/fixtures/Php/MbCaseFixture.php | 33 +++++ tests/support/fixtures/Php/MsgpackFixture.php | 41 ++++++ tests/support/fixtures/Php/OpensslFixture.php | 41 ++++++ .../support/fixtures/Php/SerializeFixture.php | 42 ++++++ tests/support/fixtures/Php/UrlFailFixture.php | 32 ----- tests/support/fixtures/Php/UrlFixture.php | 64 ++-------- tests/support/fixtures/Php/YamlFixture.php | 38 ++++++ tests/unit/Helper/Arr/FilterTraitTest.php | 5 +- tests/unit/Helper/Arr/GetTraitTest.php | 53 ++++++++ tests/unit/Helper/Json/DecodeTraitTest.php | 53 ++++++++ tests/unit/Helper/Json/EncodeTraitTest.php | 53 ++++++++ tests/unit/Helper/Str/CamelizeTraitTest.php | 6 +- .../unit/Helper/Str/DirFromFileTraitTest.php | 20 ++- .../unit/Helper/Str/DirSeparatorTraitTest.php | 2 +- tests/unit/Helper/Str/EndsWithTraitTest.php | 2 +- .../unit/Helper/Str/InterpolateTraitTest.php | 4 +- tests/unit/Helper/Str/LowerTraitTest.php | 2 +- tests/unit/Helper/Str/StartsWithTraitTest.php | 2 +- tests/unit/Helper/Str/UncamelizeTraitTest.php | 4 +- tests/unit/Helper/Str/UpperTraitTest.php | 2 +- tests/unit/Php/ApcuTraitTest.php | 59 +++++++++ tests/unit/Php/Base64TraitTest.php | 51 ++++++++ tests/unit/Php/FileTraitTest.php | 4 + tests/unit/Php/HashTraitTest.php | 53 ++++++++ tests/unit/Php/HeaderTraitTest.php | 40 ++++++ tests/unit/Php/IgbinaryTraitTest.php | 48 +++++++ tests/unit/Php/JsonTraitTest.php | 52 -------- tests/unit/Php/MbCaseTraitTest.php | 55 ++++++++ tests/unit/Php/MsgpackTraitTest.php | 46 +++++++ tests/unit/Php/OpensslTraitTest.php | 46 +++++++ tests/unit/Php/SerializeTraitTest.php | 44 +++++++ tests/unit/Php/UrlTraitTest.php | 46 +------ tests/unit/Php/YamlTraitTest.php | 48 +++++++ 89 files changed, 2432 insertions(+), 840 deletions(-) delete mode 100644 src/Helper/Arr/FilterTrait.php delete mode 100644 src/Helper/Str/CamelizeTrait.php delete mode 100644 src/Helper/Str/UncamelizeTrait.php create mode 100644 src/Php/ApcuTrait.php create mode 100644 src/Php/Base64Trait.php create mode 100644 src/Php/HashTrait.php create mode 100644 src/Php/HeaderTrait.php create mode 100644 src/Php/IgbinaryTrait.php delete mode 100644 src/Php/JsonTrait.php create mode 100644 src/Php/MbCaseTrait.php create mode 100644 src/Php/MsgpackTrait.php create mode 100644 src/Php/OpensslTrait.php create mode 100644 src/Php/SerializeTrait.php create mode 100644 src/Php/YamlTrait.php create mode 100644 src/Support/Helper/Arr/FilterTrait.php create mode 100644 src/Support/Helper/Arr/GetTrait.php create mode 100644 src/Support/Helper/Json/DecodeTrait.php create mode 100644 src/Support/Helper/Json/EncodeTrait.php create mode 100644 src/Support/Helper/Str/CamelizeTrait.php rename src/{ => Support}/Helper/Str/DirFromFileTrait.php (72%) rename src/{ => Support}/Helper/Str/DirSeparatorTrait.php (64%) rename src/{ => Support}/Helper/Str/EndsWithTrait.php (61%) rename src/{ => Support}/Helper/Str/InterpolateTrait.php (65%) rename src/{ => Support}/Helper/Str/LowerTrait.php (64%) rename src/{ => Support}/Helper/Str/StartsWithTrait.php (61%) create mode 100644 src/Support/Helper/Str/UncamelizeTrait.php rename src/{ => Support}/Helper/Str/UpperTrait.php (64%) create mode 100644 tests/support/assets/sample.yaml create mode 100644 tests/support/fixtures/Helper/Arr/GetFixture.php create mode 100644 tests/support/fixtures/Helper/Json/DecodeFixture.php create mode 100644 tests/support/fixtures/Helper/Json/EncodeFixture.php create mode 100644 tests/support/fixtures/Php/ApcuFixture.php create mode 100644 tests/support/fixtures/Php/Base64Fixture.php create mode 100644 tests/support/fixtures/Php/HashFixture.php create mode 100644 tests/support/fixtures/Php/HeaderFixture.php create mode 100644 tests/support/fixtures/Php/IgbinaryFixture.php delete mode 100644 tests/support/fixtures/Php/JsonFixture.php create mode 100644 tests/support/fixtures/Php/MbCaseFixture.php create mode 100644 tests/support/fixtures/Php/MsgpackFixture.php create mode 100644 tests/support/fixtures/Php/OpensslFixture.php create mode 100644 tests/support/fixtures/Php/SerializeFixture.php delete mode 100644 tests/support/fixtures/Php/UrlFailFixture.php create mode 100644 tests/support/fixtures/Php/YamlFixture.php create mode 100644 tests/unit/Helper/Arr/GetTraitTest.php create mode 100644 tests/unit/Helper/Json/DecodeTraitTest.php create mode 100644 tests/unit/Helper/Json/EncodeTraitTest.php create mode 100644 tests/unit/Php/ApcuTraitTest.php create mode 100644 tests/unit/Php/Base64TraitTest.php create mode 100644 tests/unit/Php/HashTraitTest.php create mode 100644 tests/unit/Php/HeaderTraitTest.php create mode 100644 tests/unit/Php/IgbinaryTraitTest.php delete mode 100644 tests/unit/Php/JsonTraitTest.php create mode 100644 tests/unit/Php/MbCaseTraitTest.php create mode 100644 tests/unit/Php/MsgpackTraitTest.php create mode 100644 tests/unit/Php/OpensslTraitTest.php create mode 100644 tests/unit/Php/SerializeTraitTest.php create mode 100644 tests/unit/Php/YamlTraitTest.php diff --git a/src/Factory/FactoryTrait.php b/src/Factory/FactoryTrait.php index 3454317..b639b38 100644 --- a/src/Factory/FactoryTrait.php +++ b/src/Factory/FactoryTrait.php @@ -21,9 +21,6 @@ * Methods allowing a mapper based factory to operate. Supports injected * services, getting a service by name (key), initialization and setting of * the exception class (when exceptions are needed to be thrown) - * - * @property string $exceptionClass - * @property array $mapper */ trait FactoryTrait { @@ -40,7 +37,7 @@ trait FactoryTrait /** * Returns the exception class for the factory * - * @return string + * @return class-string<\Throwable> */ abstract protected function getExceptionClass(): string; @@ -50,7 +47,7 @@ abstract protected function getExceptionClass(): string; * * @param string $name * - * @return mixed + * @return string * @throws Exception */ protected function getService(string $name): string @@ -71,7 +68,7 @@ protected function getService(string $name): string * @param string $name * @param mixed ...$arguments * - * @return object|mixed + * @return object * @throws Exception */ protected function getCachedInstance(string $name, mixed ...$arguments): object diff --git a/src/Helper/Arr/FilterTrait.php b/src/Helper/Arr/FilterTrait.php deleted file mode 100644 index 88705dd..0000000 --- a/src/Helper/Arr/FilterTrait.php +++ /dev/null @@ -1,57 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -declare(strict_types=1); - -namespace Phalcon\Traits\Helper\Arr; - -use function array_filter; -use function is_callable; - -/** - * Provides a wrapper to array_filter with a callable on an array - */ -trait FilterTrait -{ - /** - * @param array $collection - * @param callable|null $method - * @param int $mode - * - * @return array - */ - protected function staticToFilter( - array $collection, - callable|null $method = null, - int $mode = 0 - ): array { - if (null === $method || !is_callable($method)) { - return $collection; - } - - return array_filter($collection, $method, $mode); - } - - /** - * @param array $collection - * @param callable|null $method - * @param int $mode - * - * @return array - */ - protected function toFilter( - array $collection, - callable|null $method = null, - int $mode = 0 - ): array { - return self::staticToFilter($collection, $method, $mode); - } -} diff --git a/src/Helper/Str/CamelizeTrait.php b/src/Helper/Str/CamelizeTrait.php deleted file mode 100644 index b8a10b0..0000000 --- a/src/Helper/Str/CamelizeTrait.php +++ /dev/null @@ -1,102 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -declare(strict_types=1); - -namespace Phalcon\Traits\Helper\Str; - -use function array_map; -use function implode; -use function lcfirst; -use function preg_split; -use function str_replace; -use function ucfirst; - -use const PREG_SPLIT_DELIM_CAPTURE; -use const PREG_SPLIT_NO_EMPTY; - -/** - * Converts strings to upperCamelCase or lowerCamelCase - */ -trait CamelizeTrait -{ - /** - * @param string $text - * @param string $delimiters - * @param bool $lowerFirst - * - * @return string - */ - public static function staticToCamelize( - string $text, - string $delimiters = '\-_', - bool $lowerFirst = false - ): string { - $exploded = self::staticProcessArray($text, $delimiters); - - $output = array_map( - function ($element) { - return ucfirst(mb_strtolower($element)); - }, - $exploded - ); - - $result = implode('', $output); - - if (true === $lowerFirst) { - $result = lcfirst($result); - } - - return $result; - } - - /** - * @param string $text - * @param string $delimiters - * @param bool $lowerFirst - * - * @return string - */ - public function toCamelize( - string $text, - string $delimiters = '\-_', - bool $lowerFirst = false - ): string { - return self::staticToCamelize($text, $delimiters, $lowerFirst); - } - - /** - * @param string $text - * @param string|null $delimiters - * - * @return array - */ - protected static function staticProcessArray( - string $text, - string $delimiters = '\-_' - ): array { - /** - * Escape the `-` if it exists so that it does not get interpreted - * as a range. First remove any escaping for the `-` if present and then - * add it again - just to be on the safe side - */ - $delimiters = str_replace(['\-', '-'], ['-', '\-'], $delimiters); - - $result = preg_split( - '/[' . $delimiters . ']+/', - $text, - -1, - PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY - ); - - return (false === $result) ? [] : $result; - } -} diff --git a/src/Helper/Str/UncamelizeTrait.php b/src/Helper/Str/UncamelizeTrait.php deleted file mode 100644 index 8338efd..0000000 --- a/src/Helper/Str/UncamelizeTrait.php +++ /dev/null @@ -1,52 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -declare(strict_types=1); - -namespace Phalcon\Traits\Helper\Str; - -/** - * Converts strings to non camelized style - */ -trait UncamelizeTrait -{ - /** - * @param string $text - * @param string $delimiter - * - * @return string - */ - public static function staticToUncamelize( - string $text, - string $delimiter = '_' - ): string { - $text = (string)preg_replace( - '/[A-Z]/', - $delimiter . '\\0', - lcfirst($text) - ); - - return mb_convert_case($text, MB_CASE_LOWER, 'UTF-8'); - } - - /** - * @param string $text - * @param string $delimiter - * - * @return string - */ - public function toUncamelize( - string $text, - string $delimiter = '_' - ): string { - return self::staticToUncamelize($text, $delimiter); - } -} diff --git a/src/Php/ApcuTrait.php b/src/Php/ApcuTrait.php new file mode 100644 index 0000000..a94ec4e --- /dev/null +++ b/src/Php/ApcuTrait.php @@ -0,0 +1,120 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +declare(strict_types=1); + +namespace Phalcon\Traits\Php; + +use APCUIterator; + +use function apcu_dec; +use function apcu_delete; +use function apcu_exists; +use function apcu_fetch; +use function apcu_inc; +use function apcu_store; + +/** + * APCu based wrapper methods + */ +trait ApcuTrait +{ + /** + * @param string $key + * @param int $step + * + * @return bool|int + * + * @link https://php.net/manual/en/function.apcu-dec.php + */ + protected static function phpApcuDec(string $key, int $step = 1): bool | int + { + return apcu_dec($key, $step); + } + + /** + * @param array|string $key + * + * @return array|bool + * + * @link https://php.net/manual/en/function.apcu-delete.php + */ + protected static function phpApcuDelete(array | string $key): bool | array + { + return apcu_delete($key); + } + + /** + * @param array|string $key + * + * @return array|bool + * + * @link https://php.net/manual/en/function.apcu-exists.php + */ + protected static function phpApcuExists(array | string $key): bool | array + { + return apcu_exists($key); + } + + /** + * @param array|string $key + * + * @return mixed + * + * @link https://php.net/manual/en/function.apcu-fetch.php + */ + protected static function phpApcuFetch(array | string $key): mixed + { + return apcu_fetch($key); + } + + /** + * @param string $key + * @param int $step + * + * @return bool|int + * + * @link https://php.net/manual/en/function.apcu-inc.php + */ + protected static function phpApcuInc(string $key, int $step = 1): bool | int + { + return apcu_inc($key, $step); + } + + /** + * @param string $pattern + * + * @return APCUIterator|bool + * + * @link https://php.net/manual/en/class.apcuiterator.php + */ + protected static function phpApcuIterator(string $pattern): APCUIterator | bool + { + return new APCUIterator($pattern); + } + + /** + * @param array|string $key + * @param mixed $payload + * @param int $ttl + * + * @return array|bool + * + * @link https://php.net/manual/en/function.apcu-store.php + */ + protected static function phpApcuStore( + array | string $key, + mixed $payload, + int $ttl = 0 + ): bool | array { + return apcu_store($key, $payload, $ttl); + } +} diff --git a/src/Php/Base64Trait.php b/src/Php/Base64Trait.php new file mode 100644 index 0000000..dc2d2ae --- /dev/null +++ b/src/Php/Base64Trait.php @@ -0,0 +1,83 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +declare(strict_types=1); + +namespace Phalcon\Traits\Php; + +use function base64_decode; +use function base64_encode; +use function mb_strlen; +use function str_repeat; +use function str_replace; +use function strtr; + +/** + * Base64 based wrapper methods + */ +trait Base64Trait +{ + /** + * Decode a Base64 URL string + * + * @param string $input + * + * @return string + */ + protected static function doDecodeUrl(string $input): string + { + $remainder = mb_strlen($input) % 4; + if (0 !== $remainder) { + $input .= str_repeat('=', 4 - $remainder); + } + + return base64_decode(strtr($input, '-_', '+/')); + } + + /** + * Encode a string in Base64 URL format + * + * @param string $input + * + * @return string + */ + protected static function doEncodeUrl(string $input): string + { + return str_replace('=', '', strtr(base64_encode($input), '+/', '-_')); + } + + /** + * @param string $input + * @param bool $strict + * + * @return string|false + * + * @link https://php.net/manual/en/function.base64-decode.php + */ + protected static function phpBase64Decode( + string $input, + bool $strict = false + ): string | false { + return base64_decode($input, $strict); + } + + /** + * @param string $input + * + * @return string + * + * @link https://php.net/manual/en/function.base64-encode.php + */ + protected static function phpBase64Encode(string $input): string + { + return base64_encode($input); + } +} diff --git a/src/Php/FileTrait.php b/src/Php/FileTrait.php index 0678de8..305de5c 100644 --- a/src/Php/FileTrait.php +++ b/src/Php/FileTrait.php @@ -14,6 +14,7 @@ namespace Phalcon\Traits\Php; use function fclose; +use function fgetcsv; use function file_exists; use function file_get_contents; use function file_put_contents; @@ -36,7 +37,7 @@ trait FileTrait * * @return bool */ - protected function phpFclose($handle): bool + protected static function phpFclose($handle): bool { return fclose($handle); } @@ -45,7 +46,7 @@ protected function phpFclose($handle): bool * Gets line from file pointer and parse for CSV fields * * @param resource $stream - * @param int $length + * @param int<0, max> $length * @param string $separator * @param string $enclosure * @param string $escape @@ -54,13 +55,21 @@ protected function phpFclose($handle): bool * * @link https://php.net/manual/en/function.fgetcsv.php */ - protected function phpFgetCsv( + protected static function phpFgetCsv( $stream, int $length = 0, string $separator = ',', - string $enclosure = '"', - string $escape = '\\' - ): array|false { + ?string $enclosure = null, + ?string $escape = null + ): array | false { + if (null === $enclosure) { + $enclosure = '"'; + } + + if (null === $escape) { + $escape = '\\'; + } + return fgetcsv($stream, $length, $separator, $enclosure, $escape); } @@ -71,21 +80,34 @@ protected function phpFgetCsv( * * @link https://php.net/manual/en/function.file-exists.php */ - protected function phpFileExists(string $filename): bool + protected static function phpFileExists(string $filename): bool { return file_exists($filename); } /** - * @param string $filename + * @param string $filename + * @param bool $useIncludePath + * @param resource|null $context + * @param int $offset + * @param int<0, max>|null $length * * @return false|string * * @link https://php.net/manual/en/function.file-get-contents.php */ - protected function phpFileGetContents(string $filename): false | string - { - return file_get_contents($filename); + protected static function phpFileGetContents( + string $filename, + bool $useIncludePath = false, + $context = null, + int $offset = 0, + ?int $length = null + ): false | string { + if (null === $length) { + return file_get_contents($filename, $useIncludePath, $context, $offset); + } + + return file_get_contents($filename, $useIncludePath, $context, $offset, $length); } /** @@ -98,7 +120,7 @@ protected function phpFileGetContents(string $filename): false | string * * @link https://php.net/manual/en/function.file-put-contents.php */ - protected function phpFilePutContents( + protected static function phpFilePutContents( string $filename, $data, int $flags = 0, @@ -108,16 +130,22 @@ protected function phpFilePutContents( } /** - * @param string $filename - * @param string $mode + * @param string $filename + * @param string $mode + * @param bool $useIncludePath + * @param resource|null $context * * @return resource|false * * @link https://php.net/manual/en/function.fopen.php */ - protected function phpFopen(string $filename, string $mode) - { - return fopen($filename, $mode); + protected static function phpFopen( + string $filename, + string $mode, + bool $useIncludePath = false, + $context = null + ) { + return fopen($filename, $mode, $useIncludePath, $context); } /** @@ -127,12 +155,17 @@ protected function phpFopen(string $filename, string $mode) * * @param resource $handle * @param string $data + * @param int<0, max>|null $length * * @return false|int */ - protected function phpFwrite($handle, string $data): false|int + protected static function phpFwrite($handle, string $data, ?int $length = null): false | int { - return fwrite($handle, $data); + if (null === $length) { + return fwrite($handle, $data); + } + + return fwrite($handle, $data, $length); } /** @@ -144,20 +177,21 @@ protected function phpFwrite($handle, string $data): false|int * * @link https://php.net/manual/en/function.is-writable.php */ - protected function phpIsWritable(string $filename): bool + protected static function phpIsWritable(string $filename): bool { return is_writable($filename); } /** - * @param string $filename + * @param string $filename + * @param resource|null $context * * @return bool * * @link https://php.net/manual/en/function.unlink.php */ - protected function phpUnlink(string $filename): bool + protected static function phpUnlink(string $filename, $context = null): bool { - return unlink($filename); + return unlink($filename, $context); } } diff --git a/src/Php/HashTrait.php b/src/Php/HashTrait.php new file mode 100644 index 0000000..cd20875 --- /dev/null +++ b/src/Php/HashTrait.php @@ -0,0 +1,70 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +declare(strict_types=1); + +namespace Phalcon\Traits\Php; + +use function hash; +use function hash_equals; +use function hash_hmac; + +/** + * Hashing method wrappers + */ +trait HashTrait +{ + /** + * @param string $algorithm + * @param string $data + * @param bool $binary + * + * @return string + * + * @link https://php.net/manual/en/function.hash.php + */ + protected static function phpHash(string $algorithm, string $data, bool $binary = false): string + { + return hash($algorithm, $data, $binary); + } + + /** + * @param string $knownString + * @param string $userString + * + * @return bool + * + * @link https://php.net/manual/en/function.hash-equals.php + */ + protected static function phpHashEquals(string $knownString, string $userString): bool + { + return hash_equals($knownString, $userString); + } + + /** + * @param string $algorithm + * @param string $data + * @param string $key + * @param bool $binary + * + * @return string + * + * @link https://php.net/manual/en/function.hash-hmac.php + */ + protected static function phpHashHmac( + string $algorithm, + string $data, + string $key, + bool $binary = false + ): string { + return hash_hmac($algorithm, $data, $key, $binary); + } +} diff --git a/src/Php/HeaderTrait.php b/src/Php/HeaderTrait.php new file mode 100644 index 0000000..443a69e --- /dev/null +++ b/src/Php/HeaderTrait.php @@ -0,0 +1,34 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +declare(strict_types=1); + +namespace Phalcon\Traits\Php; + +use function headers_sent; + +/** + * Header based wrapper methods + */ +trait HeaderTrait +{ + /** + * Checks if or where headers have been sent + * + * @return bool + * + * @link https://php.net/manual/en/function.headers-sent.php + */ + protected static function phpHeadersSent(): bool + { + return headers_sent(); + } +} diff --git a/src/Php/IgbinaryTrait.php b/src/Php/IgbinaryTrait.php new file mode 100644 index 0000000..49e7750 --- /dev/null +++ b/src/Php/IgbinaryTrait.php @@ -0,0 +1,47 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +declare(strict_types=1); + +namespace Phalcon\Traits\Php; + +use function igbinary_serialize; +use function igbinary_unserialize; + +/** + * Igbinary based wrapper methods + */ +trait IgbinaryTrait +{ + /** + * @param mixed $value + * + * @return string|null + * + * @link https://php.net/manual/en/function.igbinary-serialize.php + */ + protected static function phpIgbinarySerialize(mixed $value): string | null + { + return igbinary_serialize($value); + } + + /** + * @param string $value + * + * @return mixed + * + * @link https://php.net/manual/en/function.igbinary-unserialize.php + */ + protected static function phpIgbinaryUnserialize(string $value): mixed + { + return igbinary_unserialize($value); + } +} diff --git a/src/Php/InfoTrait.php b/src/Php/InfoTrait.php index 6960301..9b442c1 100644 --- a/src/Php/InfoTrait.php +++ b/src/Php/InfoTrait.php @@ -30,7 +30,7 @@ trait InfoTrait * * @link https://php.net/manual/en/function.extension-loaded.php */ - protected function phpExtensionLoaded(string $name): bool + protected static function phpExtensionLoaded(string $name): bool { return extension_loaded($name); } @@ -38,14 +38,14 @@ protected function phpExtensionLoaded(string $name): bool /** * Return true if the given function has been defined * - * @param string $function + * @param string $functionName * * @return bool * * @link https://php.net/manual/en/function.function-exists.php */ - protected function phpFunctionExists(string $function): bool + protected static function phpFunctionExists(string $functionName): bool { - return function_exists($function); + return function_exists($functionName); } } diff --git a/src/Php/IniTrait.php b/src/Php/IniTrait.php index e074d26..9b4b14c 100644 --- a/src/Php/IniTrait.php +++ b/src/Php/IniTrait.php @@ -30,78 +30,7 @@ trait IniTrait * @link https://php.net/manual/en/function.ini-get.php * @link https://php.net/manual/en/ini.list.php */ - protected function phpIniGet( - string $input, - string $defaultValue = "" - ): string { - return self::staticPhpIniGet($input, $defaultValue); - } - - /** - * Query a php.ini value and return it back as boolean - * - * @param string $input - * @param bool $defaultValue - * - * @return bool - * - * @link https://php.net/manual/en/function.ini-get.php - * @link https://php.net/manual/en/ini.list.php - */ - protected function phpIniGetBool( - string $input, - bool $defaultValue = false - ): bool { - return self::staticPhpIniGetBool($input, $defaultValue); - } - - /** - * Query a php.ini value and return it back as integer - * - * @param string $input - * @param int $defaultValue - * - * @return int - * - * @link https://php.net/manual/en/function.ini-get.php - * @link https://php.net/manual/en/ini.list.php - */ - protected function phpIniGetInt(string $input, int $defaultValue = 0): int - { - return self::staticPhpIniGetInt($input, $defaultValue); - } - - /** - * Parse a configuration file - * - * @param string $filename - * @param bool $processSections - * @param int $scannerMode - * - * @return array|false - * - * @link https://php.net/manual/en/function.parse-ini-file.php - */ - protected function phpParseIniFile( - string $filename, - bool $processSections = false, - int $scannerMode = 1 - ): array | false { - return self::staticPhpParseIniFile($filename, $processSections, $scannerMode); - } - - /** - * Gets the value of a configuration option - * - * @param string $input - * @param string $defaultValue - * - * @return string - * - * @link https://php.net/manual/en/function.ini-get.php - * @link https://php.net/manual/en/ini.list.php - */ - protected static function staticPhpIniGet( + protected static function phpIniGet( string $input, string $defaultValue = "" ): string { @@ -124,7 +53,7 @@ protected static function staticPhpIniGet( * @link https://php.net/manual/en/function.ini-get.php * @link https://php.net/manual/en/ini.list.php */ - protected static function staticPhpIniGetBool( + protected static function phpIniGetBool( string $input, bool $defaultValue = false ): bool { @@ -154,11 +83,14 @@ protected static function staticPhpIniGetBool( * @link https://php.net/manual/en/function.ini-get.php * @link https://php.net/manual/en/ini.list.php */ - protected static function staticPhpIniGetInt( - string $input, - int $defaultValue = 0 - ): int { - return (int)self::staticPhpIniGet($input, (string)$defaultValue); + protected static function phpIniGetInt(string $input, int $defaultValue = 0): int + { + $value = ini_get($input); + if (false === $value) { + return $defaultValue; + } + + return (int) $value; } /** @@ -168,14 +100,14 @@ protected static function staticPhpIniGetInt( * @param bool $processSections * @param int $scannerMode * - * @return array|false + * @return array|false * * @link https://php.net/manual/en/function.parse-ini-file.php */ - protected static function staticPhpParseIniFile( + protected static function phpParseIniFile( string $filename, bool $processSections = false, - int $scannerMode = 1 + int $scannerMode = 0 ): array | false { return parse_ini_file($filename, $processSections, $scannerMode); } diff --git a/src/Php/JsonTrait.php b/src/Php/JsonTrait.php deleted file mode 100644 index c7db0e3..0000000 --- a/src/Php/JsonTrait.php +++ /dev/null @@ -1,59 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE.txt - * file that was distributed with this source code. - */ - -declare(strict_types=1); - -namespace Phalcon\Traits\Php; - -use function json_decode; -use function json_encode; - -/** - * JSON wrapper methods - */ -trait JsonTrait -{ - /** - * @param string $json - * @param bool|null $associative - * @param int $depth - * @param int $flags - * - * @return mixed - * - * @link https://php.net/manual/en/function.json-decode.php - */ - protected function phpJsonDecode( - string $json, - ?bool $associative = null, - int $depth = 512, - int $flags = 0 - ): mixed { - return json_decode($json, $associative, $flags, $depth); - } - - /** - * @param mixed $value - * @param int $flags - * @param int $depth - * - * @return false|string - * - * @link https://php.net/manual/en/function.json-encode.php - */ - protected function phpJsonEncode( - mixed $value, - int $flags = 0, - int $depth = 512 - ): false | string { - return json_encode($value, $flags, $depth); - } -} diff --git a/src/Php/MbCaseTrait.php b/src/Php/MbCaseTrait.php new file mode 100644 index 0000000..37b983f --- /dev/null +++ b/src/Php/MbCaseTrait.php @@ -0,0 +1,49 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +declare(strict_types=1); + +namespace Phalcon\Traits\Php; + +use function function_exists; +use function mb_convert_case; +use function utf8_decode; + +/** + * Multibyte case conversion wrapper method + */ +trait MbCaseTrait +{ + /** + * Converts the case of a string using `mb_convert_case()` when the + * `mbstring` extension is available, otherwise applies the passed fallback + * function to the `utf8_decode()`d input. + * + * @param string $input + * @param int $mode + * @param callable-string $fallback + * + * @return string + * + * @link https://php.net/manual/en/function.mb-convert-case.php + */ + protected static function phpMbConvertCase(string $input, int $mode, string $fallback): string + { + if (true === function_exists('mb_convert_case')) { + return mb_convert_case($input, $mode, 'UTF-8'); + } + + /** @var string $result */ + $result = $fallback(utf8_decode($input)); + + return $result; + } +} diff --git a/src/Php/MsgpackTrait.php b/src/Php/MsgpackTrait.php new file mode 100644 index 0000000..322a0bf --- /dev/null +++ b/src/Php/MsgpackTrait.php @@ -0,0 +1,47 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +declare(strict_types=1); + +namespace Phalcon\Traits\Php; + +use function msgpack_pack; +use function msgpack_unpack; + +/** + * MessagePack based wrapper methods + */ +trait MsgpackTrait +{ + /** + * @param mixed $value + * + * @return string + * + * @link https://php.net/manual/en/function.msgpack-pack.php + */ + protected static function phpMsgpackPack(mixed $value): string + { + return msgpack_pack($value); + } + + /** + * @param string $value + * + * @return mixed + * + * @link https://php.net/manual/en/function.msgpack-unpack.php + */ + protected static function phpMsgpackUnpack(string $value): mixed + { + return msgpack_unpack($value); + } +} diff --git a/src/Php/OpensslTrait.php b/src/Php/OpensslTrait.php new file mode 100644 index 0000000..368833d --- /dev/null +++ b/src/Php/OpensslTrait.php @@ -0,0 +1,47 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +declare(strict_types=1); + +namespace Phalcon\Traits\Php; + +use function openssl_cipher_iv_length; +use function openssl_random_pseudo_bytes; + +/** + * OpenSSL based wrapper methods + */ +trait OpensslTrait +{ + /** + * @param string $cipher + * + * @return int|false + * + * @link https://php.net/manual/en/function.openssl-cipher-iv-length.php + */ + protected static function phpOpensslCipherIvLength(string $cipher): int | false + { + return openssl_cipher_iv_length($cipher); + } + + /** + * @param int $length + * + * @return string + * + * @link https://php.net/manual/en/function.openssl-random-pseudo-bytes.php + */ + protected static function phpOpensslRandomPseudoBytes(int $length): string + { + return openssl_random_pseudo_bytes($length); + } +} diff --git a/src/Php/SerializeTrait.php b/src/Php/SerializeTrait.php new file mode 100644 index 0000000..93c8911 --- /dev/null +++ b/src/Php/SerializeTrait.php @@ -0,0 +1,48 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +declare(strict_types=1); + +namespace Phalcon\Traits\Php; + +use function serialize; +use function unserialize; + +/** + * PHP serialize/unserialize wrapper methods + */ +trait SerializeTrait +{ + /** + * @param mixed $value + * + * @return string + * + * @link https://php.net/manual/en/function.serialize.php + */ + protected static function phpSerialize(mixed $value): string + { + return serialize($value); + } + + /** + * @param string $data + * @param array{allowed_classes?: array|bool, max_depth?: int} $options + * + * @return mixed + * + * @link https://php.net/manual/en/function.unserialize.php + */ + protected static function phpUnserialize(string $data, array $options = []): mixed + { + return unserialize($data, $options); + } +} diff --git a/src/Php/UrlTrait.php b/src/Php/UrlTrait.php index eadd3eb..f2ba6e6 100644 --- a/src/Php/UrlTrait.php +++ b/src/Php/UrlTrait.php @@ -13,89 +13,26 @@ namespace Phalcon\Traits\Php; -use function base64_decode; -use function base64_encode; use function parse_url; use function rawurldecode; use function rawurlencode; -use function rtrim; -use function strlen; -use function substr; /** * URL based wrapper methods. * * @phpstan-type TParseUrl = array{ - * scheme: string, - * host: string, - * port: int, - * user: string, - * pass: string, - * query: string, - * path: string, - * fragment: string + * scheme?: string, + * host?: string, + * port?: int<0, 65535>, + * user?: string, + * pass?: string, + * path?: string, + * query?: string, + * fragment?: string * } */ trait UrlTrait { - /** - * @param string $input - * @param bool $strict - * - * @return string - */ - protected function doBase64DecodeUrl( - string $input, - bool $strict = false - ): string { - $input = strtr($input, "-_", "+/") - . substr("===", (strlen($input) + 3) % 4); - - $result = $this->phpBase64Decode($input, $strict); - - return false !== $result ? $result : ''; - } - - /** - * @param string $input - * - * @return string - */ - protected function doBase64EncodeUrl(string $input): string - { - return rtrim( - strtr($this->phpBase64Encode($input), "+/", "-_"), - "=" - ); - } - - /** - * @param string $input - * @param bool $strict - * - * @return string|false - * - * @link https://www.php.net/manual/en/function.base64-decode.php - */ - protected function phpBase64Decode( - string $input, - bool $strict = false - ): string | false { - return base64_decode($input, $strict); - } - - /** - * @param string $input - * - * @return string - * - * @link https://www.php.net/manual/en/function.base64-encode.php - */ - protected function phpBase64Encode(string $input): string - { - return base64_encode($input); - } - /** * @param string $url * @param int $component @@ -104,7 +41,7 @@ protected function phpBase64Encode(string $input): string * * @link https://www.php.net/manual/en/function.parse-url.php */ - protected function phpParseUrl(string $url, int $component = -1): array | false | int | string | null + protected static function phpParseUrl(string $url, int $component = -1): array | false | int | string | null { return parse_url($url, $component); } @@ -116,7 +53,7 @@ protected function phpParseUrl(string $url, int $component = -1): array | false * * @link https://www.php.net/manual/en/function.rawurldecode.php */ - protected function phpRawUrlDecode(string $string): string + protected static function phpRawUrlDecode(string $string): string { return rawurldecode($string); } @@ -128,7 +65,7 @@ protected function phpRawUrlDecode(string $string): string * * @link https://www.php.net/manual/en/function.rawurlencode.php */ - protected function phpRawUrlEncode(string $string): string + protected static function phpRawUrlEncode(string $string): string { return rawurlencode($string); } diff --git a/src/Php/YamlTrait.php b/src/Php/YamlTrait.php new file mode 100644 index 0000000..95866ec --- /dev/null +++ b/src/Php/YamlTrait.php @@ -0,0 +1,43 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +declare(strict_types=1); + +namespace Phalcon\Traits\Php; + +use function yaml_parse_file; + +/** + * YAML based wrapper methods + */ +trait YamlTrait +{ + /** + * Parse a YAML stream from a file + * + * @param string $filename + * @param int $pos + * @param mixed $ndocs + * @param array $callbacks + * + * @return mixed + * + * @link https://php.net/manual/en/function.yaml-parse-file.php + */ + protected static function phpYamlParseFile( + string $filename, + int $pos = 0, + mixed &$ndocs = null, + array $callbacks = [] + ): mixed { + return yaml_parse_file($filename, $pos, $ndocs, $callbacks); + } +} diff --git a/src/Support/Helper/Arr/FilterTrait.php b/src/Support/Helper/Arr/FilterTrait.php new file mode 100644 index 0000000..6997723 --- /dev/null +++ b/src/Support/Helper/Arr/FilterTrait.php @@ -0,0 +1,41 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +declare(strict_types=1); + +namespace Phalcon\Traits\Support\Helper\Arr; + +use function array_filter; + +/** + * Filters a collection using array_filter with an optional callable + */ +trait FilterTrait +{ + /** + * Helper method to filter the collection + * + * @param array $collection + * @param callable|null $method + * + * @return array + */ + protected static function toFilter( + array $collection, + callable|null $method = null + ): array { + if (null === $method) { + return $collection; + } + + return array_filter($collection, $method); + } +} diff --git a/src/Support/Helper/Arr/GetTrait.php b/src/Support/Helper/Arr/GetTrait.php new file mode 100644 index 0000000..b4bab68 --- /dev/null +++ b/src/Support/Helper/Arr/GetTrait.php @@ -0,0 +1,50 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +declare(strict_types=1); + +namespace Phalcon\Traits\Support\Helper\Arr; + +use function settype; + +/** + * Gets an array element by key and if it does not exist returns the default. + * It also allows for casting the returned value to a specific type using + * `settype` internally + */ +trait GetTrait +{ + /** + * @param array $collection + * @param array-key $index + * @param mixed $defaultValue + * @param string|null $cast + * + * @return mixed + */ + protected static function getArrVal( + array $collection, + int | string $index, + mixed $defaultValue = null, + ?string $cast = null + ): mixed { + $value = $defaultValue; + if (true === isset($collection[$index])) { + $value = $collection[$index]; + } + + if ($cast) { + settype($value, $cast); + } + + return $value; + } +} diff --git a/src/Support/Helper/Json/DecodeTrait.php b/src/Support/Helper/Json/DecodeTrait.php new file mode 100644 index 0000000..c470380 --- /dev/null +++ b/src/Support/Helper/Json/DecodeTrait.php @@ -0,0 +1,73 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +declare(strict_types=1); + +namespace Phalcon\Traits\Support\Helper\Json; + +use JsonException; + +use function json_decode; +use function json_encode; +use function json_last_error; +use function json_last_error_msg; + +use const JSON_ERROR_NONE; + +/** + * Decodes a string using `json_decode`, throwing the native `\JsonException` + * on failure. Any framework-flavored exception is added by the `Support` + * helper class that wraps this trait. + */ +trait DecodeTrait +{ + /** + * Decodes a string using `json_decode` + * + * @param string $data JSON data to parse + * @param bool $associative When `true`, objects are converted to arrays + * @param int<1, max> $depth Recursion depth + * @param int $options Bitmask of json_decode options + * + * @return mixed + * + * @throws JsonException if the data cannot be decoded + * @link https://www.php.net/manual/en/function.json-decode.php + */ + protected static function toDecode( + string $data, + bool $associative = false, + int $depth = 512, + int $options = 79 + ): mixed { + /** + * Need to clear the json_last_error() before the code below + */ + json_encode(null); + + $decoded = json_decode($data, $associative, $depth, $options); + $error = json_last_error(); + $message = json_last_error_msg(); + + /** + * When JSON_THROW_ON_ERROR is set, json_decode() has already raised a + * native \JsonException above; otherwise the error is surfaced the + * same way here. + */ + if (JSON_ERROR_NONE !== $error) { + json_encode(null); + + throw new JsonException($message, $error); + } + + return $decoded; + } +} diff --git a/src/Support/Helper/Json/EncodeTrait.php b/src/Support/Helper/Json/EncodeTrait.php new file mode 100644 index 0000000..a29df0f --- /dev/null +++ b/src/Support/Helper/Json/EncodeTrait.php @@ -0,0 +1,70 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +declare(strict_types=1); + +namespace Phalcon\Traits\Support\Helper\Json; + +use JsonException; + +use function json_encode; +use function json_last_error; +use function json_last_error_msg; + +use const JSON_ERROR_NONE; + +/** + * Encodes data using `json_encode`, throwing the native `\JsonException` on + * failure. Any framework-flavored exception is added by the `Support` helper + * class that wraps this trait. + */ +trait EncodeTrait +{ + /** + * Encodes data using `json_encode` + * + * @param mixed $data JSON data to encode + * @param int $options Bitmask of json_encode options + * @param int<1, max> $depth Recursion depth + * + * @return string + * + * @throws JsonException if the data cannot be encoded + * @link https://www.php.net/manual/en/function.json-encode.php + */ + protected static function toEncode( + mixed $data, + int $options = 79, + int $depth = 512 + ): string { + /** + * Need to clear the json_last_error() before the code below + */ + json_encode(null); + + $encoded = json_encode($data, $options, $depth); + $error = json_last_error(); + $message = json_last_error_msg(); + + /** + * When JSON_THROW_ON_ERROR is set, json_encode() has already raised a + * native \JsonException above; otherwise the error is surfaced the + * same way here. + */ + if (JSON_ERROR_NONE !== $error) { + json_encode(null); + + throw new JsonException($message, $error); + } + + return (string) $encoded; + } +} diff --git a/src/Support/Helper/Str/CamelizeTrait.php b/src/Support/Helper/Str/CamelizeTrait.php new file mode 100644 index 0000000..4038476 --- /dev/null +++ b/src/Support/Helper/Str/CamelizeTrait.php @@ -0,0 +1,70 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +declare(strict_types=1); + +namespace Phalcon\Traits\Support\Helper\Str; + +use function lcfirst; +use function strlen; +use function strpos; +use function strtolower; +use function strtoupper; + +/** + * Converts strings to upperCamelCase or lowerCamelCase. + * + * Byte-based ASCII conversion, matching the cphalcon `camelize()` builtin: + * every delimiter character starts a new segment whose first character is + * upper-cased and the rest lower-cased. + */ +trait CamelizeTrait +{ + /** + * @param string $text + * @param string $delimiters + * @param bool $lowerFirst + * + * @return string + */ + public static function toCamelize( + string $text, + string $delimiters = '-_', + bool $lowerFirst = false + ): string { + $result = ''; + $preDelimiter = true; + $length = strlen($text); + + for ($i = 0; $i < $length; $i++) { + $character = $text[$i]; + + if (false !== strpos($delimiters, $character)) { + $preDelimiter = true; + + continue; + } + + if ($preDelimiter) { + $result .= strtoupper($character); + $preDelimiter = false; + } else { + $result .= strtolower($character); + } + } + + if (true === $lowerFirst) { + $result = lcfirst($result); + } + + return $result; + } +} diff --git a/src/Helper/Str/DirFromFileTrait.php b/src/Support/Helper/Str/DirFromFileTrait.php similarity index 72% rename from src/Helper/Str/DirFromFileTrait.php rename to src/Support/Helper/Str/DirFromFileTrait.php index 90ca299..853091b 100644 --- a/src/Helper/Str/DirFromFileTrait.php +++ b/src/Support/Helper/Str/DirFromFileTrait.php @@ -11,12 +11,13 @@ declare(strict_types=1); -namespace Phalcon\Traits\Helper\Str; +namespace Phalcon\Traits\Support\Helper\Str; use function implode; use function mb_str_split; use function mb_substr; use function pathinfo; +use function str_replace; use const PATHINFO_FILENAME; @@ -28,28 +29,23 @@ trait DirFromFileTrait { /** * @param string $file + * @param bool $filesystemSafe * * @return string */ - protected static function staticToDirFromFile(string $file): string + protected static function toDirFromFile(string $file, bool $filesystemSafe = false): string { $name = pathinfo($file, PATHINFO_FILENAME); $start = mb_substr($name, 0, -2); + if (true === $filesystemSafe && !empty($start)) { + $start = str_replace('.', '-', $start); + } + if (!$start) { $start = mb_substr($name, 0, 1); } return implode('/', mb_str_split($start, 2)) . '/'; } - - /** - * @param string $file - * - * @return string - */ - protected function toDirFromFile(string $file): string - { - return self::staticToDirFromFile($file); - } } diff --git a/src/Helper/Str/DirSeparatorTrait.php b/src/Support/Helper/Str/DirSeparatorTrait.php similarity index 64% rename from src/Helper/Str/DirSeparatorTrait.php rename to src/Support/Helper/Str/DirSeparatorTrait.php index d2ad02a..2160ded 100644 --- a/src/Helper/Str/DirSeparatorTrait.php +++ b/src/Support/Helper/Str/DirSeparatorTrait.php @@ -11,7 +11,7 @@ declare(strict_types=1); -namespace Phalcon\Traits\Helper\Str; +namespace Phalcon\Traits\Support\Helper\Str; use function rtrim; @@ -28,18 +28,8 @@ trait DirSeparatorTrait * * @return string */ - protected static function staticToDirSeparator(string $directory): string + protected static function toDirSeparator(string $directory): string { return rtrim($directory, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR; } - - /** - * @param string $directory - * - * @return string - */ - protected function toDirSeparator(string $directory): string - { - return self::staticToDirSeparator($directory); - } } diff --git a/src/Helper/Str/EndsWithTrait.php b/src/Support/Helper/Str/EndsWithTrait.php similarity index 61% rename from src/Helper/Str/EndsWithTrait.php rename to src/Support/Helper/Str/EndsWithTrait.php index d0cdfa2..210670d 100644 --- a/src/Helper/Str/EndsWithTrait.php +++ b/src/Support/Helper/Str/EndsWithTrait.php @@ -11,10 +11,10 @@ declare(strict_types=1); -namespace Phalcon\Traits\Helper\Str; +namespace Phalcon\Traits\Support\Helper\Str; -use function mb_strlen; -use function substr_compare; +use function mb_strtolower; +use function str_ends_with; /** * Check if a string ends with a given string @@ -28,21 +28,20 @@ trait EndsWithTrait * * @return bool */ - protected function toEndsWith( + protected static function toEndsWith( string $haystack, string $needle, bool $ignoreCase = true ): bool { - if ('' === $haystack) { + if ('' === $haystack || '' === $needle) { return false; } - return 0 === substr_compare( - $haystack, - $needle, - -mb_strlen($needle), - mb_strlen($needle), - $ignoreCase - ); + if ($ignoreCase) { + $needle = mb_strtolower($needle); + $haystack = mb_strtolower($haystack); + } + + return str_ends_with($haystack, $needle); } } diff --git a/src/Helper/Str/InterpolateTrait.php b/src/Support/Helper/Str/InterpolateTrait.php similarity index 65% rename from src/Helper/Str/InterpolateTrait.php rename to src/Support/Helper/Str/InterpolateTrait.php index 3c220ee..fac8b2c 100644 --- a/src/Helper/Str/InterpolateTrait.php +++ b/src/Support/Helper/Str/InterpolateTrait.php @@ -11,7 +11,10 @@ declare(strict_types=1); -namespace Phalcon\Traits\Helper\Str; +namespace Phalcon\Traits\Support\Helper\Str; + +use function strpos; +use function strtr; /** * Interpolates context values into the message placeholders @@ -28,7 +31,7 @@ trait InterpolateTrait * * @return string */ - protected static function staticToInterpolate( + protected static function toInterpolate( string $input, array $context = [], string $left = '%', @@ -38,6 +41,10 @@ protected static function staticToInterpolate( return $input; } + if (false === strpos($input, $left)) { + return $input; + } + $replace = []; foreach ($context as $key => $value) { $replace[$left . $key . $right] = $value; @@ -45,21 +52,4 @@ protected static function staticToInterpolate( return strtr($input, $replace); } - - /** - * @param string $input - * @param string[] $context - * @param string $left - * @param string $right - * - * @return string - */ - protected function toInterpolate( - string $input, - array $context = [], - string $left = '%', - string $right = '%' - ): string { - return self::staticToInterpolate($input, $context, $left, $right); - } } diff --git a/src/Helper/Str/LowerTrait.php b/src/Support/Helper/Str/LowerTrait.php similarity index 64% rename from src/Helper/Str/LowerTrait.php rename to src/Support/Helper/Str/LowerTrait.php index 56218c3..5098f0a 100644 --- a/src/Helper/Str/LowerTrait.php +++ b/src/Support/Helper/Str/LowerTrait.php @@ -11,7 +11,7 @@ declare(strict_types=1); -namespace Phalcon\Traits\Helper\Str; +namespace Phalcon\Traits\Support\Helper\Str; use function mb_convert_case; @@ -28,23 +28,10 @@ trait LowerTrait * * @return string */ - protected static function staticToLower( + protected static function toLower( string $text, string $encoding = 'UTF-8' ): string { return mb_convert_case($text, MB_CASE_LOWER, $encoding); } - - /** - * @param string $text - * @param string $encoding - * - * @return string - */ - protected function toLower( - string $text, - string $encoding = 'UTF-8' - ): string { - return self::staticToLower($text, $encoding); - } } diff --git a/src/Helper/Str/StartsWithTrait.php b/src/Support/Helper/Str/StartsWithTrait.php similarity index 61% rename from src/Helper/Str/StartsWithTrait.php rename to src/Support/Helper/Str/StartsWithTrait.php index 052ab4f..d7905d3 100644 --- a/src/Helper/Str/StartsWithTrait.php +++ b/src/Support/Helper/Str/StartsWithTrait.php @@ -11,10 +11,10 @@ declare(strict_types=1); -namespace Phalcon\Traits\Helper\Str; +namespace Phalcon\Traits\Support\Helper\Str; -use function mb_strlen; -use function substr_compare; +use function mb_strtolower; +use function str_starts_with; /** * Check if a string starts with a given string @@ -28,21 +28,20 @@ trait StartsWithTrait * * @return bool */ - protected function toStartsWith( + protected static function toStartsWith( string $haystack, string $needle, bool $ignoreCase = true ): bool { - if ('' === $haystack) { + if ('' === $haystack || '' === $needle) { return false; } - return 0 === substr_compare( - $haystack, - $needle, - 0, - mb_strlen($needle), - $ignoreCase - ); + if ($ignoreCase) { + $needle = mb_strtolower($needle); + $haystack = mb_strtolower($haystack); + } + + return str_starts_with($haystack, $needle); } } diff --git a/src/Support/Helper/Str/UncamelizeTrait.php b/src/Support/Helper/Str/UncamelizeTrait.php new file mode 100644 index 0000000..4f6e797 --- /dev/null +++ b/src/Support/Helper/Str/UncamelizeTrait.php @@ -0,0 +1,63 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +declare(strict_types=1); + +namespace Phalcon\Traits\Support\Helper\Str; + +use function chr; +use function ord; +use function strlen; + +/** + * Converts strings to non camelized style. + * + * Byte-based ASCII conversion, matching the cphalcon `uncamelize()` builtin: + * every ASCII upper-case letter is prefixed with the delimiter (except at the + * start) and lower-cased; all other bytes pass through unchanged. + */ +trait UncamelizeTrait +{ + /** + * @param string $text + * @param string $delimiter + * + * @return string + */ + protected static function toUncamelize( + string $text, + string $delimiter = '_' + ): string { + $result = ''; + $length = strlen($text); + + for ($i = 0; $i < $length; $i++) { + $character = $text[$i]; + + if ("\0" === $character) { + break; + } + + $ascii = ord($character); + if ($ascii >= 65 && $ascii <= 90) { + if ($i > 0) { + $result .= $delimiter; + } + + $result .= chr($ascii + 32); + } else { + $result .= $character; + } + } + + return $result; + } +} diff --git a/src/Helper/Str/UpperTrait.php b/src/Support/Helper/Str/UpperTrait.php similarity index 64% rename from src/Helper/Str/UpperTrait.php rename to src/Support/Helper/Str/UpperTrait.php index 1824a05..5df8924 100644 --- a/src/Helper/Str/UpperTrait.php +++ b/src/Support/Helper/Str/UpperTrait.php @@ -11,7 +11,7 @@ declare(strict_types=1); -namespace Phalcon\Traits\Helper\Str; +namespace Phalcon\Traits\Support\Helper\Str; use function mb_convert_case; @@ -28,23 +28,10 @@ trait UpperTrait * * @return string */ - protected static function staticToUpper( + protected static function toUpper( string $text, string $encoding = 'UTF-8' ): string { return mb_convert_case($text, MB_CASE_UPPER, $encoding); } - - /** - * @param string $text - * @param string $encoding - * - * @return string - */ - protected function toUpper( - string $text, - string $encoding = 'UTF-8' - ): string { - return self::staticToUpper($text, $encoding); - } } diff --git a/tests/support/assets/sample.yaml b/tests/support/assets/sample.yaml new file mode 100644 index 0000000..6c736ae --- /dev/null +++ b/tests/support/assets/sample.yaml @@ -0,0 +1,3 @@ +name: Phalcon +version: 6 +enabled: true diff --git a/tests/support/config/functions.php b/tests/support/config/functions.php index 01a9d4d..9f90a97 100644 --- a/tests/support/config/functions.php +++ b/tests/support/config/functions.php @@ -56,7 +56,7 @@ function outputDir(string $fileName = ''): string * Utility *******************************************************************************/ if (!function_exists('env')) { - function env(string $key, $default = null) + function env(string $key, mixed $default = null): mixed { if (defined($key)) { return constant($key); @@ -71,7 +71,7 @@ function env(string $key, $default = null) } if (!function_exists('defineFromEnv')) { - function defineFromEnv(string $name) + function defineFromEnv(string $name): void { if (defined($name)) { return; diff --git a/tests/support/fixtures/Factory/FactoryFixture.php b/tests/support/fixtures/Factory/FactoryFixture.php index 0e1f10f..1d07f13 100644 --- a/tests/support/fixtures/Factory/FactoryFixture.php +++ b/tests/support/fixtures/Factory/FactoryFixture.php @@ -21,7 +21,7 @@ class FactoryFixture use FactoryTrait; /** - * @param array $services + * @param array $services */ public function __construct(array $services = []) { @@ -31,8 +31,8 @@ public function __construct(array $services = []) /** * Create a new instance of the adapter * - * @param string $name - * @param array $options + * @param string $name + * @param array $options * * @throws FactoryExceptionFixture */ @@ -49,7 +49,7 @@ public function newInstance(string $name, array $options = []): object * @param string $name * @param mixed ...$arguments * - * @return object|mixed + * @return object * @throws Exception */ public function getInstance(string $name, mixed ...$arguments): object @@ -58,7 +58,7 @@ public function getInstance(string $name, mixed ...$arguments): object } /** - * @return string + * @return class-string<\Throwable> */ protected function getExceptionClass(): string { diff --git a/tests/support/fixtures/Helper/Arr/FilterFixture.php b/tests/support/fixtures/Helper/Arr/FilterFixture.php index 0a0088b..41b6ed7 100644 --- a/tests/support/fixtures/Helper/Arr/FilterFixture.php +++ b/tests/support/fixtures/Helper/Arr/FilterFixture.php @@ -13,7 +13,7 @@ namespace Phalcon\Tests\Fixtures\Helper\Arr; -use Phalcon\Traits\Helper\Arr\FilterTrait; +use Phalcon\Traits\Support\Helper\Arr\FilterTrait; class FilterFixture { @@ -24,15 +24,13 @@ class FilterFixture * * @param array $collection * @param callable|null $method - * @param int $mode * * @return array */ public function filter( array $collection, - callable|null $method = null, - int $mode = 0 + callable|null $method = null ): array { - return $this->toFilter($collection, $method, $mode); + return $this->toFilter($collection, $method); } } diff --git a/tests/support/fixtures/Helper/Arr/GetFixture.php b/tests/support/fixtures/Helper/Arr/GetFixture.php new file mode 100644 index 0000000..f4688cb --- /dev/null +++ b/tests/support/fixtures/Helper/Arr/GetFixture.php @@ -0,0 +1,38 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +declare(strict_types=1); + +namespace Phalcon\Tests\Fixtures\Helper\Arr; + +use Phalcon\Traits\Support\Helper\Arr\GetTrait; + +class GetFixture +{ + use GetTrait; + + /** + * @param array $collection + * @param array-key $index + * @param mixed $defaultValue + * @param string|null $cast + * + * @return mixed + */ + public function get( + array $collection, + int | string $index, + mixed $defaultValue = null, + ?string $cast = null + ): mixed { + return $this->getArrVal($collection, $index, $defaultValue, $cast); + } +} diff --git a/tests/support/fixtures/Helper/Json/DecodeFixture.php b/tests/support/fixtures/Helper/Json/DecodeFixture.php new file mode 100644 index 0000000..168d3b7 --- /dev/null +++ b/tests/support/fixtures/Helper/Json/DecodeFixture.php @@ -0,0 +1,40 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +declare(strict_types=1); + +namespace Phalcon\Tests\Fixtures\Helper\Json; + +use Phalcon\Traits\Support\Helper\Json\DecodeTrait; + +class DecodeFixture +{ + use DecodeTrait; + + /** + * Decodes a string using `json_decode` + * + * @param string $data + * @param bool $associative + * @param int<1, max> $depth + * @param int $options + * + * @return mixed + */ + public function decode( + string $data, + bool $associative = false, + int $depth = 512, + int $options = 79 + ): mixed { + return $this->toDecode($data, $associative, $depth, $options); + } +} diff --git a/tests/support/fixtures/Helper/Json/EncodeFixture.php b/tests/support/fixtures/Helper/Json/EncodeFixture.php new file mode 100644 index 0000000..8887c6a --- /dev/null +++ b/tests/support/fixtures/Helper/Json/EncodeFixture.php @@ -0,0 +1,38 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +declare(strict_types=1); + +namespace Phalcon\Tests\Fixtures\Helper\Json; + +use Phalcon\Traits\Support\Helper\Json\EncodeTrait; + +class EncodeFixture +{ + use EncodeTrait; + + /** + * Encodes data using `json_encode` + * + * @param mixed $data + * @param int $options + * @param int<1, max> $depth + * + * @return string + */ + public function encode( + mixed $data, + int $options = 79, + int $depth = 512 + ): string { + return $this->toEncode($data, $options, $depth); + } +} diff --git a/tests/support/fixtures/Helper/Str/CamelizeFixture.php b/tests/support/fixtures/Helper/Str/CamelizeFixture.php index 4fde570..3eeb5d3 100644 --- a/tests/support/fixtures/Helper/Str/CamelizeFixture.php +++ b/tests/support/fixtures/Helper/Str/CamelizeFixture.php @@ -13,7 +13,7 @@ namespace Phalcon\Tests\Fixtures\Helper\Str; -use Phalcon\Traits\Helper\Str\CamelizeTrait; +use Phalcon\Traits\Support\Helper\Str\CamelizeTrait; class CamelizeFixture { diff --git a/tests/support/fixtures/Helper/Str/DirFromFileFixture.php b/tests/support/fixtures/Helper/Str/DirFromFileFixture.php index 25351d5..68f1aee 100644 --- a/tests/support/fixtures/Helper/Str/DirFromFileFixture.php +++ b/tests/support/fixtures/Helper/Str/DirFromFileFixture.php @@ -13,7 +13,7 @@ namespace Phalcon\Tests\Fixtures\Helper\Str; -use Phalcon\Traits\Helper\Str\DirFromFileTrait; +use Phalcon\Traits\Support\Helper\Str\DirFromFileTrait; /** * Accepts a file name (without extension) and returns a calculated @@ -25,11 +25,12 @@ class DirFromFileFixture /** * @param string $file + * @param bool $filesystemSafe * * @return string */ - public function dirFromFile(string $file): string + public function dirFromFile(string $file, bool $filesystemSafe = false): string { - return $this->toDirFromFile($file); + return $this->toDirFromFile($file, $filesystemSafe); } } diff --git a/tests/support/fixtures/Helper/Str/DirSeparatorFixture.php b/tests/support/fixtures/Helper/Str/DirSeparatorFixture.php index 32869f2..b95d439 100644 --- a/tests/support/fixtures/Helper/Str/DirSeparatorFixture.php +++ b/tests/support/fixtures/Helper/Str/DirSeparatorFixture.php @@ -13,7 +13,7 @@ namespace Phalcon\Tests\Fixtures\Helper\Str; -use Phalcon\Traits\Helper\Str\DirSeparatorTrait; +use Phalcon\Traits\Support\Helper\Str\DirSeparatorTrait; /** * Accepts a directory name and ensures that it ends with diff --git a/tests/support/fixtures/Helper/Str/EndsWithFixture.php b/tests/support/fixtures/Helper/Str/EndsWithFixture.php index 9d1e116..781bb31 100644 --- a/tests/support/fixtures/Helper/Str/EndsWithFixture.php +++ b/tests/support/fixtures/Helper/Str/EndsWithFixture.php @@ -13,7 +13,7 @@ namespace Phalcon\Tests\Fixtures\Helper\Str; -use Phalcon\Traits\Helper\Str\EndsWithTrait; +use Phalcon\Traits\Support\Helper\Str\EndsWithTrait; class EndsWithFixture { diff --git a/tests/support/fixtures/Helper/Str/InterpolateFixture.php b/tests/support/fixtures/Helper/Str/InterpolateFixture.php index 8d1d75f..21319c4 100644 --- a/tests/support/fixtures/Helper/Str/InterpolateFixture.php +++ b/tests/support/fixtures/Helper/Str/InterpolateFixture.php @@ -13,7 +13,7 @@ namespace Phalcon\Tests\Fixtures\Helper\Str; -use Phalcon\Traits\Helper\Str\InterpolateTrait; +use Phalcon\Traits\Support\Helper\Str\InterpolateTrait; class InterpolateFixture { @@ -24,10 +24,10 @@ class InterpolateFixture * * @see http://www.php-fig.org/psr/psr-3/ Section 1.2 Message * - * @param string $input - * @param array $context - * @param string $left - * @param string $right + * @param string $input + * @param array $context + * @param string $left + * @param string $right * * @return string */ diff --git a/tests/support/fixtures/Helper/Str/LowerFixture.php b/tests/support/fixtures/Helper/Str/LowerFixture.php index 29b49a4..5fffc72 100644 --- a/tests/support/fixtures/Helper/Str/LowerFixture.php +++ b/tests/support/fixtures/Helper/Str/LowerFixture.php @@ -13,7 +13,7 @@ namespace Phalcon\Tests\Fixtures\Helper\Str; -use Phalcon\Traits\Helper\Str\LowerTrait; +use Phalcon\Traits\Support\Helper\Str\LowerTrait; class LowerFixture { diff --git a/tests/support/fixtures/Helper/Str/StartsWithFixture.php b/tests/support/fixtures/Helper/Str/StartsWithFixture.php index 5866baa..3e14a84 100644 --- a/tests/support/fixtures/Helper/Str/StartsWithFixture.php +++ b/tests/support/fixtures/Helper/Str/StartsWithFixture.php @@ -13,7 +13,7 @@ namespace Phalcon\Tests\Fixtures\Helper\Str; -use Phalcon\Traits\Helper\Str\StartsWithTrait; +use Phalcon\Traits\Support\Helper\Str\StartsWithTrait; class StartsWithFixture { diff --git a/tests/support/fixtures/Helper/Str/UncamelizeFixture.php b/tests/support/fixtures/Helper/Str/UncamelizeFixture.php index e1fa0ad..2ea6f92 100644 --- a/tests/support/fixtures/Helper/Str/UncamelizeFixture.php +++ b/tests/support/fixtures/Helper/Str/UncamelizeFixture.php @@ -13,7 +13,7 @@ namespace Phalcon\Tests\Fixtures\Helper\Str; -use Phalcon\Traits\Helper\Str\UncamelizeTrait; +use Phalcon\Traits\Support\Helper\Str\UncamelizeTrait; class UncamelizeFixture { @@ -23,11 +23,10 @@ class UncamelizeFixture * Uncamelizes a string * * @param string $text - * @param string $delimiters * * @return string */ - public function Uncamelize( + public function uncamelize( string $text, string $delimiter = '_' ): string { diff --git a/tests/support/fixtures/Helper/Str/UpperFixture.php b/tests/support/fixtures/Helper/Str/UpperFixture.php index c200e63..6b782c2 100644 --- a/tests/support/fixtures/Helper/Str/UpperFixture.php +++ b/tests/support/fixtures/Helper/Str/UpperFixture.php @@ -13,7 +13,7 @@ namespace Phalcon\Tests\Fixtures\Helper\Str; -use Phalcon\Traits\Helper\Str\UpperTrait; +use Phalcon\Traits\Support\Helper\Str\UpperTrait; class UpperFixture { diff --git a/tests/support/fixtures/Php/ApcuFixture.php b/tests/support/fixtures/Php/ApcuFixture.php new file mode 100644 index 0000000..c542d3e --- /dev/null +++ b/tests/support/fixtures/Php/ApcuFixture.php @@ -0,0 +1,96 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +declare(strict_types=1); + +namespace Phalcon\Tests\Fixtures\Php; + +use APCUIterator; +use Phalcon\Traits\Php\ApcuTrait; + +class ApcuFixture +{ + use ApcuTrait; + + /** + * @param string $key + * @param int $step + * + * @return bool|int + */ + public function apcuDec(string $key, int $step = 1): bool | int + { + return $this->phpApcuDec($key, $step); + } + + /** + * @param array|string $key + * + * @return array|bool + */ + public function apcuDelete(array | string $key): bool | array + { + return $this->phpApcuDelete($key); + } + + /** + * @param array|string $key + * + * @return array|bool + */ + public function apcuExists(array | string $key): bool | array + { + return $this->phpApcuExists($key); + } + + /** + * @param array|string $key + * + * @return mixed + */ + public function apcuFetch(array | string $key): mixed + { + return $this->phpApcuFetch($key); + } + + /** + * @param string $key + * @param int $step + * + * @return bool|int + */ + public function apcuInc(string $key, int $step = 1): bool | int + { + return $this->phpApcuInc($key, $step); + } + + /** + * @param string $pattern + * + * @return APCUIterator|bool + */ + public function apcuIterator(string $pattern): APCUIterator | bool + { + return $this->phpApcuIterator($pattern); + } + + /** + * @param array|string $key + * @param mixed $payload + * @param int $ttl + * + * @return array|bool + */ + public function apcuStore(array | string $key, mixed $payload, int $ttl = 0): bool | array + { + return $this->phpApcuStore($key, $payload, $ttl); + } +} diff --git a/tests/support/fixtures/Php/Base64Fixture.php b/tests/support/fixtures/Php/Base64Fixture.php new file mode 100644 index 0000000..7220c5a --- /dev/null +++ b/tests/support/fixtures/Php/Base64Fixture.php @@ -0,0 +1,66 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +declare(strict_types=1); + +namespace Phalcon\Tests\Fixtures\Php; + +use Phalcon\Traits\Php\Base64Trait; + +class Base64Fixture +{ + use Base64Trait; + + /** + * @param string $input + * @param bool $strict + * + * @return string|false + * + * @link https://www.php.net/manual/en/function.base64-decode.php + */ + public function base64Decode(string $input, bool $strict = false): string | false + { + return $this->phpBase64Decode($input, $strict); + } + + /** + * @param string $input + * + * @return string + * + * @link https://www.php.net/manual/en/function.base64-encode.php + */ + public function base64Encode(string $input): string + { + return $this->phpBase64Encode($input); + } + + /** + * @param string $input + * + * @return string + */ + public function decodeUrl(string $input): string + { + return $this->doDecodeUrl($input); + } + + /** + * @param string $input + * + * @return string + */ + public function encodeUrl(string $input): string + { + return $this->doEncodeUrl($input); + } +} diff --git a/tests/support/fixtures/Php/FileFixture.php b/tests/support/fixtures/Php/FileFixture.php index b10edde..02568b7 100644 --- a/tests/support/fixtures/Php/FileFixture.php +++ b/tests/support/fixtures/Php/FileFixture.php @@ -79,13 +79,13 @@ public function fclose($handle) /** * Gets line from file pointer and parse for CSV fields * - * @param resource $stream - * @param int $length - * @param string $separator - * @param string $enclosure - * @param string $escape + * @param resource $stream + * @param int<0, max> $length + * @param string $separator + * @param string $enclosure + * @param string $escape * - * @return array|null|false + * @return array|false * * @link https://php.net/manual/en/function.fgetcsv.php */ diff --git a/tests/support/fixtures/Php/HashFixture.php b/tests/support/fixtures/Php/HashFixture.php new file mode 100644 index 0000000..ab8911a --- /dev/null +++ b/tests/support/fixtures/Php/HashFixture.php @@ -0,0 +1,61 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +declare(strict_types=1); + +namespace Phalcon\Tests\Fixtures\Php; + +use Phalcon\Traits\Php\HashTrait; + +class HashFixture +{ + use HashTrait; + + /** + * @param string $algorithm + * @param string $data + * @param bool $binary + * + * @return string + */ + public function hash(string $algorithm, string $data, bool $binary = false): string + { + return $this->phpHash($algorithm, $data, $binary); + } + + /** + * @param string $knownString + * @param string $userString + * + * @return bool + */ + public function hashEquals(string $knownString, string $userString): bool + { + return $this->phpHashEquals($knownString, $userString); + } + + /** + * @param string $algorithm + * @param string $data + * @param string $key + * @param bool $binary + * + * @return string + */ + public function hashHmac( + string $algorithm, + string $data, + string $key, + bool $binary = false + ): string { + return $this->phpHashHmac($algorithm, $data, $key, $binary); + } +} diff --git a/tests/support/fixtures/Php/HeaderFixture.php b/tests/support/fixtures/Php/HeaderFixture.php new file mode 100644 index 0000000..3adf4d7 --- /dev/null +++ b/tests/support/fixtures/Php/HeaderFixture.php @@ -0,0 +1,31 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +declare(strict_types=1); + +namespace Phalcon\Tests\Fixtures\Php; + +use Phalcon\Traits\Php\HeaderTrait; + +class HeaderFixture +{ + use HeaderTrait; + + /** + * Checks if or where headers have been sent + * + * @return bool + */ + public function headersSent(): bool + { + return $this->phpHeadersSent(); + } +} diff --git a/tests/support/fixtures/Php/IgbinaryFixture.php b/tests/support/fixtures/Php/IgbinaryFixture.php new file mode 100644 index 0000000..6a21712 --- /dev/null +++ b/tests/support/fixtures/Php/IgbinaryFixture.php @@ -0,0 +1,41 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +declare(strict_types=1); + +namespace Phalcon\Tests\Fixtures\Php; + +use Phalcon\Traits\Php\IgbinaryTrait; + +class IgbinaryFixture +{ + use IgbinaryTrait; + + /** + * @param mixed $value + * + * @return string|null + */ + public function serialize(mixed $value): string | null + { + return $this->phpIgbinarySerialize($value); + } + + /** + * @param string $value + * + * @return mixed + */ + public function unserialize(string $value): mixed + { + return $this->phpIgbinaryUnserialize($value); + } +} diff --git a/tests/support/fixtures/Php/IniFixture.php b/tests/support/fixtures/Php/IniFixture.php index 8927194..0edd187 100644 --- a/tests/support/fixtures/Php/IniFixture.php +++ b/tests/support/fixtures/Php/IniFixture.php @@ -74,7 +74,7 @@ public function iniGetInt(string $input, int $defaultValue = 0): int * @param bool $processSections * @param int $scannerMode * - * @return array|false + * @return array|false * * @link https://php.net/manual/en/function.parse-ini-file.php */ diff --git a/tests/support/fixtures/Php/JsonFixture.php b/tests/support/fixtures/Php/JsonFixture.php deleted file mode 100644 index 51b2dfb..0000000 --- a/tests/support/fixtures/Php/JsonFixture.php +++ /dev/null @@ -1,54 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE.txt - * file that was distributed with this source code. - */ - -declare(strict_types=1); - -namespace Phalcon\Tests\Fixtures\Php; - -use Phalcon\Traits\Php\JsonTrait; - -class JsonFixture -{ - use JsonTrait; - - /** - * @param mixed $value - * @param int $flags - * @param int $depth - * - * @return false|string - * - * @link https://php.net/manual/en/function.json-encode.php - */ - public function jsonEncode($value, int $flags = 0, int $depth = 512) - { - return $this->phpJsonEncode($value, $flags, $depth); - } - - /** - * @param string $json - * @param bool|null $associative - * @param int $depth - * @param int $flags - * - * @return mixed - * - * @link https://php.net/manual/en/function.json-decode.php - */ - public function jsonDecode( - string $json, - ?bool $associative = null, - int $depth = 512, - int $flags = 0 - ) { - return $this->phpJsonDecode($json, $associative, $flags, $depth); - } -} diff --git a/tests/support/fixtures/Php/MbCaseFixture.php b/tests/support/fixtures/Php/MbCaseFixture.php new file mode 100644 index 0000000..93f8e13 --- /dev/null +++ b/tests/support/fixtures/Php/MbCaseFixture.php @@ -0,0 +1,33 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +declare(strict_types=1); + +namespace Phalcon\Tests\Fixtures\Php; + +use Phalcon\Traits\Php\MbCaseTrait; + +class MbCaseFixture +{ + use MbCaseTrait; + + /** + * @param string $input + * @param int $mode + * @param callable-string $fallback + * + * @return string + */ + public function mbConvertCase(string $input, int $mode, string $fallback): string + { + return $this->phpMbConvertCase($input, $mode, $fallback); + } +} diff --git a/tests/support/fixtures/Php/MsgpackFixture.php b/tests/support/fixtures/Php/MsgpackFixture.php new file mode 100644 index 0000000..8b89f07 --- /dev/null +++ b/tests/support/fixtures/Php/MsgpackFixture.php @@ -0,0 +1,41 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +declare(strict_types=1); + +namespace Phalcon\Tests\Fixtures\Php; + +use Phalcon\Traits\Php\MsgpackTrait; + +class MsgpackFixture +{ + use MsgpackTrait; + + /** + * @param mixed $value + * + * @return string + */ + public function pack(mixed $value): string + { + return $this->phpMsgpackPack($value); + } + + /** + * @param string $value + * + * @return mixed + */ + public function unpack(string $value): mixed + { + return $this->phpMsgpackUnpack($value); + } +} diff --git a/tests/support/fixtures/Php/OpensslFixture.php b/tests/support/fixtures/Php/OpensslFixture.php new file mode 100644 index 0000000..8a4bfd4 --- /dev/null +++ b/tests/support/fixtures/Php/OpensslFixture.php @@ -0,0 +1,41 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +declare(strict_types=1); + +namespace Phalcon\Tests\Fixtures\Php; + +use Phalcon\Traits\Php\OpensslTrait; + +class OpensslFixture +{ + use OpensslTrait; + + /** + * @param string $cipher + * + * @return int|false + */ + public function cipherIvLength(string $cipher): int | false + { + return $this->phpOpensslCipherIvLength($cipher); + } + + /** + * @param int $length + * + * @return string + */ + public function randomPseudoBytes(int $length): string + { + return $this->phpOpensslRandomPseudoBytes($length); + } +} diff --git a/tests/support/fixtures/Php/SerializeFixture.php b/tests/support/fixtures/Php/SerializeFixture.php new file mode 100644 index 0000000..e79e7e8 --- /dev/null +++ b/tests/support/fixtures/Php/SerializeFixture.php @@ -0,0 +1,42 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +declare(strict_types=1); + +namespace Phalcon\Tests\Fixtures\Php; + +use Phalcon\Traits\Php\SerializeTrait; + +class SerializeFixture +{ + use SerializeTrait; + + /** + * @param mixed $value + * + * @return string + */ + public function serialize(mixed $value): string + { + return $this->phpSerialize($value); + } + + /** + * @param string $data + * @param array{allowed_classes?: array|bool, max_depth?: int} $options + * + * @return mixed + */ + public function unserialize(string $data, array $options = []): mixed + { + return $this->phpUnserialize($data, $options); + } +} diff --git a/tests/support/fixtures/Php/UrlFailFixture.php b/tests/support/fixtures/Php/UrlFailFixture.php deleted file mode 100644 index b9050b1..0000000 --- a/tests/support/fixtures/Php/UrlFailFixture.php +++ /dev/null @@ -1,32 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE.txt - * file that was distributed with this source code. - */ - -declare(strict_types=1); - -namespace Phalcon\Tests\Fixtures\Php; - -class UrlFailFixture extends UrlFixture -{ - /** - * @param string $input - * @param bool $strict - * - * @return string|false - * - * @link https://www.php.net/manual/en/function.base64-decode.php - */ - protected function phpBase64Decode( - string $input, - bool $strict = false - ): string|false { - return false; - } -} diff --git a/tests/support/fixtures/Php/UrlFixture.php b/tests/support/fixtures/Php/UrlFixture.php index 50ed311..dd2519e 100644 --- a/tests/support/fixtures/Php/UrlFixture.php +++ b/tests/support/fixtures/Php/UrlFixture.php @@ -17,66 +17,20 @@ /** * @phpstan-type TParseUrl = array{ - * scheme: string, - * host: string, - * port: int, - * user: string, - * pass: string, - * query: string, - * path: string, - * fragment: string + * scheme?: string, + * host?: string, + * port?: int<0, 65535>, + * user?: string, + * pass?: string, + * path?: string, + * query?: string, + * fragment?: string * } */ class UrlFixture { use UrlTrait; - /** - * @param string $input - * @param bool $strict - * - * @return string - */ - public function base64DecodeUrl(string $input, bool $strict = false): string - { - return $this->doBase64DecodeUrl($input, $strict); - } - - /** - * @param string $input - * - * @return string - */ - public function base64EncodeUrl(string $input): string - { - return $this->doBase64EncodeUrl($input); - } - - /** - * @param string $input - * @param bool $strict - * - * @return string|false - * - * @link https://www.php.net/manual/en/function.base64-decode.php - */ - public function base64Decode(string $input, bool $strict = false) - { - return $this->phpBase64Decode($input, $strict); - } - - /** - * @param string $input - * - * @return string - * - * @link https://www.php.net/manual/en/function.base64-encode.php - */ - public function base64Encode(string $input): string - { - return $this->phpBase64Encode($input); - } - /** * @param string $url * @param int $component @@ -85,7 +39,7 @@ public function base64Encode(string $input): string * * @link https://www.php.net/manual/en/function.parse-url.php */ - public function parseUrl(string $url, int $component = -1): array|false|int|string|null + public function parseUrl(string $url, int $component = -1): array | false | int | string | null { return $this->phpParseUrl($url, $component); } diff --git a/tests/support/fixtures/Php/YamlFixture.php b/tests/support/fixtures/Php/YamlFixture.php new file mode 100644 index 0000000..84201cd --- /dev/null +++ b/tests/support/fixtures/Php/YamlFixture.php @@ -0,0 +1,38 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +declare(strict_types=1); + +namespace Phalcon\Tests\Fixtures\Php; + +use Phalcon\Traits\Php\YamlTrait; + +class YamlFixture +{ + use YamlTrait; + + /** + * @param string $filename + * @param int $pos + * @param mixed $ndocs + * @param array $callbacks + * + * @return mixed + */ + public function parseFile( + string $filename, + int $pos = 0, + mixed &$ndocs = null, + array $callbacks = [] + ): mixed { + return $this->phpYamlParseFile($filename, $pos, $ndocs, $callbacks); + } +} diff --git a/tests/unit/Helper/Arr/FilterTraitTest.php b/tests/unit/Helper/Arr/FilterTraitTest.php index 53322ae..cf7e99f 100644 --- a/tests/unit/Helper/Arr/FilterTraitTest.php +++ b/tests/unit/Helper/Arr/FilterTraitTest.php @@ -26,6 +26,9 @@ final class FilterTraitTest extends AbstractUnitTestCase * * @dataProvider getExamples * + * @param array $source + * @param array $expected + * * @return void * * @author Phalcon Team @@ -44,7 +47,7 @@ public function testHelperArrFilterTraitToFilter( } /** - * @return array> + * @return array> */ public static function getExamples(): array { diff --git a/tests/unit/Helper/Arr/GetTraitTest.php b/tests/unit/Helper/Arr/GetTraitTest.php new file mode 100644 index 0000000..1c50a60 --- /dev/null +++ b/tests/unit/Helper/Arr/GetTraitTest.php @@ -0,0 +1,53 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +declare(strict_types=1); + +namespace Phalcon\Tests\Unit\Helper\Arr; + +use Phalcon\Tests\Fixtures\Helper\Arr\GetFixture; +use Phalcon\Tests\Unit\AbstractUnitTestCase; + +/** + * Tests the Get trait + */ +final class GetTraitTest extends AbstractUnitTestCase +{ + /** + * Tests Phalcon\Traits\Support\Helper\Arr\GetTrait :: getArrVal() + * + * @return void + * + * @author Phalcon Team + * @since 2021-10-25 + */ + public function testHelperArrGetTrait(): void + { + $get = new GetFixture(); + $collection = [ + 'one' => 1, + 'two' => 'value', + 'three' => '123', + ]; + + // Existing key + $this->assertSame(1, $get->get($collection, 'one')); + + // Missing key returns the default value + $this->assertSame('def', $get->get($collection, 'missing', 'def')); + + // Missing key with no default returns null + $this->assertNull($get->get($collection, 'missing')); + + // Existing value cast to integer + $this->assertSame(123, $get->get($collection, 'three', null, 'integer')); + } +} diff --git a/tests/unit/Helper/Json/DecodeTraitTest.php b/tests/unit/Helper/Json/DecodeTraitTest.php new file mode 100644 index 0000000..6debd1d --- /dev/null +++ b/tests/unit/Helper/Json/DecodeTraitTest.php @@ -0,0 +1,53 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +declare(strict_types=1); + +namespace Phalcon\Tests\Unit\Helper\Json; + +use JsonException; +use Phalcon\Tests\Fixtures\Helper\Json\DecodeFixture; +use Phalcon\Tests\Unit\AbstractUnitTestCase; + +final class DecodeTraitTest extends AbstractUnitTestCase +{ + /** + * Tests Support\Helper\Json\DecodeTrait - decodes + * + * @return void + * + * @author Phalcon Team + * @since 2020-09-09 + */ + public function testHelperJsonDecodeTrait(): void + { + $object = new DecodeFixture(); + + $this->assertSame([1, 2, 3], $object->decode('[1,2,3]', true)); + } + + /** + * Tests Support\Helper\Json\DecodeTrait - throws on failure + * + * @return void + * + * @author Phalcon Team + * @since 2020-09-09 + */ + public function testHelperJsonDecodeTraitThrowsException(): void + { + $object = new DecodeFixture(); + + $this->expectException(JsonException::class); + + $object->decode('{"invalid": }'); + } +} diff --git a/tests/unit/Helper/Json/EncodeTraitTest.php b/tests/unit/Helper/Json/EncodeTraitTest.php new file mode 100644 index 0000000..6fdeb6a --- /dev/null +++ b/tests/unit/Helper/Json/EncodeTraitTest.php @@ -0,0 +1,53 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +declare(strict_types=1); + +namespace Phalcon\Tests\Unit\Helper\Json; + +use JsonException; +use Phalcon\Tests\Fixtures\Helper\Json\EncodeFixture; +use Phalcon\Tests\Unit\AbstractUnitTestCase; + +final class EncodeTraitTest extends AbstractUnitTestCase +{ + /** + * Tests Support\Helper\Json\EncodeTrait - encodes + * + * @return void + * + * @author Phalcon Team + * @since 2020-09-09 + */ + public function testHelperJsonEncodeTrait(): void + { + $object = new EncodeFixture(); + + $this->assertSame('[1,2,3]', $object->encode([1, 2, 3])); + } + + /** + * Tests Support\Helper\Json\EncodeTrait - throws on failure + * + * @return void + * + * @author Phalcon Team + * @since 2020-09-09 + */ + public function testHelperJsonEncodeTraitThrowsException(): void + { + $object = new EncodeFixture(); + + $this->expectException(JsonException::class); + + $object->encode("\xB1\x31"); + } +} diff --git a/tests/unit/Helper/Str/CamelizeTraitTest.php b/tests/unit/Helper/Str/CamelizeTraitTest.php index f28c9d5..2d7aeda 100644 --- a/tests/unit/Helper/Str/CamelizeTraitTest.php +++ b/tests/unit/Helper/Str/CamelizeTraitTest.php @@ -35,14 +35,14 @@ public function testHelperStrCamelize( bool $lowercase ): void { $object = new CamelizeFixture(); - $delimiter = $delimiter ?: '\-_'; + $delimiter = $delimiter ?: '-_'; - $actual = $object->toCamelize($value, $delimiter, $lowercase); + $actual = $object->camelize($value, $delimiter, $lowercase); $this->assertSame($expected, $actual); } /** - * @return array + * @return array> */ public static function getSources(): array { diff --git a/tests/unit/Helper/Str/DirFromFileTraitTest.php b/tests/unit/Helper/Str/DirFromFileTraitTest.php index f5e8d42..528323b 100644 --- a/tests/unit/Helper/Str/DirFromFileTraitTest.php +++ b/tests/unit/Helper/Str/DirFromFileTraitTest.php @@ -22,7 +22,7 @@ final class DirFromFileTraitTest extends AbstractUnitTestCase { /** - * Tests Phalcon\Traits\Str\DirFromFileTrait + * Tests Phalcon\Traits\Support\Helper\Str\DirFromFileTrait * * @dataProvider getExamples * @@ -41,7 +41,23 @@ public function testHelperStrDirFromFileTrait( } /** - * @return array[] + * Tests Phalcon\Traits\Support\Helper\Str\DirFromFileTrait - filesystemSafe + * + * @return void + * + * @author Phalcon Team + * @since 2021-10-26 + */ + public function testHelperStrDirFromFileTraitFilesystemSafe(): void + { + $object = new DirFromFileFixture(); + + // With filesystemSafe, dots in the computed segments become dashes + $this->assertEquals('ab/c-/de/', $object->dirFromFile('abc.defg.jpg', true)); + } + + /** + * @return array> */ public static function getExamples(): array { diff --git a/tests/unit/Helper/Str/DirSeparatorTraitTest.php b/tests/unit/Helper/Str/DirSeparatorTraitTest.php index be7dbc9..999abaa 100644 --- a/tests/unit/Helper/Str/DirSeparatorTraitTest.php +++ b/tests/unit/Helper/Str/DirSeparatorTraitTest.php @@ -43,7 +43,7 @@ public function testHelperStrDirSeparatorTrait( } /** - * @return array[] + * @return array> */ public static function getExamples(): array { diff --git a/tests/unit/Helper/Str/EndsWithTraitTest.php b/tests/unit/Helper/Str/EndsWithTraitTest.php index 44cfc21..d125450 100644 --- a/tests/unit/Helper/Str/EndsWithTraitTest.php +++ b/tests/unit/Helper/Str/EndsWithTraitTest.php @@ -43,7 +43,7 @@ public function testHelperStrEndsWithFilter( } /** - * @return array[] + * @return array> */ public static function getExamples(): array { diff --git a/tests/unit/Helper/Str/InterpolateTraitTest.php b/tests/unit/Helper/Str/InterpolateTraitTest.php index a4cc9e8..f0a81c4 100644 --- a/tests/unit/Helper/Str/InterpolateTraitTest.php +++ b/tests/unit/Helper/Str/InterpolateTraitTest.php @@ -26,6 +26,8 @@ final class InterpolateTraitTest extends AbstractUnitTestCase * * @dataProvider getExamples * + * @param array $context + * * @return void * * @author Phalcon Team @@ -44,7 +46,7 @@ public function testHelperStrInterpolateFilter( } /** - * @return array[] + * @return array> */ public static function getExamples(): array { diff --git a/tests/unit/Helper/Str/LowerTraitTest.php b/tests/unit/Helper/Str/LowerTraitTest.php index 82d631a..65a63de 100644 --- a/tests/unit/Helper/Str/LowerTraitTest.php +++ b/tests/unit/Helper/Str/LowerTraitTest.php @@ -42,7 +42,7 @@ public function testHelperStrLowerFilter( } /** - * @return array[] + * @return array> */ public static function getExamples(): array { diff --git a/tests/unit/Helper/Str/StartsWithTraitTest.php b/tests/unit/Helper/Str/StartsWithTraitTest.php index 8c89447..4f4e51f 100644 --- a/tests/unit/Helper/Str/StartsWithTraitTest.php +++ b/tests/unit/Helper/Str/StartsWithTraitTest.php @@ -43,7 +43,7 @@ public function testHelperStrStartsWithFilter( } /** - * @return array[] + * @return array> */ public static function getExamples(): array { diff --git a/tests/unit/Helper/Str/UncamelizeTraitTest.php b/tests/unit/Helper/Str/UncamelizeTraitTest.php index 350badf..71dbf75 100644 --- a/tests/unit/Helper/Str/UncamelizeTraitTest.php +++ b/tests/unit/Helper/Str/UncamelizeTraitTest.php @@ -35,13 +35,13 @@ public function testHelperStrUncamelize( string $delimiter ): void { $object = new UncamelizeFixture(); - $actual = $object->toUncamelize($value, $delimiter); + $actual = $object->uncamelize($value, $delimiter); $this->assertSame($expected, $actual); } /** - * @return array + * @return array> */ public static function getSources(): array { diff --git a/tests/unit/Helper/Str/UpperTraitTest.php b/tests/unit/Helper/Str/UpperTraitTest.php index 48b594c..794e3c9 100644 --- a/tests/unit/Helper/Str/UpperTraitTest.php +++ b/tests/unit/Helper/Str/UpperTraitTest.php @@ -42,7 +42,7 @@ public function testHelperStrUpperFilter( } /** - * @return array[] + * @return array> */ public static function getExamples(): array { diff --git a/tests/unit/Php/ApcuTraitTest.php b/tests/unit/Php/ApcuTraitTest.php new file mode 100644 index 0000000..599d303 --- /dev/null +++ b/tests/unit/Php/ApcuTraitTest.php @@ -0,0 +1,59 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +declare(strict_types=1); + +namespace Phalcon\Tests\Unit\Php; + +use APCUIterator; +use Phalcon\Tests\Fixtures\Php\ApcuFixture; +use Phalcon\Tests\Unit\AbstractUnitTestCase; + +/** + * Tests the Apcu trait + */ +final class ApcuTraitTest extends AbstractUnitTestCase +{ + /** + * Tests Phalcon\Traits\Php\ApcuTrait + * + * @return void + * + * @author Phalcon Team + * @since 2021-10-25 + */ + public function testHelperPhpApcuTrait(): void + { + $this->checkExtensionIsLoaded('apcu'); + + $apcu = new ApcuFixture(); + $key = 'phalcon-traits-apcu'; + + $apcu->apcuDelete($key); + + // store / exists / fetch + $this->assertTrue($apcu->apcuStore($key, 10)); + $this->assertTrue($apcu->apcuExists($key)); + $this->assertSame(10, $apcu->apcuFetch($key)); + + // inc / dec + $this->assertSame(11, $apcu->apcuInc($key)); + $this->assertSame(10, $apcu->apcuDec($key)); + + // iterator + $iterator = $apcu->apcuIterator('/^' . $key . '$/'); + $this->assertInstanceOf(APCUIterator::class, $iterator); + + // delete + $this->assertTrue($apcu->apcuDelete($key)); + $this->assertFalse($apcu->apcuExists($key)); + } +} diff --git a/tests/unit/Php/Base64TraitTest.php b/tests/unit/Php/Base64TraitTest.php new file mode 100644 index 0000000..afafd89 --- /dev/null +++ b/tests/unit/Php/Base64TraitTest.php @@ -0,0 +1,51 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +declare(strict_types=1); + +namespace Phalcon\Tests\Unit\Php; + +use Phalcon\Tests\Fixtures\Php\Base64Fixture; +use Phalcon\Tests\Unit\AbstractUnitTestCase; + +/** + * Tests the Base64 trait + */ +final class Base64TraitTest extends AbstractUnitTestCase +{ + /** + * Tests Phalcon\Traits\Php\Base64Trait + * + * @return void + * + * @author Phalcon Team + * @since 2021-10-30 + */ + public function testHelperPhpBase64Trait(): void + { + $base64 = new Base64Fixture(); + $source = 'Testing-Data/phalcon'; + + $expected = 'VGVzdGluZy1EYXRhL3BoYWxjb24='; + $actual = $base64->base64Encode($source); + $this->assertEquals($expected, $actual); + + $actual = $base64->base64Decode($expected); + $this->assertEquals($source, $actual); + + $expected = 'VGVzdGluZy1EYXRhL3BoYWxjb24'; + $actual = $base64->encodeUrl($source); + $this->assertEquals($expected, $actual); + + $actual = $base64->decodeUrl($expected); + $this->assertEquals($source, $actual); + } +} diff --git a/tests/unit/Php/FileTraitTest.php b/tests/unit/Php/FileTraitTest.php index 2594731..9327f40 100644 --- a/tests/unit/Php/FileTraitTest.php +++ b/tests/unit/Php/FileTraitTest.php @@ -47,6 +47,10 @@ public function testHelperPhpFileTrait(): void */ $source = dataDir('assets/sample.csv'); $handle = $file->fopen($source, 'r'); + if (false === $handle) { + $this->fail('Could not open file: ' . $source); + } + $actual = $file->fgetCsv($handle, 0, ';'); $result = $file->fclose($handle); $this->assertTrue($result); diff --git a/tests/unit/Php/HashTraitTest.php b/tests/unit/Php/HashTraitTest.php new file mode 100644 index 0000000..1442fe3 --- /dev/null +++ b/tests/unit/Php/HashTraitTest.php @@ -0,0 +1,53 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +declare(strict_types=1); + +namespace Phalcon\Tests\Unit\Php; + +use Phalcon\Tests\Fixtures\Php\HashFixture; +use Phalcon\Tests\Unit\AbstractUnitTestCase; + +use function hash; +use function hash_hmac; + +/** + * Tests the Hash trait + */ +final class HashTraitTest extends AbstractUnitTestCase +{ + /** + * Tests Phalcon\Traits\Php\HashTrait + * + * @return void + * + * @author Phalcon Team + * @since 2021-10-25 + */ + public function testHelperPhpHashTrait(): void + { + $hash = new HashFixture(); + + // hash + $expected = hash('sha256', 'Phalcon Framework'); + $actual = $hash->hash('sha256', 'Phalcon Framework'); + $this->assertSame($expected, $actual); + + // hashEquals + $this->assertTrue($hash->hashEquals($expected, $actual)); + $this->assertFalse($hash->hashEquals($expected, 'not-a-match')); + + // hashHmac + $expected = hash_hmac('sha256', 'Phalcon Framework', 'secret'); + $actual = $hash->hashHmac('sha256', 'Phalcon Framework', 'secret'); + $this->assertSame($expected, $actual); + } +} diff --git a/tests/unit/Php/HeaderTraitTest.php b/tests/unit/Php/HeaderTraitTest.php new file mode 100644 index 0000000..5314484 --- /dev/null +++ b/tests/unit/Php/HeaderTraitTest.php @@ -0,0 +1,40 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +declare(strict_types=1); + +namespace Phalcon\Tests\Unit\Php; + +use Phalcon\Tests\Fixtures\Php\HeaderFixture; +use Phalcon\Tests\Unit\AbstractUnitTestCase; + +/** + * Tests the Header trait + */ +final class HeaderTraitTest extends AbstractUnitTestCase +{ + /** + * Tests Phalcon\Traits\Php\HeaderTrait + * + * @return void + * + * @author Phalcon Team + * @since 2021-10-25 + */ + public function testHelperPhpHeaderTrait(): void + { + $header = new HeaderFixture(); + + // In the CLI SAPI no HTTP headers are ever sent + $actual = $header->headersSent(); + $this->assertFalse($actual); + } +} diff --git a/tests/unit/Php/IgbinaryTraitTest.php b/tests/unit/Php/IgbinaryTraitTest.php new file mode 100644 index 0000000..5aa9e05 --- /dev/null +++ b/tests/unit/Php/IgbinaryTraitTest.php @@ -0,0 +1,48 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +declare(strict_types=1); + +namespace Phalcon\Tests\Unit\Php; + +use Phalcon\Tests\Fixtures\Php\IgbinaryFixture; +use Phalcon\Tests\Unit\AbstractUnitTestCase; + +/** + * Tests the Igbinary trait + */ +final class IgbinaryTraitTest extends AbstractUnitTestCase +{ + /** + * Tests Phalcon\Traits\Php\IgbinaryTrait + * + * @return void + * + * @author Phalcon Team + * @since 2021-10-25 + */ + public function testHelperPhpIgbinaryTrait(): void + { + $this->checkExtensionIsLoaded('igbinary'); + + $igbinary = new IgbinaryFixture(); + $data = [ + 'one' => 1, + 'two' => 2, + ]; + + $serialized = $igbinary->serialize($data); + $this->assertIsString($serialized); + + $actual = $igbinary->unserialize($serialized); + $this->assertSame($data, $actual); + } +} diff --git a/tests/unit/Php/JsonTraitTest.php b/tests/unit/Php/JsonTraitTest.php deleted file mode 100644 index 4aa48e3..0000000 --- a/tests/unit/Php/JsonTraitTest.php +++ /dev/null @@ -1,52 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE.txt - * file that was distributed with this source code. - */ - -declare(strict_types=1); - -namespace Phalcon\Tests\Unit\Php; - -use Phalcon\Tests\Fixtures\Php\JsonFixture; -use Phalcon\Tests\Unit\AbstractUnitTestCase; - -/** - * Tests the Json trait - */ -final class JsonTraitTest extends AbstractUnitTestCase -{ - /** - * Tests Phalcon\Traits\Php\JsonTrait - * - * @return void - * - * @author Phalcon Team - * @since 2021-10-25 - */ - public function testHelperPhpJsonTrait(): void - { - $json = new JsonFixture(); - $data = [ - 'one' => 'two', - 'three', - ]; - - $expected = '{"one":"two","0":"three"}'; - $actual = $json->jsonEncode($data); - $this->assertEquals($expected, $actual); - - $data = '{"one":"two","0":"three"}'; - $expected = [ - 'one' => 'two', - 'three', - ]; - $actual = $json->jsonDecode($data, true); - $this->assertEquals($expected, $actual); - } -} diff --git a/tests/unit/Php/MbCaseTraitTest.php b/tests/unit/Php/MbCaseTraitTest.php new file mode 100644 index 0000000..00d5ce3 --- /dev/null +++ b/tests/unit/Php/MbCaseTraitTest.php @@ -0,0 +1,55 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +declare(strict_types=1); + +namespace Phalcon\Tests\Unit\Php; + +use Phalcon\Tests\Fixtures\Php\MbCaseFixture; +use Phalcon\Tests\Unit\AbstractUnitTestCase; + +use const MB_CASE_LOWER; +use const MB_CASE_TITLE; +use const MB_CASE_UPPER; + +/** + * Tests the MbCase trait + */ +final class MbCaseTraitTest extends AbstractUnitTestCase +{ + /** + * Tests Phalcon\Traits\Php\MbCaseTrait + * + * @return void + * + * @author Phalcon Team + * @since 2021-10-25 + */ + public function testHelperPhpMbCaseTrait(): void + { + $mbCase = new MbCaseFixture(); + + $this->assertSame( + 'привет мир', + $mbCase->mbConvertCase('ПРИВЕТ МИР', MB_CASE_LOWER, 'strtolower') + ); + + $this->assertSame( + 'ПРИВЕТ МИР', + $mbCase->mbConvertCase('привет мир', MB_CASE_UPPER, 'strtoupper') + ); + + $this->assertSame( + 'Hello World', + $mbCase->mbConvertCase('hello world', MB_CASE_TITLE, 'ucwords') + ); + } +} diff --git a/tests/unit/Php/MsgpackTraitTest.php b/tests/unit/Php/MsgpackTraitTest.php new file mode 100644 index 0000000..6cb2d8f --- /dev/null +++ b/tests/unit/Php/MsgpackTraitTest.php @@ -0,0 +1,46 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +declare(strict_types=1); + +namespace Phalcon\Tests\Unit\Php; + +use Phalcon\Tests\Fixtures\Php\MsgpackFixture; +use Phalcon\Tests\Unit\AbstractUnitTestCase; + +/** + * Tests the Msgpack trait + */ +final class MsgpackTraitTest extends AbstractUnitTestCase +{ + /** + * Tests Phalcon\Traits\Php\MsgpackTrait + * + * @return void + * + * @author Phalcon Team + * @since 2021-10-25 + */ + public function testHelperPhpMsgpackTrait(): void + { + $this->checkExtensionIsLoaded('msgpack'); + + $msgpack = new MsgpackFixture(); + $data = [ + 'one' => 1, + 'two' => 2, + ]; + + $packed = $msgpack->pack($data); + + $this->assertSame($data, $msgpack->unpack($packed)); + } +} diff --git a/tests/unit/Php/OpensslTraitTest.php b/tests/unit/Php/OpensslTraitTest.php new file mode 100644 index 0000000..cb57e5f --- /dev/null +++ b/tests/unit/Php/OpensslTraitTest.php @@ -0,0 +1,46 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +declare(strict_types=1); + +namespace Phalcon\Tests\Unit\Php; + +use Phalcon\Tests\Fixtures\Php\OpensslFixture; +use Phalcon\Tests\Unit\AbstractUnitTestCase; + +use function strlen; + +/** + * Tests the Openssl trait + */ +final class OpensslTraitTest extends AbstractUnitTestCase +{ + /** + * Tests Phalcon\Traits\Php\OpensslTrait + * + * @return void + * + * @author Phalcon Team + * @since 2021-10-25 + */ + public function testHelperPhpOpensslTrait(): void + { + $this->checkExtensionIsLoaded('openssl'); + + $openssl = new OpensslFixture(); + + // aes-256-cbc uses a 16-byte IV + $this->assertSame(16, $openssl->cipherIvLength('aes-256-cbc')); + + $bytes = $openssl->randomPseudoBytes(16); + $this->assertSame(16, strlen($bytes)); + } +} diff --git a/tests/unit/Php/SerializeTraitTest.php b/tests/unit/Php/SerializeTraitTest.php new file mode 100644 index 0000000..1d1056c --- /dev/null +++ b/tests/unit/Php/SerializeTraitTest.php @@ -0,0 +1,44 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +declare(strict_types=1); + +namespace Phalcon\Tests\Unit\Php; + +use Phalcon\Tests\Fixtures\Php\SerializeFixture; +use Phalcon\Tests\Unit\AbstractUnitTestCase; + +/** + * Tests the Serialize trait + */ +final class SerializeTraitTest extends AbstractUnitTestCase +{ + /** + * Tests Phalcon\Traits\Php\SerializeTrait + * + * @return void + * + * @author Phalcon Team + * @since 2021-10-25 + */ + public function testHelperPhpSerializeTrait(): void + { + $serialize = new SerializeFixture(); + $data = [ + 'one' => 1, + 'two' => 2, + ]; + + $serialized = $serialize->serialize($data); + + $this->assertSame($data, $serialize->unserialize($serialized)); + } +} diff --git a/tests/unit/Php/UrlTraitTest.php b/tests/unit/Php/UrlTraitTest.php index 1d170a5..5468e76 100644 --- a/tests/unit/Php/UrlTraitTest.php +++ b/tests/unit/Php/UrlTraitTest.php @@ -13,7 +13,6 @@ namespace Phalcon\Tests\Unit\Php; -use Phalcon\Tests\Fixtures\Php\UrlFailFixture; use Phalcon\Tests\Fixtures\Php\UrlFixture; use Phalcon\Tests\Unit\AbstractUnitTestCase; @@ -33,34 +32,14 @@ final class UrlTraitTest extends AbstractUnitTestCase public function testHelperPhpUrlTrait(): void { $url = new UrlFixture(); - $source = "Testing-Data/phalcon"; - - $expected = 'VGVzdGluZy1EYXRhL3BoYWxjb24='; - $actual = $url->base64Encode($source); - $this->assertEquals($expected, $actual); - - $expected = $source; - $data = $actual; - $actual = $url->base64Decode($data); - $this->assertEquals($expected, $actual); - - $expected = 'VGVzdGluZy1EYXRhL3BoYWxjb24'; - $actual = $url->base64EncodeUrl($source); - $this->assertEquals($expected, $actual); - - $expected = $source; - $data = $actual; - $actual = $url->base64DecodeUrl($data); - $this->assertEquals($expected, $actual); + $source = 'Testing-Data/phalcon'; $expected = 'Testing-Data%2Fphalcon'; $actual = $url->rawUrlEncode($source); $this->assertEquals($expected, $actual); - $expected = $source; - $data = $actual; - $actual = $url->rawUrlDecode($data); - $this->assertEquals($expected, $actual); + $actual = $url->rawUrlDecode($expected); + $this->assertEquals($source, $actual); $source = 'https://phalcon:secret@dev.phalcon.ld:8000/action?param=value#frag'; $expected = [ @@ -73,24 +52,7 @@ public function testHelperPhpUrlTrait(): void 'query' => 'param=value', 'fragment' => 'frag', ]; - $actual = $url->parseUrl($source); + $actual = $url->parseUrl($source); $this->assertEquals($expected, $actual); } - - /** - * Tests Phalcon\Traits\Php\UrlTrait - base64_decode error - * - * @return void - * - * @author Phalcon Team - * @since 2021-10-30 - */ - public function testHelperPhpUrlTraitBase64DecodeError(): void - { - $url = new UrlFailFixture(); - - $source = "Testing-Data/phalcon"; - $actual = $url->base64DecodeUrl($source); - $this->assertEmpty($actual); - } } diff --git a/tests/unit/Php/YamlTraitTest.php b/tests/unit/Php/YamlTraitTest.php new file mode 100644 index 0000000..3150fd3 --- /dev/null +++ b/tests/unit/Php/YamlTraitTest.php @@ -0,0 +1,48 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +declare(strict_types=1); + +namespace Phalcon\Tests\Unit\Php; + +use Phalcon\Tests\Fixtures\Php\YamlFixture; +use Phalcon\Tests\Unit\AbstractUnitTestCase; + +use function dataDir; + +/** + * Tests the Yaml trait + */ +final class YamlTraitTest extends AbstractUnitTestCase +{ + /** + * Tests Phalcon\Traits\Php\YamlTrait + * + * @return void + * + * @author Phalcon Team + * @since 2021-10-25 + */ + public function testHelperPhpYamlTrait(): void + { + $this->checkExtensionIsLoaded('yaml'); + + $yaml = new YamlFixture(); + $actual = $yaml->parseFile(dataDir('assets/sample.yaml')); + $expected = [ + 'name' => 'Phalcon', + 'version' => 6, + 'enabled' => true, + ]; + + $this->assertSame($expected, $actual); + } +} From bf5db2a3becec37368997eaae3b0633d915582b2 Mon Sep 17 00:00:00 2001 From: Nikolaos Dimopoulos Date: Fri, 10 Jul 2026 12:43:01 -0500 Subject: [PATCH 6/9] more tests and coverage Assisted-by: Claude Code --- resources/infection.json5 | 12 +++++- src/Php/MbCaseTrait.php | 22 +++------- .../fixtures/Helper/Json/DecodeFixture.php | 13 ++++++ .../fixtures/Helper/Json/EncodeFixture.php | 12 ++++++ tests/support/fixtures/Php/FileFixture.php | 40 +++++++++++++------ tests/support/fixtures/Php/HashFixture.php | 27 +++++++++++++ tests/support/fixtures/Php/MbCaseFixture.php | 9 ++--- tests/unit/Helper/Json/DecodeTraitTest.php | 16 ++++++++ tests/unit/Helper/Json/EncodeTraitTest.php | 17 ++++++++ .../unit/Helper/Str/DirFromFileTraitTest.php | 20 ++++++++++ tests/unit/Helper/Str/EndsWithTraitTest.php | 14 +++++++ tests/unit/Helper/Str/StartsWithTraitTest.php | 14 +++++++ tests/unit/Helper/Str/UncamelizeTraitTest.php | 1 + tests/unit/Php/FileTraitTest.php | 13 ++++++ tests/unit/Php/HashTraitTest.php | 23 +++++++++++ tests/unit/Php/IniTraitTest.php | 30 ++++++++++++++ tests/unit/Php/MbCaseTraitTest.php | 6 +-- 17 files changed, 251 insertions(+), 38 deletions(-) diff --git a/resources/infection.json5 b/resources/infection.json5 index 568e0d1..fa44462 100644 --- a/resources/infection.json5 +++ b/resources/infection.json5 @@ -13,7 +13,17 @@ "phpUnit": { "configDir": "." }, + // Floor gate. The bulk of the surviving mutants are equivalent (thin + // passthrough wrappers + defaults masked by the php functions they call); + // this catches a real regression without chasing false positives. + "minMsi": 75, + "minCoveredMsi": 75, "mutators": { - "@default": true + "@default": true, + // protected->private / public->protected on trait methods are + // behaviourally equivalent (a trait's private method is still callable + // by the composing class, and nothing subclasses these wrappers). + "ProtectedVisibility": false, + "PublicVisibility": false } } diff --git a/src/Php/MbCaseTrait.php b/src/Php/MbCaseTrait.php index 37b983f..56c1485 100644 --- a/src/Php/MbCaseTrait.php +++ b/src/Php/MbCaseTrait.php @@ -13,9 +13,7 @@ namespace Phalcon\Traits\Php; -use function function_exists; use function mb_convert_case; -use function utf8_decode; /** * Multibyte case conversion wrapper method @@ -23,27 +21,17 @@ trait MbCaseTrait { /** - * Converts the case of a string using `mb_convert_case()` when the - * `mbstring` extension is available, otherwise applies the passed fallback - * function to the `utf8_decode()`d input. + * Converts the case of a string using `mb_convert_case()` * - * @param string $input - * @param int $mode - * @param callable-string $fallback + * @param string $input + * @param int $mode * * @return string * * @link https://php.net/manual/en/function.mb-convert-case.php */ - protected static function phpMbConvertCase(string $input, int $mode, string $fallback): string + protected static function phpMbConvertCase(string $input, int $mode): string { - if (true === function_exists('mb_convert_case')) { - return mb_convert_case($input, $mode, 'UTF-8'); - } - - /** @var string $result */ - $result = $fallback(utf8_decode($input)); - - return $result; + return mb_convert_case($input, $mode, 'UTF-8'); } } diff --git a/tests/support/fixtures/Helper/Json/DecodeFixture.php b/tests/support/fixtures/Helper/Json/DecodeFixture.php index 168d3b7..d1eb9e3 100644 --- a/tests/support/fixtures/Helper/Json/DecodeFixture.php +++ b/tests/support/fixtures/Helper/Json/DecodeFixture.php @@ -37,4 +37,17 @@ public function decode( ): mixed { return $this->toDecode($data, $associative, $depth, $options); } + + /** + * Decodes a string relying on the trait defaults (associative false, + * options 79) + * + * @param string $data + * + * @return mixed + */ + public function decodeDefault(string $data): mixed + { + return $this->toDecode($data); + } } diff --git a/tests/support/fixtures/Helper/Json/EncodeFixture.php b/tests/support/fixtures/Helper/Json/EncodeFixture.php index 8887c6a..8605d80 100644 --- a/tests/support/fixtures/Helper/Json/EncodeFixture.php +++ b/tests/support/fixtures/Helper/Json/EncodeFixture.php @@ -35,4 +35,16 @@ public function encode( ): string { return $this->toEncode($data, $options, $depth); } + + /** + * Encodes data relying on the trait defaults (options 79, depth 512) + * + * @param mixed $data + * + * @return string + */ + public function encodeDefault(mixed $data): string + { + return $this->toEncode($data); + } } diff --git a/tests/support/fixtures/Php/FileFixture.php b/tests/support/fixtures/Php/FileFixture.php index 02568b7..d2be547 100644 --- a/tests/support/fixtures/Php/FileFixture.php +++ b/tests/support/fixtures/Php/FileFixture.php @@ -32,15 +32,30 @@ public function fileExists($filename) } /** - * @param string $filename + * @param string $filename + * @param bool $useIncludePath + * @param resource|null $context + * @param int $offset + * @param int<0, max>|null $length * * @return string|false * * @link https://php.net/manual/en/function.file-get-contents.php */ - public function fileGetContents($filename) - { - return $this->phpFileGetContents($filename); + public function fileGetContents( + $filename, + bool $useIncludePath = false, + $context = null, + int $offset = 0, + ?int $length = null + ) { + return $this->phpFileGetContents( + $filename, + $useIncludePath, + $context, + $offset, + $length + ); } /** @@ -82,8 +97,8 @@ public function fclose($handle) * @param resource $stream * @param int<0, max> $length * @param string $separator - * @param string $enclosure - * @param string $escape + * @param string|null $enclosure + * @param string|null $escape * * @return array|false * @@ -93,8 +108,8 @@ public function fgetCsv( $stream, $length = 0, $separator = ',', - $enclosure = '"', - $escape = '\\' + ?string $enclosure = null, + ?string $escape = null ) { return $this->phpFgetCsv( $stream, @@ -124,14 +139,15 @@ public function fopen($filename, $mode) * * @link https://php.net/manual/en/function.fwrite.php * - * @param resource $handle - * @param string $data + * @param resource $handle + * @param string $data + * @param int<0, max>|null $length * * @return int|false */ - public function fwrite($handle, string $data) + public function fwrite($handle, string $data, ?int $length = null) { - return $this->phpFwrite($handle, $data); + return $this->phpFwrite($handle, $data, $length); } /** diff --git a/tests/support/fixtures/Php/HashFixture.php b/tests/support/fixtures/Php/HashFixture.php index ab8911a..65977ac 100644 --- a/tests/support/fixtures/Php/HashFixture.php +++ b/tests/support/fixtures/Php/HashFixture.php @@ -31,6 +31,19 @@ public function hash(string $algorithm, string $data, bool $binary = false): str return $this->phpHash($algorithm, $data, $binary); } + /** + * Hashes relying on the trait default (binary false) + * + * @param string $algorithm + * @param string $data + * + * @return string + */ + public function hashDefault(string $algorithm, string $data): string + { + return $this->phpHash($algorithm, $data); + } + /** * @param string $knownString * @param string $userString @@ -58,4 +71,18 @@ public function hashHmac( ): string { return $this->phpHashHmac($algorithm, $data, $key, $binary); } + + /** + * HMAC hashes relying on the trait default (binary false) + * + * @param string $algorithm + * @param string $data + * @param string $key + * + * @return string + */ + public function hashHmacDefault(string $algorithm, string $data, string $key): string + { + return $this->phpHashHmac($algorithm, $data, $key); + } } diff --git a/tests/support/fixtures/Php/MbCaseFixture.php b/tests/support/fixtures/Php/MbCaseFixture.php index 93f8e13..c0ac313 100644 --- a/tests/support/fixtures/Php/MbCaseFixture.php +++ b/tests/support/fixtures/Php/MbCaseFixture.php @@ -20,14 +20,13 @@ class MbCaseFixture use MbCaseTrait; /** - * @param string $input - * @param int $mode - * @param callable-string $fallback + * @param string $input + * @param int $mode * * @return string */ - public function mbConvertCase(string $input, int $mode, string $fallback): string + public function mbConvertCase(string $input, int $mode): string { - return $this->phpMbConvertCase($input, $mode, $fallback); + return $this->phpMbConvertCase($input, $mode); } } diff --git a/tests/unit/Helper/Json/DecodeTraitTest.php b/tests/unit/Helper/Json/DecodeTraitTest.php index 6debd1d..5b9258e 100644 --- a/tests/unit/Helper/Json/DecodeTraitTest.php +++ b/tests/unit/Helper/Json/DecodeTraitTest.php @@ -50,4 +50,20 @@ public function testHelperJsonDecodeTraitThrowsException(): void $object->decode('{"invalid": }'); } + + /** + * Tests Support\Helper\Json\DecodeTrait - associative defaults to false + * + * @return void + * + * @author Phalcon Team + * @since 2020-09-09 + */ + public function testHelperJsonDecodeTraitDefaultAssociative(): void + { + $object = new DecodeFixture(); + + // associative defaults to false -> an object decodes to \stdClass + $this->assertEquals((object) ['a' => 1], $object->decodeDefault('{"a":1}')); + } } diff --git a/tests/unit/Helper/Json/EncodeTraitTest.php b/tests/unit/Helper/Json/EncodeTraitTest.php index 6fdeb6a..e5fa9e0 100644 --- a/tests/unit/Helper/Json/EncodeTraitTest.php +++ b/tests/unit/Helper/Json/EncodeTraitTest.php @@ -50,4 +50,21 @@ public function testHelperJsonEncodeTraitThrowsException(): void $object->encode("\xB1\x31"); } + + /** + * Tests Support\Helper\Json\EncodeTrait - default options (79) + * + * @return void + * + * @author Phalcon Team + * @since 2020-09-09 + */ + public function testHelperJsonEncodeTraitDefaultOptions(): void + { + $object = new EncodeFixture(); + + // 79 includes JSON_HEX_TAG so `<` is escaped as \\u003C, and no pretty-print + $this->assertSame('"\\u003C"', $object->encodeDefault('<')); + $this->assertSame('{"a":"b"}', $object->encodeDefault(['a' => 'b'])); + } } diff --git a/tests/unit/Helper/Str/DirFromFileTraitTest.php b/tests/unit/Helper/Str/DirFromFileTraitTest.php index 528323b..ded8341 100644 --- a/tests/unit/Helper/Str/DirFromFileTraitTest.php +++ b/tests/unit/Helper/Str/DirFromFileTraitTest.php @@ -70,6 +70,26 @@ public static function getExamples(): array '', '/', ], + // multibyte: mb_substr / mb_str_split must operate on characters + [ + 'абвгде.jpg', + 'аб/вг/', + ], + // filesystemSafe defaults to false -> dots are preserved + [ + 'ab.cd.ef.jpg', + 'ab/.c/d./', + ], + // short name falls back to the first character + [ + 'XY.jpg', + 'X/', + ], + // short multibyte name -> first character kept intact + [ + 'я.jpg', + 'я/', + ], ]; } } diff --git a/tests/unit/Helper/Str/EndsWithTraitTest.php b/tests/unit/Helper/Str/EndsWithTraitTest.php index d125450..84efe94 100644 --- a/tests/unit/Helper/Str/EndsWithTraitTest.php +++ b/tests/unit/Helper/Str/EndsWithTraitTest.php @@ -108,6 +108,20 @@ public static function getExamples(): array false, false, ], + // empty needle -> false (guards the `||` short-circuit) + [ + 'Hello', + '', + true, + false, + ], + // multibyte case-fold: upper-case Cyrillic must lower-case + [ + 'ПРИВЕТ', + 'ВЕТ', + true, + true, + ], ]; } } diff --git a/tests/unit/Helper/Str/StartsWithTraitTest.php b/tests/unit/Helper/Str/StartsWithTraitTest.php index 4f4e51f..dac3490 100644 --- a/tests/unit/Helper/Str/StartsWithTraitTest.php +++ b/tests/unit/Helper/Str/StartsWithTraitTest.php @@ -108,6 +108,20 @@ public static function getExamples(): array false, false, ], + // empty needle -> false (guards the `||` short-circuit) + [ + 'Hello', + '', + true, + false, + ], + // multibyte case-fold: upper-case Cyrillic must lower-case + [ + 'ПРИВЕТ', + 'ПРИ', + true, + true, + ], ]; } } diff --git a/tests/unit/Helper/Str/UncamelizeTraitTest.php b/tests/unit/Helper/Str/UncamelizeTraitTest.php index 71dbf75..626a781 100644 --- a/tests/unit/Helper/Str/UncamelizeTraitTest.php +++ b/tests/unit/Helper/Str/UncamelizeTraitTest.php @@ -64,6 +64,7 @@ public static function getSources(): array ['CameLiZe', 'came.li.ze', '.'], ['CameLiZe', 'came-li-ze', '-'], ['CAMELIZE', 'c/a/m/e/l/i/z/e', '/'], + ["A\0B", 'a', '_'], ]; } } diff --git a/tests/unit/Php/FileTraitTest.php b/tests/unit/Php/FileTraitTest.php index 9327f40..21ece7a 100644 --- a/tests/unit/Php/FileTraitTest.php +++ b/tests/unit/Php/FileTraitTest.php @@ -19,6 +19,7 @@ use function dataDir; use function is_resource; use function outputDir; +use function substr; use function uniqid; /** @@ -86,6 +87,12 @@ public function testHelperPhpFileTrait(): void $actual = $file->fileGetContents($fileName); $this->assertEquals($expected, $actual); + /** + * Read a fixed length (covers the $length branch) + */ + $actual = $file->fileGetContents($fileName, false, null, 0, 5); + $this->assertEquals(substr($contents, 0, 5), $actual); + /** * Delete it */ @@ -105,6 +112,12 @@ public function testHelperPhpFileTrait(): void $actual = $file->fwrite($handle, $contents); $this->assertGreaterThan(0, $actual); + /** + * fwrite with an explicit length (covers the $length branch) + */ + $actual = $file->fwrite($handle, $contents, 3); + $this->assertSame(3, $actual); + /** * fclose */ diff --git a/tests/unit/Php/HashTraitTest.php b/tests/unit/Php/HashTraitTest.php index 1442fe3..31b9b15 100644 --- a/tests/unit/Php/HashTraitTest.php +++ b/tests/unit/Php/HashTraitTest.php @@ -50,4 +50,27 @@ public function testHelperPhpHashTrait(): void $actual = $hash->hashHmac('sha256', 'Phalcon Framework', 'secret'); $this->assertSame($expected, $actual); } + + /** + * Tests Phalcon\Traits\Php\HashTrait - binary defaults to false (hex) + * + * @return void + * + * @author Phalcon Team + * @since 2021-10-25 + */ + public function testHelperPhpHashTraitDefaultBinary(): void + { + $hash = new HashFixture(); + + $this->assertSame( + hash('sha256', 'Phalcon Framework'), + $hash->hashDefault('sha256', 'Phalcon Framework') + ); + + $this->assertSame( + hash_hmac('sha256', 'Phalcon Framework', 'secret'), + $hash->hashHmacDefault('sha256', 'Phalcon Framework', 'secret') + ); + } } diff --git a/tests/unit/Php/IniTraitTest.php b/tests/unit/Php/IniTraitTest.php index 9db6023..a68735c 100644 --- a/tests/unit/Php/IniTraitTest.php +++ b/tests/unit/Php/IniTraitTest.php @@ -18,6 +18,7 @@ use function dataDir; use function ini_get; +use function ini_set; /** * Tests the Ini trait @@ -87,4 +88,33 @@ public function testHelperPhpInfoTrait(): void $actual = $ini->iniGetInt('unknown', 1234); $this->assertSame($expected, $actual); } + + /** + * Tests Phalcon\Traits\Php\IniTrait :: phpIniGetBool() token mapping. + * + * Uses the writable `user_agent` directive as scratch storage so every + * truthy token (and the case-fold) exercises a distinct `match` arm. + * + * @return void + * + * @author Phalcon Team + * @since 2023-01-01 + */ + public function testHelperPhpIniTraitGetBoolValues(): void + { + $ini = new IniFixture(); + $saved = ini_get('user_agent'); + + foreach (['true', 'on', 'yes', 'y', '1', 'YES', 'On'] as $truthy) { + ini_set('user_agent', $truthy); + $this->assertTrue($ini->iniGetBool('user_agent'), $truthy); + } + + foreach (['false', 'off', 'no', 'n', '0', ''] as $falsy) { + ini_set('user_agent', $falsy); + $this->assertFalse($ini->iniGetBool('user_agent'), $falsy); + } + + ini_set('user_agent', (string) $saved); + } } diff --git a/tests/unit/Php/MbCaseTraitTest.php b/tests/unit/Php/MbCaseTraitTest.php index 00d5ce3..97806b2 100644 --- a/tests/unit/Php/MbCaseTraitTest.php +++ b/tests/unit/Php/MbCaseTraitTest.php @@ -39,17 +39,17 @@ public function testHelperPhpMbCaseTrait(): void $this->assertSame( 'привет мир', - $mbCase->mbConvertCase('ПРИВЕТ МИР', MB_CASE_LOWER, 'strtolower') + $mbCase->mbConvertCase('ПРИВЕТ МИР', MB_CASE_LOWER) ); $this->assertSame( 'ПРИВЕТ МИР', - $mbCase->mbConvertCase('привет мир', MB_CASE_UPPER, 'strtoupper') + $mbCase->mbConvertCase('привет мир', MB_CASE_UPPER) ); $this->assertSame( 'Hello World', - $mbCase->mbConvertCase('hello world', MB_CASE_TITLE, 'ucwords') + $mbCase->mbConvertCase('hello world', MB_CASE_TITLE) ); } } From adaf5e8171bfb2cdd8128c301044b095d38e869c Mon Sep 17 00:00:00 2001 From: Nikolaos Dimopoulos Date: Fri, 10 Jul 2026 13:43:13 -0500 Subject: [PATCH 7/9] updating changelog --- CHANGELOG.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2f24381..53d4dac 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,33 @@ # Changelog +## [4.0.0](https://github.com/phalcon/traits/releases/tag/4.0.0) (unreleased) + +### Added + +- Added `Phalcon\Traits\Support\Helper\Json\EncodeTrait` and `Phalcon\Traits\Support\Helper\Json\DecodeTrait`, `json_encode()` / `json_decode()` wrappers that throw the native `\JsonException` on failure +- Added `Phalcon\Traits\Php\Base64Trait`, wrappers for the `base64_*` functions (Base64 URL encode/decode plus `phpBase64Encode()` / `phpBase64Decode()`), split out of `Php\UrlTrait` + +### Changed + +- Moved the helper traits from `Phalcon\Traits\Helper\*` to `Phalcon\Traits\Support\Helper\*`, matching the `Phalcon\Support\Helper` namespace used by the framework (**BC break**) +- Replaced the `staticToX()` / `staticPhpX()` static delegate methods (e.g. `staticToCamelize()`, `staticToLower()`, `staticPhpIniGet()`) with a single `protected static` method per trait (**BC break**) +- Reduced `Phalcon\Traits\Php\UrlTrait` to the URL wrappers only (`phpParseUrl()`, `phpRawUrlDecode()`, `phpRawUrlEncode()`); the Base64 helpers moved to the new `Php\Base64Trait` (**BC break**) +- Simplified `Phalcon\Traits\Php\MbCaseTrait::phpMbConvertCase()` to `(string $input, int $mode)`, dropping the `$fallback` parameter and the `utf8_decode()` fallback (`mbstring` is a required extension) (**BC break**) +- Changed the default `$scannerMode` of `Phalcon\Traits\Php\IniTrait::phpParseIniFile()` to `0` (`INI_SCANNER_NORMAL`) +- Widened the `Phalcon\Traits\Php\FileTrait` wrappers to the full parameter sets of their underlying `file_*` functions +- Modernized the test setup: switched to the Talon runner, enforced 100% code coverage, and added Infection mutation testing + +### Removed + +- Removed `Phalcon\Traits\Php\JsonTrait`; the thin `json_encode()` / `json_decode()` wrapper is superseded by the throwing `Support\Helper\Json\EncodeTrait` / `DecodeTrait` (**BC break**) + +### Fixed + +- Reimplemented `Phalcon\Traits\Support\Helper\Str\CamelizeTrait` and `UncamelizeTrait` as byte-based ASCII conversions matching the cphalcon builtin +- Rewrote `Phalcon\Traits\Support\Helper\Str\EndsWithTrait` and `StartsWithTrait` on `str_ends_with()` / `str_starts_with()` with multibyte-aware case folding and empty-string guards +- Restored the `filesystemSafe` parameter and the `.` → `-` replacement on `Phalcon\Traits\Support\Helper\Str\DirFromFileTrait` +- Corrected the PHPDoc on `Phalcon\Traits\Factory\FactoryTrait` (`class-string<\Throwable>` exception class, removed the spurious `@property` tags) + ## [3.0.0](https://github.com/phalcon/traits/releases/tag/3.0.0) (2025-02-11) From efb7abb52e2bbc0f7805932a2ba9a6850775f06c Mon Sep 17 00:00:00 2001 From: Nikolaos Dimopoulos Date: Fri, 10 Jul 2026 13:51:49 -0500 Subject: [PATCH 8/9] phpcs --- src/Factory/FactoryTrait.php | 38 +++++----- tests/unit/Factory/FactoryTraitTest.php | 76 +++++++++---------- tests/unit/Helper/Arr/FilterTraitTest.php | 48 ++++++------ tests/unit/Helper/Json/DecodeTraitTest.php | 18 ++--- tests/unit/Helper/Json/EncodeTraitTest.php | 20 ++--- tests/unit/Helper/Str/CamelizeTraitTest.php | 44 +++++------ .../unit/Helper/Str/DirFromFileTraitTest.php | 68 ++++++++--------- .../unit/Helper/Str/DirSeparatorTraitTest.php | 36 ++++----- tests/unit/Helper/Str/EndsWithTraitTest.php | 40 +++++----- .../unit/Helper/Str/InterpolateTraitTest.php | 46 +++++------ tests/unit/Helper/Str/LowerTraitTest.php | 38 +++++----- tests/unit/Helper/Str/StartsWithTraitTest.php | 40 +++++----- tests/unit/Helper/Str/UncamelizeTraitTest.php | 36 ++++----- tests/unit/Helper/Str/UpperTraitTest.php | 38 +++++----- 14 files changed, 293 insertions(+), 293 deletions(-) diff --git a/src/Factory/FactoryTrait.php b/src/Factory/FactoryTrait.php index b639b38..82f7c7b 100644 --- a/src/Factory/FactoryTrait.php +++ b/src/Factory/FactoryTrait.php @@ -34,6 +34,25 @@ trait FactoryTrait */ private array $mapper = []; + /** + * Return an object from the instances pool. If it does not exist, create it + * + * @param string $name + * @param mixed ...$arguments + * + * @return object + * @throws Exception + */ + protected function getCachedInstance(string $name, mixed ...$arguments): object + { + if (true !== isset($this->instances[$name])) { + $definition = $this->getService($name); + $this->instances[$name] = new $definition(...$arguments); + } + + return $this->instances[$name]; + } + /** * Returns the exception class for the factory * @@ -62,25 +81,6 @@ protected function getService(string $name): string return $this->mapper[$name]; } - /** - * Return an object from the instances pool. If it does not exist, create it - * - * @param string $name - * @param mixed ...$arguments - * - * @return object - * @throws Exception - */ - protected function getCachedInstance(string $name, mixed ...$arguments): object - { - if (true !== isset($this->instances[$name])) { - $definition = $this->getService($name); - $this->instances[$name] = new $definition(...$arguments); - } - - return $this->instances[$name]; - } - /** * Returns the services for the factory * diff --git a/tests/unit/Factory/FactoryTraitTest.php b/tests/unit/Factory/FactoryTraitTest.php index 5003895..909b254 100644 --- a/tests/unit/Factory/FactoryTraitTest.php +++ b/tests/unit/Factory/FactoryTraitTest.php @@ -26,44 +26,6 @@ */ final class FactoryTraitTest extends AbstractUnitTestCase { - /** - * Tests Phalcon\Traits\Arr\FactoryTrait :: newInstance() - * - * @return void - * - * @author Phalcon Team - * @since 2021-10-25 - */ - public function testFactoryFactoryTraitNewInstance(): void - { - $factory = new FactoryFixture(); - - $class = FactoryOneFixture::class; - $actual = $factory->newInstance('one'); - $this->assertInstanceOf($class, $actual); - } - - /** - * Tests Phalcon\Traits\Arr\FactoryTrait :: newInstance() with init - * - * @return void - * - * @author Phalcon Team - * @since 2021-10-25 - */ - public function testFactoryFactoryTraitNewInstanceWithInit(): void - { - $options = ['three' => FactoryThreeFixture::class]; - $factory = new FactoryFixture($options); - - $class = FactoryOneFixture::class; - $actual = $factory->newInstance('one'); - $this->assertInstanceOf($class, $actual); - - $class = FactoryThreeFixture::class; - $actual = $factory->newInstance('three'); - $this->assertInstanceOf($class, $actual); - } /** * Tests Phalcon\Traits\Arr\FactoryTrait :: newInstance() with init @@ -104,6 +66,22 @@ public function testFactoryFactoryTraitCachedInstance(): void $twoHash = spl_object_hash($two); $this->assertSame($oneHash, $twoHash); } + /** + * Tests Phalcon\Traits\Arr\FactoryTrait :: newInstance() + * + * @return void + * + * @author Phalcon Team + * @since 2021-10-25 + */ + public function testFactoryFactoryTraitNewInstance(): void + { + $factory = new FactoryFixture(); + + $class = FactoryOneFixture::class; + $actual = $factory->newInstance('one'); + $this->assertInstanceOf($class, $actual); + } /** * Tests Phalcon\Traits\Arr\FactoryTrait :: newInstance() - exception @@ -122,4 +100,26 @@ public function testFactoryFactoryTraitNewInstanceException(): void $factory->newInstance('unknown'); } + + /** + * Tests Phalcon\Traits\Arr\FactoryTrait :: newInstance() with init + * + * @return void + * + * @author Phalcon Team + * @since 2021-10-25 + */ + public function testFactoryFactoryTraitNewInstanceWithInit(): void + { + $options = ['three' => FactoryThreeFixture::class]; + $factory = new FactoryFixture($options); + + $class = FactoryOneFixture::class; + $actual = $factory->newInstance('one'); + $this->assertInstanceOf($class, $actual); + + $class = FactoryThreeFixture::class; + $actual = $factory->newInstance('three'); + $this->assertInstanceOf($class, $actual); + } } diff --git a/tests/unit/Helper/Arr/FilterTraitTest.php b/tests/unit/Helper/Arr/FilterTraitTest.php index cf7e99f..d6b8908 100644 --- a/tests/unit/Helper/Arr/FilterTraitTest.php +++ b/tests/unit/Helper/Arr/FilterTraitTest.php @@ -21,30 +21,6 @@ */ final class FilterTraitTest extends AbstractUnitTestCase { - /** - * Tests Phalcon\Traits\Arr\FilterTrait :: toFilter() - * - * @dataProvider getExamples - * - * @param array $source - * @param array $expected - * - * @return void - * - * @author Phalcon Team - * @since 2021-10-25 - */ - public function testHelperArrFilterTraitToFilter( - array $source, - array $expected, - ?callable $method - ): void { - $filter = new FilterFixture(); - - $actual = $filter->filter($source, $method); - - $this->assertEquals($expected, $actual); - } /** * @return array> @@ -105,4 +81,28 @@ function ($element) { ], ]; } + /** + * Tests Phalcon\Traits\Arr\FilterTrait :: toFilter() + * + * @dataProvider getExamples + * + * @param array $source + * @param array $expected + * + * @return void + * + * @author Phalcon Team + * @since 2021-10-25 + */ + public function testHelperArrFilterTraitToFilter( + array $source, + array $expected, + ?callable $method + ): void { + $filter = new FilterFixture(); + + $actual = $filter->filter($source, $method); + + $this->assertEquals($expected, $actual); + } } diff --git a/tests/unit/Helper/Json/DecodeTraitTest.php b/tests/unit/Helper/Json/DecodeTraitTest.php index 5b9258e..11920e1 100644 --- a/tests/unit/Helper/Json/DecodeTraitTest.php +++ b/tests/unit/Helper/Json/DecodeTraitTest.php @@ -35,35 +35,35 @@ public function testHelperJsonDecodeTrait(): void } /** - * Tests Support\Helper\Json\DecodeTrait - throws on failure + * Tests Support\Helper\Json\DecodeTrait - associative defaults to false * * @return void * * @author Phalcon Team * @since 2020-09-09 */ - public function testHelperJsonDecodeTraitThrowsException(): void + public function testHelperJsonDecodeTraitDefaultAssociative(): void { $object = new DecodeFixture(); - $this->expectException(JsonException::class); - - $object->decode('{"invalid": }'); + // associative defaults to false -> an object decodes to \stdClass + $this->assertEquals((object) ['a' => 1], $object->decodeDefault('{"a":1}')); } /** - * Tests Support\Helper\Json\DecodeTrait - associative defaults to false + * Tests Support\Helper\Json\DecodeTrait - throws on failure * * @return void * * @author Phalcon Team * @since 2020-09-09 */ - public function testHelperJsonDecodeTraitDefaultAssociative(): void + public function testHelperJsonDecodeTraitThrowsException(): void { $object = new DecodeFixture(); - // associative defaults to false -> an object decodes to \stdClass - $this->assertEquals((object) ['a' => 1], $object->decodeDefault('{"a":1}')); + $this->expectException(JsonException::class); + + $object->decode('{"invalid": }'); } } diff --git a/tests/unit/Helper/Json/EncodeTraitTest.php b/tests/unit/Helper/Json/EncodeTraitTest.php index e5fa9e0..16034ec 100644 --- a/tests/unit/Helper/Json/EncodeTraitTest.php +++ b/tests/unit/Helper/Json/EncodeTraitTest.php @@ -35,36 +35,36 @@ public function testHelperJsonEncodeTrait(): void } /** - * Tests Support\Helper\Json\EncodeTrait - throws on failure + * Tests Support\Helper\Json\EncodeTrait - default options (79) * * @return void * * @author Phalcon Team * @since 2020-09-09 */ - public function testHelperJsonEncodeTraitThrowsException(): void + public function testHelperJsonEncodeTraitDefaultOptions(): void { $object = new EncodeFixture(); - $this->expectException(JsonException::class); - - $object->encode("\xB1\x31"); + // 79 includes JSON_HEX_TAG so `<` is escaped as \\u003C, and no pretty-print + $this->assertSame('"\\u003C"', $object->encodeDefault('<')); + $this->assertSame('{"a":"b"}', $object->encodeDefault(['a' => 'b'])); } /** - * Tests Support\Helper\Json\EncodeTrait - default options (79) + * Tests Support\Helper\Json\EncodeTrait - throws on failure * * @return void * * @author Phalcon Team * @since 2020-09-09 */ - public function testHelperJsonEncodeTraitDefaultOptions(): void + public function testHelperJsonEncodeTraitThrowsException(): void { $object = new EncodeFixture(); - // 79 includes JSON_HEX_TAG so `<` is escaped as \\u003C, and no pretty-print - $this->assertSame('"\\u003C"', $object->encodeDefault('<')); - $this->assertSame('{"a":"b"}', $object->encodeDefault(['a' => 'b'])); + $this->expectException(JsonException::class); + + $object->encode("\xB1\x31"); } } diff --git a/tests/unit/Helper/Str/CamelizeTraitTest.php b/tests/unit/Helper/Str/CamelizeTraitTest.php index 2d7aeda..b00e49b 100644 --- a/tests/unit/Helper/Str/CamelizeTraitTest.php +++ b/tests/unit/Helper/Str/CamelizeTraitTest.php @@ -18,28 +18,6 @@ final class CamelizeTraitTest extends AbstractUnitTestCase { - /** - * Tests Str\CamelizeTrait - * - * @dataProvider getSources - * - * @return void - * - * @author Phalcon Team - * @since 2020-09-09 - */ - public function testHelperStrCamelize( - string $value, - string $expected, - ?string $delimiter, - bool $lowercase - ): void { - $object = new CamelizeFixture(); - $delimiter = $delimiter ?: '-_'; - - $actual = $object->camelize($value, $delimiter, $lowercase); - $this->assertSame($expected, $actual); - } /** * @return array> @@ -75,4 +53,26 @@ public static function getSources(): array ['customer-Session', 'customerSession', ' -_', true], ]; } + /** + * Tests Str\CamelizeTrait + * + * @dataProvider getSources + * + * @return void + * + * @author Phalcon Team + * @since 2020-09-09 + */ + public function testHelperStrCamelize( + string $value, + string $expected, + ?string $delimiter, + bool $lowercase + ): void { + $object = new CamelizeFixture(); + $delimiter = $delimiter ?: '-_'; + + $actual = $object->camelize($value, $delimiter, $lowercase); + $this->assertSame($expected, $actual); + } } diff --git a/tests/unit/Helper/Str/DirFromFileTraitTest.php b/tests/unit/Helper/Str/DirFromFileTraitTest.php index ded8341..8cbdb24 100644 --- a/tests/unit/Helper/Str/DirFromFileTraitTest.php +++ b/tests/unit/Helper/Str/DirFromFileTraitTest.php @@ -21,40 +21,6 @@ */ final class DirFromFileTraitTest extends AbstractUnitTestCase { - /** - * Tests Phalcon\Traits\Support\Helper\Str\DirFromFileTrait - * - * @dataProvider getExamples - * - * @return void - * - * @author Phalcon Team - * @since 2021-10-26 - */ - public function testHelperStrDirFromFileTrait( - string $fileName, - string $expected - ): void { - $object = new DirFromFileFixture(); - $actual = $object->dirFromFile($fileName); - $this->assertEquals($expected, $actual); - } - - /** - * Tests Phalcon\Traits\Support\Helper\Str\DirFromFileTrait - filesystemSafe - * - * @return void - * - * @author Phalcon Team - * @since 2021-10-26 - */ - public function testHelperStrDirFromFileTraitFilesystemSafe(): void - { - $object = new DirFromFileFixture(); - - // With filesystemSafe, dots in the computed segments become dashes - $this->assertEquals('ab/c-/de/', $object->dirFromFile('abc.defg.jpg', true)); - } /** * @return array> @@ -92,4 +58,38 @@ public static function getExamples(): array ], ]; } + /** + * Tests Phalcon\Traits\Support\Helper\Str\DirFromFileTrait + * + * @dataProvider getExamples + * + * @return void + * + * @author Phalcon Team + * @since 2021-10-26 + */ + public function testHelperStrDirFromFileTrait( + string $fileName, + string $expected + ): void { + $object = new DirFromFileFixture(); + $actual = $object->dirFromFile($fileName); + $this->assertEquals($expected, $actual); + } + + /** + * Tests Phalcon\Traits\Support\Helper\Str\DirFromFileTrait - filesystemSafe + * + * @return void + * + * @author Phalcon Team + * @since 2021-10-26 + */ + public function testHelperStrDirFromFileTraitFilesystemSafe(): void + { + $object = new DirFromFileFixture(); + + // With filesystemSafe, dots in the computed segments become dashes + $this->assertEquals('ab/c-/de/', $object->dirFromFile('abc.defg.jpg', true)); + } } diff --git a/tests/unit/Helper/Str/DirSeparatorTraitTest.php b/tests/unit/Helper/Str/DirSeparatorTraitTest.php index 999abaa..ee1dd9d 100644 --- a/tests/unit/Helper/Str/DirSeparatorTraitTest.php +++ b/tests/unit/Helper/Str/DirSeparatorTraitTest.php @@ -23,24 +23,6 @@ */ final class DirSeparatorTraitTest extends AbstractUnitTestCase { - /** - * Tests Phalcon\Traits\Str\DirFromFileTrait - * - * @dataProvider getExamples - * - * @return void - * - * @author Phalcon Team - * @since 2021-10-26 - */ - public function testHelperStrDirSeparatorTrait( - string $directory, - string $expected - ): void { - $object = new DirSeparatorFixture(); - $actual = $object->dirSeparator($directory); - $this->assertEquals($expected, $actual); - } /** * @return array> @@ -71,4 +53,22 @@ public static function getExamples(): array ], ]; } + /** + * Tests Phalcon\Traits\Str\DirFromFileTrait + * + * @dataProvider getExamples + * + * @return void + * + * @author Phalcon Team + * @since 2021-10-26 + */ + public function testHelperStrDirSeparatorTrait( + string $directory, + string $expected + ): void { + $object = new DirSeparatorFixture(); + $actual = $object->dirSeparator($directory); + $this->assertEquals($expected, $actual); + } } diff --git a/tests/unit/Helper/Str/EndsWithTraitTest.php b/tests/unit/Helper/Str/EndsWithTraitTest.php index 84efe94..d305516 100644 --- a/tests/unit/Helper/Str/EndsWithTraitTest.php +++ b/tests/unit/Helper/Str/EndsWithTraitTest.php @@ -21,26 +21,6 @@ */ final class EndsWithTraitTest extends AbstractUnitTestCase { - /** - * Tests Phalcon\Traits\Str\EndsWithTrait :: toEndsWith() - * - * @dataProvider getExamples - * - * @return void - * - * @author Phalcon Team - * @since 2021-10-26 - */ - public function testHelperStrEndsWithFilter( - string $haystack, - string $needle, - bool $insensitive, - bool $expected - ): void { - $object = new EndsWithFixture(); - $actual = $object->endsWith($haystack, $needle, $insensitive); - $this->assertEquals($expected, $actual); - } /** * @return array> @@ -124,4 +104,24 @@ public static function getExamples(): array ], ]; } + /** + * Tests Phalcon\Traits\Str\EndsWithTrait :: toEndsWith() + * + * @dataProvider getExamples + * + * @return void + * + * @author Phalcon Team + * @since 2021-10-26 + */ + public function testHelperStrEndsWithFilter( + string $haystack, + string $needle, + bool $insensitive, + bool $expected + ): void { + $object = new EndsWithFixture(); + $actual = $object->endsWith($haystack, $needle, $insensitive); + $this->assertEquals($expected, $actual); + } } diff --git a/tests/unit/Helper/Str/InterpolateTraitTest.php b/tests/unit/Helper/Str/InterpolateTraitTest.php index f0a81c4..67218c7 100644 --- a/tests/unit/Helper/Str/InterpolateTraitTest.php +++ b/tests/unit/Helper/Str/InterpolateTraitTest.php @@ -21,29 +21,6 @@ */ final class InterpolateTraitTest extends AbstractUnitTestCase { - /** - * Tests Phalcon\Traits\Str\InterpolateTrait :: toInterpolate() - * - * @dataProvider getExamples - * - * @param array $context - * - * @return void - * - * @author Phalcon Team - * @since 2021-10-26 - */ - public function testHelperStrInterpolateFilter( - string $expected, - string $format, - array $context, - string $left, - string $right - ): void { - $object = new InterpolateFixture(); - $actual = $object->interpolate($format, $context, $left, $right); - $this->assertEquals($expected, $actual); - } /** * @return array> @@ -117,4 +94,27 @@ public static function getExamples(): array ], ]; } + /** + * Tests Phalcon\Traits\Str\InterpolateTrait :: toInterpolate() + * + * @dataProvider getExamples + * + * @param array $context + * + * @return void + * + * @author Phalcon Team + * @since 2021-10-26 + */ + public function testHelperStrInterpolateFilter( + string $expected, + string $format, + array $context, + string $left, + string $right + ): void { + $object = new InterpolateFixture(); + $actual = $object->interpolate($format, $context, $left, $right); + $this->assertEquals($expected, $actual); + } } diff --git a/tests/unit/Helper/Str/LowerTraitTest.php b/tests/unit/Helper/Str/LowerTraitTest.php index 65a63de..c18a859 100644 --- a/tests/unit/Helper/Str/LowerTraitTest.php +++ b/tests/unit/Helper/Str/LowerTraitTest.php @@ -21,25 +21,6 @@ */ final class LowerTraitTest extends AbstractUnitTestCase { - /** - * Tests Phalcon\Traits\Str\LowerTrait :: toLower() - * - * @dataProvider getExamples - * - * @return void - * - * @author Phalcon Team - * @since 2021-10-26 - */ - public function testHelperStrLowerFilter( - string $text, - string $encoding, - string $expected - ): void { - $object = new LowerFixture(); - $actual = $object->lower($text, $encoding); - $this->assertEquals($expected, $actual); - } /** * @return array> @@ -124,4 +105,23 @@ public static function getExamples(): array ], ]; } + /** + * Tests Phalcon\Traits\Str\LowerTrait :: toLower() + * + * @dataProvider getExamples + * + * @return void + * + * @author Phalcon Team + * @since 2021-10-26 + */ + public function testHelperStrLowerFilter( + string $text, + string $encoding, + string $expected + ): void { + $object = new LowerFixture(); + $actual = $object->lower($text, $encoding); + $this->assertEquals($expected, $actual); + } } diff --git a/tests/unit/Helper/Str/StartsWithTraitTest.php b/tests/unit/Helper/Str/StartsWithTraitTest.php index dac3490..36b09be 100644 --- a/tests/unit/Helper/Str/StartsWithTraitTest.php +++ b/tests/unit/Helper/Str/StartsWithTraitTest.php @@ -21,26 +21,6 @@ */ final class StartsWithTraitTest extends AbstractUnitTestCase { - /** - * Tests Phalcon\Traits\Str\StartsWithTrait :: toStartsWith() - * - * @dataProvider getExamples - * - * @return void - * - * @author Phalcon Team - * @since 2021-10-26 - */ - public function testHelperStrStartsWithFilter( - string $haystack, - string $needle, - bool $insensitive, - bool $expected - ): void { - $object = new StartsWithFixture(); - $actual = $object->startsWith($haystack, $needle, $insensitive); - $this->assertEquals($expected, $actual); - } /** * @return array> @@ -124,4 +104,24 @@ public static function getExamples(): array ], ]; } + /** + * Tests Phalcon\Traits\Str\StartsWithTrait :: toStartsWith() + * + * @dataProvider getExamples + * + * @return void + * + * @author Phalcon Team + * @since 2021-10-26 + */ + public function testHelperStrStartsWithFilter( + string $haystack, + string $needle, + bool $insensitive, + bool $expected + ): void { + $object = new StartsWithFixture(); + $actual = $object->startsWith($haystack, $needle, $insensitive); + $this->assertEquals($expected, $actual); + } } diff --git a/tests/unit/Helper/Str/UncamelizeTraitTest.php b/tests/unit/Helper/Str/UncamelizeTraitTest.php index 626a781..3aae2eb 100644 --- a/tests/unit/Helper/Str/UncamelizeTraitTest.php +++ b/tests/unit/Helper/Str/UncamelizeTraitTest.php @@ -21,24 +21,6 @@ */ final class UncamelizeTraitTest extends AbstractUnitTestCase { - /** - * Tests Str\CamelizeTrait - * - * @dataProvider getSources - * - * @author Phalcon Team - * @since 2020-09-09 - */ - public function testHelperStrUncamelize( - string $value, - string $expected, - string $delimiter - ): void { - $object = new UncamelizeFixture(); - $actual = $object->uncamelize($value, $delimiter); - - $this->assertSame($expected, $actual); - } /** * @return array> @@ -67,4 +49,22 @@ public static function getSources(): array ["A\0B", 'a', '_'], ]; } + /** + * Tests Str\CamelizeTrait + * + * @dataProvider getSources + * + * @author Phalcon Team + * @since 2020-09-09 + */ + public function testHelperStrUncamelize( + string $value, + string $expected, + string $delimiter + ): void { + $object = new UncamelizeFixture(); + $actual = $object->uncamelize($value, $delimiter); + + $this->assertSame($expected, $actual); + } } diff --git a/tests/unit/Helper/Str/UpperTraitTest.php b/tests/unit/Helper/Str/UpperTraitTest.php index 794e3c9..48bbe95 100644 --- a/tests/unit/Helper/Str/UpperTraitTest.php +++ b/tests/unit/Helper/Str/UpperTraitTest.php @@ -21,25 +21,6 @@ */ final class UpperTraitTest extends AbstractUnitTestCase { - /** - * Tests Phalcon\Traits\Str\UpperTrait :: toUpper() - * - * @dataProvider getExamples - * - * @return void - * - * @author Phalcon Team - * @since 2021-10-26 - */ - public function testHelperStrUpperFilter( - string $text, - string $encoding, - string $expected - ): void { - $object = new UpperFixture(); - $actual = $object->upper($text, $encoding); - $this->assertEquals($expected, $actual); - } /** * @return array> @@ -124,4 +105,23 @@ public static function getExamples(): array ], ]; } + /** + * Tests Phalcon\Traits\Str\UpperTrait :: toUpper() + * + * @dataProvider getExamples + * + * @return void + * + * @author Phalcon Team + * @since 2021-10-26 + */ + public function testHelperStrUpperFilter( + string $text, + string $encoding, + string $expected + ): void { + $object = new UpperFixture(); + $actual = $object->upper($text, $encoding); + $this->assertEquals($expected, $actual); + } } From 1aa16feef0374ae5eaab88538ab2628990895353 Mon Sep 17 00:00:00 2001 From: Nikolaos Dimopoulos Date: Fri, 10 Jul 2026 13:53:25 -0500 Subject: [PATCH 9/9] more phpcs --- tests/unit/Factory/FactoryTraitTest.php | 1 - tests/unit/Helper/Arr/FilterTraitTest.php | 1 - tests/unit/Helper/Str/CamelizeTraitTest.php | 1 - tests/unit/Helper/Str/DirFromFileTraitTest.php | 1 - tests/unit/Helper/Str/DirSeparatorTraitTest.php | 1 - tests/unit/Helper/Str/EndsWithTraitTest.php | 1 - tests/unit/Helper/Str/InterpolateTraitTest.php | 1 - tests/unit/Helper/Str/LowerTraitTest.php | 1 - tests/unit/Helper/Str/StartsWithTraitTest.php | 1 - tests/unit/Helper/Str/UncamelizeTraitTest.php | 1 - tests/unit/Helper/Str/UpperTraitTest.php | 1 - 11 files changed, 11 deletions(-) diff --git a/tests/unit/Factory/FactoryTraitTest.php b/tests/unit/Factory/FactoryTraitTest.php index 909b254..0eca634 100644 --- a/tests/unit/Factory/FactoryTraitTest.php +++ b/tests/unit/Factory/FactoryTraitTest.php @@ -26,7 +26,6 @@ */ final class FactoryTraitTest extends AbstractUnitTestCase { - /** * Tests Phalcon\Traits\Arr\FactoryTrait :: newInstance() with init * diff --git a/tests/unit/Helper/Arr/FilterTraitTest.php b/tests/unit/Helper/Arr/FilterTraitTest.php index d6b8908..51f3802 100644 --- a/tests/unit/Helper/Arr/FilterTraitTest.php +++ b/tests/unit/Helper/Arr/FilterTraitTest.php @@ -21,7 +21,6 @@ */ final class FilterTraitTest extends AbstractUnitTestCase { - /** * @return array> */ diff --git a/tests/unit/Helper/Str/CamelizeTraitTest.php b/tests/unit/Helper/Str/CamelizeTraitTest.php index b00e49b..8df1a68 100644 --- a/tests/unit/Helper/Str/CamelizeTraitTest.php +++ b/tests/unit/Helper/Str/CamelizeTraitTest.php @@ -18,7 +18,6 @@ final class CamelizeTraitTest extends AbstractUnitTestCase { - /** * @return array> */ diff --git a/tests/unit/Helper/Str/DirFromFileTraitTest.php b/tests/unit/Helper/Str/DirFromFileTraitTest.php index 8cbdb24..3465454 100644 --- a/tests/unit/Helper/Str/DirFromFileTraitTest.php +++ b/tests/unit/Helper/Str/DirFromFileTraitTest.php @@ -21,7 +21,6 @@ */ final class DirFromFileTraitTest extends AbstractUnitTestCase { - /** * @return array> */ diff --git a/tests/unit/Helper/Str/DirSeparatorTraitTest.php b/tests/unit/Helper/Str/DirSeparatorTraitTest.php index ee1dd9d..a3e5f08 100644 --- a/tests/unit/Helper/Str/DirSeparatorTraitTest.php +++ b/tests/unit/Helper/Str/DirSeparatorTraitTest.php @@ -23,7 +23,6 @@ */ final class DirSeparatorTraitTest extends AbstractUnitTestCase { - /** * @return array> */ diff --git a/tests/unit/Helper/Str/EndsWithTraitTest.php b/tests/unit/Helper/Str/EndsWithTraitTest.php index d305516..0df6508 100644 --- a/tests/unit/Helper/Str/EndsWithTraitTest.php +++ b/tests/unit/Helper/Str/EndsWithTraitTest.php @@ -21,7 +21,6 @@ */ final class EndsWithTraitTest extends AbstractUnitTestCase { - /** * @return array> */ diff --git a/tests/unit/Helper/Str/InterpolateTraitTest.php b/tests/unit/Helper/Str/InterpolateTraitTest.php index 67218c7..2e735f6 100644 --- a/tests/unit/Helper/Str/InterpolateTraitTest.php +++ b/tests/unit/Helper/Str/InterpolateTraitTest.php @@ -21,7 +21,6 @@ */ final class InterpolateTraitTest extends AbstractUnitTestCase { - /** * @return array> */ diff --git a/tests/unit/Helper/Str/LowerTraitTest.php b/tests/unit/Helper/Str/LowerTraitTest.php index c18a859..d56dfec 100644 --- a/tests/unit/Helper/Str/LowerTraitTest.php +++ b/tests/unit/Helper/Str/LowerTraitTest.php @@ -21,7 +21,6 @@ */ final class LowerTraitTest extends AbstractUnitTestCase { - /** * @return array> */ diff --git a/tests/unit/Helper/Str/StartsWithTraitTest.php b/tests/unit/Helper/Str/StartsWithTraitTest.php index 36b09be..edb92ed 100644 --- a/tests/unit/Helper/Str/StartsWithTraitTest.php +++ b/tests/unit/Helper/Str/StartsWithTraitTest.php @@ -21,7 +21,6 @@ */ final class StartsWithTraitTest extends AbstractUnitTestCase { - /** * @return array> */ diff --git a/tests/unit/Helper/Str/UncamelizeTraitTest.php b/tests/unit/Helper/Str/UncamelizeTraitTest.php index 3aae2eb..e7eea04 100644 --- a/tests/unit/Helper/Str/UncamelizeTraitTest.php +++ b/tests/unit/Helper/Str/UncamelizeTraitTest.php @@ -21,7 +21,6 @@ */ final class UncamelizeTraitTest extends AbstractUnitTestCase { - /** * @return array> */ diff --git a/tests/unit/Helper/Str/UpperTraitTest.php b/tests/unit/Helper/Str/UpperTraitTest.php index 48bbe95..8d92aac 100644 --- a/tests/unit/Helper/Str/UpperTraitTest.php +++ b/tests/unit/Helper/Str/UpperTraitTest.php @@ -21,7 +21,6 @@ */ final class UpperTraitTest extends AbstractUnitTestCase { - /** * @return array> */