diff --git a/.editorconfig b/.editorconfig index 15d6bad..87b5178 100644 --- a/.editorconfig +++ b/.editorconfig @@ -14,5 +14,13 @@ trim_trailing_whitespace = true end_of_line = crlf [*.yml] -indent_style = space indent_size = 2 + +[*.twig] +insert_final_newline = false + +[*.neon] +indent_style = tab + +[Makefile] +indent_style = tab diff --git a/.gitattributes b/.gitattributes index e16b4b4..1ebf0b2 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,25 +1,6 @@ # Define the line ending behavior of the different file extensions -# Set default behaviour, in case users don't have core.autocrlf set. -* text=auto -* text eol=lf - -# Explicitly declare text files we want to always be normalized and converted -# to native line endings on checkout. -*.php text -*.default text -*.ctp text -*.sql text -*.md text -*.po text -*.js text -*.css text -*.ini text -*.properties text -*.txt text -*.xml text -*.svg text -*.yml text -.htaccess text +# Set default behavior, in case users don't have core.autocrlf set. +* text text=auto eol=lf # Declare files that will always have CRLF line endings on checkout. *.bat eol=crlf @@ -30,13 +11,26 @@ # Denote all files that are truly binary and should not be modified. *.png binary *.jpg binary +*.jpeg binary *.gif binary +*.webp binary +*.avif binary *.ico binary *.mo binary *.pdf binary +*.xls binary +*.xlsx binary *.phar binary *.woff binary *.woff2 binary +*.ttc binary *.ttf binary *.otf binary *.eot binary +*.gz binary +*.bz2 binary +*.7z binary +*.zip binary +*.webm binary +*.mp4 binary +*.ogv binary diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 05ca9eb..aae4cbd 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,3 +1,5 @@ + diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..6647c42 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,12 @@ +version: 2 +updates: +- package-ecosystem: composer + directory: "/" + schedule: + interval: weekly + open-pull-requests-limit: 10 +- package-ecosystem: github-actions + directory: "/" + schedule: + interval: weekly + open-pull-requests-limit: 10 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..7191ab2 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,81 @@ +name: CI + +on: + push: + branches: + - 'master' + pull_request: + branches: + - '*' + workflow_dispatch: + +permissions: + contents: read + +jobs: + testsuite: + runs-on: ubuntu-24.04 + strategy: + fail-fast: false + matrix: + include: + - php-version: '8.2' + dependencies: 'highest' + - php-version: '8.3' + dependencies: 'highest' + - php-version: '8.4' + dependencies: 'highest' + - php-version: '8.5' + dependencies: 'highest' + + steps: + - uses: actions/checkout@v7 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-version }} + extensions: mbstring, intl, pdo_sqlite + ini-values: zend.assertions=1 + coverage: none + + - name: Composer install + uses: ramsey/composer-install@v4 + with: + dependency-versions: ${{ matrix.dependencies }} + composer-options: ${{ matrix.composer-options }} + + - name: Composer post install + run: composer run-script post-install-cmd --no-interaction + + - name: Run PHPUnit + run: vendor/bin/phpunit + env: + DATABASE_TEST_URL: sqlite://./testdb.sqlite + + coding-standard: + name: Coding Standard & Static Analysis + runs-on: ubuntu-24.04 + + steps: + - uses: actions/checkout@v7 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: '8.5' + extensions: mbstring, intl + coverage: none + tools: cs2pr + + - name: Composer install + uses: ramsey/composer-install@v4 + + - name: Run PHP CodeSniffer + run: vendor/bin/phpcs --report=checkstyle | cs2pr + + - name: Run phpstan + if: always() + run: vendor/bin/phpstan analyse --no-progress + env: + SECURITY_SALT: f76f1c8475585c46c6acd3ddcb8f5e0f15de524637bb4080a08c4afe7cfc9144 diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml new file mode 100644 index 0000000..b450d4b --- /dev/null +++ b/.github/workflows/stale.yml @@ -0,0 +1,29 @@ +name: Mark stale issues and pull requests + +on: + schedule: + - cron: "0 0 * * *" + +permissions: + contents: read + +jobs: + stale: + + permissions: + issues: write # for actions/stale to close stale issues + pull-requests: write # for actions/stale to close stale PRs + runs-on: ubuntu-latest + + steps: + - uses: actions/stale@v10 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + stale-issue-message: 'This issue is stale because it has been open for 120 days with no activity. Remove the `stale` label or comment or this will be closed in 15 days' + stale-pr-message: 'This pull request is stale because it has been open 30 days with no activity. Remove the `stale` label or comment on this issue, or it will be closed in 15 days' + stale-issue-label: 'stale' + stale-pr-label: 'stale' + days-before-stale: 120 + days-before-close: 15 + exempt-issue-labels: 'pinned' + exempt-pr-labels: 'pinned' diff --git a/.gitignore b/.gitignore index 8ee26cc..985465c 100644 --- a/.gitignore +++ b/.gitignore @@ -36,3 +36,4 @@ nbproject/* # NetBeans config/Migrations/schema-dump-default.lock database cms-tutorial-database.sqlite +/.phpunit.cache/ diff --git a/.htaccess b/.htaccess index bc1dd9c..54b08e8 100644 --- a/.htaccess +++ b/.htaccess @@ -6,6 +6,7 @@ RewriteEngine on + RewriteRule ^(\.well-known/.*)$ $1 [L] RewriteRule ^$ webroot/ [L] RewriteRule (.*) webroot/$1 [L] diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index befdb98..0000000 --- a/.travis.yml +++ /dev/null @@ -1,30 +0,0 @@ -language: php - -dist: trusty - -sudo: false - -php: - - 5.6 - - 7.0 - - 7.1 - -matrix: - fast_finish: true - - include: - - php: 7.0 - env: PHPCS=1 - -before_script: - - if [[ $PHPCS = 1 ]]; then composer require cakephp/cakephp-codesniffer:~2.1; fi - - if [[ $PHPCS != 1 ]]; then composer install; fi - - if [[ $PHPCS != 1 ]]; then composer require phpunit/phpunit:"^5.7|^6.0"; fi - - if [[ $PHPCS != 1 ]]; then composer run-script post-install-cmd --no-interaction; fi - -script: - - if [[ $PHPCS != 1 ]]; then vendor/bin/phpunit; fi - - if [[ $PHPCS = 1 ]]; then vendor/bin/phpcs -p --extensions=php --standard=vendor/cakephp/cakephp-codesniffer/CakePHP ./src ./tests ./config ./webroot; fi - -notifications: - email: false diff --git a/README.md b/README.md index ed542a3..bb7d8ea 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,11 @@ The completed CMS tutorial application created during https://book.cakephp.org/5/en/tutorials-and-examples/cms/installation.html +## Requirements + +* PHP 8.2 or higher (tested on 8.2, 8.3, 8.4 and 8.5), with the `intl`, `mbstring` and `pdo_sqlite` extensions. +* [Composer](https://getcomposer.org/doc/00-intro.md). + ## Installation 1. Download [Composer](https://getcomposer.org/doc/00-intro.md) or update `composer self-update`. @@ -14,6 +19,9 @@ cd cms-tutorial composer install ``` +Composer also runs the installer, which creates `config/app_local.php` from `config/app_local.example.php` +and sets the `Security.salt` value. + ## Configuration You can use the default configuration, using a sqlite3 file based database. In that case, no configuration @@ -36,5 +44,27 @@ bin/cake server Then point your browser to http://localhost:8765 -You will be redirected to the `/users/login` page. This is the behavior we configured to request a valid -username and password. The CMS Tutorial user Authentication and Authorization to identify the users. +You will see the list of articles. Adding or editing articles requires a logged in user, so you will be +redirected to the `/users/login` page, where you can also sign up. The CMS Tutorial uses Authentication and +Authorization to identify the users and to decide what they can do. + +## Production + +Set the `APP_FULL_BASE_URL` environment variable (for example `APP_FULL_BASE_URL=https://example.com`) +or `App.fullBaseUrl` in `config/app_local.php`. With `debug` off, the `HostHeaderMiddleware` rejects the +requests whose `Host` header does not match it, to prevent Host header injection. + +## Permissions + +* Anyone can read the articles and the tags, and sign up as a user. +* Logged in users can add articles, and edit or delete their own articles. +* Logged in users can add and edit tags, but nobody can delete them. +* Users can only see, edit or delete their own user. + +## Running the tests and the code checks + +```bash +composer test # phpunit +composer cs-check # phpcs, CakePHP coding standard +composer stan # phpstan +``` diff --git a/bin/bash_completion.sh b/bin/bash_completion.sh new file mode 100644 index 0000000..319059e --- /dev/null +++ b/bin/bash_completion.sh @@ -0,0 +1,47 @@ +# +# Bash completion file for CakePHP console. +# Copy this file to a file named `cake` under `/etc/bash_completion.d/`. +# For more info check https://book.cakephp.org/5/en/console-commands/completion.html#how-to-enable-bash-autocompletion-for-the-cakephp-console +# + +_cake() +{ + local cur prev opts cake + COMPREPLY=() + cake="${COMP_WORDS[0]}" + cur="${COMP_WORDS[COMP_CWORD]}" + prev="${COMP_WORDS[COMP_CWORD-1]}" + + if [[ "$cur" == -* ]] ; then + if [[ ${COMP_CWORD} = 1 ]] ; then + opts=$(${cake} completion options) + elif [[ ${COMP_CWORD} = 2 ]] ; then + opts=$(${cake} completion options "${COMP_WORDS[1]}") + else + opts=$(${cake} completion options "${COMP_WORDS[1]}" "${COMP_WORDS[2]}") + fi + + COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) + return 0 + fi + + if [[ ${COMP_CWORD} = 1 ]] ; then + opts=$(${cake} completion commands) + COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) + return 0 + fi + + if [[ ${COMP_CWORD} = 2 ]] ; then + opts=$(${cake} completion subcommands $prev) + COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) + if [[ $COMPREPLY = "" ]] ; then + _filedir + return 0 + fi + return 0 + fi + + return 0 +} + +complete -F _cake cake bin/cake diff --git a/bin/cake b/bin/cake index 2547a4f..4b696c8 100755 --- a/bin/cake +++ b/bin/cake @@ -19,28 +19,57 @@ # Canonicalize by following every symlink of the given name recursively canonicalize() { - NAME="$1" - if [ -f "$NAME" ] - then - DIR=$(dirname -- "$NAME") - NAME=$(cd -P "$DIR" > /dev/null && pwd -P)/$(basename -- "$NAME") - fi - while [ -h "$NAME" ]; do - DIR=$(dirname -- "$NAME") - SYM=$(readlink "$NAME") - NAME=$(cd "$DIR" > /dev/null && cd $(dirname -- "$SYM") > /dev/null && pwd)/$(basename -- "$SYM") - done - echo "$NAME" + NAME="$1" + if [ -f "$NAME" ] + then + DIR=$(dirname -- "$NAME") + NAME=$(cd -P "$DIR" > /dev/null && pwd -P)/$(basename -- "$NAME") + fi + while [ -h "$NAME" ]; do + DIR=$(dirname -- "$NAME") + SYM=$(readlink "$NAME") + NAME=$(cd "$DIR" > /dev/null && cd "$(dirname -- "$SYM")" > /dev/null && pwd)/$(basename -- "$SYM") + done + echo "$NAME" } -CONSOLE=$(dirname -- "$(canonicalize "$0")") +# Find a CLI version of PHP +findCliPhp() { + for TESTEXEC in php php-cli /usr/local/bin/php + do + SAPI=$(echo "" | $TESTEXEC 2>/dev/null) + if [ "$SAPI" = "cli" ] + then + echo $TESTEXEC + return + fi + done + echo "Failed to find a CLI version of PHP; falling back to system standard php executable" >&2 + echo "php"; +} + +# If current path is a symlink, resolve to real path +realname="$0" +if [ -L "$realname" ] +then + realname=$(readlink -f "$0") +fi + +CONSOLE=$(dirname -- "$(canonicalize "$realname")") APP=$(dirname "$CONSOLE") -if [ $(basename $0) != 'cake' ] +# If your CLI PHP is somewhere that this doesn't find, you can define a PHP environment +# variable with the correct path in it. +if [ -z "$PHP" ] +then + PHP=$(findCliPhp) +fi + +if [ "$(basename "$realname")" != 'cake' ] then - exec php "$CONSOLE"/cake.php $(basename $0) "$@" + exec "$PHP" "$CONSOLE"/cake.php "$(basename "$realname")" "$@" else - exec php "$CONSOLE"/cake.php "$@" + exec "$PHP" "$CONSOLE"/cake.php "$@" fi exit diff --git a/bin/cake.php b/bin/cake.php index 320ee36..aab8d9f 100644 --- a/bin/cake.php +++ b/bin/cake.php @@ -1,7 +1,5 @@ #!/usr/bin/php -q =8.1", - "cakephp/cakephp": "^5.0", - "cakephp/migrations": "~4.0", - "cakephp/authorization": "~3.0", - "cakephp/authentication": "~3.0", - "cakephp/plugin-installer": "~2.0", - "josegonzalez/dotenv": "2.*" + "php": ">=8.2", + "cakephp/authentication": "^4.2", + "cakephp/authorization": "^3.5", + "cakephp/cakephp": "5.4.*", + "cakephp/migrations": "^5.2", + "cakephp/plugin-installer": "^2.0", + "mobiledetect/mobiledetectlib": "^4.8.03" }, "require-dev": { - "psy/psysh": "@stable", - "cakephp/debug_kit": "^5.0", - "cakephp/bake": "^3.0", + "cakephp/bake": "^3.6", + "cakephp/cakephp-codesniffer": "^5.3", + "cakephp/debug_kit": "^5.2", "cakephp/repl": "^2.0", - "cakephp/cakephp-codesniffer": "^5.0" + "josegonzalez/dotenv": "^4.0", + "phpstan/phpstan": "^2.1", + "phpunit/phpunit": "^11.5.3 || ^12.1.3 || ^13.0" }, "suggest": { - "markstory/asset_compress": "An asset compression plugin which provides file concatenation and a flexible filter system for preprocessing and minification.", - "dereuromark/cakephp-ide-helper": "After baking your code, this keeps your annotations in sync with the code evolving from there on for maximum IDE and PHPStan compatibility.", - "phpunit/phpunit": "Allows automated tests to be run without system-wide install.", - "cakephp/cakephp-codesniffer": "Allows to check the code against the coding standards used in CakePHP." + "dereuromark/cakephp-ide-helper": "After baking your code, this keeps your annotations in sync with the code evolving from there on for maximum IDE and PHPStan/Psalm compatibility.", + "markstory/asset_compress": "An asset compression plugin which provides file concatenation and a flexible filter system for preprocessing and minification." }, "autoload": { "psr-4": { - "App\\": "src" + "App\\": "src/" } }, "autoload-dev": { "psr-4": { - "App\\Test\\": "tests", - "Cake\\Test\\": "./vendor/cakephp/cakephp/tests" + "App\\Test\\": "tests/", + "Cake\\Test\\": "vendor/cakephp/cakephp/tests/" } }, "scripts": { "post-install-cmd": "App\\Console\\Installer::postInstall", + "post-update-cmd": "App\\Console\\Installer::postInstall", "post-create-project-cmd": "App\\Console\\Installer::postInstall", "check": [ "@test", "@cs-check" ], - "cs-check": "phpcs --colors -p --standard=vendor/cakephp/cakephp-codesniffer/CakePHP src/ tests/", - "cs-fix": "phpcbf --colors --standard=vendor/cakephp/cakephp-codesniffer/CakePHP src/ tests/", - "stan": "phpstan analyse src/", + "cs-check": "phpcs --colors -p", + "cs-fix": "phpcbf --colors -p", + "stan": "phpstan", "test": "phpunit --colors=always" }, - "minimum-stability": "dev", - "prefer-stable": true, "config": { "allow-plugins": { "dealerdirect/phpcodesniffer-composer-installer": true, "cakephp/plugin-installer": true - } + }, + "platform-check": true, + "sort-packages": true } } diff --git a/composer.lock b/composer.lock deleted file mode 100644 index 505897c..0000000 --- a/composer.lock +++ /dev/null @@ -1,4706 +0,0 @@ -{ - "_readme": [ - "This file locks the dependencies of your project to a known state", - "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", - "This file is @generated automatically" - ], - "content-hash": "1193ec68cd6b5f31b43867d8c03e908b", - "packages": [ - { - "name": "cakephp/authentication", - "version": "3.3.2", - "source": { - "type": "git", - "url": "https://github.com/cakephp/authentication.git", - "reference": "76e859261832866884b8b8d78dc14e6d22fb3451" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/cakephp/authentication/zipball/76e859261832866884b8b8d78dc14e6d22fb3451", - "reference": "76e859261832866884b8b8d78dc14e6d22fb3451", - "shasum": "" - }, - "require": { - "cakephp/http": "^5.0", - "laminas/laminas-diactoros": "^3.0", - "php": ">=8.1", - "psr/http-client": "^1.0", - "psr/http-message": "^1.1 || ^2.0", - "psr/http-server-handler": "^1.0", - "psr/http-server-middleware": "^1.0" - }, - "require-dev": { - "cakephp/cakephp": "^5.1.0", - "cakephp/cakephp-codesniffer": "^5.0", - "firebase/php-jwt": "^6.2", - "phpunit/phpunit": "^10.5.5 || ^11.1.3 || ^12.0.9" - }, - "suggest": { - "cakephp/cakephp": "Install full core to use \"CookieAuthenticator\".", - "cakephp/orm": "To use \"OrmResolver\" (Not needed separately if using full CakePHP framework).", - "cakephp/utility": "Provides CakePHP security methods. Required for the JWT adapter and Legacy password hasher.", - "ext-ldap": "Make sure this php extension is installed and enabled on your system if you want to use the built-in LDAP adapter for \"LdapIdentifier\".", - "firebase/php-jwt": "If you want to use the JWT adapter add this dependency" - }, - "type": "cakephp-plugin", - "autoload": { - "psr-4": { - "Authentication\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "CakePHP Community", - "homepage": "https://github.com/cakephp/authentication/graphs/contributors" - } - ], - "description": "Authentication plugin for CakePHP", - "homepage": "https://cakephp.org", - "keywords": [ - "Authentication", - "auth", - "cakephp", - "middleware" - ], - "support": { - "docs": "https://book.cakephp.org/authentication/3/en/", - "forum": "https://discourse.cakephp.org/", - "issues": "https://github.com/cakephp/authentication/issues", - "source": "https://github.com/cakephp/authentication" - }, - "time": "2025-07-30T20:38:32+00:00" - }, - { - "name": "cakephp/authorization", - "version": "3.4.2", - "source": { - "type": "git", - "url": "https://github.com/cakephp/authorization.git", - "reference": "6395003b7ff3928d58ad91e55d23031499a329f0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/cakephp/authorization/zipball/6395003b7ff3928d58ad91e55d23031499a329f0", - "reference": "6395003b7ff3928d58ad91e55d23031499a329f0", - "shasum": "" - }, - "require": { - "cakephp/http": "^5.1", - "php": ">=8.1", - "psr/http-client": "^1.0", - "psr/http-message": "^1.1 || ^2.0", - "psr/http-server-handler": "^1.0", - "psr/http-server-middleware": "^1.0" - }, - "require-dev": { - "cakephp/authentication": "^3.0", - "cakephp/bake": "^3.2", - "cakephp/cakephp": "^5.1", - "cakephp/cakephp-codesniffer": "^5.1", - "phpunit/phpunit": "^10.5.5 || ^11.1.3" - }, - "suggest": { - "cakephp/http": "To use \"RequestPolicyInterface\" (Not needed separately if using full CakePHP framework).", - "cakephp/orm": "To use \"OrmResolver\" (Not needed separately if using full CakePHP framework)." - }, - "type": "cakephp-plugin", - "autoload": { - "psr-4": { - "Authorization\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "CakePHP Community", - "homepage": "https://github.com/cakephp/authorization/graphs/contributors" - } - ], - "description": "Authorization abstraction layer plugin for CakePHP", - "keywords": [ - "access", - "auth", - "authorization", - "cakephp" - ], - "support": { - "docs": "https://cakephp.org/authorization/2/en/", - "forum": "https://stackoverflow.com/tags/cakephp", - "irc": "irc://irc.freenode.org/cakephp", - "issues": "https://github.com/cakephp/authorization/issues", - "source": "https://github.com/cakephp/authorization" - }, - "time": "2025-07-29T14:41:00+00:00" - }, - { - "name": "cakephp/cakephp", - "version": "5.2.9", - "source": { - "type": "git", - "url": "https://github.com/cakephp/cakephp.git", - "reference": "12d41e43f945c1cb38ef3d983a9d87f9b13c041f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/cakephp/cakephp/zipball/12d41e43f945c1cb38ef3d983a9d87f9b13c041f", - "reference": "12d41e43f945c1cb38ef3d983a9d87f9b13c041f", - "shasum": "" - }, - "require": { - "cakephp/chronos": "^3.1", - "composer/ca-bundle": "^1.5", - "ext-intl": "*", - "ext-json": "*", - "ext-mbstring": "*", - "laminas/laminas-diactoros": "^3.3", - "laminas/laminas-httphandlerrunner": "^2.6", - "league/container": "^4.2", - "php": ">=8.1", - "psr/container": "^1.1 || ^2.0", - "psr/http-client": "^1.0.2", - "psr/http-factory": "^1.1", - "psr/http-message": "^1.1 || ^2.0", - "psr/http-server-handler": "^1.0.2", - "psr/http-server-middleware": "^1.0.2", - "psr/log": "^3.0", - "psr/simple-cache": "^2.0 || ^3.0" - }, - "provide": { - "psr/container-implementation": "^2.0", - "psr/http-client-implementation": "^1.0", - "psr/http-factory-implementation": "^1.0", - "psr/http-server-handler-implementation": "^1.0", - "psr/http-server-middleware-implementation": "^1.0", - "psr/log-implementation": "^3.0", - "psr/simple-cache-implementation": "^3.0" - }, - "replace": { - "cakephp/cache": "self.version", - "cakephp/collection": "self.version", - "cakephp/console": "self.version", - "cakephp/core": "self.version", - "cakephp/database": "self.version", - "cakephp/datasource": "self.version", - "cakephp/event": "self.version", - "cakephp/form": "self.version", - "cakephp/http": "self.version", - "cakephp/i18n": "self.version", - "cakephp/log": "self.version", - "cakephp/orm": "self.version", - "cakephp/utility": "self.version", - "cakephp/validation": "self.version" - }, - "require-dev": { - "cakephp/cakephp-codesniffer": "^5.3", - "http-interop/http-factory-tests": "dev-main", - "mikey179/vfsstream": "^1.6.10", - "mockery/mockery": "^1.6", - "paragonie/csp-builder": "^2.3 || ^3.0", - "phpunit/phpunit": "^10.5.5 || ^11.1.3 || ^12.0.9" - }, - "suggest": { - "ext-curl": "To enable more efficient network calls in Http\\Client.", - "ext-openssl": "To use Security::encrypt() or have secure CSRF token generation.", - "paragonie/csp-builder": "CSP builder, to use the CSP Middleware" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-5.next": "5.2.x-dev" - } - }, - "autoload": { - "files": [ - "src/Core/functions.php", - "src/Error/functions.php", - "src/Collection/functions.php", - "src/I18n/functions.php", - "src/ORM/bootstrap.php", - "src/Routing/functions.php", - "src/Utility/bootstrap.php" - ], - "psr-4": { - "Cake\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "CakePHP Community", - "homepage": "https://github.com/cakephp/cakephp/graphs/contributors" - } - ], - "description": "The CakePHP framework", - "homepage": "https://cakephp.org", - "keywords": [ - "conventions over configuration", - "dry", - "form", - "framework", - "mvc", - "orm", - "psr-7", - "rapid-development", - "validation" - ], - "support": { - "forum": "https://discourse.cakephp.org/", - "issues": "https://github.com/cakephp/cakephp/issues", - "source": "https://github.com/cakephp/cakephp" - }, - "time": "2025-10-17T03:14:02+00:00" - }, - { - "name": "cakephp/chronos", - "version": "3.3.0", - "source": { - "type": "git", - "url": "https://github.com/cakephp/chronos.git", - "reference": "7d9af08f3ef777b88c2dba44f059382e2b389435" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/cakephp/chronos/zipball/7d9af08f3ef777b88c2dba44f059382e2b389435", - "reference": "7d9af08f3ef777b88c2dba44f059382e2b389435", - "shasum": "" - }, - "require": { - "php": ">=8.1", - "psr/clock": "^1.0" - }, - "provide": { - "psr/clock-implementation": "1.0" - }, - "require-dev": { - "cakephp/cakephp-codesniffer": "^5.0", - "phpunit/phpunit": "^10.5.58 || ^11.1.3" - }, - "type": "library", - "autoload": { - "psr-4": { - "Cake\\Chronos\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Brian Nesbitt", - "email": "brian@nesbot.com", - "homepage": "http://nesbot.com" - }, - { - "name": "The CakePHP Team", - "homepage": "https://cakephp.org" - } - ], - "description": "A simple API extension for DateTime.", - "homepage": "https://cakephp.org", - "keywords": [ - "date", - "datetime", - "time" - ], - "support": { - "issues": "https://github.com/cakephp/chronos/issues", - "source": "https://github.com/cakephp/chronos" - }, - "time": "2025-10-27T16:57:07+00:00" - }, - { - "name": "cakephp/migrations", - "version": "4.8.2", - "source": { - "type": "git", - "url": "https://github.com/cakephp/migrations.git", - "reference": "efe451ad8d8a510bba97d9720bfdc63c06d6da98" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/cakephp/migrations/zipball/efe451ad8d8a510bba97d9720bfdc63c06d6da98", - "reference": "efe451ad8d8a510bba97d9720bfdc63c06d6da98", - "shasum": "" - }, - "require": { - "cakephp/cache": "^5.2.9", - "cakephp/database": "^5.2.9", - "cakephp/orm": "^5.2.9", - "php": ">=8.1", - "robmorgan/phinx": "^0.16.10" - }, - "require-dev": { - "cakephp/bake": "^3.3", - "cakephp/cakephp": "^5.2.9", - "cakephp/cakephp-codesniffer": "^5.0", - "phpunit/phpunit": "^10.5.5 || ^11.1.3 || ^12.2.4" - }, - "suggest": { - "cakephp/bake": "If you want to generate migrations.", - "dereuromark/cakephp-ide-helper": "If you want to have IDE suggest/autocomplete when creating migrations." - }, - "type": "cakephp-plugin", - "autoload": { - "psr-4": { - "Migrations\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "CakePHP Community", - "homepage": "https://github.com/cakephp/migrations/graphs/contributors" - } - ], - "description": "Database Migration plugin for CakePHP based on Phinx", - "homepage": "https://github.com/cakephp/migrations", - "keywords": [ - "cakephp", - "cli", - "migrations" - ], - "support": { - "forum": "https://stackoverflow.com/tags/cakephp", - "irc": "irc://irc.freenode.org/cakephp", - "issues": "https://github.com/cakephp/migrations/issues", - "source": "https://github.com/cakephp/migrations" - }, - "time": "2025-10-19T15:16:42+00:00" - }, - { - "name": "cakephp/plugin-installer", - "version": "2.0.1", - "source": { - "type": "git", - "url": "https://github.com/cakephp/plugin-installer.git", - "reference": "5420701fd47d82fe81805ebee34fbbcef34c52ba" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/cakephp/plugin-installer/zipball/5420701fd47d82fe81805ebee34fbbcef34c52ba", - "reference": "5420701fd47d82fe81805ebee34fbbcef34c52ba", - "shasum": "" - }, - "require": { - "composer-plugin-api": "^2.0", - "php": ">=8.1" - }, - "require-dev": { - "cakephp/cakephp-codesniffer": "^5.0", - "composer/composer": "^2.0", - "phpunit/phpunit": "^10.1.0" - }, - "type": "composer-plugin", - "extra": { - "class": "Cake\\Composer\\Plugin" - }, - "autoload": { - "psr-4": { - "Cake\\Composer\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "CakePHP Community", - "homepage": "https://cakephp.org" - } - ], - "description": "A composer installer for CakePHP 3.0+ plugins.", - "support": { - "issues": "https://github.com/cakephp/plugin-installer/issues", - "source": "https://github.com/cakephp/plugin-installer/tree/2.0.1" - }, - "time": "2023-09-10T10:02:44+00:00" - }, - { - "name": "composer/ca-bundle", - "version": "1.5.8", - "source": { - "type": "git", - "url": "https://github.com/composer/ca-bundle.git", - "reference": "719026bb30813accb68271fee7e39552a58e9f65" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/ca-bundle/zipball/719026bb30813accb68271fee7e39552a58e9f65", - "reference": "719026bb30813accb68271fee7e39552a58e9f65", - "shasum": "" - }, - "require": { - "ext-openssl": "*", - "ext-pcre": "*", - "php": "^7.2 || ^8.0" - }, - "require-dev": { - "phpstan/phpstan": "^1.10", - "phpunit/phpunit": "^8 || ^9", - "psr/log": "^1.0 || ^2.0 || ^3.0", - "symfony/process": "^4.0 || ^5.0 || ^6.0 || ^7.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Composer\\CaBundle\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" - } - ], - "description": "Lets you find a path to the system CA bundle, and includes a fallback to the Mozilla CA bundle.", - "keywords": [ - "cabundle", - "cacert", - "certificate", - "ssl", - "tls" - ], - "support": { - "irc": "irc://irc.freenode.org/composer", - "issues": "https://github.com/composer/ca-bundle/issues", - "source": "https://github.com/composer/ca-bundle/tree/1.5.8" - }, - "funding": [ - { - "url": "https://packagist.com", - "type": "custom" - }, - { - "url": "https://github.com/composer", - "type": "github" - } - ], - "time": "2025-08-20T18:49:47+00:00" - }, - { - "name": "josegonzalez/dotenv", - "version": "2.1.0", - "source": { - "type": "git", - "url": "https://github.com/josegonzalez/php-dotenv.git", - "reference": "ff3461f2960737f54054dff4fef3482a2bb9682b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/josegonzalez/php-dotenv/zipball/ff3461f2960737f54054dff4fef3482a2bb9682b", - "reference": "ff3461f2960737f54054dff4fef3482a2bb9682b", - "shasum": "" - }, - "require": { - "m1/env": "2.*", - "php": ">=5.3.0" - }, - "require-dev": { - "satooshi/php-coveralls": "1.*", - "squizlabs/php_codesniffer": "2.*" - }, - "type": "library", - "autoload": { - "psr-0": { - "josegonzalez\\Dotenv": [ - "src", - "tests" - ] - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jose Diaz-Gonzalez", - "email": "dotenv@josegonzalez.com", - "homepage": "http://josediazgonzalez.com", - "role": "Maintainer" - } - ], - "description": "dotenv file parsing for PHP", - "homepage": "https://github.com/josegonzalez/php-dotenv", - "keywords": [ - "configuration", - "dotenv", - "php" - ], - "support": { - "issues": "https://github.com/josegonzalez/php-dotenv/issues", - "source": "https://github.com/josegonzalez/php-dotenv/tree/2.1.0" - }, - "time": "2017-01-03T01:04:05+00:00" - }, - { - "name": "laminas/laminas-diactoros", - "version": "3.8.0", - "source": { - "type": "git", - "url": "https://github.com/laminas/laminas-diactoros.git", - "reference": "60c182916b2749480895601649563970f3f12ec4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-diactoros/zipball/60c182916b2749480895601649563970f3f12ec4", - "reference": "60c182916b2749480895601649563970f3f12ec4", - "shasum": "" - }, - "require": { - "php": "~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0", - "psr/http-factory": "^1.1", - "psr/http-message": "^1.1 || ^2.0" - }, - "conflict": { - "amphp/amp": "<2.6.4" - }, - "provide": { - "psr/http-factory-implementation": "^1.0", - "psr/http-message-implementation": "^1.1 || ^2.0" - }, - "require-dev": { - "ext-curl": "*", - "ext-dom": "*", - "ext-gd": "*", - "ext-libxml": "*", - "http-interop/http-factory-tests": "^2.2.0", - "laminas/laminas-coding-standard": "~3.1.0", - "php-http/psr7-integration-tests": "^1.4.0", - "phpunit/phpunit": "^10.5.36", - "psalm/plugin-phpunit": "^0.19.5", - "vimeo/psalm": "^6.13" - }, - "type": "library", - "extra": { - "laminas": { - "module": "Laminas\\Diactoros", - "config-provider": "Laminas\\Diactoros\\ConfigProvider" - } - }, - "autoload": { - "files": [ - "src/functions/create_uploaded_file.php", - "src/functions/marshal_headers_from_sapi.php", - "src/functions/marshal_method_from_sapi.php", - "src/functions/marshal_protocol_version_from_sapi.php", - "src/functions/normalize_server.php", - "src/functions/normalize_uploaded_files.php", - "src/functions/parse_cookie_header.php" - ], - "psr-4": { - "Laminas\\Diactoros\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "PSR HTTP Message implementations", - "homepage": "https://laminas.dev", - "keywords": [ - "http", - "laminas", - "psr", - "psr-17", - "psr-7" - ], - "support": { - "chat": "https://laminas.dev/chat", - "docs": "https://docs.laminas.dev/laminas-diactoros/", - "forum": "https://discourse.laminas.dev", - "issues": "https://github.com/laminas/laminas-diactoros/issues", - "rss": "https://github.com/laminas/laminas-diactoros/releases.atom", - "source": "https://github.com/laminas/laminas-diactoros" - }, - "funding": [ - { - "url": "https://funding.communitybridge.org/projects/laminas-project", - "type": "community_bridge" - } - ], - "time": "2025-10-12T15:31:36+00:00" - }, - { - "name": "laminas/laminas-httphandlerrunner", - "version": "2.13.0", - "source": { - "type": "git", - "url": "https://github.com/laminas/laminas-httphandlerrunner.git", - "reference": "181eaeeb838ad3d80fbbcfb0657a46bc212bbd4e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-httphandlerrunner/zipball/181eaeeb838ad3d80fbbcfb0657a46bc212bbd4e", - "reference": "181eaeeb838ad3d80fbbcfb0657a46bc212bbd4e", - "shasum": "" - }, - "require": { - "php": "~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0", - "psr/http-message": "^1.0 || ^2.0", - "psr/http-message-implementation": "^1.0 || ^2.0", - "psr/http-server-handler": "^1.0" - }, - "require-dev": { - "laminas/laminas-coding-standard": "~3.1.0", - "laminas/laminas-diactoros": "^3.6.0", - "phpunit/phpunit": "^10.5.46", - "psalm/plugin-phpunit": "^0.19.5", - "vimeo/psalm": "^6.10.3" - }, - "type": "library", - "extra": { - "laminas": { - "config-provider": "Laminas\\HttpHandlerRunner\\ConfigProvider" - } - }, - "autoload": { - "psr-4": { - "Laminas\\HttpHandlerRunner\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "Execute PSR-15 RequestHandlerInterface instances and emit responses they generate.", - "homepage": "https://laminas.dev", - "keywords": [ - "components", - "laminas", - "mezzio", - "psr-15", - "psr-7" - ], - "support": { - "chat": "https://laminas.dev/chat", - "docs": "https://docs.laminas.dev/laminas-httphandlerrunner/", - "forum": "https://discourse.laminas.dev", - "issues": "https://github.com/laminas/laminas-httphandlerrunner/issues", - "rss": "https://github.com/laminas/laminas-httphandlerrunner/releases.atom", - "source": "https://github.com/laminas/laminas-httphandlerrunner" - }, - "funding": [ - { - "url": "https://funding.communitybridge.org/projects/laminas-project", - "type": "community_bridge" - } - ], - "time": "2025-10-12T20:58:29+00:00" - }, - { - "name": "league/container", - "version": "4.2.5", - "source": { - "type": "git", - "url": "https://github.com/thephpleague/container.git", - "reference": "d3cebb0ff4685ff61c749e54b27db49319e2ec00" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/thephpleague/container/zipball/d3cebb0ff4685ff61c749e54b27db49319e2ec00", - "reference": "d3cebb0ff4685ff61c749e54b27db49319e2ec00", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0", - "psr/container": "^1.1 || ^2.0" - }, - "provide": { - "psr/container-implementation": "^1.0" - }, - "replace": { - "orno/di": "~2.0" - }, - "require-dev": { - "nette/php-generator": "^3.4", - "nikic/php-parser": "^4.10", - "phpstan/phpstan": "^0.12.47", - "phpunit/phpunit": "^8.5.17", - "roave/security-advisories": "dev-latest", - "scrutinizer/ocular": "^1.8", - "squizlabs/php_codesniffer": "^3.6" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-1.x": "1.x-dev", - "dev-2.x": "2.x-dev", - "dev-3.x": "3.x-dev", - "dev-4.x": "4.x-dev", - "dev-master": "4.x-dev" - } - }, - "autoload": { - "psr-4": { - "League\\Container\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Phil Bennett", - "email": "mail@philbennett.co.uk", - "role": "Developer" - } - ], - "description": "A fast and intuitive dependency injection container.", - "homepage": "https://github.com/thephpleague/container", - "keywords": [ - "container", - "dependency", - "di", - "injection", - "league", - "provider", - "service" - ], - "support": { - "issues": "https://github.com/thephpleague/container/issues", - "source": "https://github.com/thephpleague/container/tree/4.2.5" - }, - "funding": [ - { - "url": "https://github.com/philipobenito", - "type": "github" - } - ], - "time": "2025-05-20T12:55:37+00:00" - }, - { - "name": "m1/env", - "version": "2.2.0", - "source": { - "type": "git", - "url": "https://github.com/m1/Env.git", - "reference": "5c296e3e13450a207e12b343f3af1d7ab569f6f3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/m1/Env/zipball/5c296e3e13450a207e12b343f3af1d7ab569f6f3", - "reference": "5c296e3e13450a207e12b343f3af1d7ab569f6f3", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "require-dev": { - "phpunit/phpunit": "4.*", - "scrutinizer/ocular": "~1.1", - "squizlabs/php_codesniffer": "^2.3" - }, - "suggest": { - "josegonzalez/dotenv": "For loading of .env", - "m1/vars": "For loading of configs" - }, - "type": "library", - "autoload": { - "psr-4": { - "M1\\Env\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Miles Croxford", - "email": "hello@milescroxford.com", - "homepage": "http://milescroxford.com", - "role": "Developer" - } - ], - "description": "Env is a lightweight library bringing .env file parser compatibility to PHP. In short - it enables you to read .env files with PHP.", - "homepage": "https://github.com/m1/Env", - "keywords": [ - ".env", - "config", - "dotenv", - "env", - "loader", - "m1", - "parser", - "support" - ], - "support": { - "issues": "https://github.com/m1/Env/issues", - "source": "https://github.com/m1/Env/tree/2.2.0" - }, - "time": "2020-02-19T09:02:13+00:00" - }, - { - "name": "psr/clock", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/clock.git", - "reference": "e41a24703d4560fd0acb709162f73b8adfc3aa0d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/clock/zipball/e41a24703d4560fd0acb709162f73b8adfc3aa0d", - "reference": "e41a24703d4560fd0acb709162f73b8adfc3aa0d", - "shasum": "" - }, - "require": { - "php": "^7.0 || ^8.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Psr\\Clock\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common interface for reading the clock.", - "homepage": "https://github.com/php-fig/clock", - "keywords": [ - "clock", - "now", - "psr", - "psr-20", - "time" - ], - "support": { - "issues": "https://github.com/php-fig/clock/issues", - "source": "https://github.com/php-fig/clock/tree/1.0.0" - }, - "time": "2022-11-25T14:36:26+00:00" - }, - { - "name": "psr/container", - "version": "2.0.2", - "source": { - "type": "git", - "url": "https://github.com/php-fig/container.git", - "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/c71ecc56dfe541dbd90c5360474fbc405f8d5963", - "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963", - "shasum": "" - }, - "require": { - "php": ">=7.4.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Container\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common Container Interface (PHP FIG PSR-11)", - "homepage": "https://github.com/php-fig/container", - "keywords": [ - "PSR-11", - "container", - "container-interface", - "container-interop", - "psr" - ], - "support": { - "issues": "https://github.com/php-fig/container/issues", - "source": "https://github.com/php-fig/container/tree/2.0.2" - }, - "time": "2021-11-05T16:47:00+00:00" - }, - { - "name": "psr/http-client", - "version": "1.0.3", - "source": { - "type": "git", - "url": "https://github.com/php-fig/http-client.git", - "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-client/zipball/bb5906edc1c324c9a05aa0873d40117941e5fa90", - "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90", - "shasum": "" - }, - "require": { - "php": "^7.0 || ^8.0", - "psr/http-message": "^1.0 || ^2.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Http\\Client\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common interface for HTTP clients", - "homepage": "https://github.com/php-fig/http-client", - "keywords": [ - "http", - "http-client", - "psr", - "psr-18" - ], - "support": { - "source": "https://github.com/php-fig/http-client" - }, - "time": "2023-09-23T14:17:50+00:00" - }, - { - "name": "psr/http-factory", - "version": "1.1.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/http-factory.git", - "reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-factory/zipball/2b4765fddfe3b508ac62f829e852b1501d3f6e8a", - "reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a", - "shasum": "" - }, - "require": { - "php": ">=7.1", - "psr/http-message": "^1.0 || ^2.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Http\\Message\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "PSR-17: Common interfaces for PSR-7 HTTP message factories", - "keywords": [ - "factory", - "http", - "message", - "psr", - "psr-17", - "psr-7", - "request", - "response" - ], - "support": { - "source": "https://github.com/php-fig/http-factory" - }, - "time": "2024-04-15T12:06:14+00:00" - }, - { - "name": "psr/http-message", - "version": "2.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/http-message.git", - "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-message/zipball/402d35bcb92c70c026d1a6a9883f06b2ead23d71", - "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Http\\Message\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common interface for HTTP messages", - "homepage": "https://github.com/php-fig/http-message", - "keywords": [ - "http", - "http-message", - "psr", - "psr-7", - "request", - "response" - ], - "support": { - "source": "https://github.com/php-fig/http-message/tree/2.0" - }, - "time": "2023-04-04T09:54:51+00:00" - }, - { - "name": "psr/http-server-handler", - "version": "1.0.2", - "source": { - "type": "git", - "url": "https://github.com/php-fig/http-server-handler.git", - "reference": "84c4fb66179be4caaf8e97bd239203245302e7d4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-server-handler/zipball/84c4fb66179be4caaf8e97bd239203245302e7d4", - "reference": "84c4fb66179be4caaf8e97bd239203245302e7d4", - "shasum": "" - }, - "require": { - "php": ">=7.0", - "psr/http-message": "^1.0 || ^2.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Http\\Server\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common interface for HTTP server-side request handler", - "keywords": [ - "handler", - "http", - "http-interop", - "psr", - "psr-15", - "psr-7", - "request", - "response", - "server" - ], - "support": { - "source": "https://github.com/php-fig/http-server-handler/tree/1.0.2" - }, - "time": "2023-04-10T20:06:20+00:00" - }, - { - "name": "psr/http-server-middleware", - "version": "1.0.2", - "source": { - "type": "git", - "url": "https://github.com/php-fig/http-server-middleware.git", - "reference": "c1481f747daaa6a0782775cd6a8c26a1bf4a3829" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-server-middleware/zipball/c1481f747daaa6a0782775cd6a8c26a1bf4a3829", - "reference": "c1481f747daaa6a0782775cd6a8c26a1bf4a3829", - "shasum": "" - }, - "require": { - "php": ">=7.0", - "psr/http-message": "^1.0 || ^2.0", - "psr/http-server-handler": "^1.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Http\\Server\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common interface for HTTP server-side middleware", - "keywords": [ - "http", - "http-interop", - "middleware", - "psr", - "psr-15", - "psr-7", - "request", - "response" - ], - "support": { - "issues": "https://github.com/php-fig/http-server-middleware/issues", - "source": "https://github.com/php-fig/http-server-middleware/tree/1.0.2" - }, - "time": "2023-04-11T06:14:47+00:00" - }, - { - "name": "psr/log", - "version": "3.0.2", - "source": { - "type": "git", - "url": "https://github.com/php-fig/log.git", - "reference": "f16e1d5863e37f8d8c2a01719f5b34baa2b714d3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/f16e1d5863e37f8d8c2a01719f5b34baa2b714d3", - "reference": "f16e1d5863e37f8d8c2a01719f5b34baa2b714d3", - "shasum": "" - }, - "require": { - "php": ">=8.0.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Log\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common interface for logging libraries", - "homepage": "https://github.com/php-fig/log", - "keywords": [ - "log", - "psr", - "psr-3" - ], - "support": { - "source": "https://github.com/php-fig/log/tree/3.0.2" - }, - "time": "2024-09-11T13:17:53+00:00" - }, - { - "name": "psr/simple-cache", - "version": "3.0.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/simple-cache.git", - "reference": "764e0b3939f5ca87cb904f570ef9be2d78a07865" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/764e0b3939f5ca87cb904f570ef9be2d78a07865", - "reference": "764e0b3939f5ca87cb904f570ef9be2d78a07865", - "shasum": "" - }, - "require": { - "php": ">=8.0.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\SimpleCache\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common interfaces for simple caching", - "keywords": [ - "cache", - "caching", - "psr", - "psr-16", - "simple-cache" - ], - "support": { - "source": "https://github.com/php-fig/simple-cache/tree/3.0.0" - }, - "time": "2021-10-29T13:26:27+00:00" - }, - { - "name": "robmorgan/phinx", - "version": "0.16.10", - "source": { - "type": "git", - "url": "https://github.com/cakephp/phinx.git", - "reference": "83f83ec105e55e3abba7acc23c0272b5fcf66929" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/cakephp/phinx/zipball/83f83ec105e55e3abba7acc23c0272b5fcf66929", - "reference": "83f83ec105e55e3abba7acc23c0272b5fcf66929", - "shasum": "" - }, - "require": { - "cakephp/database": "^5.0.2", - "composer-runtime-api": "^2.0", - "php-64bit": ">=8.1", - "psr/container": "^1.1|^2.0", - "symfony/config": "^4.0|^5.0|^6.0|^7.0", - "symfony/console": "^6.0|^7.0" - }, - "require-dev": { - "cakephp/cakephp-codesniffer": "^5.0", - "cakephp/i18n": "^5.0", - "ext-json": "*", - "ext-pdo": "*", - "phpunit/phpunit": "^9.5.19", - "symfony/yaml": "^4.0|^5.0|^6.0|^7.0" - }, - "suggest": { - "ext-json": "Install if using JSON configuration format", - "ext-pdo": "PDO extension is needed", - "symfony/yaml": "Install if using YAML configuration format" - }, - "bin": [ - "bin/phinx" - ], - "type": "library", - "autoload": { - "psr-4": { - "Phinx\\": "src/Phinx/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Rob Morgan", - "email": "robbym@gmail.com", - "homepage": "https://robmorgan.id.au", - "role": "Lead Developer" - }, - { - "name": "Woody Gilk", - "email": "woody.gilk@gmail.com", - "homepage": "https://shadowhand.me", - "role": "Developer" - }, - { - "name": "Richard Quadling", - "email": "rquadling@gmail.com", - "role": "Developer" - }, - { - "name": "CakePHP Community", - "homepage": "https://github.com/cakephp/phinx/graphs/contributors", - "role": "Developer" - } - ], - "description": "Phinx makes it ridiculously easy to manage the database migrations for your PHP app.", - "homepage": "https://phinx.org", - "keywords": [ - "database", - "database migrations", - "db", - "migrations", - "phinx" - ], - "support": { - "issues": "https://github.com/cakephp/phinx/issues", - "source": "https://github.com/cakephp/phinx/tree/0.16.10" - }, - "time": "2025-07-08T18:55:28+00:00" - }, - { - "name": "symfony/config", - "version": "v7.3.4", - "source": { - "type": "git", - "url": "https://github.com/symfony/config.git", - "reference": "8a09223170046d2cfda3d2e11af01df2c641e961" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/config/zipball/8a09223170046d2cfda3d2e11af01df2c641e961", - "reference": "8a09223170046d2cfda3d2e11af01df2c641e961", - "shasum": "" - }, - "require": { - "php": ">=8.2", - "symfony/deprecation-contracts": "^2.5|^3", - "symfony/filesystem": "^7.1", - "symfony/polyfill-ctype": "~1.8" - }, - "conflict": { - "symfony/finder": "<6.4", - "symfony/service-contracts": "<2.5" - }, - "require-dev": { - "symfony/event-dispatcher": "^6.4|^7.0", - "symfony/finder": "^6.4|^7.0", - "symfony/messenger": "^6.4|^7.0", - "symfony/service-contracts": "^2.5|^3", - "symfony/yaml": "^6.4|^7.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\Config\\": "" - }, - "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": "Helps you find, load, combine, autofill and validate configuration values of any kind", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/config/tree/v7.3.4" - }, - "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": "2025-09-22T12:46:16+00:00" - }, - { - "name": "symfony/console", - "version": "v7.3.5", - "source": { - "type": "git", - "url": "https://github.com/symfony/console.git", - "reference": "cdb80fa5869653c83cfe1a9084a673b6daf57ea7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/cdb80fa5869653c83cfe1a9084a673b6daf57ea7", - "reference": "cdb80fa5869653c83cfe1a9084a673b6daf57ea7", - "shasum": "" - }, - "require": { - "php": ">=8.2", - "symfony/deprecation-contracts": "^2.5|^3", - "symfony/polyfill-mbstring": "~1.0", - "symfony/service-contracts": "^2.5|^3", - "symfony/string": "^7.2" - }, - "conflict": { - "symfony/dependency-injection": "<6.4", - "symfony/dotenv": "<6.4", - "symfony/event-dispatcher": "<6.4", - "symfony/lock": "<6.4", - "symfony/process": "<6.4" - }, - "provide": { - "psr/log-implementation": "1.0|2.0|3.0" - }, - "require-dev": { - "psr/log": "^1|^2|^3", - "symfony/config": "^6.4|^7.0", - "symfony/dependency-injection": "^6.4|^7.0", - "symfony/event-dispatcher": "^6.4|^7.0", - "symfony/http-foundation": "^6.4|^7.0", - "symfony/http-kernel": "^6.4|^7.0", - "symfony/lock": "^6.4|^7.0", - "symfony/messenger": "^6.4|^7.0", - "symfony/process": "^6.4|^7.0", - "symfony/stopwatch": "^6.4|^7.0", - "symfony/var-dumper": "^6.4|^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/v7.3.5" - }, - "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": "2025-10-14T15:46:26+00:00" - }, - { - "name": "symfony/deprecation-contracts", - "version": "v3.6.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "63afe740e99a13ba87ec199bb07bbdee937a5b62" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/63afe740e99a13ba87ec199bb07bbdee937a5b62", - "reference": "63afe740e99a13ba87ec199bb07bbdee937a5b62", - "shasum": "" - }, - "require": { - "php": ">=8.1" - }, - "type": "library", - "extra": { - "thanks": { - "url": "https://github.com/symfony/contracts", - "name": "symfony/contracts" - }, - "branch-alias": { - "dev-main": "3.6-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.6.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2024-09-25T14:21:43+00:00" - }, - { - "name": "symfony/filesystem", - "version": "v7.3.2", - "source": { - "type": "git", - "url": "https://github.com/symfony/filesystem.git", - "reference": "edcbb768a186b5c3f25d0643159a787d3e63b7fd" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/edcbb768a186b5c3f25d0643159a787d3e63b7fd", - "reference": "edcbb768a186b5c3f25d0643159a787d3e63b7fd", - "shasum": "" - }, - "require": { - "php": ">=8.2", - "symfony/polyfill-ctype": "~1.8", - "symfony/polyfill-mbstring": "~1.8" - }, - "require-dev": { - "symfony/process": "^6.4|^7.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\Filesystem\\": "" - }, - "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": "Provides basic utilities for the filesystem", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/filesystem/tree/v7.3.2" - }, - "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": "2025-07-07T08:17:47+00:00" - }, - { - "name": "symfony/polyfill-ctype", - "version": "v1.33.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "a3cc8b044a6ea513310cbd48ef7333b384945638" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/a3cc8b044a6ea513310cbd48ef7333b384945638", - "reference": "a3cc8b044a6ea513310cbd48ef7333b384945638", - "shasum": "" - }, - "require": { - "php": ">=7.2" - }, - "provide": { - "ext-ctype": "*" - }, - "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\\Polyfill\\Ctype\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Gert de Pagter", - "email": "BackEndTea@gmail.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for ctype functions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "ctype", - "polyfill", - "portable" - ], - "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.33.0" - }, - "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": "2024-09-09T11:45:10+00:00" - }, - { - "name": "symfony/polyfill-intl-grapheme", - "version": "v1.33.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "380872130d3a5dd3ace2f4010d95125fde5d5c70" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/380872130d3a5dd3ace2f4010d95125fde5d5c70", - "reference": "380872130d3a5dd3ace2f4010d95125fde5d5c70", - "shasum": "" - }, - "require": { - "php": ">=7.2" - }, - "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\\Polyfill\\Intl\\Grapheme\\": "" - } - }, - "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": "Symfony polyfill for intl's grapheme_* functions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "grapheme", - "intl", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.33.0" - }, - "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": "2025-06-27T09:58:17+00:00" - }, - { - "name": "symfony/polyfill-intl-normalizer", - "version": "v1.33.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "3833d7255cc303546435cb650316bff708a1c75c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/3833d7255cc303546435cb650316bff708a1c75c", - "reference": "3833d7255cc303546435cb650316bff708a1c75c", - "shasum": "" - }, - "require": { - "php": ">=7.2" - }, - "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\\Polyfill\\Intl\\Normalizer\\": "" - }, - "classmap": [ - "Resources/stubs" - ] - }, - "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": "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/polyfill-intl-normalizer/tree/v1.33.0" - }, - "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": "2024-09-09T11:45:10+00:00" - }, - { - "name": "symfony/polyfill-mbstring", - "version": "v1.33.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "6d857f4d76bd4b343eac26d6b539585d2bc56493" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/6d857f4d76bd4b343eac26d6b539585d2bc56493", - "reference": "6d857f4d76bd4b343eac26d6b539585d2bc56493", - "shasum": "" - }, - "require": { - "ext-iconv": "*", - "php": ">=7.2" - }, - "provide": { - "ext-mbstring": "*" - }, - "suggest": { - "ext-mbstring": "For best performance" - }, - "type": "library", - "extra": { - "thanks": { - "url": "https://github.com/symfony/polyfill", - "name": "symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Mbstring\\": "" - } - }, - "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": "Symfony polyfill for the Mbstring extension", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "mbstring", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.33.0" - }, - "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": "2024-12-23T08:48:59+00:00" - }, - { - "name": "symfony/service-contracts", - "version": "v3.6.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/service-contracts.git", - "reference": "f021b05a130d35510bd6b25fe9053c2a8a15d5d4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/f021b05a130d35510bd6b25fe9053c2a8a15d5d4", - "reference": "f021b05a130d35510bd6b25fe9053c2a8a15d5d4", - "shasum": "" - }, - "require": { - "php": ">=8.1", - "psr/container": "^1.1|^2.0", - "symfony/deprecation-contracts": "^2.5|^3" - }, - "conflict": { - "ext-psr": "<1.1|>=2" - }, - "type": "library", - "extra": { - "thanks": { - "url": "https://github.com/symfony/contracts", - "name": "symfony/contracts" - }, - "branch-alias": { - "dev-main": "3.6-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Contracts\\Service\\": "" - }, - "exclude-from-classmap": [ - "/Test/" - ] - }, - "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": "Generic abstractions related to writing services", - "homepage": "https://symfony.com", - "keywords": [ - "abstractions", - "contracts", - "decoupling", - "interfaces", - "interoperability", - "standards" - ], - "support": { - "source": "https://github.com/symfony/service-contracts/tree/v3.6.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2025-04-25T09:37:31+00:00" - }, - { - "name": "symfony/string", - "version": "v7.3.4", - "source": { - "type": "git", - "url": "https://github.com/symfony/string.git", - "reference": "f96476035142921000338bad71e5247fbc138872" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/f96476035142921000338bad71e5247fbc138872", - "reference": "f96476035142921000338bad71e5247fbc138872", - "shasum": "" - }, - "require": { - "php": ">=8.2", - "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/emoji": "^7.1", - "symfony/http-client": "^6.4|^7.0", - "symfony/intl": "^6.4|^7.0", - "symfony/translation-contracts": "^2.5|^3.0", - "symfony/var-exporter": "^6.4|^7.0" - }, - "type": "library", - "autoload": { - "files": [ - "Resources/functions.php" - ], - "psr-4": { - "Symfony\\Component\\String\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "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": "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": [ - "grapheme", - "i18n", - "string", - "unicode", - "utf-8", - "utf8" - ], - "support": { - "source": "https://github.com/symfony/string/tree/v7.3.4" - }, - "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": "2025-09-11T14:36:48+00:00" - } - ], - "packages-dev": [ - { - "name": "brick/varexporter", - "version": "0.6.0", - "source": { - "type": "git", - "url": "https://github.com/brick/varexporter.git", - "reference": "af98bfc2b702a312abbcaff37656dbe419cec5bc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/brick/varexporter/zipball/af98bfc2b702a312abbcaff37656dbe419cec5bc", - "reference": "af98bfc2b702a312abbcaff37656dbe419cec5bc", - "shasum": "" - }, - "require": { - "nikic/php-parser": "^5.0", - "php": "^8.1" - }, - "require-dev": { - "php-coveralls/php-coveralls": "^2.2", - "phpunit/phpunit": "^10.5", - "vimeo/psalm": "6.8.4" - }, - "type": "library", - "autoload": { - "psr-4": { - "Brick\\VarExporter\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "A powerful alternative to var_export(), which can export closures and objects without __set_state()", - "keywords": [ - "var_export" - ], - "support": { - "issues": "https://github.com/brick/varexporter/issues", - "source": "https://github.com/brick/varexporter/tree/0.6.0" - }, - "funding": [ - { - "url": "https://github.com/BenMorel", - "type": "github" - } - ], - "time": "2025-02-20T17:42:39+00:00" - }, - { - "name": "cakephp/bake", - "version": "3.5.1", - "source": { - "type": "git", - "url": "https://github.com/cakephp/bake.git", - "reference": "f6dc5f8578430f3540faa0474866bb494f7d92e1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/cakephp/bake/zipball/f6dc5f8578430f3540faa0474866bb494f7d92e1", - "reference": "f6dc5f8578430f3540faa0474866bb494f7d92e1", - "shasum": "" - }, - "require": { - "brick/varexporter": "^0.6.0", - "cakephp/cakephp": "^5.1", - "cakephp/twig-view": "^2.0.2", - "nikic/php-parser": "^5.0.0", - "php": ">=8.1" - }, - "require-dev": { - "cakephp/cakephp-codesniffer": "^5.0.0", - "cakephp/debug_kit": "^5.0.0", - "phpunit/phpunit": "^10.5.40 || ^11.5.20 || ^12.2.4" - }, - "type": "cakephp-plugin", - "autoload": { - "psr-4": { - "Bake\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "CakePHP Community", - "homepage": "https://github.com/cakephp/bake/graphs/contributors" - } - ], - "description": "Bake plugin for CakePHP", - "homepage": "https://github.com/cakephp/bake", - "keywords": [ - "bake", - "cakephp", - "cli", - "dev" - ], - "support": { - "forum": "https://stackoverflow.com/tags/cakephp", - "issues": "https://github.com/cakephp/bake/issues", - "source": "https://github.com/cakephp/bake" - }, - "time": "2025-10-22T13:48:10+00:00" - }, - { - "name": "cakephp/cakephp-codesniffer", - "version": "5.3.0", - "source": { - "type": "git", - "url": "https://github.com/cakephp/cakephp-codesniffer.git", - "reference": "8c9481165b0f2819ac58894c9a7e5599a55ad678" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/cakephp/cakephp-codesniffer/zipball/8c9481165b0f2819ac58894c9a7e5599a55ad678", - "reference": "8c9481165b0f2819ac58894c9a7e5599a55ad678", - "shasum": "" - }, - "require": { - "dealerdirect/phpcodesniffer-composer-installer": "^1.1.2", - "php": ">=8.1", - "phpstan/phpdoc-parser": "^2.1", - "slevomat/coding-standard": "^8.23", - "squizlabs/php_codesniffer": "^4.0" - }, - "require-dev": { - "phpunit/phpunit": "^10.5.32 || ^11.3.3" - }, - "type": "phpcodesniffer-standard", - "autoload": { - "psr-4": { - "CakePHP\\": "CakePHP/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "CakePHP Community", - "homepage": "https://github.com/cakephp/cakephp-codesniffer/graphs/contributors" - } - ], - "description": "CakePHP CodeSniffer Standards", - "homepage": "https://cakephp.org", - "keywords": [ - "codesniffer", - "framework" - ], - "support": { - "forum": "https://stackoverflow.com/tags/cakephp", - "irc": "irc://irc.freenode.org/cakephp", - "issues": "https://github.com/cakephp/cakephp-codesniffer/issues", - "source": "https://github.com/cakephp/cakephp-codesniffer" - }, - "time": "2025-09-19T15:47:28+00:00" - }, - { - "name": "cakephp/debug_kit", - "version": "5.1.4", - "source": { - "type": "git", - "url": "https://github.com/cakephp/debug_kit.git", - "reference": "291e9c9098bb4fa1afea2a259f1133f7236da7dd" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/cakephp/debug_kit/zipball/291e9c9098bb4fa1afea2a259f1133f7236da7dd", - "reference": "291e9c9098bb4fa1afea2a259f1133f7236da7dd", - "shasum": "" - }, - "require": { - "cakephp/cakephp": "^5.1", - "composer/composer": "^2.0", - "doctrine/sql-formatter": "^1.1.3", - "php": ">=8.1" - }, - "require-dev": { - "cakephp/authorization": "^3.0", - "cakephp/cakephp-codesniffer": "^5.0", - "phpunit/phpunit": "^10.5.5 || ^11.1.3" - }, - "suggest": { - "ext-pdo_sqlite": "DebugKit needs to store panel data in a database. SQLite is simple and easy to use." - }, - "type": "cakephp-plugin", - "autoload": { - "psr-4": { - "DebugKit\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mark Story", - "homepage": "https://mark-story.com", - "role": "Author" - }, - { - "name": "CakePHP Community", - "homepage": "https://github.com/cakephp/debug_kit/graphs/contributors" - } - ], - "description": "CakePHP Debug Kit", - "homepage": "https://github.com/cakephp/debug_kit", - "keywords": [ - "cakephp", - "debug", - "dev", - "kit" - ], - "support": { - "forum": "https://stackoverflow.com/tags/cakephp", - "irc": "irc://irc.freenode.org/cakephp", - "issues": "https://github.com/cakephp/debug_kit/issues", - "source": "https://github.com/cakephp/debug_kit" - }, - "time": "2025-10-04T15:39:13+00:00" - }, - { - "name": "cakephp/repl", - "version": "2.0.1", - "source": { - "type": "git", - "url": "https://github.com/cakephp/repl.git", - "reference": "bd0797743b703d885ec9b71dfa69f64ac81ed53e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/cakephp/repl/zipball/bd0797743b703d885ec9b71dfa69f64ac81ed53e", - "reference": "bd0797743b703d885ec9b71dfa69f64ac81ed53e", - "shasum": "" - }, - "require": { - "cakephp/cakephp": "^5.0", - "php": ">=8.1", - "psy/psysh": "@stable" - }, - "require-dev": { - "cakephp/cakephp-codesniffer": "^5.0", - "phpunit/phpunit": "^10.1.0" - }, - "type": "cakephp-plugin", - "autoload": { - "files": [ - "src/functions.php" - ], - "psr-4": { - "Cake\\Repl\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "CakePHP Community", - "homepage": "https://github.com/cakephp/repl/graphs/contributors" - } - ], - "description": "REPL plugin for CakePHP", - "homepage": "https://github.com/cakephp/repl", - "keywords": [ - "REPL", - "cakephp" - ], - "support": { - "forum": "https://discourse.cakephp.org/", - "irc": "irc://irc.freenode.org/cakephp", - "issues": "https://github.com/cakephp/repl/issues", - "slack": "https://cakesf.herokuapp.com/", - "source": "https://github.com/cakephp/repl/tree/2.0.1" - }, - "time": "2023-09-10T04:20:15+00:00" - }, - { - "name": "cakephp/twig-view", - "version": "2.0.3", - "source": { - "type": "git", - "url": "https://github.com/cakephp/twig-view.git", - "reference": "b11df8e8734ae556d98b143192377dbc6a6f5360" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/cakephp/twig-view/zipball/b11df8e8734ae556d98b143192377dbc6a6f5360", - "reference": "b11df8e8734ae556d98b143192377dbc6a6f5360", - "shasum": "" - }, - "require": { - "cakephp/cakephp": "^5.0.0", - "jasny/twig-extensions": "^1.3", - "twig/markdown-extra": "^3.0", - "twig/twig": "^3.11.1" - }, - "conflict": { - "wyrihaximus/twig-view": "*" - }, - "require-dev": { - "cakephp/cakephp-codesniffer": "^5.0", - "cakephp/debug_kit": "^5.0", - "michelf/php-markdown": "^1.9", - "mikey179/vfsstream": "^1.6.10", - "phpunit/phpunit": "^10.5.5 || ^11.1.3" - }, - "type": "cakephp-plugin", - "autoload": { - "psr-4": { - "Cake\\TwigView\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "CakePHP Community", - "homepage": "https://github.com/cakephp/cakephp/graphs/contributors" - } - ], - "description": "Twig powered View for CakePHP", - "keywords": [ - "cakephp", - "template", - "twig", - "view" - ], - "support": { - "forum": "https://stackoverflow.com/tags/cakephp", - "irc": "irc://irc.freenode.org/cakephp", - "issues": "https://github.com/cakephp/twig-view/issues", - "source": "https://github.com/cakephp/twig-view" - }, - "time": "2024-10-11T07:53:08+00:00" - }, - { - "name": "composer/class-map-generator", - "version": "1.6.2", - "source": { - "type": "git", - "url": "https://github.com/composer/class-map-generator.git", - "reference": "ba9f089655d4cdd64e762a6044f411ccdaec0076" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/class-map-generator/zipball/ba9f089655d4cdd64e762a6044f411ccdaec0076", - "reference": "ba9f089655d4cdd64e762a6044f411ccdaec0076", - "shasum": "" - }, - "require": { - "composer/pcre": "^2.1 || ^3.1", - "php": "^7.2 || ^8.0", - "symfony/finder": "^4.4 || ^5.3 || ^6 || ^7" - }, - "require-dev": { - "phpstan/phpstan": "^1.12 || ^2", - "phpstan/phpstan-deprecation-rules": "^1 || ^2", - "phpstan/phpstan-phpunit": "^1 || ^2", - "phpstan/phpstan-strict-rules": "^1.1 || ^2", - "phpunit/phpunit": "^8", - "symfony/filesystem": "^5.4 || ^6" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Composer\\ClassMapGenerator\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "https://seld.be" - } - ], - "description": "Utilities to scan PHP code and generate class maps.", - "keywords": [ - "classmap" - ], - "support": { - "issues": "https://github.com/composer/class-map-generator/issues", - "source": "https://github.com/composer/class-map-generator/tree/1.6.2" - }, - "funding": [ - { - "url": "https://packagist.com", - "type": "custom" - }, - { - "url": "https://github.com/composer", - "type": "github" - } - ], - "time": "2025-08-20T18:52:43+00:00" - }, - { - "name": "composer/composer", - "version": "2.8.12", - "source": { - "type": "git", - "url": "https://github.com/composer/composer.git", - "reference": "3e38919bc9a2c3c026f2151b5e56d04084ce8f0b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/composer/zipball/3e38919bc9a2c3c026f2151b5e56d04084ce8f0b", - "reference": "3e38919bc9a2c3c026f2151b5e56d04084ce8f0b", - "shasum": "" - }, - "require": { - "composer/ca-bundle": "^1.5", - "composer/class-map-generator": "^1.4.0", - "composer/metadata-minifier": "^1.0", - "composer/pcre": "^2.2 || ^3.2", - "composer/semver": "^3.3", - "composer/spdx-licenses": "^1.5.7", - "composer/xdebug-handler": "^2.0.2 || ^3.0.3", - "justinrainbow/json-schema": "^6.5.1", - "php": "^7.2.5 || ^8.0", - "psr/log": "^1.0 || ^2.0 || ^3.0", - "react/promise": "^3.3", - "seld/jsonlint": "^1.4", - "seld/phar-utils": "^1.2", - "seld/signal-handler": "^2.0", - "symfony/console": "^5.4.47 || ^6.4.25 || ^7.1.10", - "symfony/filesystem": "^5.4.45 || ^6.4.24 || ^7.1.10", - "symfony/finder": "^5.4.45 || ^6.4.24 || ^7.1.10", - "symfony/polyfill-php73": "^1.24", - "symfony/polyfill-php80": "^1.24", - "symfony/polyfill-php81": "^1.24", - "symfony/process": "^5.4.47 || ^6.4.25 || ^7.1.10" - }, - "require-dev": { - "phpstan/phpstan": "^1.11.8", - "phpstan/phpstan-deprecation-rules": "^1.2.0", - "phpstan/phpstan-phpunit": "^1.4.0", - "phpstan/phpstan-strict-rules": "^1.6.0", - "phpstan/phpstan-symfony": "^1.4.0", - "symfony/phpunit-bridge": "^6.4.25 || ^7.3.3" - }, - "suggest": { - "ext-openssl": "Enabling the openssl extension allows you to access https URLs for repositories and packages", - "ext-zip": "Enabling the zip extension allows you to unzip archives", - "ext-zlib": "Allow gzip compression of HTTP requests" - }, - "bin": [ - "bin/composer" - ], - "type": "library", - "extra": { - "phpstan": { - "includes": [ - "phpstan/rules.neon" - ] - }, - "branch-alias": { - "dev-main": "2.8-dev" - } - }, - "autoload": { - "psr-4": { - "Composer\\": "src/Composer/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nils Adermann", - "email": "naderman@naderman.de", - "homepage": "https://www.naderman.de" - }, - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "https://seld.be" - } - ], - "description": "Composer helps you declare, manage and install dependencies of PHP projects. It ensures you have the right stack everywhere.", - "homepage": "https://getcomposer.org/", - "keywords": [ - "autoload", - "dependency", - "package" - ], - "support": { - "irc": "ircs://irc.libera.chat:6697/composer", - "issues": "https://github.com/composer/composer/issues", - "security": "https://github.com/composer/composer/security/policy", - "source": "https://github.com/composer/composer/tree/2.8.12" - }, - "funding": [ - { - "url": "https://packagist.com", - "type": "custom" - }, - { - "url": "https://github.com/composer", - "type": "github" - } - ], - "time": "2025-09-19T11:41:59+00:00" - }, - { - "name": "composer/metadata-minifier", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/composer/metadata-minifier.git", - "reference": "c549d23829536f0d0e984aaabbf02af91f443207" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/metadata-minifier/zipball/c549d23829536f0d0e984aaabbf02af91f443207", - "reference": "c549d23829536f0d0e984aaabbf02af91f443207", - "shasum": "" - }, - "require": { - "php": "^5.3.2 || ^7.0 || ^8.0" - }, - "require-dev": { - "composer/composer": "^2", - "phpstan/phpstan": "^0.12.55", - "symfony/phpunit-bridge": "^4.2 || ^5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Composer\\MetadataMinifier\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" - } - ], - "description": "Small utility library that handles metadata minification and expansion.", - "keywords": [ - "composer", - "compression" - ], - "support": { - "issues": "https://github.com/composer/metadata-minifier/issues", - "source": "https://github.com/composer/metadata-minifier/tree/1.0.0" - }, - "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": "2021-04-07T13:37:33+00:00" - }, - { - "name": "composer/pcre", - "version": "3.3.2", - "source": { - "type": "git", - "url": "https://github.com/composer/pcre.git", - "reference": "b2bed4734f0cc156ee1fe9c0da2550420d99a21e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/pcre/zipball/b2bed4734f0cc156ee1fe9c0da2550420d99a21e", - "reference": "b2bed4734f0cc156ee1fe9c0da2550420d99a21e", - "shasum": "" - }, - "require": { - "php": "^7.4 || ^8.0" - }, - "conflict": { - "phpstan/phpstan": "<1.11.10" - }, - "require-dev": { - "phpstan/phpstan": "^1.12 || ^2", - "phpstan/phpstan-strict-rules": "^1 || ^2", - "phpunit/phpunit": "^8 || ^9" - }, - "type": "library", - "extra": { - "phpstan": { - "includes": [ - "extension.neon" - ] - }, - "branch-alias": { - "dev-main": "3.x-dev" - } - }, - "autoload": { - "psr-4": { - "Composer\\Pcre\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" - } - ], - "description": "PCRE wrapping library that offers type-safe preg_* replacements.", - "keywords": [ - "PCRE", - "preg", - "regex", - "regular expression" - ], - "support": { - "issues": "https://github.com/composer/pcre/issues", - "source": "https://github.com/composer/pcre/tree/3.3.2" - }, - "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-11-12T16:29:46+00:00" - }, - { - "name": "composer/semver", - "version": "3.4.4", - "source": { - "type": "git", - "url": "https://github.com/composer/semver.git", - "reference": "198166618906cb2de69b95d7d47e5fa8aa1b2b95" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/semver/zipball/198166618906cb2de69b95d7d47e5fa8aa1b2b95", - "reference": "198166618906cb2de69b95d7d47e5fa8aa1b2b95", - "shasum": "" - }, - "require": { - "php": "^5.3.2 || ^7.0 || ^8.0" - }, - "require-dev": { - "phpstan/phpstan": "^1.11", - "symfony/phpunit-bridge": "^3 || ^7" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "3.x-dev" - } - }, - "autoload": { - "psr-4": { - "Composer\\Semver\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nils Adermann", - "email": "naderman@naderman.de", - "homepage": "http://www.naderman.de" - }, - { - "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": "Semver library that offers utilities, version constraint parsing and validation.", - "keywords": [ - "semantic", - "semver", - "validation", - "versioning" - ], - "support": { - "irc": "ircs://irc.libera.chat:6697/composer", - "issues": "https://github.com/composer/semver/issues", - "source": "https://github.com/composer/semver/tree/3.4.4" - }, - "funding": [ - { - "url": "https://packagist.com", - "type": "custom" - }, - { - "url": "https://github.com/composer", - "type": "github" - } - ], - "time": "2025-08-20T19:15:30+00:00" - }, - { - "name": "composer/spdx-licenses", - "version": "1.5.9", - "source": { - "type": "git", - "url": "https://github.com/composer/spdx-licenses.git", - "reference": "edf364cefe8c43501e21e88110aac10b284c3c9f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/spdx-licenses/zipball/edf364cefe8c43501e21e88110aac10b284c3c9f", - "reference": "edf364cefe8c43501e21e88110aac10b284c3c9f", - "shasum": "" - }, - "require": { - "php": "^5.3.2 || ^7.0 || ^8.0" - }, - "require-dev": { - "phpstan/phpstan": "^1.11", - "symfony/phpunit-bridge": "^3 || ^7" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Composer\\Spdx\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nils Adermann", - "email": "naderman@naderman.de", - "homepage": "http://www.naderman.de" - }, - { - "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": "SPDX licenses list and validation library.", - "keywords": [ - "license", - "spdx", - "validator" - ], - "support": { - "irc": "ircs://irc.libera.chat:6697/composer", - "issues": "https://github.com/composer/spdx-licenses/issues", - "source": "https://github.com/composer/spdx-licenses/tree/1.5.9" - }, - "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": "2025-05-12T21:07:07+00:00" - }, - { - "name": "composer/xdebug-handler", - "version": "3.0.5", - "source": { - "type": "git", - "url": "https://github.com/composer/xdebug-handler.git", - "reference": "6c1925561632e83d60a44492e0b344cf48ab85ef" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/6c1925561632e83d60a44492e0b344cf48ab85ef", - "reference": "6c1925561632e83d60a44492e0b344cf48ab85ef", - "shasum": "" - }, - "require": { - "composer/pcre": "^1 || ^2 || ^3", - "php": "^7.2.5 || ^8.0", - "psr/log": "^1 || ^2 || ^3" - }, - "require-dev": { - "phpstan/phpstan": "^1.0", - "phpstan/phpstan-strict-rules": "^1.1", - "phpunit/phpunit": "^8.5 || ^9.6 || ^10.5" - }, - "type": "library", - "autoload": { - "psr-4": { - "Composer\\XdebugHandler\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "John Stevenson", - "email": "john-stevenson@blueyonder.co.uk" - } - ], - "description": "Restarts a process without Xdebug.", - "keywords": [ - "Xdebug", - "performance" - ], - "support": { - "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" - }, - "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": "dealerdirect/phpcodesniffer-composer-installer", - "version": "v1.1.2", - "source": { - "type": "git", - "url": "https://github.com/PHPCSStandards/composer-installer.git", - "reference": "e9cf5e4bbf7eeaf9ef5db34938942602838fc2b1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PHPCSStandards/composer-installer/zipball/e9cf5e4bbf7eeaf9ef5db34938942602838fc2b1", - "reference": "e9cf5e4bbf7eeaf9ef5db34938942602838fc2b1", - "shasum": "" - }, - "require": { - "composer-plugin-api": "^2.2", - "php": ">=5.4", - "squizlabs/php_codesniffer": "^2.0 || ^3.1.0 || ^4.0" - }, - "require-dev": { - "composer/composer": "^2.2", - "ext-json": "*", - "ext-zip": "*", - "php-parallel-lint/php-parallel-lint": "^1.4.0", - "phpcompatibility/php-compatibility": "^9.0", - "yoast/phpunit-polyfills": "^1.0" - }, - "type": "composer-plugin", - "extra": { - "class": "PHPCSStandards\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin" - }, - "autoload": { - "psr-4": { - "PHPCSStandards\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Franck Nijhof", - "email": "opensource@frenck.dev", - "homepage": "https://frenck.dev", - "role": "Open source developer" - }, - { - "name": "Contributors", - "homepage": "https://github.com/PHPCSStandards/composer-installer/graphs/contributors" - } - ], - "description": "PHP_CodeSniffer Standards Composer Installer Plugin", - "keywords": [ - "PHPCodeSniffer", - "PHP_CodeSniffer", - "code quality", - "codesniffer", - "composer", - "installer", - "phpcbf", - "phpcs", - "plugin", - "qa", - "quality", - "standard", - "standards", - "style guide", - "stylecheck", - "tests" - ], - "support": { - "issues": "https://github.com/PHPCSStandards/composer-installer/issues", - "security": "https://github.com/PHPCSStandards/composer-installer/security/policy", - "source": "https://github.com/PHPCSStandards/composer-installer" - }, - "funding": [ - { - "url": "https://github.com/PHPCSStandards", - "type": "github" - }, - { - "url": "https://github.com/jrfnl", - "type": "github" - }, - { - "url": "https://opencollective.com/php_codesniffer", - "type": "open_collective" - }, - { - "url": "https://thanks.dev/u/gh/phpcsstandards", - "type": "thanks_dev" - } - ], - "time": "2025-07-17T20:45:56+00:00" - }, - { - "name": "doctrine/sql-formatter", - "version": "1.5.3", - "source": { - "type": "git", - "url": "https://github.com/doctrine/sql-formatter.git", - "reference": "a8af23a8e9d622505baa2997465782cbe8bb7fc7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/sql-formatter/zipball/a8af23a8e9d622505baa2997465782cbe8bb7fc7", - "reference": "a8af23a8e9d622505baa2997465782cbe8bb7fc7", - "shasum": "" - }, - "require": { - "php": "^8.1" - }, - "require-dev": { - "doctrine/coding-standard": "^14", - "ergebnis/phpunit-slow-test-detector": "^2.20", - "phpstan/phpstan": "^2.1.31", - "phpunit/phpunit": "^10.5.58" - }, - "bin": [ - "bin/sql-formatter" - ], - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\SqlFormatter\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jeremy Dorn", - "email": "jeremy@jeremydorn.com", - "homepage": "https://jeremydorn.com/" - } - ], - "description": "a PHP SQL highlighting library", - "homepage": "https://github.com/doctrine/sql-formatter/", - "keywords": [ - "highlight", - "sql" - ], - "support": { - "issues": "https://github.com/doctrine/sql-formatter/issues", - "source": "https://github.com/doctrine/sql-formatter/tree/1.5.3" - }, - "time": "2025-10-26T09:35:14+00:00" - }, - { - "name": "jasny/twig-extensions", - "version": "v1.3.1", - "source": { - "type": "git", - "url": "https://github.com/jasny/twig-extensions.git", - "reference": "8a5ca5f49317bf421a519556ad2e876820d41e01" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/jasny/twig-extensions/zipball/8a5ca5f49317bf421a519556ad2e876820d41e01", - "reference": "8a5ca5f49317bf421a519556ad2e876820d41e01", - "shasum": "" - }, - "require": { - "php": ">=7.4.0", - "twig/twig": "^2.7 | ^3.0" - }, - "require-dev": { - "ext-intl": "*", - "ext-json": "*", - "ext-pcre": "*", - "phpstan/phpstan": "^1.12.0", - "phpunit/phpunit": "^9.6", - "squizlabs/php_codesniffer": "^3.10" - }, - "suggest": { - "ext-intl": "Required for the use of the LocalDate Twig extension", - "ext-pcre": "Required for the use of the PCRE Twig extension" - }, - "type": "library", - "autoload": { - "psr-4": { - "Jasny\\Twig\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Arnold Daniels", - "email": "arnold@jasny.net", - "homepage": "http://www.jasny.net" - } - ], - "description": "A set of useful Twig filters", - "homepage": "http://github.com/jasny/twig-extensions#README", - "keywords": [ - "PCRE", - "array", - "date", - "datetime", - "preg", - "regex", - "templating", - "text", - "time" - ], - "support": { - "issues": "https://github.com/jasny/twig-extensions/issues", - "source": "https://github.com/jasny/twig-extensions" - }, - "time": "2024-09-03T09:04:53+00:00" - }, - { - "name": "justinrainbow/json-schema", - "version": "6.6.0", - "source": { - "type": "git", - "url": "https://github.com/jsonrainbow/json-schema.git", - "reference": "68ba7677532803cc0c5900dd5a4d730537f2b2f3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/jsonrainbow/json-schema/zipball/68ba7677532803cc0c5900dd5a4d730537f2b2f3", - "reference": "68ba7677532803cc0c5900dd5a4d730537f2b2f3", - "shasum": "" - }, - "require": { - "ext-json": "*", - "marc-mabe/php-enum": "^4.0", - "php": "^7.2 || ^8.0" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "3.3.0", - "json-schema/json-schema-test-suite": "^23.2", - "marc-mabe/php-enum-phpstan": "^2.0", - "phpspec/prophecy": "^1.19", - "phpstan/phpstan": "^1.12", - "phpunit/phpunit": "^8.5" - }, - "bin": [ - "bin/validate-json" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "6.x-dev" - } - }, - "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/jsonrainbow/json-schema", - "keywords": [ - "json", - "schema" - ], - "support": { - "issues": "https://github.com/jsonrainbow/json-schema/issues", - "source": "https://github.com/jsonrainbow/json-schema/tree/6.6.0" - }, - "time": "2025-10-10T11:34:09+00:00" - }, - { - "name": "marc-mabe/php-enum", - "version": "v4.7.2", - "source": { - "type": "git", - "url": "https://github.com/marc-mabe/php-enum.git", - "reference": "bb426fcdd65c60fb3638ef741e8782508fda7eef" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/marc-mabe/php-enum/zipball/bb426fcdd65c60fb3638ef741e8782508fda7eef", - "reference": "bb426fcdd65c60fb3638ef741e8782508fda7eef", - "shasum": "" - }, - "require": { - "ext-reflection": "*", - "php": "^7.1 | ^8.0" - }, - "require-dev": { - "phpbench/phpbench": "^0.16.10 || ^1.0.4", - "phpstan/phpstan": "^1.3.1", - "phpunit/phpunit": "^7.5.20 | ^8.5.22 | ^9.5.11", - "vimeo/psalm": "^4.17.0 | ^5.26.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-3.x": "3.2-dev", - "dev-master": "4.7-dev" - } - }, - "autoload": { - "psr-4": { - "MabeEnum\\": "src/" - }, - "classmap": [ - "stubs/Stringable.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Marc Bennewitz", - "email": "dev@mabe.berlin", - "homepage": "https://mabe.berlin/", - "role": "Lead" - } - ], - "description": "Simple and fast implementation of enumerations with native PHP", - "homepage": "https://github.com/marc-mabe/php-enum", - "keywords": [ - "enum", - "enum-map", - "enum-set", - "enumeration", - "enumerator", - "enummap", - "enumset", - "map", - "set", - "type", - "type-hint", - "typehint" - ], - "support": { - "issues": "https://github.com/marc-mabe/php-enum/issues", - "source": "https://github.com/marc-mabe/php-enum/tree/v4.7.2" - }, - "time": "2025-09-14T11:18:39+00:00" - }, - { - "name": "nikic/php-parser", - "version": "v5.6.2", - "source": { - "type": "git", - "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "3a454ca033b9e06b63282ce19562e892747449bb" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/3a454ca033b9e06b63282ce19562e892747449bb", - "reference": "3a454ca033b9e06b63282ce19562e892747449bb", - "shasum": "" - }, - "require": { - "ext-ctype": "*", - "ext-json": "*", - "ext-tokenizer": "*", - "php": ">=7.4" - }, - "require-dev": { - "ircmaxell/php-yacc": "^0.0.7", - "phpunit/phpunit": "^9.0" - }, - "bin": [ - "bin/php-parse" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.x-dev" - } - }, - "autoload": { - "psr-4": { - "PhpParser\\": "lib/PhpParser" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Nikita Popov" - } - ], - "description": "A PHP parser written in PHP", - "keywords": [ - "parser", - "php" - ], - "support": { - "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v5.6.2" - }, - "time": "2025-10-21T19:32:17+00:00" - }, - { - "name": "phpstan/phpdoc-parser", - "version": "2.3.0", - "source": { - "type": "git", - "url": "https://github.com/phpstan/phpdoc-parser.git", - "reference": "1e0cd5370df5dd2e556a36b9c62f62e555870495" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/1e0cd5370df5dd2e556a36b9c62f62e555870495", - "reference": "1e0cd5370df5dd2e556a36b9c62f62e555870495", - "shasum": "" - }, - "require": { - "php": "^7.4 || ^8.0" - }, - "require-dev": { - "doctrine/annotations": "^2.0", - "nikic/php-parser": "^5.3.0", - "php-parallel-lint/php-parallel-lint": "^1.2", - "phpstan/extension-installer": "^1.0", - "phpstan/phpstan": "^2.0", - "phpstan/phpstan-phpunit": "^2.0", - "phpstan/phpstan-strict-rules": "^2.0", - "phpunit/phpunit": "^9.6", - "symfony/process": "^5.2" - }, - "type": "library", - "autoload": { - "psr-4": { - "PHPStan\\PhpDocParser\\": [ - "src/" - ] - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "PHPDoc parser with support for nullable, intersection and generic types", - "support": { - "issues": "https://github.com/phpstan/phpdoc-parser/issues", - "source": "https://github.com/phpstan/phpdoc-parser/tree/2.3.0" - }, - "time": "2025-08-30T15:50:23+00:00" - }, - { - "name": "psy/psysh", - "version": "v0.12.14", - "source": { - "type": "git", - "url": "https://github.com/bobthecow/psysh.git", - "reference": "95c29b3756a23855a30566b745d218bee690bef2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/bobthecow/psysh/zipball/95c29b3756a23855a30566b745d218bee690bef2", - "reference": "95c29b3756a23855a30566b745d218bee690bef2", - "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" - }, - "require-dev": { - "bamarni/composer-bin-plugin": "^1.2", - "composer/class-map-generator": "^1.6" - }, - "suggest": { - "composer/class-map-generator": "Improved tab completion performance with better class discovery.", - "ext-pcntl": "Enabling the PCNTL extension makes PsySH a lot happier :)", - "ext-posix": "If you have PCNTL, you'll want the POSIX extension as well." - }, - "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/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Justin Hileman", - "email": "justin@justinhileman.info" - } - ], - "description": "An interactive shell for modern PHP.", - "homepage": "https://psysh.org", - "keywords": [ - "REPL", - "console", - "interactive", - "shell" - ], - "support": { - "issues": "https://github.com/bobthecow/psysh/issues", - "source": "https://github.com/bobthecow/psysh/tree/v0.12.14" - }, - "time": "2025-10-27T17:15:31+00:00" - }, - { - "name": "react/promise", - "version": "v3.3.0", - "source": { - "type": "git", - "url": "https://github.com/reactphp/promise.git", - "reference": "23444f53a813a3296c1368bb104793ce8d88f04a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/reactphp/promise/zipball/23444f53a813a3296c1368bb104793ce8d88f04a", - "reference": "23444f53a813a3296c1368bb104793ce8d88f04a", - "shasum": "" - }, - "require": { - "php": ">=7.1.0" - }, - "require-dev": { - "phpstan/phpstan": "1.12.28 || 1.4.10", - "phpunit/phpunit": "^9.6 || ^7.5" - }, - "type": "library", - "autoload": { - "files": [ - "src/functions_include.php" - ], - "psr-4": { - "React\\Promise\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "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": "A lightweight implementation of CommonJS Promises/A for PHP", - "keywords": [ - "promise", - "promises" - ], - "support": { - "issues": "https://github.com/reactphp/promise/issues", - "source": "https://github.com/reactphp/promise/tree/v3.3.0" - }, - "funding": [ - { - "url": "https://opencollective.com/reactphp", - "type": "open_collective" - } - ], - "time": "2025-08-19T18:57:03+00:00" - }, - { - "name": "seld/jsonlint", - "version": "1.11.0", - "source": { - "type": "git", - "url": "https://github.com/Seldaek/jsonlint.git", - "reference": "1748aaf847fc731cfad7725aec413ee46f0cc3a2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Seldaek/jsonlint/zipball/1748aaf847fc731cfad7725aec413ee46f0cc3a2", - "reference": "1748aaf847fc731cfad7725aec413ee46f0cc3a2", - "shasum": "" - }, - "require": { - "php": "^5.3 || ^7.0 || ^8.0" - }, - "require-dev": { - "phpstan/phpstan": "^1.11", - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0 || ^8.5.13" - }, - "bin": [ - "bin/jsonlint" - ], - "type": "library", - "autoload": { - "psr-4": { - "Seld\\JsonLint\\": "src/Seld/JsonLint/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "https://seld.be" - } - ], - "description": "JSON Linter", - "keywords": [ - "json", - "linter", - "parser", - "validator" - ], - "support": { - "issues": "https://github.com/Seldaek/jsonlint/issues", - "source": "https://github.com/Seldaek/jsonlint/tree/1.11.0" - }, - "funding": [ - { - "url": "https://github.com/Seldaek", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/seld/jsonlint", - "type": "tidelift" - } - ], - "time": "2024-07-11T14:55:45+00:00" - }, - { - "name": "seld/phar-utils", - "version": "1.2.1", - "source": { - "type": "git", - "url": "https://github.com/Seldaek/phar-utils.git", - "reference": "ea2f4014f163c1be4c601b9b7bd6af81ba8d701c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Seldaek/phar-utils/zipball/ea2f4014f163c1be4c601b9b7bd6af81ba8d701c", - "reference": "ea2f4014f163c1be4c601b9b7bd6af81ba8d701c", - "shasum": "" - }, - "require": { - "php": ">=5.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Seld\\PharUtils\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be" - } - ], - "description": "PHAR file format utilities, for when PHP phars you up", - "keywords": [ - "phar" - ], - "support": { - "issues": "https://github.com/Seldaek/phar-utils/issues", - "source": "https://github.com/Seldaek/phar-utils/tree/1.2.1" - }, - "time": "2022-08-31T10:31:18+00:00" - }, - { - "name": "seld/signal-handler", - "version": "2.0.2", - "source": { - "type": "git", - "url": "https://github.com/Seldaek/signal-handler.git", - "reference": "04a6112e883ad76c0ada8e4a9f7520bbfdb6bb98" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Seldaek/signal-handler/zipball/04a6112e883ad76c0ada8e4a9f7520bbfdb6bb98", - "reference": "04a6112e883ad76c0ada8e4a9f7520bbfdb6bb98", - "shasum": "" - }, - "require": { - "php": ">=7.2.0" - }, - "require-dev": { - "phpstan/phpstan": "^1", - "phpstan/phpstan-deprecation-rules": "^1.0", - "phpstan/phpstan-phpunit": "^1", - "phpstan/phpstan-strict-rules": "^1.3", - "phpunit/phpunit": "^7.5.20 || ^8.5.23", - "psr/log": "^1 || ^2 || ^3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "2.x-dev" - } - }, - "autoload": { - "psr-4": { - "Seld\\Signal\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" - } - ], - "description": "Simple unix signal handler that silently fails where signals are not supported for easy cross-platform development", - "keywords": [ - "posix", - "sigint", - "signal", - "sigterm", - "unix" - ], - "support": { - "issues": "https://github.com/Seldaek/signal-handler/issues", - "source": "https://github.com/Seldaek/signal-handler/tree/2.0.2" - }, - "time": "2023-09-03T09:24:00+00:00" - }, - { - "name": "slevomat/coding-standard", - "version": "8.24.0", - "source": { - "type": "git", - "url": "https://github.com/slevomat/coding-standard.git", - "reference": "08e7989c0351f3f38b82172838195c35d9819efa" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/slevomat/coding-standard/zipball/08e7989c0351f3f38b82172838195c35d9819efa", - "reference": "08e7989c0351f3f38b82172838195c35d9819efa", - "shasum": "" - }, - "require": { - "dealerdirect/phpcodesniffer-composer-installer": "^0.6.2 || ^0.7 || ^1.1.2", - "php": "^7.4 || ^8.0", - "phpstan/phpdoc-parser": "^2.3.0", - "squizlabs/php_codesniffer": "^4.0.0" - }, - "require-dev": { - "phing/phing": "3.0.1|3.1.0", - "php-parallel-lint/php-parallel-lint": "1.4.0", - "phpstan/phpstan": "2.1.29", - "phpstan/phpstan-deprecation-rules": "2.0.3", - "phpstan/phpstan-phpunit": "2.0.7", - "phpstan/phpstan-strict-rules": "2.0.6", - "phpunit/phpunit": "9.6.8|10.5.48|11.4.4|11.5.36|12.3.14" - }, - "type": "phpcodesniffer-standard", - "extra": { - "branch-alias": { - "dev-master": "8.x-dev" - } - }, - "autoload": { - "psr-4": { - "SlevomatCodingStandard\\": "SlevomatCodingStandard/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Slevomat Coding Standard for PHP_CodeSniffer complements Consistence Coding Standard by providing sniffs with additional checks.", - "keywords": [ - "dev", - "phpcs" - ], - "support": { - "issues": "https://github.com/slevomat/coding-standard/issues", - "source": "https://github.com/slevomat/coding-standard/tree/8.24.0" - }, - "funding": [ - { - "url": "https://github.com/kukulich", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/slevomat/coding-standard", - "type": "tidelift" - } - ], - "time": "2025-09-25T21:37:40+00:00" - }, - { - "name": "squizlabs/php_codesniffer", - "version": "4.0.0", - "source": { - "type": "git", - "url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git", - "reference": "06113cfdaf117fc2165f9cd040bd0f17fcd5242d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/06113cfdaf117fc2165f9cd040bd0f17fcd5242d", - "reference": "06113cfdaf117fc2165f9cd040bd0f17fcd5242d", - "shasum": "" - }, - "require": { - "ext-simplexml": "*", - "ext-tokenizer": "*", - "ext-xmlwriter": "*", - "php": ">=7.2.0" - }, - "require-dev": { - "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", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Greg Sherwood", - "role": "Former lead" - }, - { - "name": "Juliette Reinders Folmer", - "role": "Current lead" - }, - { - "name": "Contributors", - "homepage": "https://github.com/PHPCSStandards/PHP_CodeSniffer/graphs/contributors" - } - ], - "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", - "standards", - "static analysis" - ], - "support": { - "issues": "https://github.com/PHPCSStandards/PHP_CodeSniffer/issues", - "security": "https://github.com/PHPCSStandards/PHP_CodeSniffer/security/policy", - "source": "https://github.com/PHPCSStandards/PHP_CodeSniffer", - "wiki": "https://github.com/PHPCSStandards/PHP_CodeSniffer/wiki" - }, - "funding": [ - { - "url": "https://github.com/PHPCSStandards", - "type": "github" - }, - { - "url": "https://github.com/jrfnl", - "type": "github" - }, - { - "url": "https://opencollective.com/php_codesniffer", - "type": "open_collective" - }, - { - "url": "https://thanks.dev/u/gh/phpcsstandards", - "type": "thanks_dev" - } - ], - "time": "2025-09-15T11:28:58+00:00" - }, - { - "name": "symfony/finder", - "version": "v7.3.5", - "source": { - "type": "git", - "url": "https://github.com/symfony/finder.git", - "reference": "9f696d2f1e340484b4683f7853b273abff94421f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/9f696d2f1e340484b4683f7853b273abff94421f", - "reference": "9f696d2f1e340484b4683f7853b273abff94421f", - "shasum": "" - }, - "require": { - "php": ">=8.2" - }, - "require-dev": { - "symfony/filesystem": "^6.4|^7.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\Finder\\": "" - }, - "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": "Finds files and directories via an intuitive fluent interface", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/finder/tree/v7.3.5" - }, - "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": "2025-10-15T18:45:57+00:00" - }, - { - "name": "symfony/polyfill-php73", - "version": "v1.33.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "0f68c03565dcaaf25a890667542e8bd75fe7e5bb" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/0f68c03565dcaaf25a890667542e8bd75fe7e5bb", - "reference": "0f68c03565dcaaf25a890667542e8bd75fe7e5bb", - "shasum": "" - }, - "require": { - "php": ">=7.2" - }, - "type": "library", - "extra": { - "thanks": { - "url": "https://github.com/symfony/polyfill", - "name": "symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Php73\\": "" - }, - "classmap": [ - "Resources/stubs" - ] - }, - "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": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php73/tree/v1.33.0" - }, - "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": "2024-09-09T11:45:10+00:00" - }, - { - "name": "symfony/polyfill-php80", - "version": "v1.33.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "0cc9dd0f17f61d8131e7df6b84bd344899fe2608" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/0cc9dd0f17f61d8131e7df6b84bd344899fe2608", - "reference": "0cc9dd0f17f61d8131e7df6b84bd344899fe2608", - "shasum": "" - }, - "require": { - "php": ">=7.2" - }, - "type": "library", - "extra": { - "thanks": { - "url": "https://github.com/symfony/polyfill", - "name": "symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "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" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.33.0" - }, - "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": "2025-01-02T08:10:11+00:00" - }, - { - "name": "symfony/polyfill-php81", - "version": "v1.33.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php81.git", - "reference": "4a4cfc2d253c21a5ad0e53071df248ed48c6ce5c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/4a4cfc2d253c21a5ad0e53071df248ed48c6ce5c", - "reference": "4a4cfc2d253c21a5ad0e53071df248ed48c6ce5c", - "shasum": "" - }, - "require": { - "php": ">=7.2" - }, - "type": "library", - "extra": { - "thanks": { - "url": "https://github.com/symfony/polyfill", - "name": "symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Php81\\": "" - }, - "classmap": [ - "Resources/stubs" - ] - }, - "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": "Symfony polyfill backporting some PHP 8.1+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php81/tree/v1.33.0" - }, - "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": "2024-09-09T11:45:10+00:00" - }, - { - "name": "symfony/process", - "version": "v7.3.4", - "source": { - "type": "git", - "url": "https://github.com/symfony/process.git", - "reference": "f24f8f316367b30810810d4eb30c543d7003ff3b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/f24f8f316367b30810810d4eb30c543d7003ff3b", - "reference": "f24f8f316367b30810810d4eb30c543d7003ff3b", - "shasum": "" - }, - "require": { - "php": ">=8.2" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\Process\\": "" - }, - "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": "Executes commands in sub-processes", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/process/tree/v7.3.4" - }, - "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": "2025-09-11T10:12:26+00:00" - }, - { - "name": "symfony/var-dumper", - "version": "v7.3.5", - "source": { - "type": "git", - "url": "https://github.com/symfony/var-dumper.git", - "reference": "476c4ae17f43a9a36650c69879dcf5b1e6ae724d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/476c4ae17f43a9a36650c69879dcf5b1e6ae724d", - "reference": "476c4ae17f43a9a36650c69879dcf5b1e6ae724d", - "shasum": "" - }, - "require": { - "php": ">=8.2", - "symfony/deprecation-contracts": "^2.5|^3", - "symfony/polyfill-mbstring": "~1.0" - }, - "conflict": { - "symfony/console": "<6.4" - }, - "require-dev": { - "symfony/console": "^6.4|^7.0", - "symfony/http-kernel": "^6.4|^7.0", - "symfony/process": "^6.4|^7.0", - "symfony/uid": "^6.4|^7.0", - "twig/twig": "^3.12" - }, - "bin": [ - "Resources/bin/var-dump-server" - ], - "type": "library", - "autoload": { - "files": [ - "Resources/functions/dump.php" - ], - "psr-4": { - "Symfony\\Component\\VarDumper\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "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": "Provides mechanisms for walking through any arbitrary PHP variable", - "homepage": "https://symfony.com", - "keywords": [ - "debug", - "dump" - ], - "support": { - "source": "https://github.com/symfony/var-dumper/tree/v7.3.5" - }, - "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": "2025-09-27T09:00:46+00:00" - }, - { - "name": "twig/markdown-extra", - "version": "v3.21.0", - "source": { - "type": "git", - "url": "https://github.com/twigphp/markdown-extra.git", - "reference": "f4616e1dd375209dacf6026f846e6b537d036ce4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/twigphp/markdown-extra/zipball/f4616e1dd375209dacf6026f846e6b537d036ce4", - "reference": "f4616e1dd375209dacf6026f846e6b537d036ce4", - "shasum": "" - }, - "require": { - "php": ">=8.1.0", - "symfony/deprecation-contracts": "^2.5|^3", - "twig/twig": "^3.13|^4.0" - }, - "require-dev": { - "erusev/parsedown": "dev-master as 1.x-dev", - "league/commonmark": "^1.0|^2.0", - "league/html-to-markdown": "^4.8|^5.0", - "michelf/php-markdown": "^1.8|^2.0", - "symfony/phpunit-bridge": "^6.4|^7.0" - }, - "type": "library", - "autoload": { - "files": [ - "Resources/functions.php" - ], - "psr-4": { - "Twig\\Extra\\Markdown\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com", - "homepage": "http://fabien.potencier.org", - "role": "Lead Developer" - } - ], - "description": "A Twig extension for Markdown", - "homepage": "https://twig.symfony.com", - "keywords": [ - "html", - "markdown", - "twig" - ], - "support": { - "source": "https://github.com/twigphp/markdown-extra/tree/v3.21.0" - }, - "funding": [ - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/twig/twig", - "type": "tidelift" - } - ], - "time": "2025-01-31T20:45:36+00:00" - }, - { - "name": "twig/twig", - "version": "v3.21.1", - "source": { - "type": "git", - "url": "https://github.com/twigphp/Twig.git", - "reference": "285123877d4dd97dd7c11842ac5fb7e86e60d81d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/285123877d4dd97dd7c11842ac5fb7e86e60d81d", - "reference": "285123877d4dd97dd7c11842ac5fb7e86e60d81d", - "shasum": "" - }, - "require": { - "php": ">=8.1.0", - "symfony/deprecation-contracts": "^2.5|^3", - "symfony/polyfill-ctype": "^1.8", - "symfony/polyfill-mbstring": "^1.3" - }, - "require-dev": { - "phpstan/phpstan": "^2.0", - "psr/container": "^1.0|^2.0", - "symfony/phpunit-bridge": "^5.4.9|^6.4|^7.0" - }, - "type": "library", - "autoload": { - "files": [ - "src/Resources/core.php", - "src/Resources/debug.php", - "src/Resources/escaper.php", - "src/Resources/string_loader.php" - ], - "psr-4": { - "Twig\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com", - "homepage": "http://fabien.potencier.org", - "role": "Lead Developer" - }, - { - "name": "Twig Team", - "role": "Contributors" - }, - { - "name": "Armin Ronacher", - "email": "armin.ronacher@active-4.com", - "role": "Project Founder" - } - ], - "description": "Twig, the flexible, fast, and secure template language for PHP", - "homepage": "https://twig.symfony.com", - "keywords": [ - "templating" - ], - "support": { - "issues": "https://github.com/twigphp/Twig/issues", - "source": "https://github.com/twigphp/Twig/tree/v3.21.1" - }, - "funding": [ - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/twig/twig", - "type": "tidelift" - } - ], - "time": "2025-05-03T07:21:55+00:00" - } - ], - "aliases": [], - "minimum-stability": "dev", - "stability-flags": { - "psy/psysh": 0 - }, - "prefer-stable": true, - "prefer-lowest": false, - "platform": { - "php": ">=8.1" - }, - "platform-dev": {}, - "plugin-api-version": "2.6.0" -} diff --git a/config/.env.default b/config/.env.default deleted file mode 100644 index 7d06cfd..0000000 --- a/config/.env.default +++ /dev/null @@ -1,30 +0,0 @@ -#!/usr/bin/env bash -# Used as a default to seed config/.env which -# enables you to use environment variables to configure -# the aspects of your application that vary by -# environment. -# -# To use this file, first copy it into `config/.env`. -# -# In development .env files are parsed by PHP -# and set into the environment. This provides a simpler -# development workflow over standard environment variables. -export APP_NAME="__APP_NAME__" -export DEBUG="true" -export APP_ENCODING="UTF-8" -export APP_DEFAULT_LOCALE="en_US" -export SECURITY_SALT="__SALT__" - -export CACHE_DURATION="+2 minutes" -export CACHE_DEFAULT_URL="file://tmp/cache/?prefix=${APP_NAME}_default&duration=${CACHE_DURATION}" -export CACHE_CAKECORE_URL="file://tmp/cache/persistent?prefix=${APP_NAME}_cake_core&serialize=true&duration=${CACHE_DURATION}" -export CACHE_CAKEMODEL_URL="file://tmp/cache/models?prefix=${APP_NAME}_cake_model&serialize=true&duration=${CACHE_DURATION}" - -export EMAIL_TRANSPORT_DEFAULT_URL="" - -export DATABASE_URL="mysql://my_app:secret@localhost/${APP_NAME}?encoding=utf8&timezone=UTC&cacheMetadata=true"eIdentifiers=false&persistent=false" -export DATABASE_TEST_URL="mysql://my_app:secret@localhost/test_${APP_NAME}?encoding=utf8&timezone=UTC&cacheMetadata=true"eIdentifiers=false&persistent=false" - -# Uncomment these to define logging configuration via environment variables. -#export LOG_DEBUG_URL="file://logs?levels[]=notice&levels[]=info&levels[]=debug&file=debug" -#export LOG_ERROR_URL="file://logs?levels[]=warning&levels[]=error&levels[]=critical&levels[]=alert&levels[]=emergency&file=error" diff --git a/config/.env.example b/config/.env.example new file mode 100644 index 0000000..793f83b --- /dev/null +++ b/config/.env.example @@ -0,0 +1,41 @@ +#!/usr/bin/env bash +# Used as a default to seed config/.env which +# enables you to use environment variables to configure +# the aspects of your application that vary by +# environment. +# +# Having this file in production is considered a **SECURITY RISK** and also decreases +# the bootstrap performance of your application. +# +# To use this file, first copy it into `config/.env`. Also ensure the related +# code block for loading this file is uncommented in `config/bootstrap.php` +# +# In development .env files are parsed by PHP +# and set into the environment. This provides a simpler +# development workflow over standard environment variables. +export APP_NAME="__APP_NAME__" +export DEBUG="true" +export APP_ENCODING="UTF-8" +export APP_DEFAULT_LOCALE="en_US" +export APP_DEFAULT_TIMEZONE="UTC" +# SECURITY: Set this to your domain to prevent Host Header Injection attacks +# This is REQUIRED in production for password resets and other security features +export APP_FULL_BASE_URL="https://example.com" +export SECURITY_SALT="__SALT__" + +# Uncomment these to define cache configuration via environment variables. +#export CACHE_DURATION="+2 minutes" +#export CACHE_DEFAULT_URL="file:///path/to/tmp/cache/?prefix=${APP_NAME}_default_&duration=${CACHE_DURATION}" +#export CACHE_CAKECORE_URL="file:///path/to/tmp/cache/persistent?prefix=${APP_NAME}_cake_translations_&serialize=true&duration=${CACHE_DURATION}" +#export CACHE_CAKEMODEL_URL="file:///path/to/tmp/cache/models?prefix=${APP_NAME}_cake_model_&serialize=true&duration=${CACHE_DURATION}" + +# Uncomment these to define email transport configuration via environment variables. +#export EMAIL_TRANSPORT_DEFAULT_URL="" + +# Uncomment these to define database configuration via environment variables. +#export DATABASE_URL="mysql://my_app:secret@localhost/${APP_NAME}?encoding=utf8&timezone=UTC&cacheMetadata=true"eIdentifiers=false&persistent=false" +#export DATABASE_TEST_URL="mysql://my_app:secret@localhost/test_${APP_NAME}?encoding=utf8&timezone=UTC&cacheMetadata=true"eIdentifiers=false&persistent=false" + +# Uncomment these to define logging configuration via environment variables. +#export LOG_DEBUG_URL="file:///path/to/logs/?levels[]=notice&levels[]=info&levels[]=debug&file=debug" +#export LOG_ERROR_URL="file:///path/to/logs/?levels[]=warning&levels[]=error&levels[]=critical&levels[]=alert&levels[]=emergency&file=error" diff --git a/config/Migrations/20221126022125_InitialSchema.php b/config/Migrations/20221126022125_InitialSchema.php index f971d78..a02f0a4 100644 --- a/config/Migrations/20221126022125_InitialSchema.php +++ b/config/Migrations/20221126022125_InitialSchema.php @@ -1,15 +1,15 @@ null, 'limit' => null, 'null' => false, - 'signed' => false, ]) ->addColumn('title', 'string', [ 'default' => null, @@ -69,13 +68,11 @@ public function up() 'default' => null, 'limit' => null, 'null' => false, - 'signed' => false, ]) ->addColumn('tag_id', 'integer', [ 'default' => null, 'limit' => null, 'null' => false, - 'signed' => false, ]) ->addIndex( [ diff --git a/config/app.php b/config/app.php index 863f1b5..9876cf4 100644 --- a/config/app.php +++ b/config/app.php @@ -5,7 +5,6 @@ use Cake\Database\Driver\Mysql; use Cake\Log\Engine\FileLog; use Cake\Mailer\Transport\MailTransport; - use function Cake\Core\env; return [ @@ -37,10 +36,12 @@ * /.htaccess * /webroot/.htaccess * And uncomment the baseUrl key below. - * - fullBaseUrl - A base URL to use for absolute links. When set to false (default) - * CakePHP generates required value based on `HTTP_HOST` environment variable. - * However, you can define it manually to optimize performance or if you - * are concerned about people manipulating the `Host` header. + * - fullBaseUrl - SECURITY: A base URL to use for absolute links. + * IMPORTANT: This MUST be set in production to prevent Host Header Injection attacks + * that can compromise password reset and other security-critical features. + * Set this via APP_FULL_BASE_URL environment variable or directly in config. + * Example: 'https://example.com' + * When not set, the application will throw an exception in production mode. * - imageBaseUrl - Web path to the public images/ directory under webroot. * - cssBaseUrl - Web path to the public css/ directory under webroot. * - jsBaseUrl - Web path to the public js/ directory under webroot. @@ -58,7 +59,7 @@ 'webroot' => 'webroot', 'wwwRoot' => WWW_ROOT, //'baseUrl' => env('SCRIPT_NAME'), - 'fullBaseUrl' => false, + 'fullBaseUrl' => env('APP_FULL_BASE_URL', false), 'imageBaseUrl' => 'img/', 'cssBaseUrl' => 'css/', 'jsBaseUrl' => 'js/', @@ -169,7 +170,8 @@ * breathing room to complete logging or error handling. * - `ignoredDeprecationPaths` - array - A list of glob-compatible file paths that deprecations * should be ignored in. Use this to ignore deprecations for plugins or parts of - * your application that still emit deprecations. + * your application that still emits deprecations. + * - `traceFormat` - when logging errors, List of `'array'`, `'points'`, `'shortPoints'`, defaults to `shortPoints`. */ 'Error' => [ 'errorLevel' => E_ALL, @@ -177,6 +179,7 @@ 'log' => true, 'trace' => true, 'ignoredDeprecationPaths' => [], + 'traceFormat' => null, ], /* @@ -188,6 +191,8 @@ * By default atom, emacs, macvim, phpstorm, sublime, textmate, and vscode are * available. You can add additional editor link formats using * `Debugger::addEditor()` during your application bootstrap. + * - `editorBasePath` - The base path to your project for editor integration. + * Used to generate file links in stack traces. * - `outputMask` A mapping of `key` to `replacement` values that * `Debugger` should replace in dumped data and logs generated by `Debugger`. */ diff --git a/config/bootstrap.php b/config/bootstrap.php index 54050f7..dd9bbaa 100644 --- a/config/bootstrap.php +++ b/config/bootstrap.php @@ -15,19 +15,20 @@ * @license https://opensource.org/licenses/mit-license.php MIT License */ +/* + * This file is loaded by your src/Application.php bootstrap method. + * Feel free to extend/extract parts of the bootstrap process into your own files + * to suit your needs/preferences. + */ + /* * Configure paths required to find CakePHP + general filepath constants */ -require __DIR__ . '/paths.php'; +require __DIR__ . DIRECTORY_SEPARATOR . 'paths.php'; /* - * Bootstrap CakePHP. - * - * Does the various bits of setup that CakePHP needs to do. - * This includes: - * - * - Registering the CakePHP autoloader. - * - Setting the default application paths. + * Bootstrap CakePHP + * Currently all this does is initialize the router (without loading your routes) */ require CORE_PATH . 'config' . DS . 'bootstrap.php'; @@ -43,9 +44,13 @@ use Cake\Mailer\TransportFactory; use Cake\Routing\Router; use Cake\Utility\Security; +use Detection\MobileDetect; +use function Cake\Core\env; -require_once CAKE . 'Core/functions_global.php'; -require_once CAKE . 'I18n/functions_global.php'; +/* + * Load global functions for collections, translations, debugging etc. + */ +require CAKE . 'functions.php'; /* * See https://github.com/josegonzalez/php-dotenv for API details. @@ -61,26 +66,25 @@ * security risks. See https://github.com/josegonzalez/php-dotenv#general-security-information * for more information for recommended practices. */ -// if (!env('APP_NAME') && file_exists(CONFIG . '.env')) { -// $dotenv = new \josegonzalez\Dotenv\Loader([CONFIG . '.env']); -// $dotenv->parse() -// ->putenv() -// ->toEnv() -// ->toServer(); -// } +if (!env('APP_NAME') && file_exists(CONFIG . '.env')) { + $dotenv = new \josegonzalez\Dotenv\Loader([CONFIG . '.env']); + $dotenv->parse() + ->putenv() + ->toEnv() + ->toServer(); +} /* - * Read configuration file and inject configuration into various - * CakePHP classes. + * Initializes default Config store and loads the main configuration file (app.php) * - * By default there is only one configuration file. It is often a good - * idea to create multiple configuration files, and separate the configuration - * that changes from configuration that does not. This makes deployment simpler. + * CakePHP contains 2 configuration files after project creation: + * - `config/app.php` for the default application configuration. + * - `config/app_local.php` for environment specific configuration. */ try { Configure::config('default', new PhpConfig()); Configure::load('app', 'default', false); -} catch (\Exception $e) { +} catch (Exception $e) { exit($e->getMessage() . "\n"); } @@ -93,14 +97,11 @@ } /* - * When debug = true the metadata cache should only last - * for a short time. + * When debug = true the metadata cache should only last for a short time. */ if (Configure::read('debug')) { - Configure::write('Cache._cake_model_.duration', '+2 minutes'); - Configure::write('Cache._cake_core_.duration', '+2 minutes'); - // disable router cache during development - Configure::write('Cache._cake_routes_.duration', '+2 seconds'); + Configure::write('Cache._cake_model_.duration', '+1 minute'); + Configure::write('Cache._cake_translations_.duration', '+1 minute'); } /* @@ -123,29 +124,52 @@ /* * Register application error and exception handlers. */ -(new ErrorTrap())->register(); -(new ExceptionTrap())->register(); +(new ErrorTrap(Configure::read('Error')))->register(); +(new ExceptionTrap(Configure::read('Error')))->register(); /* - * Include the CLI bootstrap overrides. + * CLI/Command specific configuration. */ -if (PHP_SAPI == 'cli') { - require __DIR__ . '/bootstrap_cli.php'; +if (PHP_SAPI === 'cli') { + // Set the fullBaseUrl to allow URLs to be generated in commands. + // This is useful when sending email from commands. + // Configure::write('App.fullBaseUrl', php_uname('n')); + + // Set logs to different files so they don't have permission conflicts. + if (Configure::check('Log.debug')) { + Configure::write('Log.debug.file', 'cli-debug'); + } + if (Configure::check('Log.error')) { + Configure::write('Log.error.file', 'cli-error'); + } } /* - * Set the full base URL. - * This URL is used as the base of all absolute links. + * Set the full base URL for the application. + * + * SECURITY: In production, App.fullBaseUrl MUST be explicitly configured to prevent + * Host Header Injection attacks. The HostHeaderMiddleware enforces this requirement + * and validates incoming Host headers against the configured value. + * + * Set APP_FULL_BASE_URL in your environment variables or configure App.fullBaseUrl + * in config/app.php or config/app_local.php + * + * Example: APP_FULL_BASE_URL=https://example.com */ $fullBaseUrl = Configure::read('App.fullBaseUrl'); if (!$fullBaseUrl) { - $s = null; - if (env('HTTPS')) { - $s = 's'; - } - $httpHost = env('HTTP_HOST'); - if (isset($httpHost)) { + + /* + * Development mode fallback: Use HTTP_HOST for convenience. + * WARNING: This is ONLY safe in development. In production, the + * HostHeaderMiddleware will reject requests when fullBaseUrl is not configured. + */ + if ($httpHost) { + $s = null; + if (env('HTTPS') || env('HTTP_X_FORWARDED_PROTO') === 'https') { + $s = 's'; + } $fullBaseUrl = 'http' . $s . '://' . $httpHost; } unset($httpHost, $s); @@ -155,6 +179,10 @@ } unset($fullBaseUrl); +/* + * Apply the loaded configuration settings to their respective systems. + * This will also remove the loaded config data from memory. + */ Cache::setConfig(Configure::consume('Cache')); ConnectionManager::setConfig(Configure::consume('Datasources')); TransportFactory::setConfig(Configure::consume('EmailTransport')); @@ -164,14 +192,46 @@ /* * Setup detectors for mobile and tablet. + * If you don't use these checks you can safely remove this code + * and the mobiledetect package from composer.json. */ ServerRequest::addDetector('mobile', function ($request) { - $detector = new \Detection\MobileDetect(); + $detector = new MobileDetect(); return $detector->isMobile(); }); ServerRequest::addDetector('tablet', function ($request) { - $detector = new \Detection\MobileDetect(); + $detector = new MobileDetect(); return $detector->isTablet(); }); + +/* + * You can enable default locale format parsing by adding calls + * to `useLocaleParser()`. This enables the automatic conversion of + * locale specific date formats when processing request data. For details see + * @link https://book.cakephp.org/5/en/core-libraries/internationalization-and-localization.html#parsing-localized-datetime-data + */ +// \Cake\Database\TypeFactory::build('time')->useLocaleParser(); +// \Cake\Database\TypeFactory::build('date')->useLocaleParser(); +// \Cake\Database\TypeFactory::build('datetime')->useLocaleParser(); +// \Cake\Database\TypeFactory::build('timestamp')->useLocaleParser(); +// \Cake\Database\TypeFactory::build('datetimefractional')->useLocaleParser(); +// \Cake\Database\TypeFactory::build('timestampfractional')->useLocaleParser(); +// \Cake\Database\TypeFactory::build('datetimetimezone')->useLocaleParser(); +// \Cake\Database\TypeFactory::build('timestamptimezone')->useLocaleParser(); + +/* + * Custom Inflector rules, can be set to correctly pluralize or singularize + * table, model, controller names or whatever other string is passed to the + * inflection functions. + */ +// \Cake\Utility\Inflector::rules('plural', ['/^(inflect)or$/i' => '\1ables']); +// \Cake\Utility\Inflector::rules('irregular', ['red' => 'redlings']); +// \Cake\Utility\Inflector::rules('uninflected', ['dontinflectme']); + +// set a custom date and time format +// see https://book.cakephp.org/5/en/core-libraries/time.html#setting-the-default-locale-and-format-string +// and https://unicode-org.github.io/icu/userguide/format_parse/datetime/#datetime-format-syntax +// \Cake\I18n\Date::setToStringFormat('dd.MM.yyyy'); +// \Cake\I18n\Time::setToStringFormat('dd.MM.yyyy HH:mm'); diff --git a/config/bootstrap_cli.php b/config/bootstrap_cli.php deleted file mode 100644 index 7cece95..0000000 --- a/config/bootstrap_cli.php +++ /dev/null @@ -1,31 +0,0 @@ - `[configuration options]`. + * + * Available options: + * - onlyDebug: Load the plugin only in debug mode. Default false. + * - onlyCli: Load the plugin only in CLI mode. Default false. + * - optional: Do not throw an exception if the plugin is not found. Default false. + */ +return [ + 'Authentication', + 'Authorization', + 'DebugKit' => ['onlyDebug' => true], + 'Bake' => ['onlyCli' => true, 'optional' => true], + 'Migrations' => ['onlyCli' => true], + + // Additional plugins here +]; diff --git a/config/routes.php b/config/routes.php index abbe15a..c3c65ff 100644 --- a/config/routes.php +++ b/config/routes.php @@ -1,12 +1,14 @@ setRouteClass(DashedRoute::class); + + $routes->scope('/', function (RouteBuilder $builder): void { + /* + * Here, we are connecting '/' (base path) to the 'index' action of the + * 'Articles' controller... + */ + $builder->connect('/', ['controller' => 'Articles', 'action' => 'index']); -$routes->scope('/', function (RouteBuilder $routes) { - // Register scoped middleware for in scopes. - $routes->registerMiddleware('csrf', new CsrfProtectionMiddleware([ - 'httponly' => true - ])); - $routes->applyMiddleware('csrf'); - $routes->connect('/', ['controller' => 'Articles', 'action' => 'index']); - $routes->connect('/pages/*', ['controller' => 'Pages', 'action' => 'display']); + /* + * ...and connect the rest of 'Pages' controller's URLs. + */ + $builder->connect('/pages/*', 'Pages::display'); + // New route we're adding for our tagged action. + // The trailing `*` tells CakePHP that this action has + // passed parameters. + $builder->connect('/articles/tagged/*', ['controller' => 'Articles', 'action' => 'tags']); - // New route we're adding for our tagged action. - // The trailing `*` tells CakePHP that this action has - // passed parameters. - $routes->scope('/articles', function ($routes) { - $routes->connect('/tagged/*', ['controller' => 'Articles', 'action' => 'tags']); + /* + * Connect catchall routes for all controllers. + * + * The `fallbacks` method is a shortcut for + * + * ``` + * $builder->connect('/{controller}', ['action' => 'index']); + * $builder->connect('/{controller}/{action}/*', []); + * ``` + * + * It is NOT recommended to use fallback routes after your initial prototyping phase! + * See https://book.cakephp.org/5/en/development/routing.html#fallbacks-method for more information + */ + $builder->fallbacks(); }); - /** - * Connect catchall routes for all controllers. + /* + * If you need a different set of middleware or none at all, + * open new scope and define routes there. + * + * ``` + * $routes->scope('/api', function (RouteBuilder $builder): void { + * // No $builder->applyMiddleware() here. + * + * // Parse specified extensions from URLs + * // $builder->setExtensions(['json', 'xml']); + * + * // Connect API actions here. + * }); + * ``` */ - $routes->fallbacks(DashedRoute::class); -}); +}; diff --git a/config/schema/sessions.sql b/config/schema/sessions.sql index 4d8fa8e..bdfdea0 100644 --- a/config/schema/sessions.sql +++ b/config/schema/sessions.sql @@ -5,9 +5,11 @@ # Redistributions of files must retain the above copyright notice. # MIT License (https://opensource.org/licenses/mit-license.php) -CREATE TABLE sessions ( - id char(40) NOT NULL, - data text, - expires INT(11) NOT NULL, - PRIMARY KEY (id) -); +CREATE TABLE `sessions` ( + `id` char(40) CHARACTER SET ascii COLLATE ascii_bin NOT NULL, + `created` datetime DEFAULT CURRENT_TIMESTAMP, -- optional, requires MySQL 5.6.5+ + `modified` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, -- optional, requires MySQL 5.6.5+ + `data` blob DEFAULT NULL, -- for PostgreSQL use bytea instead of blob + `expires` int(10) unsigned DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; diff --git a/phpcs.xml b/phpcs.xml index 099e710..ea0eeee 100644 --- a/phpcs.xml +++ b/phpcs.xml @@ -1,16 +1,10 @@ - - - - - - - - 0 + + + + */src/Controller/* - ./src - ./tests - - + src/ + tests/ diff --git a/phpstan.neon b/phpstan.neon new file mode 100644 index 0000000..8d1187e --- /dev/null +++ b/phpstan.neon @@ -0,0 +1,22 @@ +parameters: + level: 8 + treatPhpDocTypesAsCertain: false + bootstrapFiles: + - config/bootstrap.php + paths: + - src/ + ignoreErrors: + # Cake classes use generics that are not worth repeating in the app code. + - + identifier: missingType.generics + # The associations in the baked table docblocks are not resolved by PHPStan. + - + identifier: propertyTag.unresolvableType + path: src/Model/Table/* + - + identifier: missingType.iterableValue + path: src/Model/Table/* + # The base class is not generic. + - + identifier: generics.notGeneric + path: src/Application.php diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 77c784b..38c7d78 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,40 +1,36 @@ - + - - - ./tests/TestCase + + tests/TestCase/ - - - - - - - - + + + + - - - ./src/ - ./plugins/*/src/ - - + + + src/ + plugins/*/src/ + + + src/Console/Installer.php + + diff --git a/plugins/.gitkeep b/plugins/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/resources/.gitkeep b/resources/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/src/Application.php b/src/Application.php index 574ab69..d4d1618 100644 --- a/src/Application.php +++ b/src/Application.php @@ -1,4 +1,5 @@ */ class Application extends BaseApplication implements AuthenticationServiceProviderInterface, @@ -54,39 +64,11 @@ public function bootstrap(): void // Call parent to load bootstrap from files. parent::bootstrap(); - if (PHP_SAPI === 'cli') { - $this->bootstrapCli(); - } - - /* - * Only try to load DebugKit in development mode - * Debug Kit should not be installed on a production system - */ - if (Configure::read('debug')) { - $this->addPlugin('DebugKit'); - } - $this->addPlugin('Authentication'); - $this->addPlugin('Authorization'); - } - - /** - * Bootrapping for CLI application. - * - * That is when running commands. - * - * @return void - */ - protected function bootstrapCli(): void - { - try { - $this->addPlugin('Bake'); - } catch (MissingPluginException $e) { - // Do not halt if the plugin is missing - } - - $this->addPlugin('Migrations'); - - // Load more plugins here + // By default, does not allow fallback classes. + FactoryLocator::add( + 'Table', + (new TableLocator())->allowFallbackClass(false), + ); } /** @@ -95,32 +77,80 @@ protected function bootstrapCli(): void * @param \Cake\Http\MiddlewareQueue $middlewareQueue The middleware queue to setup. * @return \Cake\Http\MiddlewareQueue The updated middleware queue. */ - public function middleware($middlewareQueue): \Cake\Http\MiddlewareQueue + public function middleware(MiddlewareQueue $middlewareQueue): MiddlewareQueue { $middlewareQueue // Catch any exceptions in the lower layers, // and make an error page/response - ->add(ErrorHandlerMiddleware::class) + ->add(new ErrorHandlerMiddleware(Configure::read('Error'), $this)) + + // Validate Host header to prevent Host Header Injection attacks. + // In production, ensures App.fullBaseUrl is configured and validates + // the incoming Host header against it. + ->add(new HostHeaderMiddleware()) // Handle plugin/theme assets like CakePHP normally does. - ->add(AssetMiddleware::class) + ->add(new AssetMiddleware([ + 'cacheTime' => Configure::read('Asset.cacheTime'), + ])) // Add routing middleware. + // If you have a large number of routes connected, turning on routes + // caching in production could improve performance. + // See https://github.com/CakeDC/cakephp-cached-routing ->add(new RoutingMiddleware($this)) - // add Authentication after RoutingMiddleware - ->add(new AuthenticationMiddleware($this)) + // Parse various types of encoded request bodies so that they are + // available as array through $request->getData() + // https://book.cakephp.org/5/en/controllers/middleware.html#body-parser-middleware + ->add(new BodyParserMiddleware()) - // Add authorization **after** authentication - ->add(new AuthorizationMiddleware($this)); + // Cross Site Request Forgery (CSRF) Protection Middleware + // https://book.cakephp.org/5/en/security/csrf.html#cross-site-request-forgery-csrf-middleware + ->add(new CsrfProtectionMiddleware([ + 'httponly' => true, + ])) - if (Configure::read('debug')) { - Configure::write('DebugKit.ignoreAuthorization', true); - } + // Add Authentication after Routing, Authorization after Authentication. + ->add(new AuthenticationMiddleware($this)) + ->add(new AuthorizationMiddleware($this)); return $middlewareQueue; } + /** + * Register application container services. + * + * @param \Cake\Core\ContainerInterface $container The Container to update. + * @return void + * @link https://book.cakephp.org/5/en/development/dependency-injection.html#dependency-injection + */ + public function services(ContainerInterface $container): void + { + // Allow your Tables to be dependency injected + //$container->delegate(new \Cake\ORM\Locator\TableContainer()); + } + + /** + * Register custom event listeners here + * + * @param \Cake\Event\EventManagerInterface $eventManager + * @return \Cake\Event\EventManagerInterface + * @link https://book.cakephp.org/5/en/core-libraries/events.html#registering-listeners + */ + public function events(EventManagerInterface $eventManager): EventManagerInterface + { + // $eventManager->on(new SomeCustomListenerClass()); + + return $eventManager; + } + + /** + * Returns the authentication service, used to identify users. + * + * @param \Psr\Http\Message\ServerRequestInterface $request The request. + * @return \Authentication\AuthenticationServiceInterface + */ public function getAuthenticationService(ServerRequestInterface $request): AuthenticationServiceInterface { $service = new AuthenticationService(); @@ -138,13 +168,12 @@ public function getAuthenticationService(ServerRequestInterface $request): Authe // Define identifiers $fields = [ - AbstractIdentifier::CREDENTIAL_USERNAME => 'email', - AbstractIdentifier::CREDENTIAL_PASSWORD => 'password' + PasswordIdentifier::CREDENTIAL_USERNAME => 'email', + PasswordIdentifier::CREDENTIAL_PASSWORD => 'password', ]; $passwordIdentifier = [ - 'Authentication.Password' => [ - 'fields' => $fields, - ], + 'className' => 'Authentication.Password', + 'fields' => $fields, ]; // Load the authenticators. Session should be first. @@ -165,10 +194,14 @@ public function getAuthenticationService(ServerRequestInterface $request): Authe return $service; } + /** + * Returns the authorization service, used to check what users can do. + * + * @param \Psr\Http\Message\ServerRequestInterface $request The request. + * @return \Authorization\AuthorizationServiceInterface + */ public function getAuthorizationService(ServerRequestInterface $request): AuthorizationServiceInterface { - $resolver = new OrmResolver(); - - return new AuthorizationService($resolver); + return new AuthorizationService(new OrmResolver()); } } diff --git a/src/Console/Installer.php b/src/Console/Installer.php index 8d98c77..6ef3c2d 100644 --- a/src/Console/Installer.php +++ b/src/Console/Installer.php @@ -20,7 +20,9 @@ define('STDIN', fopen('php://stdin', 'r')); } +use Cake\Codeception\Console\Installer as CodeceptionInstaller; use Cake\Utility\Security; +use Composer\IO\IOInterface; use Composer\Script\Event; use Exception; @@ -32,6 +34,8 @@ class Installer { /** * An array of directories to be made writable + * + * @var list */ public const WRITABLE_DIRS = [ 'logs', @@ -51,11 +55,11 @@ class Installer * @throws \Exception Exception raised by validator. * @return void */ - public static function postInstall(Event $event) + public static function postInstall(Event $event): void { $io = $event->getIO(); - $rootDir = dirname(dirname(__DIR__)); + $rootDir = dirname(__DIR__, 2); static::createAppLocalConfig($rootDir, $io); static::createWritableDirectories($rootDir, $io); @@ -63,9 +67,8 @@ public static function postInstall(Event $event) static::setFolderPermissions($rootDir, $io); static::setSecuritySalt($rootDir, $io); - $class = 'Cake\Codeception\Console\Installer'; - if (class_exists($class)) { - $class::customizeCodeceptionBinary($event); + if (class_exists(CodeceptionInstaller::class)) { + CodeceptionInstaller::customizeCodeceptionBinary($event); } } @@ -76,7 +79,7 @@ public static function postInstall(Event $event) * @param \Composer\IO\IOInterface $io IO interface to write to console. * @return void */ - public static function createAppLocalConfig($dir, $io) + public static function createAppLocalConfig(string $dir, IOInterface $io): void { $appLocalConfig = $dir . '/config/app_local.php'; $appLocalConfigTemplate = $dir . '/config/app_local.example.php'; @@ -93,7 +96,7 @@ public static function createAppLocalConfig($dir, $io) * @param \Composer\IO\IOInterface $io IO interface to write to console. * @return void */ - public static function createWritableDirectories($dir, $io) + public static function createWritableDirectories(string $dir, IOInterface $io): void { foreach (static::WRITABLE_DIRS as $path) { $path = $dir . '/' . $path; @@ -113,11 +116,11 @@ public static function createWritableDirectories($dir, $io) * @param \Composer\IO\IOInterface $io IO interface to write to console. * @return void */ - public static function setFolderPermissions($dir, $io) + public static function setFolderPermissions(string $dir, IOInterface $io): void { // ask if the permissions should be changed if ($io->isInteractive()) { - $validator = function ($arg) { + $validator = function (string $arg): string { if (in_array($arg, ['Y', 'y', 'N', 'n'])) { return $arg; } @@ -127,7 +130,7 @@ public static function setFolderPermissions($dir, $io) 'Set Folder Permissions ? (Default to Y) [Y,n]? ', $validator, 10, - 'Y' + 'Y', ); if (in_array($setFolderPermissions, ['n', 'N'])) { @@ -136,7 +139,7 @@ public static function setFolderPermissions($dir, $io) } // Change the permissions on a path and output the results. - $changePerms = function ($path) use ($io) { + $changePerms = function (string $path) use ($io): void { $currentPerms = fileperms($path) & 0777; $worldWritable = $currentPerms | 0007; if ($worldWritable == $currentPerms) { @@ -151,8 +154,8 @@ public static function setFolderPermissions($dir, $io) } }; - $walker = function ($dir) use (&$walker, $changePerms) { - $files = array_diff(scandir($dir), ['.', '..']); + $walker = function (string $dir) use (&$walker, $changePerms): void { + $files = array_diff(scandir($dir) ?: [], ['.', '..']); foreach ($files as $file) { $path = $dir . '/' . $file; @@ -177,7 +180,7 @@ public static function setFolderPermissions($dir, $io) * @param \Composer\IO\IOInterface $io IO interface to write to console. * @return void */ - public static function setSecuritySalt($dir, $io) + public static function setSecuritySalt(string $dir, IOInterface $io): void { $newKey = hash('sha256', Security::randomBytes(64)); static::setSecuritySaltInFile($dir, $io, $newKey, 'app_local.php'); @@ -192,10 +195,15 @@ public static function setSecuritySalt($dir, $io) * @param string $file A path to a file relative to the application's root * @return void */ - public static function setSecuritySaltInFile($dir, $io, $newKey, $file) + public static function setSecuritySaltInFile(string $dir, IOInterface $io, string $newKey, string $file): void { $config = $dir . '/config/' . $file; $content = file_get_contents($config); + if ($content === false) { + $io->write('Config file not readable or not found: config/' . $file); + + return; + } $content = str_replace('__SALT__', $newKey, $content, $count); @@ -223,10 +231,16 @@ public static function setSecuritySaltInFile($dir, $io, $newKey, $file) * @param string $file A path to a file relative to the application's root * @return void */ - public static function setAppNameInFile($dir, $io, $appName, $file) + public static function setAppNameInFile(string $dir, IOInterface $io, string $appName, string $file): void { $config = $dir . '/config/' . $file; $content = file_get_contents($config); + if ($content === false) { + $io->write('Config file not readable or not found: config/' . $file); + + return; + } + $content = str_replace('__APP_NAME__', $appName, $content, $count); if ($count == 0) { diff --git a/src/Controller/AppController.php b/src/Controller/AppController.php index c0476e8..9c40b60 100644 --- a/src/Controller/AppController.php +++ b/src/Controller/AppController.php @@ -1,4 +1,6 @@ loadComponent('Security');` + * e.g. `$this->loadComponent('FormProtection');` * * @return void */ public function initialize(): void { parent::initialize(); + $this->loadComponent('Flash'); $this->loadComponent('Authentication.Authentication'); $this->loadComponent('Authorization.Authorization'); - } - public function beforeFilter(EventInterface $event) - { - parent::beforeFilter($event); - // for all controllers in our application, make index and view - // actions public, skipping the authentication check - $this->Authentication->addUnauthenticatedActions(['index', 'view']); + /* + * Enable the following component for recommended CakePHP form protection settings. + * see https://book.cakephp.org/5/en/controllers/components/form-protection.html + */ + //$this->loadComponent('FormProtection'); } } diff --git a/src/Controller/ArticlesController.php b/src/Controller/ArticlesController.php index 570feac..1815c06 100644 --- a/src/Controller/ArticlesController.php +++ b/src/Controller/ArticlesController.php @@ -1,29 +1,73 @@ Authentication->allowUnauthenticated(['index', 'view', 'tags']); + } + + /** + * Index method + * + * @return \Cake\Http\Response|null|void Renders view + */ public function index() { $this->Authorization->skipAuthorization(); - $articles = $this->paginate($this->Articles->find()); + + // Only let the users sort the articles by title and creation date. + $articles = $this->paginate($this->Articles->find(), [ + 'sortableFields' => fn(SortableFieldsBuilder $fields) => $fields + ->add('title', 'Articles.title') + ->add('created', 'Articles.created'), + ]); + $this->set(compact('articles')); } - public function view($slug) + /** + * View method + * + * @param string $slug Article slug. + * @return \Cake\Http\Response|null|void Renders view + * @throws \Cake\Datasource\Exception\RecordNotFoundException When record not found. + */ + public function view(string $slug) { $this->Authorization->skipAuthorization(); + $article = $this->Articles ->findBySlug($slug) ->contain('Tags') ->firstOrFail(); + $this->set(compact('article')); } + /** + * Add method + * + * @return \Cake\Http\Response|null|void Redirects on successful add, renders view otherwise. + */ public function add() { $article = $this->Articles->newEmptyEntity(); @@ -32,19 +76,28 @@ public function add() if ($this->request->is('post')) { $article = $this->Articles->patchEntity($article, $this->request->getData()); - // Added: Set the user_id from the session. - $article->user_id = $this->request->getAttribute('identity')->getIdentifier(); + // Set the user_id from the logged in user. + $article->user_id = $this->Authentication->getIdentityData('id'); if ($this->Articles->save($article)) { $this->Flash->success(__('Your article has been saved.')); + return $this->redirect(['action' => 'index']); } $this->Flash->error(__('Unable to add your article.')); } - $this->set('article', $article); + + $this->set(compact('article')); } - public function edit($slug) + /** + * Edit method + * + * @param string $slug Article slug. + * @return \Cake\Http\Response|null|void Redirects on successful edit, renders view otherwise. + * @throws \Cake\Datasource\Exception\RecordNotFoundException When record not found. + */ + public function edit(string $slug) { $article = $this->Articles ->findBySlug($slug) @@ -52,27 +105,33 @@ public function edit($slug) ->firstOrFail(); $this->Authorization->authorize($article); - if ($this->request->is(['post', 'put'])) { - $this->Articles->patchEntity($article, $this->request->getData(), [ - // Added: Disable modification of user_id. - 'accessibleFields' => ['user_id' => false] + if ($this->request->is(['patch', 'post', 'put'])) { + $article = $this->Articles->patchEntity($article, $this->request->getData(), [ + // Disable modification of user_id. + 'accessibleFields' => ['user_id' => false], ]); if ($this->Articles->save($article)) { $this->Flash->success(__('Your article has been updated.')); + return $this->redirect(['action' => 'index']); } $this->Flash->error(__('Unable to update your article.')); } // Get a list of tags. - $tags = $this->Articles->Tags->find('list'); + $tags = $this->Articles->Tags->find('list')->all(); - // Set article & tags to the view context - $this->set('tags', $tags); - $this->set('article', $article); + $this->set(compact('article', 'tags')); } - public function delete($slug) + /** + * Delete method + * + * @param string $slug Article slug. + * @return \Cake\Http\Response|null Redirects to index. + * @throws \Cake\Datasource\Exception\RecordNotFoundException When record not found. + */ + public function delete(string $slug) { $this->request->allowMethod(['post', 'delete']); @@ -81,11 +140,20 @@ public function delete($slug) if ($this->Articles->delete($article)) { $this->Flash->success(__('The {0} article has been deleted.', $article->title)); - return $this->redirect(['action' => 'index']); + } else { + $this->Flash->error(__('The article could not be deleted. Please, try again.')); } + + return $this->redirect(['action' => 'index']); } - public function tags(array $tags = []) + /** + * Tags method + * + * @param string ...$tags The tags to look for. + * @return \Cake\Http\Response|null|void Renders view + */ + public function tags(string ...$tags) { $this->Authorization->skipAuthorization(); @@ -93,9 +161,6 @@ public function tags(array $tags = []) $articles = $this->Articles->find('tagged', tags: $tags); // Pass variables into the view template context. - $this->set([ - 'articles' => $articles, - 'tags' => $tags - ]); + $this->set(compact('articles', 'tags')); } } diff --git a/src/Controller/ErrorController.php b/src/Controller/ErrorController.php index a90fbd4..eaca059 100644 --- a/src/Controller/ErrorController.php +++ b/src/Controller/ErrorController.php @@ -1,4 +1,6 @@ $event Event. + * @return void */ - public function beforeFilter(\Cake\Event\EventInterface $event) + public function beforeFilter(EventInterface $event): void { } /** * beforeRender callback. * - * @param \Cake\Event\Event $event Event. - * @return \Cake\Http\Response|null|void + * @param \Cake\Event\EventInterface<\Cake\Controller\Controller> $event Event. + * @return void */ - public function beforeRender(\Cake\Event\EventInterface $event) + public function beforeRender(EventInterface $event): void { parent::beforeRender($event); @@ -49,10 +61,10 @@ public function beforeRender(\Cake\Event\EventInterface $event) /** * afterFilter callback. * - * @param \Cake\Event\Event $event Event. - * @return \Cake\Http\Response|null|void + * @param \Cake\Event\EventInterface<\Cake\Controller\Controller> $event Event. + * @return void */ - public function afterFilter(\Cake\Event\EventInterface $event) + public function afterFilter(EventInterface $event): void { } } diff --git a/src/Controller/PagesController.php b/src/Controller/PagesController.php index 4b07caa..64f2016 100644 --- a/src/Controller/PagesController.php +++ b/src/Controller/PagesController.php @@ -1,4 +1,5 @@ Authorization->skipAuthorization(); + parent::initialize(); + + // The static pages are public. + $this->Authentication->allowUnauthenticated(['display']); } /** * Displays a view * - * @param array ...$path Path segments. + * @param string ...$path Path segments. * @return \Cake\Http\Response|null - * @throws \Cake\Network\Exception\ForbiddenException When a directory traversal attempt. - * @throws \Cake\Network\Exception\NotFoundException When the view file could not - * be found or \Cake\View\Exception\MissingTemplateException in debug mode. + * @throws \Cake\Http\Exception\ForbiddenException When a directory traversal attempt. + * @throws \Cake\View\Exception\MissingTemplateException When the view file could not + * be found and in debug mode. + * @throws \Cake\Http\Exception\NotFoundException When the view file could not + * be found and not in debug mode. + * @throws \Cake\View\Exception\MissingTemplateException In debug mode. */ - public function display(...$path) + public function display(string ...$path): ?Response { - $count = count($path); - if (!$count) { + $this->Authorization->skipAuthorization(); + + if (!$path) { return $this->redirect('/'); } if (in_array('..', $path, true) || in_array('.', $path, true)) { @@ -66,7 +77,7 @@ public function display(...$path) $this->set(compact('page', 'subpage')); try { - $this->render(implode('/', $path)); + return $this->render(implode('/', $path)); } catch (MissingTemplateException $exception) { if (Configure::read('debug')) { throw $exception; diff --git a/src/Controller/TagsController.php b/src/Controller/TagsController.php index 0e75147..28f3cd0 100644 --- a/src/Controller/TagsController.php +++ b/src/Controller/TagsController.php @@ -7,10 +7,22 @@ * Tags Controller * * @property \App\Model\Table\TagsTable $Tags - * @method \App\Model\Entity\Tag[]|\Cake\Datasource\ResultSetInterface paginate($object = null, array $settings = []) */ class TagsController extends AppController { + /** + * Initialize controller + * + * @return void + */ + public function initialize(): void + { + parent::initialize(); + + // Anyone can read the tags, the other actions need a logged in user. + $this->Authentication->allowUnauthenticated(['index', 'view']); + } + /** * Index method * @@ -18,7 +30,9 @@ class TagsController extends AppController */ public function index() { - $tags = $this->paginate($this->Tags); + $this->Authorization->skipAuthorization(); + + $tags = $this->paginate($this->Tags->find()); $this->set(compact('tags')); } @@ -26,14 +40,15 @@ public function index() /** * View method * - * @param string|null $id Tag id. + * @param int $id Tag id. * @return \Cake\Http\Response|null|void Renders view * @throws \Cake\Datasource\Exception\RecordNotFoundException When record not found. */ - public function view($id = null) + public function view(int $id) { - $tag = $this->Tags->get($id, contain: ['Articles']); + $this->Authorization->skipAuthorization(); + $tag = $this->Tags->get($id, contain: ['Articles']); $this->set(compact('tag')); } @@ -45,6 +60,7 @@ public function view($id = null) public function add() { $tag = $this->Tags->newEmptyEntity(); + $this->Authorization->authorize($tag); if ($this->request->is('post')) { $tag = $this->Tags->patchEntity($tag, $this->request->getData()); if ($this->Tags->save($tag)) { @@ -54,20 +70,20 @@ public function add() } $this->Flash->error(__('The tag could not be saved. Please, try again.')); } - $articles = $this->Tags->Articles->find('list', ['limit' => 200]); - $this->set(compact('tag', 'articles')); + $this->set(compact('tag')); } /** * Edit method * - * @param string|null $id Tag id. + * @param int $id Tag id. * @return \Cake\Http\Response|null|void Redirects on successful edit, renders view otherwise. * @throws \Cake\Datasource\Exception\RecordNotFoundException When record not found. */ - public function edit($id = null) + public function edit(int $id) { - $tag = $this->Tags->get($id, contain: ['Articles']); + $tag = $this->Tags->get($id); + $this->Authorization->authorize($tag); if ($this->request->is(['patch', 'post', 'put'])) { $tag = $this->Tags->patchEntity($tag, $this->request->getData()); if ($this->Tags->save($tag)) { @@ -77,21 +93,21 @@ public function edit($id = null) } $this->Flash->error(__('The tag could not be saved. Please, try again.')); } - $articles = $this->Tags->Articles->find('list', ['limit' => 200]); - $this->set(compact('tag', 'articles')); + $this->set(compact('tag')); } /** * Delete method * - * @param string|null $id Tag id. - * @return \Cake\Http\Response|null|void Redirects to index. + * @param int $id Tag id. + * @return \Cake\Http\Response|null Redirects to index. * @throws \Cake\Datasource\Exception\RecordNotFoundException When record not found. */ - public function delete($id = null) + public function delete(int $id) { $this->request->allowMethod(['post', 'delete']); $tag = $this->Tags->get($id); + $this->Authorization->authorize($tag); if ($this->Tags->delete($tag)) { $this->Flash->success(__('The tag has been deleted.')); } else { diff --git a/src/Controller/UsersController.php b/src/Controller/UsersController.php index 85fe099..b41c1fc 100644 --- a/src/Controller/UsersController.php +++ b/src/Controller/UsersController.php @@ -1,90 +1,60 @@ Authentication->addUnauthenticatedActions(['login', 'add']); + parent::initialize(); + + // Anyone can sign up and log in. + $this->Authentication->allowUnauthenticated(['login', 'add']); } /** * Index method * - * @return \Cake\Http\Response|void + * @return \Cake\Http\Response|null|void Renders view */ public function index() { - $users = $this->paginate($this->Users); + $query = $this->Users->find(); + $query = $this->Authorization->applyScope($query); + $users = $this->paginate($query); $this->set(compact('users')); - $this->set('_serialize', ['users']); - } - - public function login() { - $this->Authorization->skipAuthorization(); - - $this->request->allowMethod(['get', 'post']); - $result = $this->Authentication->getResult(); - // regardless of POST or GET, redirect if user is logged in - if ($result->isValid()) { - // redirect to /articles after login success - $redirect = $this->request->getQuery('redirect', [ - 'controller' => 'Articles', - 'action' => 'index', - ]); - - return $this->redirect($redirect); - } - // display error if user submitted and authentication failed - if ($this->request->is('post') && !$result->isValid()) { - $this->Flash->error(__('Invalid username or password')); - } - } - - public function logout() - { - $this->Authorization->skipAuthorization(); - - $result = $this->Authentication->getResult(); - // regardless of POST or GET, redirect if user is logged in - if ($result->isValid()) { - $this->Authentication->logout(); - return $this->redirect(['controller' => 'Users', 'action' => 'login']); - } } /** * View method * - * @param string|null $id User id. - * @return \Cake\Http\Response|void + * @param int $id User id. + * @return \Cake\Http\Response|null|void Renders view * @throws \Cake\Datasource\Exception\RecordNotFoundException When record not found. */ - public function view($id = null) + public function view(int $id) { $user = $this->Users->get($id, contain: ['Articles']); - - $this->set('user', $user); - $this->set('_serialize', ['user']); + $this->Authorization->authorize($user); + $this->set(compact('user')); } /** * Add method * - * @return \Cake\Http\Response|null Redirects on successful add, renders view otherwise. + * @return \Cake\Http\Response|null|void Redirects on successful add, renders view otherwise. */ public function add() { @@ -101,21 +71,26 @@ public function add() $this->Flash->error(__('The user could not be saved. Please, try again.')); } $this->set(compact('user')); - $this->set('_serialize', ['user']); } /** * Edit method * - * @param string|null $id User id. - * @return \Cake\Http\Response|null Redirects on successful edit, renders view otherwise. - * @throws \Cake\Network\Exception\NotFoundException When record not found. + * @param int $id User id. + * @return \Cake\Http\Response|null|void Redirects on successful edit, renders view otherwise. + * @throws \Cake\Datasource\Exception\RecordNotFoundException When record not found. */ - public function edit($id = null) + public function edit(int $id) { $user = $this->Users->get($id, contain: []); + $this->Authorization->authorize($user); if ($this->request->is(['patch', 'post', 'put'])) { - $user = $this->Users->patchEntity($user, $this->request->getData()); + $data = $this->request->getData(); + // Keep the current password when the field is left empty. + if (empty($data['password'])) { + unset($data['password']); + } + $user = $this->Users->patchEntity($user, $data); if ($this->Users->save($user)) { $this->Flash->success(__('The user has been saved.')); @@ -124,26 +99,69 @@ public function edit($id = null) $this->Flash->error(__('The user could not be saved. Please, try again.')); } $this->set(compact('user')); - $this->set('_serialize', ['user']); } /** * Delete method * - * @param string|null $id User id. - * @return \Cake\Http\Response|null Redirects to index. + * @param int $id User id. + * @return \Cake\Http\Response|null Redirects to the login page, or to the index if it failed. * @throws \Cake\Datasource\Exception\RecordNotFoundException When record not found. */ - public function delete($id = null) + public function delete(int $id) { $this->request->allowMethod(['post', 'delete']); $user = $this->Users->get($id); + $this->Authorization->authorize($user); if ($this->Users->delete($user)) { $this->Flash->success(__('The user has been deleted.')); - } else { - $this->Flash->error(__('The user could not be deleted. Please, try again.')); + // Users can only delete themselves, so log them out too. + $this->Authentication->logout(); + + return $this->redirect(['action' => 'login']); } + $this->Flash->error(__('The user could not be deleted. Please, try again.')); return $this->redirect(['action' => 'index']); } + + /** + * Login method + * + * @return \Cake\Http\Response|null|void Redirects on successful login, renders view otherwise. + */ + public function login() + { + $this->Authorization->skipAuthorization(); + + $this->request->allowMethod(['get', 'post']); + $result = $this->Authentication->getResult(); + if ($result?->isValid()) { + // redirect to the page the user came from, or to /articles + return $this->Authentication->redirectAfterLogin(['controller' => 'Articles', 'action' => 'index']); + } + + // display error if user submitted and authentication failed + if ($this->request->is('post')) { + $this->Flash->error(__('Invalid username or password')); + } + } + + /** + * Logout method + * + * @return \Cake\Http\Response|null|void Redirects to the login page. + */ + public function logout() + { + $this->Authorization->skipAuthorization(); + + $result = $this->Authentication->getResult(); + // regardless of POST or GET, redirect if user is logged in + if ($result?->isValid()) { + $this->Authentication->logout(); + + return $this->redirect(['action' => 'login']); + } + } } diff --git a/src/Middleware/HostHeaderMiddleware.php b/src/Middleware/HostHeaderMiddleware.php new file mode 100644 index 0000000..e6ab578 --- /dev/null +++ b/src/Middleware/HostHeaderMiddleware.php @@ -0,0 +1,58 @@ +handle($request); + } + + $fullBaseUrl = Configure::read('App.fullBaseUrl'); + if (!$fullBaseUrl) { + throw new InternalErrorException( + 'SECURITY: App.fullBaseUrl is not configured. ' . + 'This is required in production to prevent Host Header Injection attacks. ' . + 'Set APP_FULL_BASE_URL environment variable or configure App.fullBaseUrl in config/app.php', + ); + } + + $configuredHost = parse_url($fullBaseUrl, PHP_URL_HOST); + $requestHost = $request->getUri()->getHost(); + + if ($configuredHost && $requestHost && strtolower($configuredHost) !== strtolower($requestHost)) { + throw new BadRequestException( + 'Invalid Host header. Request host does not match configured application host.', + ); + } + + return $handler->handle($request); + } +} diff --git a/src/Model/Entity/Article.php b/src/Model/Entity/Article.php index caceb3d..52e9380 100644 --- a/src/Model/Entity/Article.php +++ b/src/Model/Entity/Article.php @@ -21,6 +21,7 @@ * * @property \App\Model\Entity\User $user * @property \App\Model\Entity\Tag[] $tags + * @property string $tag_string */ class Article extends Entity { @@ -31,12 +32,12 @@ class Article extends Entity * be mass assigned. For security purposes, it is advised to set '*' to false * (or remove it), and explicitly make individual fields accessible as needed. * - * @var array + * @var array */ protected array $_accessible = [ 'user_id' => true, 'title' => true, - 'slug' => true, + 'slug' => false, 'body' => true, 'published' => true, 'created' => true, @@ -46,6 +47,12 @@ class Article extends Entity 'tag_string' => true, ]; + /** + * Sets the slug every time the title is set. + * + * @param string $title The article title. + * @return string + */ protected function _setTitle(string $title): string { $this->slug = Text::slug($title); @@ -53,6 +60,11 @@ protected function _setTitle(string $title): string return $title; } + /** + * Virtual field with the article tags as a comma separated string. + * + * @return string + */ protected function _getTagString(): string { if (isset($this->_fields['tag_string'])) { @@ -61,11 +73,7 @@ protected function _getTagString(): string if (empty($this->tags)) { return ''; } - $tags = new Collection($this->tags); - $str = $tags->reduce(function ($string, $tag) { - return $string . $tag->title . ', '; - }, ''); - return trim($str, ', '); + return (new Collection($this->tags))->extract('title')->implode(', '); } } diff --git a/src/Model/Entity/ArticlesTag.php b/src/Model/Entity/ArticlesTag.php index 0240c11..1f2ad70 100644 --- a/src/Model/Entity/ArticlesTag.php +++ b/src/Model/Entity/ArticlesTag.php @@ -23,7 +23,7 @@ class ArticlesTag extends Entity * be mass assigned. For security purposes, it is advised to set '*' to false * (or remove it), and explicitly make individual fields accessible as needed. * - * @var array + * @var array */ protected array $_accessible = [ 'article' => true, diff --git a/src/Model/Entity/Tag.php b/src/Model/Entity/Tag.php index 5c97855..d5f827d 100644 --- a/src/Model/Entity/Tag.php +++ b/src/Model/Entity/Tag.php @@ -24,12 +24,11 @@ class Tag extends Entity * be mass assigned. For security purposes, it is advised to set '*' to false * (or remove it), and explicitly make individual fields accessible as needed. * - * @var array + * @var array */ protected array $_accessible = [ 'title' => true, 'created' => true, 'modified' => true, - 'articles' => true, ]; } diff --git a/src/Model/Entity/User.php b/src/Model/Entity/User.php index 91ccb19..6f131de 100644 --- a/src/Model/Entity/User.php +++ b/src/Model/Entity/User.php @@ -3,7 +3,7 @@ namespace App\Model\Entity; -use Authentication\PasswordHasher\DefaultPasswordHasher; +use Authentication\PasswordHasher\DefaultPasswordHasher; use Cake\ORM\Entity; /** @@ -26,7 +26,7 @@ class User extends Entity * be mass assigned. For security purposes, it is advised to set '*' to false * (or remove it), and explicitly make individual fields accessible as needed. * - * @var array + * @var array */ protected array $_accessible = [ 'email' => true, @@ -39,18 +39,24 @@ class User extends Entity /** * Fields that are excluded from JSON versions of the entity. * - * @var array + * @var array */ protected array $_hidden = [ 'password', ]; - protected function _setPassword($value) + /** + * Hashes the password every time it is set. + * + * @param string $password The plain text password. + * @return string|null + */ + protected function _setPassword(string $password): ?string { - if (strlen($value)) { - $hasher = new DefaultPasswordHasher(); - - return $hasher->hash($value); + if (strlen($password)) { + return (new DefaultPasswordHasher())->hash($password); } + + return null; } } diff --git a/src/Model/Table/ArticlesTable.php b/src/Model/Table/ArticlesTable.php index b877a1f..ec9ef9f 100644 --- a/src/Model/Table/ArticlesTable.php +++ b/src/Model/Table/ArticlesTable.php @@ -3,6 +3,7 @@ namespace App\Model\Table; +use App\Model\Entity\Article; use ArrayObject; use Cake\Event\EventInterface; use Cake\ORM\Query\SelectQuery; @@ -15,19 +16,20 @@ * * @property \App\Model\Table\UsersTable&\Cake\ORM\Association\BelongsTo $Users * @property \App\Model\Table\TagsTable&\Cake\ORM\Association\BelongsToMany $Tags + * @method \Cake\ORM\Query\SelectQuery<\App\Model\Entity\Article> findBySlug(string $slug) * @method \App\Model\Entity\Article newEmptyEntity() - * @method \App\Model\Entity\Article newEntity(array $data, array $options = []) - * @method \App\Model\Entity\Article[] newEntities(array $data, array $options = []) - * @method \App\Model\Entity\Article get($primaryKey, $options = []) - * @method \App\Model\Entity\Article findOrCreate($search, ?callable $callback = null, $options = []) - * @method \App\Model\Entity\Article patchEntity(\Cake\Datasource\EntityInterface $entity, array $data, array $options = []) - * @method \App\Model\Entity\Article[] patchEntities(iterable $entities, array $data, array $options = []) - * @method \App\Model\Entity\Article|false save(\Cake\Datasource\EntityInterface $entity, $options = []) - * @method \App\Model\Entity\Article saveOrFail(\Cake\Datasource\EntityInterface $entity, $options = []) - * @method \App\Model\Entity\Article[]|\Cake\Datasource\ResultSetInterface|false saveMany(iterable $entities, $options = []) - * @method \App\Model\Entity\Article[]|\Cake\Datasource\ResultSetInterface saveManyOrFail(iterable $entities, $options = []) - * @method \App\Model\Entity\Article[]|\Cake\Datasource\ResultSetInterface|false deleteMany(iterable $entities, $options = []) - * @method \App\Model\Entity\Article[]|\Cake\Datasource\ResultSetInterface deleteManyOrFail(iterable $entities, $options = []) + * @method \App\Model\Entity\Article newEntity(array $data, array $options = []) + * @method array<\App\Model\Entity\Article> newEntities(array $data, array $options = []) + * @method \App\Model\Entity\Article get(mixed $primaryKey, array|string $finder = 'all', \Psr\SimpleCache\CacheInterface|string|null $cache = null, \Closure|string|null $cacheKey = null, mixed ...$args) + * @method \App\Model\Entity\Article findOrCreate($search, ?callable $callback = null, array $options = []) + * @method \App\Model\Entity\Article patchEntity(\Cake\Datasource\EntityInterface $entity, array $data, array $options = []) + * @method array<\App\Model\Entity\Article> patchEntities(iterable<\Cake\Datasource\EntityInterface> $entities, array $data, array $options = []) + * @method \App\Model\Entity\Article|false save(\Cake\Datasource\EntityInterface $entity, array $options = []) + * @method \App\Model\Entity\Article saveOrFail(\Cake\Datasource\EntityInterface $entity, array $options = []) + * @method iterable<\App\Model\Entity\Article>|\Cake\Datasource\ResultSetInterface<\App\Model\Entity\Article>|false saveMany(iterable<\Cake\Datasource\EntityInterface> $entities, array $options = []) + * @method iterable<\App\Model\Entity\Article>|\Cake\Datasource\ResultSetInterface<\App\Model\Entity\Article> saveManyOrFail(iterable<\Cake\Datasource\EntityInterface> $entities, array $options = []) + * @method iterable<\App\Model\Entity\Article>|\Cake\Datasource\ResultSetInterface<\App\Model\Entity\Article>|false deleteMany(iterable<\Cake\Datasource\EntityInterface> $entities, array $options = []) + * @method iterable<\App\Model\Entity\Article>|\Cake\Datasource\ResultSetInterface<\App\Model\Entity\Article> deleteManyOrFail(iterable<\Cake\Datasource\EntityInterface> $entities, array $options = []) * @mixin \Cake\ORM\Behavior\TimestampBehavior */ class ArticlesTable extends Table @@ -35,7 +37,7 @@ class ArticlesTable extends Table /** * Initialize method * - * @param array $config The configuration for the Table. + * @param array $config The configuration for the Table. * @return void */ public function initialize(array $config): void @@ -68,19 +70,19 @@ public function initialize(array $config): void public function validationDefault(Validator $validator): Validator { $validator - ->integer('id') - ->allowEmptyString('id', null, 'create'); + ->nonNegativeInteger('user_id') + ->notEmptyString('user_id'); $validator ->scalar('title') - ->maxLength('title', 255) + // The slug is built from the title and its column is shorter than the title one. + ->maxLength('title', 191) ->requirePresence('title', 'create') ->notEmptyString('title'); $validator ->scalar('slug') ->maxLength('slug', 191) - ->requirePresence('slug', 'create') ->notEmptyString('slug') ->add('slug', 'unique', ['rule' => 'validateUnique', 'provider' => 'table']); @@ -104,56 +106,89 @@ public function validationDefault(Validator $validator): Validator */ public function buildRules(RulesChecker $rules): RulesChecker { - $rules->add($rules->isUnique(['slug']), ['errorField' => 'slug']); + // The slug is built from the title, so the title needs some letters or numbers. + $rules->add( + fn(Article $article): bool => $article->slug !== '', + 'slugNotEmpty', + ['errorField' => 'title', 'message' => __('The title needs at least one letter or number.')], + ); + // The title is also the field the user can fix when the slug is already used. + $rules->add($rules->isUnique(['slug']), [ + 'errorField' => 'title', + 'message' => __('An article with this title already exists.'), + ]); $rules->add($rules->existsIn(['user_id'], 'Users'), ['errorField' => 'user_id']); return $rules; } - public function beforeSave(EventInterface $event, $entity, ArrayObject $options) + /** + * Builds the tags from the `tag_string` virtual field before saving. + * + * @param \Cake\Event\EventInterface $event The beforeSave event. + * @param \App\Model\Entity\Article $entity The entity being saved. + * @param \ArrayObject $options The save options. + * @return void + */ + public function beforeSave(EventInterface $event, Article $entity, ArrayObject $options): void { - if ($entity->tag_string) { + // Only change the tags when the tag string was sent, an empty one removes all the tags. + if ($entity->isDirty('tag_string')) { $entity->tags = $this->_buildTags($entity->tag_string); } - - // Other code } - protected function _buildTags($tagString) + /** + * Finds the existing tags and creates the new ones from a comma separated string. + * + * @param string $tagString The tags, separated by commas. + * @return array<\App\Model\Entity\Tag> + */ + protected function _buildTags(string $tagString): array { // Trim tags - $newTags = array_map('trim', explode(',', $tagString)); + $newTags = array_map(trim(...), explode(',', $tagString)); // Remove all empty tags $newTags = array_filter($newTags); - // Reduce duplicated tags - $newTags = array_unique($newTags); + // Reduce duplicated tags, ignoring the case + $newTags = array_intersect_key($newTags, array_unique(array_map(mb_strtolower(...), $newTags))); - $out = []; + // There is nothing to look for when the string only had commas and spaces. + if (!$newTags) { + return []; + } + + // Find the existing tags with a lower case comparison, so every database works the same. + $lowerCaseTags = array_map(mb_strtolower(...), $newTags); $tags = $this->Tags->find() - ->where(['Tags.title IN' => $newTags]) + ->where(['LOWER(Tags.title) IN' => $lowerCaseTags]) ->all(); - // Remove existing tags from the list of new tags. - foreach ($tags->extract('title') as $existing) { - $index = array_search($existing, $newTags); - if ($index !== false) { - unset($newTags[$index]); - } - } + // Remove existing tags from the list of new tags, ignoring the case. + $existing = array_map(mb_strtolower(...), $tags->extract('title')->toList()); + $newTags = array_filter($newTags, fn(string $tag): bool => !in_array(mb_strtolower($tag), $existing, true)); + // Add existing tags. - foreach ($tags as $tag) { - $out[] = $tag; - } + $out = $tags->toList(); // Add new tags. foreach ($newTags as $tag) { $out[] = $this->Tags->newEntity(['title' => $tag]); } + return $out; } - // The $query argument is a query builder instance. - // The $options array will contain the 'tags' option we passed - // to find('tagged') in our controller action. + /** + * Finds the articles having any of the given tags, or no tags at all. + * + * The $query argument is a query builder instance. + * The $tags argument will contain the 'tags' option we passed + * to find('tagged') in our controller action. + * + * @param \Cake\ORM\Query\SelectQuery $query The query to modify. + * @param array $tags The tag titles to look for. + * @return \Cake\ORM\Query\SelectQuery + */ public function findTagged(SelectQuery $query, array $tags = []): SelectQuery { $columns = [ diff --git a/src/Model/Table/ArticlesTagsTable.php b/src/Model/Table/ArticlesTagsTable.php index e843279..a20c9a4 100644 --- a/src/Model/Table/ArticlesTagsTable.php +++ b/src/Model/Table/ArticlesTagsTable.php @@ -3,37 +3,34 @@ namespace App\Model\Table; -use Cake\ORM\Query; use Cake\ORM\RulesChecker; use Cake\ORM\Table; -use Cake\Validation\Validator; /** * ArticlesTags Model * * @property \App\Model\Table\ArticlesTable&\Cake\ORM\Association\BelongsTo $Articles * @property \App\Model\Table\TagsTable&\Cake\ORM\Association\BelongsTo $Tags - * * @method \App\Model\Entity\ArticlesTag newEmptyEntity() - * @method \App\Model\Entity\ArticlesTag newEntity(array $data, array $options = []) - * @method \App\Model\Entity\ArticlesTag[] newEntities(array $data, array $options = []) - * @method \App\Model\Entity\ArticlesTag get($primaryKey, $options = []) - * @method \App\Model\Entity\ArticlesTag findOrCreate($search, ?callable $callback = null, $options = []) - * @method \App\Model\Entity\ArticlesTag patchEntity(\Cake\Datasource\EntityInterface $entity, array $data, array $options = []) - * @method \App\Model\Entity\ArticlesTag[] patchEntities(iterable $entities, array $data, array $options = []) - * @method \App\Model\Entity\ArticlesTag|false save(\Cake\Datasource\EntityInterface $entity, $options = []) - * @method \App\Model\Entity\ArticlesTag saveOrFail(\Cake\Datasource\EntityInterface $entity, $options = []) - * @method \App\Model\Entity\ArticlesTag[]|\Cake\Datasource\ResultSetInterface|false saveMany(iterable $entities, $options = []) - * @method \App\Model\Entity\ArticlesTag[]|\Cake\Datasource\ResultSetInterface saveManyOrFail(iterable $entities, $options = []) - * @method \App\Model\Entity\ArticlesTag[]|\Cake\Datasource\ResultSetInterface|false deleteMany(iterable $entities, $options = []) - * @method \App\Model\Entity\ArticlesTag[]|\Cake\Datasource\ResultSetInterface deleteManyOrFail(iterable $entities, $options = []) + * @method \App\Model\Entity\ArticlesTag newEntity(array $data, array $options = []) + * @method array<\App\Model\Entity\ArticlesTag> newEntities(array $data, array $options = []) + * @method \App\Model\Entity\ArticlesTag get(mixed $primaryKey, array|string $finder = 'all', \Psr\SimpleCache\CacheInterface|string|null $cache = null, \Closure|string|null $cacheKey = null, mixed ...$args) + * @method \App\Model\Entity\ArticlesTag findOrCreate($search, ?callable $callback = null, array $options = []) + * @method \App\Model\Entity\ArticlesTag patchEntity(\Cake\Datasource\EntityInterface $entity, array $data, array $options = []) + * @method array<\App\Model\Entity\ArticlesTag> patchEntities(iterable<\Cake\Datasource\EntityInterface> $entities, array $data, array $options = []) + * @method \App\Model\Entity\ArticlesTag|false save(\Cake\Datasource\EntityInterface $entity, array $options = []) + * @method \App\Model\Entity\ArticlesTag saveOrFail(\Cake\Datasource\EntityInterface $entity, array $options = []) + * @method iterable<\App\Model\Entity\ArticlesTag>|\Cake\Datasource\ResultSetInterface<\App\Model\Entity\ArticlesTag>|false saveMany(iterable<\Cake\Datasource\EntityInterface> $entities, array $options = []) + * @method iterable<\App\Model\Entity\ArticlesTag>|\Cake\Datasource\ResultSetInterface<\App\Model\Entity\ArticlesTag> saveManyOrFail(iterable<\Cake\Datasource\EntityInterface> $entities, array $options = []) + * @method iterable<\App\Model\Entity\ArticlesTag>|\Cake\Datasource\ResultSetInterface<\App\Model\Entity\ArticlesTag>|false deleteMany(iterable<\Cake\Datasource\EntityInterface> $entities, array $options = []) + * @method iterable<\App\Model\Entity\ArticlesTag>|\Cake\Datasource\ResultSetInterface<\App\Model\Entity\ArticlesTag> deleteManyOrFail(iterable<\Cake\Datasource\EntityInterface> $entities, array $options = []) */ class ArticlesTagsTable extends Table { /** * Initialize method * - * @param array $config The configuration for the Table. + * @param array $config The configuration for the Table. * @return void */ public function initialize(array $config): void @@ -41,7 +38,7 @@ public function initialize(array $config): void parent::initialize($config); $this->setTable('articles_tags'); - $this->setDisplayField('article_id'); + $this->setDisplayField(['article_id', 'tag_id']); $this->setPrimaryKey(['article_id', 'tag_id']); $this->belongsTo('Articles', [ diff --git a/src/Model/Table/TagsTable.php b/src/Model/Table/TagsTable.php index 2fa1557..3e4f28a 100644 --- a/src/Model/Table/TagsTable.php +++ b/src/Model/Table/TagsTable.php @@ -3,7 +3,6 @@ namespace App\Model\Table; -use Cake\ORM\Query; use Cake\ORM\RulesChecker; use Cake\ORM\Table; use Cake\Validation\Validator; @@ -12,21 +11,19 @@ * Tags Model * * @property \App\Model\Table\ArticlesTable&\Cake\ORM\Association\BelongsToMany $Articles - * * @method \App\Model\Entity\Tag newEmptyEntity() - * @method \App\Model\Entity\Tag newEntity(array $data, array $options = []) - * @method \App\Model\Entity\Tag[] newEntities(array $data, array $options = []) - * @method \App\Model\Entity\Tag get($primaryKey, $options = []) - * @method \App\Model\Entity\Tag findOrCreate($search, ?callable $callback = null, $options = []) - * @method \App\Model\Entity\Tag patchEntity(\Cake\Datasource\EntityInterface $entity, array $data, array $options = []) - * @method \App\Model\Entity\Tag[] patchEntities(iterable $entities, array $data, array $options = []) - * @method \App\Model\Entity\Tag|false save(\Cake\Datasource\EntityInterface $entity, $options = []) - * @method \App\Model\Entity\Tag saveOrFail(\Cake\Datasource\EntityInterface $entity, $options = []) - * @method \App\Model\Entity\Tag[]|\Cake\Datasource\ResultSetInterface|false saveMany(iterable $entities, $options = []) - * @method \App\Model\Entity\Tag[]|\Cake\Datasource\ResultSetInterface saveManyOrFail(iterable $entities, $options = []) - * @method \App\Model\Entity\Tag[]|\Cake\Datasource\ResultSetInterface|false deleteMany(iterable $entities, $options = []) - * @method \App\Model\Entity\Tag[]|\Cake\Datasource\ResultSetInterface deleteManyOrFail(iterable $entities, $options = []) - * + * @method \App\Model\Entity\Tag newEntity(array $data, array $options = []) + * @method array<\App\Model\Entity\Tag> newEntities(array $data, array $options = []) + * @method \App\Model\Entity\Tag get(mixed $primaryKey, array|string $finder = 'all', \Psr\SimpleCache\CacheInterface|string|null $cache = null, \Closure|string|null $cacheKey = null, mixed ...$args) + * @method \App\Model\Entity\Tag findOrCreate($search, ?callable $callback = null, array $options = []) + * @method \App\Model\Entity\Tag patchEntity(\Cake\Datasource\EntityInterface $entity, array $data, array $options = []) + * @method array<\App\Model\Entity\Tag> patchEntities(iterable<\Cake\Datasource\EntityInterface> $entities, array $data, array $options = []) + * @method \App\Model\Entity\Tag|false save(\Cake\Datasource\EntityInterface $entity, array $options = []) + * @method \App\Model\Entity\Tag saveOrFail(\Cake\Datasource\EntityInterface $entity, array $options = []) + * @method iterable<\App\Model\Entity\Tag>|\Cake\Datasource\ResultSetInterface<\App\Model\Entity\Tag>|false saveMany(iterable<\Cake\Datasource\EntityInterface> $entities, array $options = []) + * @method iterable<\App\Model\Entity\Tag>|\Cake\Datasource\ResultSetInterface<\App\Model\Entity\Tag> saveManyOrFail(iterable<\Cake\Datasource\EntityInterface> $entities, array $options = []) + * @method iterable<\App\Model\Entity\Tag>|\Cake\Datasource\ResultSetInterface<\App\Model\Entity\Tag>|false deleteMany(iterable<\Cake\Datasource\EntityInterface> $entities, array $options = []) + * @method iterable<\App\Model\Entity\Tag>|\Cake\Datasource\ResultSetInterface<\App\Model\Entity\Tag> deleteManyOrFail(iterable<\Cake\Datasource\EntityInterface> $entities, array $options = []) * @mixin \Cake\ORM\Behavior\TimestampBehavior */ class TagsTable extends Table @@ -34,7 +31,7 @@ class TagsTable extends Table /** * Initialize method * - * @param array $config The configuration for the Table. + * @param array $config The configuration for the Table. * @return void */ public function initialize(array $config): void @@ -62,15 +59,15 @@ public function initialize(array $config): void */ public function validationDefault(Validator $validator): Validator { - $validator - ->integer('id') - ->allowEmptyString('id', null, 'create'); - $validator ->scalar('title') ->maxLength('title', 191) ->allowEmptyString('title') - ->add('title', 'unique', ['rule' => 'validateUnique', 'provider' => 'table']); + ->add('title', 'unique', [ + 'rule' => 'validateUnique', + 'provider' => 'table', + 'message' => __('This tag already exists.'), + ]); return $validator; } @@ -84,7 +81,7 @@ public function validationDefault(Validator $validator): Validator */ public function buildRules(RulesChecker $rules): RulesChecker { - $rules->add($rules->isUnique(['title']), ['errorField' => 'title']); + $rules->add($rules->isUnique(['title'], ['allowMultipleNulls' => true]), ['errorField' => 'title']); return $rules; } diff --git a/src/Model/Table/UsersTable.php b/src/Model/Table/UsersTable.php index d204e70..05130b4 100644 --- a/src/Model/Table/UsersTable.php +++ b/src/Model/Table/UsersTable.php @@ -3,7 +3,6 @@ namespace App\Model\Table; -use Cake\ORM\Query; use Cake\ORM\RulesChecker; use Cake\ORM\Table; use Cake\Validation\Validator; @@ -12,21 +11,19 @@ * Users Model * * @property \App\Model\Table\ArticlesTable&\Cake\ORM\Association\HasMany $Articles - * * @method \App\Model\Entity\User newEmptyEntity() - * @method \App\Model\Entity\User newEntity(array $data, array $options = []) - * @method \App\Model\Entity\User[] newEntities(array $data, array $options = []) - * @method \App\Model\Entity\User get($primaryKey, $options = []) - * @method \App\Model\Entity\User findOrCreate($search, ?callable $callback = null, $options = []) - * @method \App\Model\Entity\User patchEntity(\Cake\Datasource\EntityInterface $entity, array $data, array $options = []) - * @method \App\Model\Entity\User[] patchEntities(iterable $entities, array $data, array $options = []) - * @method \App\Model\Entity\User|false save(\Cake\Datasource\EntityInterface $entity, $options = []) - * @method \App\Model\Entity\User saveOrFail(\Cake\Datasource\EntityInterface $entity, $options = []) - * @method \App\Model\Entity\User[]|\Cake\Datasource\ResultSetInterface|false saveMany(iterable $entities, $options = []) - * @method \App\Model\Entity\User[]|\Cake\Datasource\ResultSetInterface saveManyOrFail(iterable $entities, $options = []) - * @method \App\Model\Entity\User[]|\Cake\Datasource\ResultSetInterface|false deleteMany(iterable $entities, $options = []) - * @method \App\Model\Entity\User[]|\Cake\Datasource\ResultSetInterface deleteManyOrFail(iterable $entities, $options = []) - * + * @method \App\Model\Entity\User newEntity(array $data, array $options = []) + * @method array<\App\Model\Entity\User> newEntities(array $data, array $options = []) + * @method \App\Model\Entity\User get(mixed $primaryKey, array|string $finder = 'all', \Psr\SimpleCache\CacheInterface|string|null $cache = null, \Closure|string|null $cacheKey = null, mixed ...$args) + * @method \App\Model\Entity\User findOrCreate($search, ?callable $callback = null, array $options = []) + * @method \App\Model\Entity\User patchEntity(\Cake\Datasource\EntityInterface $entity, array $data, array $options = []) + * @method array<\App\Model\Entity\User> patchEntities(iterable<\Cake\Datasource\EntityInterface> $entities, array $data, array $options = []) + * @method \App\Model\Entity\User|false save(\Cake\Datasource\EntityInterface $entity, array $options = []) + * @method \App\Model\Entity\User saveOrFail(\Cake\Datasource\EntityInterface $entity, array $options = []) + * @method iterable<\App\Model\Entity\User>|\Cake\Datasource\ResultSetInterface<\App\Model\Entity\User>|false saveMany(iterable<\Cake\Datasource\EntityInterface> $entities, array $options = []) + * @method iterable<\App\Model\Entity\User>|\Cake\Datasource\ResultSetInterface<\App\Model\Entity\User> saveManyOrFail(iterable<\Cake\Datasource\EntityInterface> $entities, array $options = []) + * @method iterable<\App\Model\Entity\User>|\Cake\Datasource\ResultSetInterface<\App\Model\Entity\User>|false deleteMany(iterable<\Cake\Datasource\EntityInterface> $entities, array $options = []) + * @method iterable<\App\Model\Entity\User>|\Cake\Datasource\ResultSetInterface<\App\Model\Entity\User> deleteManyOrFail(iterable<\Cake\Datasource\EntityInterface> $entities, array $options = []) * @mixin \Cake\ORM\Behavior\TimestampBehavior */ class UsersTable extends Table @@ -34,7 +31,7 @@ class UsersTable extends Table /** * Initialize method * - * @param array $config The configuration for the Table. + * @param array $config The configuration for the Table. * @return void */ public function initialize(array $config): void @@ -42,13 +39,16 @@ public function initialize(array $config): void parent::initialize($config); $this->setTable('users'); - $this->setDisplayField('id'); + $this->setDisplayField('email'); $this->setPrimaryKey('id'); $this->addBehavior('Timestamp'); + // Deleting a user deletes the articles too, and the callbacks clean their tags. $this->hasMany('Articles', [ 'foreignKey' => 'user_id', + 'dependent' => true, + 'cascadeCallbacks' => true, ]); } @@ -60,10 +60,6 @@ public function initialize(array $config): void */ public function validationDefault(Validator $validator): Validator { - $validator - ->integer('id') - ->allowEmptyString('id', null, 'create'); - $validator ->email('email') ->requirePresence('email', 'create') diff --git a/src/Policy/ArticlePolicy.php b/src/Policy/ArticlePolicy.php index e8444c5..96a2599 100644 --- a/src/Policy/ArticlePolicy.php +++ b/src/Policy/ArticlePolicy.php @@ -1,31 +1,64 @@ isAuthor($user, $article); } - public function canDelete(IdentityInterface $user, Article $article) + /** + * Check if $user can delete Article + * + * @param \Authorization\IdentityInterface $user The user. + * @param \App\Model\Entity\Article $article The article. + * @return bool + */ + public function canDelete(IdentityInterface $user, Article $article): bool { // logged in users can delete their own articles. return $this->isAuthor($user, $article); } - protected function isAuthor(IdentityInterface $user, Article $article) + /** + * Check if $user is the author of the Article + * + * @param \Authorization\IdentityInterface $user The user. + * @param \App\Model\Entity\Article $article The article. + * @return bool + */ + protected function isAuthor(IdentityInterface $user, Article $article): bool { - return $article->user_id === $user->getIdentifier(); + return $article->user_id === $user['id']; } } diff --git a/src/Policy/TagPolicy.php b/src/Policy/TagPolicy.php new file mode 100644 index 0000000..186ebc1 --- /dev/null +++ b/src/Policy/TagPolicy.php @@ -0,0 +1,52 @@ +isSelf($user, $resource); + } + + /** + * Check if $user can edit User + * + * @param \Authorization\IdentityInterface $user The user. + * @param \App\Model\Entity\User $resource The user being accessed. + * @return bool + */ + public function canEdit(IdentityInterface $user, User $resource): bool + { + return $this->isSelf($user, $resource); + } + + /** + * Check if $user can delete User + * + * @param \Authorization\IdentityInterface $user The user. + * @param \App\Model\Entity\User $resource The user being accessed. + * @return bool + */ + public function canDelete(IdentityInterface $user, User $resource): bool + { + return $this->isSelf($user, $resource); + } + + /** + * Check if $resource is the logged in user + * + * @param \Authorization\IdentityInterface $user The user. + * @param \App\Model\Entity\User $resource The user being accessed. + * @return bool + */ + protected function isSelf(IdentityInterface $user, User $resource): bool + { + return $resource->id === $user['id']; + } +} diff --git a/src/Policy/UsersTablePolicy.php b/src/Policy/UsersTablePolicy.php new file mode 100644 index 0000000..ca04335 --- /dev/null +++ b/src/Policy/UsersTablePolicy.php @@ -0,0 +1,25 @@ +where(['Users.id' => $user['id']]); + } +} diff --git a/src/View/AjaxView.php b/src/View/AjaxView.php index fcb0aad..c37f318 100644 --- a/src/View/AjaxView.php +++ b/src/View/AjaxView.php @@ -30,7 +30,7 @@ class AjaxView extends AppView * * @var string */ - public string $layout = 'ajax'; + protected string $layout = 'ajax'; /** * Initialization hook method. diff --git a/src/View/AppView.php b/src/View/AppView.php index 7ccc7c2..f35a280 100644 --- a/src/View/AppView.php +++ b/src/View/AppView.php @@ -22,20 +22,22 @@ * * Your application's default view class * - * @link https://book.cakephp.org/4/en/views.html#the-app-view + * @link https://book.cakephp.org/5/en/views.html#the-app-view */ class AppView extends View { /** * Initialization hook method. * - * Use this method to add common initialization code like loading helpers. + * Use this method to add common initialization code like adding helpers. * - * e.g. `$this->loadHelper('Html');` + * e.g. `$this->addHelper('Html');` * * @return void */ public function initialize(): void { + // Gives the templates access to the logged in user. + $this->addHelper('Authentication.Identity'); } } diff --git a/templates/Articles/add.php b/templates/Articles/add.php index f38c2e3..c68045a 100644 --- a/templates/Articles/add.php +++ b/templates/Articles/add.php @@ -1,6 +1,11 @@ - + -

