Skip to content

Commit

Permalink
CakePHP to 4.6.2 (NOJIRA)
Browse files Browse the repository at this point in the history
  • Loading branch information
Benn Oshrin committed Aug 2, 2025
1 parent b91311d commit 7c37dcb
Show file tree
Hide file tree
Showing 2,606 changed files with 75,353 additions and 20,275 deletions.
1 change: 1 addition & 0 deletions app/vendor/cakephp-plugins.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
'EnvSource' => $baseDir . '/plugins/EnvSource/',
'Migrations' => $baseDir . '/vendor/cakephp/migrations/',
'OrcidSource' => $baseDir . '/plugins/OrcidSource/',
'SshKeyAuthenticator' => $baseDir . '/plugins/SshKeyAuthenticator/',
'TestWidget' => $baseDir . '/plugins/TestWidget/',
],
];
50 changes: 10 additions & 40 deletions app/vendor/cakephp/cakephp-codesniffer/.github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,13 @@ jobs:
strategy:
fail-fast: false
matrix:
php-version: ['7.2', '7.4', '8.0']
prefer-lowest: ['']
php-version: ['7.2', '7.4']
dependencies: [highest]
include:
- php-version: '7.2'
prefer-lowest: 'prefer-lowest'
dependencies: 'lowest'
- php-version: '8.0'
composer-options: "--ignore-platform-reqs"

steps:
- uses: actions/checkout@v2
Expand All @@ -30,29 +32,11 @@ jobs:
extensions: mbstring, intl
coverage: pcov

- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- name: Get date part for cache key
id: key-date
run: echo "::set-output name=date::$(date +'%Y-%m')"

- name: Cache composer dependencies
uses: actions/cache@v1
- name: Composer install
uses: ramsey/composer-install@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ steps.key-date.outputs.date }}-${{ hashFiles('composer.json') }}-${{ matrix.prefer-lowest }}

- name: Composer Install
run: |
if [[ ${{ matrix.php-version }} == '8.0' ]]; then
composer install --ignore-platform-reqs
elif ${{ matrix.prefer-lowest == 'prefer-lowest' }}; then
composer update --prefer-lowest --prefer-stable
else
composer install
fi
dependency-versions: ${{ matrix.dependencies }}
composer-options: "${{ matrix.composer-options }}"

- name: Setup problem matchers for PHPUnit
if: matrix.php-version == '7.4'
Expand Down Expand Up @@ -82,22 +66,8 @@ jobs:
tools: cs2pr
coverage: none

- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- name: Get date part for cache key
id: key-date
run: echo "::set-output name=date::$(date +'%Y-%m')"

- name: Cache composer dependencies
uses: actions/cache@v1
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ steps.key-date.outputs.date }}-${{ hashFiles('composer.json') }}-${{ matrix.prefer-lowest }}

- name: Composer install
run: composer install
uses: ramsey/composer-install@v3

- name: Run PHP CodeSniffer
run: vendor/bin/phpcs --report=checkstyle CakePHP/ | cs2pr
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ protected function getClassNameWithNamespace(File $phpCsFile): ?string

