Skip to content

Commit

Permalink
Bump CakePHP to v4.6.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Benn Oshrin committed May 7, 2025
1 parent a6f324d commit 08637cb
Show file tree
Hide file tree
Showing 4,554 changed files with 202,493 additions and 102,469 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
2 changes: 1 addition & 1 deletion app/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"license": "MIT",
"require": {
"php": ">=7.3",
"cakephp/cakephp": "^4.4",
"cakephp/cakephp": "^4.6",
"cakephp/migrations": "^3.2",
"cakephp/plugin-installer": "^1.3",
"components/jquery": "~3.7",
Expand Down
1,341 changes: 693 additions & 648 deletions app/composer.lock

Large diffs are not rendered by default.

120 changes: 120 additions & 0 deletions app/vendor/bin/sql-formatter
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
#!/usr/bin/env php
<?php

/**
* Proxy PHP file generated by Composer
*
* This file includes the referenced bin path (../doctrine/sql-formatter/bin/sql-formatter)
* using a stream wrapper to prevent the shebang from being output on PHP<8
*
* @generated
*/

namespace Composer;

$GLOBALS['_composer_bin_dir'] = __DIR__;
$GLOBALS['_composer_autoload_path'] = __DIR__ . '/..'.'/autoload.php';

if (PHP_VERSION_ID < 80000) {
if (!class_exists('Composer\BinProxyWrapper')) {
/**
* @internal
*/
final class BinProxyWrapper
{
private $handle;
private $position;
private $realpath;

public function stream_open($path, $mode, $options, &$opened_path)
{
// get rid of phpvfscomposer:// prefix for __FILE__ & __DIR__ resolution
$opened_path = substr($path, 17);
$this->realpath = realpath($opened_path) ?: $opened_path;
$opened_path = $this->realpath;
$this->handle = fopen($this->realpath, $mode);
$this->position = 0;

return (bool) $this->handle;
}

public function stream_read($count)
{
$data = fread($this->handle, $count);

if ($this->position === 0) {
$data = preg_replace('{^#!.*\r?\n}', '', $data);
}

$this->position += strlen($data);

return $data;
}

public function stream_cast($castAs)
{
return $this->handle;
}

public function stream_close()
{
fclose($this->handle);
}

public function stream_lock($operation)
{
return $operation ? flock($this->handle, $operation) : true;
}

public function stream_seek($offset, $whence)
{
if (0 === fseek($this->handle, $offset, $whence)) {
$this->position = ftell($this->handle);
return true;
}

return false;
}

public function stream_tell()
{
return $this->position;
}

public function stream_eof()
{
return feof($this->handle);
}

public function stream_stat()
{
return array();
}

public function stream_set_option($option, $arg1, $arg2)
{
return true;
}

public function url_stat($path, $flags)
{
$path = substr($path, 17);
if (file_exists($path)) {
return stat($path);
}

return false;
}
}
}

if (
(function_exists('stream_get_wrappers') && in_array('phpvfscomposer', stream_get_wrappers(), true))
|| (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper'))
) {
include("phpvfscomposer://" . __DIR__ . '/..'.'/doctrine/sql-formatter/bin/sql-formatter');
exit(0);
}
}

include __DIR__ . '/..'.'/doctrine/sql-formatter/bin/sql-formatter';
5 changes: 4 additions & 1 deletion app/vendor/bin/validate-json
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,10 @@ if (PHP_VERSION_ID < 80000) {
}
}

if (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper')) {
if (
(function_exists('stream_get_wrappers') && in_array('phpvfscomposer', stream_get_wrappers(), true))
|| (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper'))
) {
include("phpvfscomposer://" . __DIR__ . '/..'.'/justinrainbow/json-schema/bin/validate-json');
exit(0);
}
Expand Down
2 changes: 1 addition & 1 deletion app/vendor/cakephp/cakephp/VERSION.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@
// @license https://opensource.org/licenses/mit-license.php MIT License
// +--------------------------------------------------------------------------------------------+ //
////////////////////////////////////////////////////////////////////////////////////////////////////
4.4.17
4.6.1
7 changes: 4 additions & 3 deletions app/vendor/cakephp/cakephp/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@
}
],
"require": {
"php": ">=7.4.0",
"php": ">=7.4.0,<9",
"ext-intl": "*",
"ext-json": "*",
"ext-mbstring": "*",
"cakephp/chronos": "^2.2",
"cakephp/chronos": "^2.4.0-RC2",
"composer/ca-bundle": "^1.2",
"laminas/laminas-diactoros": "^2.2.2",
"laminas/laminas-httphandlerrunner": "^1.1 || ^2.0",
Expand Down Expand Up @@ -58,7 +58,7 @@
"require-dev": {
"cakephp/cakephp-codesniffer": "^4.5",
"mikey179/vfsstream": "^1.6.10",
"paragonie/csp-builder": "^2.3",
"paragonie/csp-builder": "^2.3 || ^3.0",
"phpunit/phpunit": "^8.5 || ^9.3"
},
"suggest": {
Expand Down Expand Up @@ -88,6 +88,7 @@
},
"files": [
"src/Core/functions.php",
"src/Error/functions.php",
"src/Collection/functions.php",
"src/I18n/functions.php",
"src/Routing/functions.php",
Expand Down
32 changes: 16 additions & 16 deletions app/vendor/cakephp/cakephp/src/Cache/Cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,11 @@
namespace Cake\Cache;

use Cake\Cache\Engine\NullEngine;
use Cake\Cache\Exception\CacheWriteException;
use Cake\Cache\Exception\InvalidArgumentException;
use Cake\Core\StaticConfigTrait;
use RuntimeException;
use function Cake\Core\deprecationWarning;

/**
* Cache provides a consistent interface to Caching in your application. It allows you
Expand Down Expand Up @@ -136,7 +139,7 @@ public static function setRegistry(CacheRegistry $registry): void
* Finds and builds the instance of the required engine class.
*
* @param string $name Name of the config array that needs an engine instance built
* @throws \Cake\Cache\InvalidArgumentException When a cache engine cannot be created.
* @throws \Cake\Cache\Exception\InvalidArgumentException When a cache engine cannot be created.
* @throws \RuntimeException If loading of the engine failed.
* @return void
*/
Expand Down Expand Up @@ -265,15 +268,12 @@ public static function write(string $key, $value, string $config = 'default'): b
$backend = static::pool($config);
$success = $backend->set($key, $value);
if ($success === false && $value !== '') {
trigger_error(
sprintf(
"%s cache was unable to write '%s' to %s cache",
$config,
$key,
get_class($backend)
),
E_USER_WARNING
);
throw new CacheWriteException(sprintf(
"%s cache was unable to write '%s' to %s cache",
$config,
$key,
get_class($backend)
));
}

return $success;
Expand All @@ -299,7 +299,7 @@ public static function write(string $key, $value, string $config = 'default'): b
* @param iterable $data An array or Traversable of data to be stored in the cache
* @param string $config Optional string configuration name to write to. Defaults to 'default'
* @return bool True on success, false on failure
* @throws \Cake\Cache\InvalidArgumentException
* @throws \Cake\Cache\Exception\InvalidArgumentException
*/
public static function writeMany(iterable $data, string $config = 'default'): bool
{
Expand Down Expand Up @@ -354,7 +354,7 @@ public static function read(string $key, string $config = 'default')
* @param string $config optional name of the configuration to use. Defaults to 'default'
* @return iterable An array containing, for each of the given $keys,
* the cached data or false if cached data could not be retrieved.
* @throws \Cake\Cache\InvalidArgumentException
* @throws \Cake\Cache\Exception\InvalidArgumentException
*/
public static function readMany(iterable $keys, string $config = 'default'): iterable
{
Expand All @@ -369,7 +369,7 @@ public static function readMany(iterable $keys, string $config = 'default'): ite
* @param string $config Optional string configuration name. Defaults to 'default'
* @return int|false New value, or false if the data doesn't exist, is not integer,
* or if there was an error fetching it.
* @throws \Cake\Cache\InvalidArgumentException When offset < 0
* @throws \Cake\Cache\Exception\InvalidArgumentException When offset < 0
*/
public static function increment(string $key, int $offset = 1, string $config = 'default')
{
Expand All @@ -388,7 +388,7 @@ public static function increment(string $key, int $offset = 1, string $config =
* @param string $config Optional string configuration name. Defaults to 'default'
* @return int|false New value, or false if the data doesn't exist, is not integer,
* or if there was an error fetching it
* @throws \Cake\Cache\InvalidArgumentException when offset < 0
* @throws \Cake\Cache\Exception\InvalidArgumentException when offset < 0
*/
public static function decrement(string $key, int $offset = 1, string $config = 'default')
{
Expand Down Expand Up @@ -445,7 +445,7 @@ public static function delete(string $key, string $config = 'default'): bool
* @param iterable $keys Array or Traversable of cache keys to be deleted
* @param string $config name of the configuration to use. Defaults to 'default'
* @return bool True on success, false on failure.
* @throws \Cake\Cache\InvalidArgumentException
* @throws \Cake\Cache\Exception\InvalidArgumentException
*/
public static function deleteMany(iterable $keys, string $config = 'default'): bool
{
Expand Down Expand Up @@ -505,7 +505,7 @@ public static function clearGroup(string $group, string $config = 'default'): bo
*
* @param string|null $group Group name or null to retrieve all group mappings
* @return array<string, array> Map of group and all configuration that has the same group
* @throws \Cake\Cache\InvalidArgumentException
* @throws \Cake\Cache\Exception\InvalidArgumentException
*/
public static function groupConfigs(?string $group = null): array
{
Expand Down
20 changes: 11 additions & 9 deletions app/vendor/cakephp/cakephp/src/Cache/CacheEngine.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,12 @@
*/
namespace Cake\Cache;

use Cake\Cache\Exception\InvalidArgumentException;
use Cake\Core\InstanceConfigTrait;
use DateInterval;
use DateTime;
use Psr\SimpleCache\CacheInterface;
use function Cake\Core\triggerWarning;

/**
* Storage engine for CakePHP caching
Expand Down Expand Up @@ -96,7 +98,7 @@ public function init(array $config = []): bool
*
* @param string $key Key to check.
* @return void
* @throws \Cake\Cache\InvalidArgumentException When the key is not valid.
* @throws \Cake\Cache\Exception\InvalidArgumentException When the key is not valid.
*/
protected function ensureValidKey($key): void
{
Expand All @@ -111,7 +113,7 @@ protected function ensureValidKey($key): void
* @param iterable $iterable The iterable to check.
* @param string $check Whether to check keys or values.
* @return void
* @throws \Cake\Cache\InvalidArgumentException
* @throws \Cake\Cache\Exception\InvalidArgumentException
*/
protected function ensureValidType($iterable, string $check = self::CHECK_VALUE): void
{
Expand All @@ -137,7 +139,7 @@ protected function ensureValidType($iterable, string $check = self::CHECK_VALUE)
* @param iterable $keys A list of keys that can obtained in a single operation.
* @param mixed $default Default value to return for keys that do not exist.
* @return iterable A list of key value pairs. Cache keys that do not exist or are stale will have $default as value.
* @throws \Cake\Cache\InvalidArgumentException If $keys is neither an array nor a Traversable,
* @throws \Cake\Cache\Exception\InvalidArgumentException If $keys is neither an array nor a Traversable,
* or if any of the $keys are not a legal value.
*/
public function getMultiple($keys, $default = null): iterable
Expand All @@ -160,7 +162,7 @@ public function getMultiple($keys, $default = null): iterable
* the driver supports TTL then the library may set a default value
* for it or let the driver take care of that.
* @return bool True on success and false on failure.
* @throws \Cake\Cache\InvalidArgumentException If $values is neither an array nor a Traversable,
* @throws \Cake\Cache\Exception\InvalidArgumentException If $values is neither an array nor a Traversable,
* or if any of the $values are not a legal value.
*/
public function setMultiple($values, $ttl = null): bool
Expand Down Expand Up @@ -196,7 +198,7 @@ public function setMultiple($values, $ttl = null): bool
*
* @param iterable $keys A list of string-based keys to be deleted.
* @return bool True if the items were successfully removed. False if there was an error.
* @throws \Cake\Cache\InvalidArgumentException If $keys is neither an array nor a Traversable,
* @throws \Cake\Cache\Exception\InvalidArgumentException If $keys is neither an array nor a Traversable,
* or if any of the $keys are not a legal value.
*/
public function deleteMultiple($keys): bool
Expand All @@ -223,7 +225,7 @@ public function deleteMultiple($keys): bool
*
* @param string $key The cache item key.
* @return bool
* @throws \Cake\Cache\InvalidArgumentException If the $key string is not a legal value.
* @throws \Cake\Cache\Exception\InvalidArgumentException If the $key string is not a legal value.
*/
public function has($key): bool
{
Expand All @@ -236,7 +238,7 @@ public function has($key): bool
* @param string $key The unique key of this item in the cache.
* @param mixed $default Default value to return if the key does not exist.
* @return mixed The value of the item from the cache, or $default in case of cache miss.
* @throws \Cake\Cache\InvalidArgumentException If the $key string is not a legal value.
* @throws \Cake\Cache\Exception\InvalidArgumentException If the $key string is not a legal value.
*/
abstract public function get($key, $default = null);

Expand All @@ -249,7 +251,7 @@ abstract public function get($key, $default = null);
* the driver supports TTL then the library may set a default value
* for it or let the driver take care of that.
* @return bool True on success and false on failure.
* @throws \Cake\Cache\InvalidArgumentException
* @throws \Cake\Cache\Exception\InvalidArgumentException
* MUST be thrown if the $key string is not a legal value.
*/
abstract public function set($key, $value, $ttl = null): bool;
Expand Down Expand Up @@ -337,7 +339,7 @@ public function groups(): array
*
* @param string $key the key passed over
* @return string Prefixed key with potentially unsafe characters replaced.
* @throws \Cake\Cache\InvalidArgumentException If key's value is invalid.
* @throws \Cake\Cache\Exception\InvalidArgumentException If key's value is invalid.
*/
protected function _key($key): string
{
Expand Down
Loading

0 comments on commit 08637cb

Please sign in to comment.