Add Article

+

Form->create($article); echo $this->Form->control('title'); diff --git a/templates/Articles/edit.php b/templates/Articles/edit.php index c71f23f..3c8cc97 100644 --- a/templates/Articles/edit.php +++ b/templates/Articles/edit.php @@ -1,6 +1,11 @@ - + -

Edit Article

+

Form->create($article); echo $this->Form->control('title'); diff --git a/templates/Articles/index.php b/templates/Articles/index.php index 5e51285..58b11ec 100644 --- a/templates/Articles/index.php +++ b/templates/Articles/index.php @@ -1,16 +1,23 @@ - -Html->link('Add Article', ['action' => 'add']) ?> -

Articles

+ $articles + */ +?> +Identity->isLoggedIn()) : ?> + Html->link(__('Add Article'), ['action' => 'add']) ?> + +

- - - + + + - + - +
TitleCreatedActionPaginator->sort('title') ?>Paginator->sort('created') ?>
Html->link($article->title, ['action' => 'view', $article->slug]) ?> @@ -19,13 +26,26 @@ created->format(DATE_RFC850) ?> - Html->link('Edit', ['action' => 'edit', $article->slug]) ?> - Form->postLink( - 'Delete', - ['action' => 'delete', $article->slug], - ['confirm' => 'Are you sure?']) - ?> + + Identity->is($article->user_id)) : ?> + Html->link(__('Edit'), ['action' => 'edit', $article->slug]) ?> + Form->deleteLink( + __('Delete'), + ['action' => 'delete', $article->slug], + ['confirm' => __('Are you sure?')], + ) ?> +
+ +
+
    + Paginator->first('<< ' . __('first')) ?> + Paginator->prev('< ' . __('previous')) ?> + Paginator->numbers() ?> + Paginator->next(__('next') . ' >') ?> + Paginator->last(__('last') . ' >>') ?> +