return ClassHelper::getFullyQualifiedName(
$phpCsFile,
$phpCsFile->findPrevious(TokenHelper::$typeKeywordTokenCodes, $lastToken)
$phpCsFile->findPrevious([T_CLASS, T_TRAIT, T_INTERFACE, T_ENUM], $lastToken)
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -56,17 +56,18 @@ public function process(File $phpcsFile, $stackPtr)
$prevLineTokens = [];

while ($current >= 0 && $tokens[$current]['line'] >= $previousLine) {
$currentTokenCode = $tokens[$current]['code'];
if (
$tokens[$current]['line'] == $previousLine
&& $tokens[$current]['code'] !== T_WHITESPACE
&& $tokens[$current]['code'] !== T_COMMENT
&& $tokens[$current]['code'] !== T_DOC_COMMENT_OPEN_TAG
&& $tokens[$current]['code'] !== T_DOC_COMMENT_TAG
&& $tokens[$current]['code'] !== T_DOC_COMMENT_STRING
&& $tokens[$current]['code'] !== T_DOC_COMMENT_CLOSE_TAG
&& $tokens[$current]['code'] !== T_DOC_COMMENT_WHITESPACE
&& $currentTokenCode !== T_WHITESPACE
&& $currentTokenCode !== T_COMMENT
&& $currentTokenCode !== T_DOC_COMMENT_OPEN_TAG
&& $currentTokenCode !== T_DOC_COMMENT_TAG
&& $currentTokenCode !== T_DOC_COMMENT_STRING
&& $currentTokenCode !== T_DOC_COMMENT_CLOSE_TAG
&& $currentTokenCode !== T_DOC_COMMENT_WHITESPACE
) {
$prevLineTokens[] = $tokens[$current]['code'];
$prevLineTokens[] = $currentTokenCode;
}
$current--;
}
Expand Down
8 changes: 6 additions & 2 deletions app/vendor/cakephp/cakephp-codesniffer/CakePHP/ruleset.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,15 @@
</properties>
<exclude-pattern>*/tests/*</exclude-pattern>
</rule>
<rule ref="Generic.Formatting.NoSpaceAfterCast"/>
<rule ref="Generic.Formatting.SpaceAfterCast">
<properties>
<property name="spacing" value="0"/>
</properties>
</rule>
<rule ref="Generic.PHP.DeprecatedFunctions"/>
<rule ref="Generic.PHP.ForbiddenFunctions"/>
<rule ref="Generic.PHP.NoSilencedErrors"/>
<rule ref="Generic.WhiteSpace.LanguageConstructSpacing"/>

<!-- Relax CakePHP rules -->
<rule ref="CakePHP.Commenting.FunctionComment">
Expand All @@ -81,7 +86,6 @@
<rule ref="Squiz.Scope.MemberVarScope"/>
<rule ref="Squiz.Scope.StaticThisUsage"/>
<rule ref="Squiz.WhiteSpace.CastSpacing"/>
<rule ref="Squiz.WhiteSpace.LanguageConstructSpacing"/>
<rule ref="Squiz.WhiteSpace.LogicalOperatorSpacing"/>
<rule ref="Squiz.WhiteSpace.ScopeClosingBrace"/>
<rule ref="Squiz.WhiteSpace.SemicolonSpacing"/>
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.6.0
4.6.2
2 changes: 1 addition & 1 deletion app/vendor/cakephp/cakephp/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"ext-intl": "*",
"ext-json": "*",
"ext-mbstring": "*",
"cakephp/chronos": "^2.4.0-RC2",
"cakephp/chronos": "^2.4.0",
"composer/ca-bundle": "^1.2",
"laminas/laminas-diactoros": "^2.2.2",
"laminas/laminas-httphandlerrunner": "^1.1 || ^2.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ public function getMultiple($keys, $default = null): array
$values = $this->_Memcached->getMulti($cacheKeys);
$return = [];
foreach ($cacheKeys as $original => $prefixed) {
$return[$original] = $values[$prefixed] ?? $default;
$return[$original] = array_key_exists($prefixed, $values) ? $values[$prefixed] : $default;
}

return $return;
Expand Down
8 changes: 7 additions & 1 deletion app/vendor/cakephp/cakephp/src/Cache/Engine/NullEngine.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,13 @@ public function get($key, $default = null)
*/
public function getMultiple($keys, $default = null): iterable
{
return [];
$result = [];

foreach ($keys as $key) {
$result[$key] = $default;
}

return $result;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ protected function reconnect(): bool
}

try {
$this->connection->connect();
$this->connection->getDriver()->connect();
if ($this->connection->isQueryLoggingEnabled()) {
$this->connection->log('[RECONNECT]');
}
Expand Down
18 changes: 18 additions & 0 deletions app/vendor/cakephp/cakephp/src/ORM/BehaviorRegistry.php
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,24 @@ protected function _getMethods(Behavior $instance, string $class, string $alias)
return compact('methods', 'finders');
}

/**
* Set an object directly into the registry by name.
*
* @param string $name The name of the object to set in the registry.
* @param \Cake\ORM\Behavior $object instance to store in the registry
* @return $this
*/
public function set(string $name, object $object)
{
parent::set($name, $object);

$methods = $this->_getMethods($object, get_class($object), $name);
$this->_methodMap += $methods['methods'];
$this->_finderMap += $methods['finders'];

return $this;
}

/**
* Remove an object from the registry.
*
Expand Down
1 change: 1 addition & 0 deletions app/vendor/cakephp/cakephp/src/ORM/EagerLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ class EagerLoader
'joinType' => 1,
'strategy' => 1,
'negateMatch' => 1,
'includeFields' => 1,
];

/**
Expand Down
36 changes: 18 additions & 18 deletions app/vendor/cakephp/twig-view/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE)


This plugin allows you to use the [Twig Templating Language](http://twig.sensiolabs.org/documentation) for your views.
This plugin allows you to use the [Twig Templating Language](https://twig.symfony.com/doc) for your views.

It provides wrappers for common View opertions and many helpful extensions that expose CakePHP functions and `jasny/twig-extensions` helpers.

## Installation

To install with [Composer](http://getcomposer.org/), use the command below.
To install with [Composer](https://getcomposer.org/), use the command below.

```bash
composer require cakephp/twig-view
Expand Down Expand Up @@ -205,8 +205,8 @@ All wrapper functions are pre-escaped and do not require using `|raw` filter. Ho

### Extension Filters

* `low` maps to [`strtolower`](http://php.net/strtolower)
* `up` maps to [`strtoupper`](http://php.net/strtoupper)
* `low` maps to [`strtolower`](https://php.net/strtolower)
* `up` maps to [`strtoupper`](https://php.net/strtoupper)
* `env` maps to [`env`](https://book.cakephp.org/4/en/core-libraries/global-constants-and-functions.html#global-functions)
* `pluralize` maps to [`Cake\Utility\Inflector::pluralize`](https://book.cakephp.org/4/en/core-libraries/inflector.html#Cake\\Utility\\Inflector::pluralize)
* `singularize` maps to [`Cake\Utility\Inflector::singularize`](https://book.cakephp.org/4/en/core-libraries/inflector.html#Cake\\Utility\\Inflector::singularize)
Expand All @@ -222,7 +222,7 @@ All wrapper functions are pre-escaped and do not require using `|raw` filter. Ho
* `cake_number_format` maps to [`Cake\I18n\Number::format`](https://book.cakephp.org/4/en/core-libraries/number.html#Cake\\I18n\\Number::format)
* `formatDelta` maps to [`Cake\I18n\Number::formatDelta`](https://book.cakephp.org/4/en/core-libraries/number.html#Cake\\I18n\\Number::formatDelta)
* `currency` maps to [`Cake\I18n\Number::currency`](https://book.cakephp.org/4/en/core-libraries/number.html#Cake\\I18n\\Number::currency)
* `substr` maps to [`substr`](http://php.net/substr)
* `substr` maps to [`substr`](https://php.net/substr)
* `tokenize` maps to [`Cake\Utility\Text::tokenize`](https://book.cakephp.org/4/en/core-libraries/text.html#simple-string-parsing)
* `insert` maps to [`Cake\Utility\Text::insert`](https://book.cakephp.org/4/en/core-libraries/text.html#formatting-strings)
* `cleanInsert` maps to [`Cake\Utility\Text::cleanInsert`](https://book.cakephp.org/4/en/core-libraries/text.html#formatting-strings)
Expand All @@ -239,24 +239,24 @@ All wrapper functions are pre-escaped and do not require using `|raw` filter. Ho
* `utf8` maps to `Cake\Utility\Text::utf8`
* `ascii` maps to `Cake\Utility\Text::ascii`
* `parseFileSize` maps to [`Cake\Utility\Text::parseFileSize`](https://book.cakephp.org/4/en/core-libraries/text.html#simple-string-parsing)
* `serialize` maps to [`serialize`](http://php.net/serialize)
* `unserialize` maps to [`unserialize`](http://php.net/unserialize)
* `md5` maps to [`md5`](http://php.net/md5)
* `base64_encode` maps to [`base64_encode`](http://php.net/base64_encode)
* `base64_decode` maps to [`base64_decode`](http://php.net/base64_decode)
* `string` cast to [`string`](http://php.net/manual/en/language.types.type-juggling.php)
* `serialize` maps to [`serialize`](https://php.net/serialize)
* `unserialize` maps to [`unserialize`](https://php.net/unserialize)
* `md5` maps to [`md5`](https://php.net/md5)
* `base64_encode` maps to [`base64_encode`](https://php.net/base64_encode)
* `base64_decode` maps to [`base64_decode`](https://php.net/base64_decode)
* `string` cast to [`string`](https://php.net/manual/en/language.types.type-juggling.php)

See `jasny/twig-extensions` for the filters they provide.

### Extension Functions

* `in_array` maps to [`in_array`](http://php.net/in_array)
* `explode` maps to [`explode`](http://php.net/explode)
* `array` cast to [`array`](http://php.net/manual/en/language.types.type-juggling.php)
* `array_push` maps to [`push`](http://php.net/array_push)
* `array_prev` maps to [`prev`](http://php.net/prev)
* `array_next` maps to [`next`](http://php.net/next)
* `array_current` maps to [`current`](http://php.net/current)
* `in_array` maps to [`in_array`](https://php.net/in_array)
* `explode` maps to [`explode`](https://php.net/explode)
* `array` cast to [`array`](https://php.net/manual/en/language.types.type-juggling.php)
* `array_push` maps to [`push`](https://php.net/array_push)
* `array_prev` maps to [`prev`](https://php.net/prev)
* `array_next` maps to [`next`](https://php.net/next)
* `array_current` maps to [`current`](https://php.net/current)
* `__` maps to [`__`](https://book.cakephp.org/4/en/core-libraries/internationalization-and-localization.html)
* `__d` maps to [`__d`](https://book.cakephp.org/4/en/core-libraries/internationalization-and-localization.html)
* `__n` maps to [`__n`](https://book.cakephp.org/4/en/core-libraries/internationalization-and-localization.html)
Expand Down
11 changes: 7 additions & 4 deletions app/vendor/cakephp/twig-view/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,10 @@
"source": "https://github.com/cakephp/twig-view"
},
"require": {
"php": ">=7.2",
"cakephp/cakephp": "^4.0",
"jasny/twig-extensions": "^1.3",
"twig/markdown-extra": "^3.0",
"twig/twig": "^3.0"
"twig/twig": "^3.11.0"
},
"require-dev": {
"cakephp/cakephp-codesniffer": "^4.0",
Expand Down Expand Up @@ -64,12 +63,16 @@
"@phpstan",
"@psalm"
],
"stan-setup": "cp composer.json composer.backup && composer require --dev phpstan/phpstan:^0.12.54 psalm/phar:~4.3.0 && mv composer.backup composer.json",
"stan-setup": "cp composer.json composer.backup && composer require --dev phpstan/phpstan:~1.7.0 psalm/phar:~4.23.0 && mv composer.backup composer.json",
"test": [
"phpunit"
]
},
"config": {
"sort-packages": true
"sort-packages": true,
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true,
"cakephp/plugin-installer": true
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,13 @@ public function getFunctions(): array
{
return [
new TwigFunction('__', '__'),
new TwigFunction('__d', '__d'),
new TwigFunction('__n', '__n'),
new TwigFunction('__x', '__x'),
new TwigFunction('__d', '__d'),
new TwigFunction('__dn', '__dn'),
new TwigFunction('__x', '__x'),
new TwigFunction('__xn', '__xn'),
new TwigFunction('__dx', '__dx'),
new TwigFunction('__dxn', '__dxn'),
];
}
}
4 changes: 2 additions & 2 deletions app/vendor/cakephp/twig-view/src/View/TwigView.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,12 @@ class TwigView extends View
* Use ViewBuilder::setOption()/setOptions() in your controller to set these options.
*
* - `environment` - Array of config you would pass into \Twig\Environment to overwrite the default settings.
* See http://twig.sensiolabs.org/doc/api.html#environment-options.
* See https://twig.symfony.com/doc/3.x/api.html#environment-options.
* - `markdown` - Set to 'default' to use `DefaultMarkdown` or
* provide custom Twig\Extra\Markdown\MarkdownInterface instance.
* See https://twig.symfony.com/doc/3.x/filters/markdown_to_html.html.
*
* @var array
* @var array<string, mixed>
*/
protected $_defaultConfig = [
'environment' => [
Expand Down
Loading

0 comments on commit 7c37dcb

Please sign in to comment.