+
diff --git a/templates/Articles/tags.php b/templates/Articles/tags.php index a5547e1..b7b7b81 100644 --- a/templates/Articles/tags.php +++ b/templates/Articles/tags.php @@ -1,17 +1,24 @@ + $articles + * @var array $tags + */ +?>

- Articles tagged with - Text->toList(h($tags), 'or') ?> + + Text->toList(h($tags), __('or')) ?>

- +

Html->link( $article->title, - ['controller' => 'Articles', 'action' => 'view', $article->slug] + ['controller' => 'Articles', 'action' => 'view', $article->slug], ) ?>

- created) ?> + created) ?>
- -
\ No newline at end of file + + diff --git a/templates/Articles/view.php b/templates/Articles/view.php index c0799bf..66bbd20 100644 --- a/templates/Articles/view.php +++ b/templates/Articles/view.php @@ -1,7 +1,13 @@ - - +

title) ?>

body) ?>

-

Tags: tag_string) ?>

-

Created: created->format(DATE_RFC850) ?>

-

Html->link('Edit', ['action' => 'edit', $article->slug]) ?>

+

tag_string) ?>

+

created->format(DATE_RFC850) ?>

+Identity->is($article->user_id)) : ?> +

Html->link(__('Edit'), ['action' => 'edit', $article->slug]) ?>

+ diff --git a/templates/Error/error400.php b/templates/Error/error400.php index 3cfc92b..b111276 100644 --- a/templates/Error/error400.php +++ b/templates/Error/error400.php @@ -1,34 +1,22 @@ layout = 'error'; +$this->setLayout('error'); if (Configure::read('debug')) : - $this->layout = 'dev_error'; + $this->setLayout('dev_error'); $this->assign('title', $message); $this->assign('templateName', 'error400.php'); $this->start('file'); -?> -queryString)) : ?> -

- SQL Query: - queryString) ?> -

- -params)) : ?> - SQL Query Params: - params) ?> - -element('auto_table_warning') ?> -end(); + echo $this->element('auto_table_warning'); + $this->end(); endif; ?>

diff --git a/templates/Error/error500.php b/templates/Error/error500.php index a1c6c44..c6239e4 100644 --- a/templates/Error/error500.php +++ b/templates/Error/error500.php @@ -1,42 +1,35 @@ layout = 'error'; +$this->setLayout('error'); if (Configure::read('debug')) : - $this->layout = 'dev_error'; + $this->setLayout('dev_error'); $this->assign('title', $message); $this->assign('templateName', 'error500.php'); $this->start('file'); ?> -queryString)) : ?> -

- SQL Query: - queryString) ?> -

- -params)) : ?> - SQL Query Params: - params) ?> - - Error in: - getFile()), $error->getLine()) ?> + getFile() ?> + getLine() ?> + Error in: + Html->link(sprintf('%s, line %s', Debugger::trimPath($file), $line), Debugger::editorUrl($file, $line)); ?> element('auto_table_warning'); - if (extension_loaded('xdebug')) : - xdebug_print_function_stack(); - endif; - $this->end(); endif; ?> -

+

: diff --git a/templates/Pages/home.php b/templates/Pages/home.php index 3e7473c..710ad2f 100644 --- a/templates/Pages/home.php +++ b/templates/Pages/home.php @@ -1,5 +1,4 @@ top level domain to the - DebugKit.safeTld + DebugKit.safeTld config and reload.'; if (!in_array('sqlite', \PDO::getAvailableDrivers())) { $error .= '
You need to install the PHP extension pdo_sqlite so DebugKit can work properly.'; @@ -76,40 +75,40 @@ fetch('script') ?> -

-
- - CakePHP - -

- Welcome to CakePHP Chiffon (🍰) -

-
-
-
-
-
-
-
-
- Please be aware that this page will not be shown if you turn off debug mode unless you replace templates/Pages/home.php with your own version. -
-
- +
+
+ + CakePHP + +

+ Welcome to CakePHP Chiffon (🍰) +

+
+
+
+
+
+
+
+
+ Please be aware that this page will not be shown if you turn off debug mode unless you replace templates/Pages/home.php with your own version. +
+
+ +
+
-
-
-
-
-

Environment

-
    +
    +
    +

    Environment

    +
      =')) : ?>
    • Your version of PHP is 8.1.0 or higher (detected ).
    • @@ -137,11 +136,11 @@
    • You should set zend.assertions to 1 in your php.ini for your development environment.
    • -
    -
    -
    -

    Filesystem

    -
      +
    +
    +
    +

    Filesystem

    +
    • Your tmp directory is writable.
    • @@ -156,31 +155,38 @@ -
    • The is being used for core caching. To change the config edit config/app.php
    • +
    • The engine is being used for translations caching. To change the config edit config/app.php
    • -
    • Your cache is NOT working. Please check the settings in config/app.php
    • +
    • Your translations cache is NOT working. Please check the settings in config/app.php
    • -
    +
+
-
-
-
-
-

Database

- -
    +
    +
    +
    +

    Database

    + +
    • CakePHP is able to connect to the database.
    • CakePHP is NOT able to connect to the database.
    • -
    -
    -
    -

    DebugKit

    -
      + + + +
    • The engine is being used for database schema caching. To change the config edit config/app.php
    • + +
    • Your database schema cache is NOT working. Please check the settings in config/app.php
    • + +
    +
    +
    +

    DebugKit

    +
    • DebugKit is loaded.
    • DebugKit is not loaded.
    • -
    +
+
-
-
-
- -
-
- -
- -
+ diff --git a/templates/Tags/add.php b/templates/Tags/add.php index c748695..09344f9 100644 --- a/templates/Tags/add.php +++ b/templates/Tags/add.php @@ -11,14 +11,13 @@ Html->link(__('List Tags'), ['action' => 'index'], ['class' => 'side-nav-item']) ?> -
+
Form->create($tag) ?>
Form->control('title'); - echo $this->Form->control('articles._ids', ['options' => $articles]); ?>
Form->button(__('Submit')) ?> diff --git a/templates/Tags/edit.php b/templates/Tags/edit.php index db27f3f..da36cbe 100644 --- a/templates/Tags/edit.php +++ b/templates/Tags/edit.php @@ -8,22 +8,16 @@ -
+
Form->create($tag) ?>
Form->control('title'); - echo $this->Form->control('articles._ids', ['options' => $articles]); ?>
Form->button(__('Submit')) ?> diff --git a/templates/Tags/index.php b/templates/Tags/index.php index b48cf4f..a79318e 100644 --- a/templates/Tags/index.php +++ b/templates/Tags/index.php @@ -1,7 +1,7 @@ $tags */ ?>
@@ -28,7 +28,6 @@ Html->link(__('View'), ['action' => 'view', $tag->id]) ?> Html->link(__('Edit'), ['action' => 'edit', $tag->id]) ?> - Form->postLink(__('Delete'), ['action' => 'delete', $tag->id], ['confirm' => __('Are you sure you want to delete # {0}?', $tag->id)]) ?> @@ -45,4 +44,4 @@

Paginator->counter(__('Page {{page}} of {{pages}}, showing {{current}} record(s) out of {{count}} total')) ?>

-
+
\ No newline at end of file diff --git a/templates/Tags/view.php b/templates/Tags/view.php index 3e17327..380aa93 100644 --- a/templates/Tags/view.php +++ b/templates/Tags/view.php @@ -9,12 +9,11 @@

Html->link(__('Edit Tag'), ['action' => 'edit', $tag->id], ['class' => 'side-nav-item']) ?> - Form->postLink(__('Delete Tag'), ['action' => 'delete', $tag->id], ['confirm' => __('Are you sure you want to delete # {0}?', $tag->id), 'class' => 'side-nav-item']) ?> Html->link(__('List Tags'), ['action' => 'index'], ['class' => 'side-nav-item']) ?> Html->link(__('New Tag'), ['action' => 'add'], ['class' => 'side-nav-item']) ?>
-
+

title) ?>

@@ -51,20 +50,29 @@ - articles as $articles) : ?> + articles as $article) : ?> - - - - - - - - + + + + + + + + @@ -74,4 +82,4 @@ - + \ No newline at end of file diff --git a/templates/Users/add.php b/templates/Users/add.php index 472270a..84aae0c 100644 --- a/templates/Users/add.php +++ b/templates/Users/add.php @@ -1,25 +1,28 @@ - -
- Form->create($user) ?> -
- - Form->control('email'); - echo $this->Form->control('password'); - ?> -
- Form->button(__('Submit')) ?> - Form->end() ?> +
+ +
+
+ Form->create($user) ?> +
+ + Form->control('email'); + echo $this->Form->control('password'); + ?> +
+ Form->button(__('Submit')) ?> + Form->end() ?> +
+
diff --git a/templates/Users/edit.php b/templates/Users/edit.php index db27971..3df6fd5 100644 --- a/templates/Users/edit.php +++ b/templates/Users/edit.php @@ -1,31 +1,34 @@ - -
- Form->create($user) ?> -
- - Form->control('email'); - echo $this->Form->control('password'); - ?> -
- Form->button(__('Submit')) ?> - Form->end() ?> + ['confirm' => __('Are you sure you want to delete # {0}?', $user->id), 'class' => 'side-nav-item'] + ) ?> + Html->link(__('List Users'), ['action' => 'index'], ['class' => 'side-nav-item']) ?> +
+ +
+
+ Form->create($user) ?> +
+ + Form->control('email'); + // Never print the stored hash, an empty password keeps the current one. + echo $this->Form->control('password', ['value' => '', 'required' => false]); + ?> +
+ Form->button(__('Submit')) ?> + Form->end() ?> +
+
diff --git a/templates/Users/index.php b/templates/Users/index.php index 928acf6..dbe29ad 100644 --- a/templates/Users/index.php +++ b/templates/Users/index.php @@ -1,47 +1,47 @@ $users + */ ?> - -
+
+ Html->link(__('New User'), ['action' => 'add'], ['class' => 'button float-right']) ?>

-
id) ?>user_id) ?>title) ?>slug) ?>body) ?>published) ?>created) ?>modified) ?>id) ?>user_id) ?>title) ?>slug) ?>body) ?>published) ?>created) ?>modified) ?> - Html->link(__('View'), ['controller' => 'Articles', 'action' => 'view', $articles->id]) ?> - Html->link(__('Edit'), ['controller' => 'Articles', 'action' => 'edit', $articles->id]) ?> - Form->postLink(__('Delete'), ['controller' => 'Articles', 'action' => 'delete', $articles->id], ['confirm' => __('Are you sure you want to delete # {0}?', $articles->id)]) ?> + Html->link(__('View'), ['controller' => 'Articles', 'action' => 'view', $article->slug]) ?> + Identity->is($article->user_id)) : ?> + Html->link(__('Edit'), ['controller' => 'Articles', 'action' => 'edit', $article->slug]) ?> + Form->postLink( + __('Delete'), + ['controller' => 'Articles', 'action' => 'delete', $article->slug], + [ + 'method' => 'delete', + 'confirm' => __('Are you sure you want to delete # {0}?', $article->title), + ] + ) ?> +
- - - - - - - - - - - - - - - - - - - - - - -
Paginator->sort('id') ?>Paginator->sort('email') ?>Paginator->sort('password') ?>Paginator->sort('created') ?>Paginator->sort('modified') ?>
Number->format($user->id) ?>email) ?>password) ?>created) ?>modified) ?> - Html->link(__('View'), ['action' => 'view', $user->id]) ?> - Html->link(__('Edit'), ['action' => 'edit', $user->id]) ?> - Form->postLink(__('Delete'), ['action' => 'delete', $user->id], ['confirm' => __('Are you sure you want to delete # {0}?', $user->id)]) ?> -
+
+ + + + + + + + + + + + + + + + + + + + + +
Paginator->sort('id') ?>Paginator->sort('email') ?>Paginator->sort('created') ?>Paginator->sort('modified') ?>
Number->format($user->id) ?>email) ?>created) ?>modified) ?> + Html->link(__('View'), ['action' => 'view', $user->id]) ?> + Html->link(__('Edit'), ['action' => 'edit', $user->id]) ?> + Form->postLink( + __('Delete'), + ['action' => 'delete', $user->id], + [ + 'method' => 'delete', + 'confirm' => __('Are you sure you want to delete # {0}?', $user->id), + ] + ) ?> +
+
    Paginator->first('<< ' . __('first')) ?> @@ -52,4 +52,4 @@

Paginator->counter(__('Page {{page}} of {{pages}}, showing {{current}} record(s) out of {{count}} total')) ?>

-
+
\ No newline at end of file diff --git a/templates/Users/login.php b/templates/Users/login.php index 1f7b2a6..da003cf 100644 --- a/templates/Users/login.php +++ b/templates/Users/login.php @@ -1,14 +1,18 @@ +
- Flash->render() ?> -

Login

+

Form->create() ?>
- + Form->control('email', ['required' => true]) ?> Form->control('password', ['required' => true]) ?>
- Form->submit(__('Login')); ?> + Form->submit(__('Login')) ?> Form->end() ?> - Html->link("Add User", ['action' => 'add']) ?> + Html->link(__('Add User'), ['action' => 'add']) ?>
diff --git a/templates/Users/view.php b/templates/Users/view.php index 4205506..3a86a5a 100644 --- a/templates/Users/view.php +++ b/templates/Users/view.php @@ -1,77 +1,84 @@ - -
-

id) ?>

- - - - - - - - - - - - - - - - - - - - - -
email) ?>
password) ?>
Number->format($user->id) ?>
created) ?>
modified) ?>
- \ No newline at end of file diff --git a/templates/element/flash/default.php b/templates/element/flash/default.php index 736b27d..061c700 100644 --- a/templates/element/flash/default.php +++ b/templates/element/flash/default.php @@ -1,4 +1,9 @@ +
diff --git a/templates/element/flash/success.php b/templates/element/flash/success.php index becd5a1..73eaac4 100644 --- a/templates/element/flash/success.php +++ b/templates/element/flash/success.php @@ -1,4 +1,9 @@ +
diff --git a/templates/email/html/default.php b/templates/email/html/default.php index ac3daa7..70a6cd4 100644 --- a/templates/email/html/default.php +++ b/templates/email/html/default.php @@ -11,10 +11,12 @@ * @link https://cakephp.org CakePHP(tm) Project * @since 0.10.0 * @license https://opensource.org/licenses/mit-license.php MIT License + * @var \Cake\View\View $this + * @var string $content */ -$content = explode("\n", $content); +$lines = explode("\n", $content); -foreach ($content as $line) : +foreach ($lines as $line) : echo '

' . $line . "

\n"; endforeach; diff --git a/templates/email/text/default.php b/templates/email/text/default.php index 862cd9f..cb1f378 100644 --- a/templates/email/text/default.php +++ b/templates/email/text/default.php @@ -11,6 +11,8 @@ * @link https://cakephp.org CakePHP(tm) Project * @since 0.10.0 * @license https://opensource.org/licenses/mit-license.php MIT License + * @var \Cake\View\View $this + * @var string $content */ echo $content; diff --git a/templates/layout/ajax.php b/templates/layout/ajax.php index 29b439c..cd51169 100644 --- a/templates/layout/ajax.php +++ b/templates/layout/ajax.php @@ -11,6 +11,7 @@ * @link https://cakephp.org CakePHP(tm) Project * @since 0.10.0 * @license https://opensource.org/licenses/mit-license.php MIT License + * @var \App\View\AppView $this */ echo $this->fetch('content'); diff --git a/templates/layout/default.php b/templates/layout/default.php index 84f0ec1..c53dfb7 100644 --- a/templates/layout/default.php +++ b/templates/layout/default.php @@ -11,6 +11,7 @@ * @link https://cakephp.org CakePHP(tm) Project * @since 0.10.0 * @license https://opensource.org/licenses/mit-license.php MIT License + * @var \App\View\AppView $this */ $cakeDescription = 'CakePHP: the rapid development php framework'; @@ -19,38 +20,40 @@ Html->charset() ?> - + <?= $cakeDescription ?>: <?= $this->fetch('title') ?> Html->meta('icon') ?> - Html->css('base.css') ?> - Html->css('cake.css') ?> + Html->css(['normalize.min', 'milligram.min', 'fonts', 'cake']) ?> fetch('meta') ?> fetch('css') ?> fetch('script') ?> -