Skip to content

Commit

Permalink
Update cakephp to 4.3.1 and other dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Benn Oshrin committed Nov 16, 2021
1 parent 0ee8a40 commit 10a1dde
Show file tree
Hide file tree
Showing 833 changed files with 27,289 additions and 22,720 deletions.
66 changes: 40 additions & 26 deletions app/vendor/adodb/adodb-php/adodb.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ function ADODB_Setup() {
/**
* ADODB version as a string.
*/
$ADODB_vers = 'v5.21.2 2021-08-22';
$ADODB_vers = 'v5.21.3 2021-10-31';

/**
* Determines whether recordset->RecordCount() is used.
Expand Down Expand Up @@ -1672,17 +1672,19 @@ function SelectLimit($sql,$nrows=-1,$offset=-1, $inputarr=false,$secs2cache=0) {
// 0 to offset-1 which will be discarded anyway. So we disable $ADODB_COUNTRECS.
global $ADODB_COUNTRECS;

$savec = $ADODB_COUNTRECS;
$ADODB_COUNTRECS = false;
try {
$savec = $ADODB_COUNTRECS;
$ADODB_COUNTRECS = false;


if ($secs2cache != 0) {
$rs = $this->CacheExecute($secs2cache,$sql,$inputarr);
} else {
$rs = $this->Execute($sql,$inputarr);
if ($secs2cache != 0) {
$rs = $this->CacheExecute($secs2cache, $sql, $inputarr);
} else {
$rs = $this->Execute($sql, $inputarr);
}
} finally {
$ADODB_COUNTRECS = $savec;
}

$ADODB_COUNTRECS = $savec;
if ($rs && !$rs->EOF) {
$rs = $this->_rs2rs($rs,$nrows,$offset);
}
Expand Down Expand Up @@ -1829,11 +1831,15 @@ public function CacheGetAssoc($secs2cache, $sql = false, $inputarr = false,$forc
public function GetOne($sql, $inputarr=false) {
global $ADODB_COUNTRECS,$ADODB_GETONE_EOF;

$crecs = $ADODB_COUNTRECS;
$ADODB_COUNTRECS = false;
try {
$crecs = $ADODB_COUNTRECS;
$ADODB_COUNTRECS = false;
$rs = $this->Execute($sql, $inputarr);
} finally {
$ADODB_COUNTRECS = $crecs;
}

$ret = false;
$rs = $this->Execute($sql,$inputarr);
if ($rs) {
if ($rs->EOF) {
$ret = $ADODB_GETONE_EOF;
Expand All @@ -1843,7 +1849,6 @@ public function GetOne($sql, $inputarr=false) {

$rs->Close();
}
$ADODB_COUNTRECS = $crecs;
return $ret;
}

Expand Down Expand Up @@ -1972,10 +1977,14 @@ function OffsetDate($dayFraction,$date=false) {
function GetArray($sql,$inputarr=false) {
global $ADODB_COUNTRECS;

$savec = $ADODB_COUNTRECS;
$ADODB_COUNTRECS = false;
$rs = $this->Execute($sql,$inputarr);
$ADODB_COUNTRECS = $savec;
try {
$savec = $ADODB_COUNTRECS;
$ADODB_COUNTRECS = false;
$rs = $this->Execute($sql, $inputarr);
} finally {
$ADODB_COUNTRECS = $savec;
}

if (!$rs)
if (defined('ADODB_PEAR')) {
return ADODB_PEAR_Error();
Expand All @@ -1994,10 +2003,13 @@ function CacheGetAll($secs2cache,$sql=false,$inputarr=false) {
function CacheGetArray($secs2cache,$sql=false,$inputarr=false) {
global $ADODB_COUNTRECS;

$savec = $ADODB_COUNTRECS;
$ADODB_COUNTRECS = false;
$rs = $this->CacheExecute($secs2cache,$sql,$inputarr);
$ADODB_COUNTRECS = $savec;
try {
$savec = $ADODB_COUNTRECS;
$ADODB_COUNTRECS = false;
$rs = $this->CacheExecute($secs2cache, $sql, $inputarr);
} finally {
$ADODB_COUNTRECS = $savec;
}

if (!$rs)
if (defined('ADODB_PEAR')) {
Expand Down Expand Up @@ -2028,12 +2040,14 @@ function GetRandRow($sql, $arr= false) {
function GetRow($sql,$inputarr=false) {
global $ADODB_COUNTRECS;

$crecs = $ADODB_COUNTRECS;
$ADODB_COUNTRECS = false;

$rs = $this->Execute($sql,$inputarr);
try {
$crecs = $ADODB_COUNTRECS;
$ADODB_COUNTRECS = false;
$rs = $this->Execute($sql, $inputarr);
} finally {
$ADODB_COUNTRECS = $crecs;
}

$ADODB_COUNTRECS = $crecs;
if ($rs) {
if (!$rs->EOF) {
$arr = $rs->fields;
Expand Down
15 changes: 15 additions & 0 deletions app/vendor/adodb/adodb-php/docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,18 @@ Older changelogs:

--------------------------------------------------------------------------------

## [5.21.3] - 2021-10-31

### Fixed

- core: Ensure temp $ADODB_COUNTRECS changes really are temporary
[#761](https://github.com/ADOdb/ADOdb/issues/761)
- mysqli: force error reporting mode to OFF (PHP 8.1 compatibility)
[#755](https://github.com/ADOdb/ADOdb/issues/755)
- pdo: fix metaIndexes declaration to match parent
[#717](https://github.com/ADOdb/ADOdb/issues/717)


## [5.21.2] - 2021-08-22

### Fixed
Expand Down Expand Up @@ -1117,6 +1129,9 @@ Released together with [v4.95](changelog_v4.x.md#495---17-may-2007)
- Adodb5 version,more error checking code now will use exceptions if available.


[Unreleased]: https://github.com/adodb/adodb/compare/v5.21.3...master

[5.21.3]: https://github.com/adodb/adodb/compare/v5.21.2...v5.21.3
[5.21.2]: https://github.com/adodb/adodb/compare/v5.21.1...v5.21.2
[5.21.1]: https://github.com/adodb/adodb/compare/v5.21.0...v5.21.1
[5.21.0]: https://github.com/adodb/adodb/compare/v5.21.0-rc.1...v5.21.0
Expand Down
17 changes: 15 additions & 2 deletions app/vendor/adodb/adodb-php/drivers/adodb-mysqli.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,25 @@ class ADODB_mysqli extends ADOConnection {
*/
private $usePreparedStatement = false;
private $useLastInsertStatement = false;

/**
* @var bool True if the last executed statement is a SELECT {@see _query()}
*/
private $isSelectStatement = false;

/**
* ADODB_mysqli constructor.
*/
public function __construct()
{
parent::__construct();

// Forcing error reporting mode to OFF, which is no longer the default
// starting with PHP 8.1 (see #755)
mysqli_report(MYSQLI_REPORT_OFF);
}


/**
* Sets the isolation level of a transaction.
*
Expand Down Expand Up @@ -1126,7 +1139,7 @@ function _query($sql, $inputarr)
return $mysql_res;
*/

if ($this->multiQuery) {
$rs = mysqli_multi_query($this->_connectionID, $sql.';');
if ($rs) {
Expand Down
4 changes: 2 additions & 2 deletions app/vendor/adodb/adodb-php/drivers/adodb-pdo.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -273,10 +273,10 @@ function MetaColumns($table,$normalize=true)
return $this->_driver->MetaColumns($table,$normalize);
}

public function metaIndexes($table,$normalize=true)
public function metaIndexes($table,$normalize=true,$owner=false)
{
if (method_exists($this->_driver,'metaIndexes'))
return $this->_driver->metaIndexes($table,$normalize);
return $this->_driver->metaIndexes($table,$normalize,$owner);
}

/**
Expand Down
5 changes: 2 additions & 3 deletions app/vendor/cakephp/bake/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@
"Pastry\\PastryTest\\": "tests/test_app/Plugin/PastryTest/src/",
"WithBakeSubFolder\\": "tests/test_app/Plugin/WithBakeSubFolder/src/",
"Bake\\Test\\": "tests/",
"Bake\\Test\\App\\": "tests/test_app/App/",
"Cake\\Test\\": "vendor/cakephp/cakephp/tests/"
"Bake\\Test\\App\\": "tests/test_app/App/"
}
},
"scripts": {
Expand All @@ -53,7 +52,7 @@
"cs-check": "phpcs --parallel=16 -p src/ tests/",
"cs-fix": "phpcbf --parallel=16 -p src/ tests/",
"stan": "phpstan analyse src/ && psalm.phar",
"stan-setup": "cp composer.json composer.backup && composer require --dev phpstan/phpstan:0.12.82 psalm/phar:~4.7.0 && mv composer.backup composer.json",
"stan-setup": "cp composer.json composer.backup && composer require --dev phpstan/phpstan:^0.12 psalm/phar:~4.11.0 && mv composer.backup composer.json",
"test": "phpunit",
"test-coverage": "phpunit --coverage-clover=clover.xml"
}
Expand Down
2 changes: 1 addition & 1 deletion app/vendor/cakephp/bake/docs/config/all.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

# The GitHub branch name for this version of the docs
# for edit links to point at.
branch = 'master'
branch = '2.x'

# Current version being built
version = '2.x'
Expand Down
12 changes: 6 additions & 6 deletions app/vendor/cakephp/bake/src/Command/FixtureCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
use Cake\Console\Arguments;
use Cake\Console\ConsoleIo;
use Cake\Console\ConsoleOptionParser;
use Cake\Console\Exception\StopException;
use Cake\Core\Configure;
use Cake\Database\Exception;
use Cake\Database\Schema\TableSchemaInterface;
Expand Down Expand Up @@ -168,7 +167,7 @@ protected function bake(string $model, string $useTable, Arguments $args, Consol
$data = $this->readSchema($model, $useTable);
}

$this->validateNames($data);
$this->validateNames($data, $io);

if ($modelImport === null) {
$schema = $this->_generateSchema($data);
Expand Down Expand Up @@ -214,15 +213,16 @@ public function readSchema(string $name, string $table): TableSchemaInterface
* Validates table and column names are supported.
*
* @param \Cake\Database\Schema\TableSchemaInterface $schema Table schema
* @param \Cake\Console\ConsoleIo $io Console io
* @return void
* @throws \Cake\Console\Exception\StopException When table or column names are not supported
*/
public function validateNames(TableSchemaInterface $schema): void
public function validateNames(TableSchemaInterface $schema, ConsoleIo $io): void
{
foreach ($schema->columns() as $column) {
if (!is_string($column) || !ctype_alpha($column[0])) {
throw new StopException(sprintf(
'Unable to bake table with integer column names or names that start with digits. Found `%s`.',
if (!is_string($column) || (!ctype_alpha($column[0]) && $column[0] !== '_')) {
$io->abort(sprintf(
'Unable to bake model. Table column names must start with a letter or underscore. Found `%s`.',
(string)$column
));
}
Expand Down
12 changes: 6 additions & 6 deletions app/vendor/cakephp/bake/src/Command/ModelCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
use Cake\Console\Arguments;
use Cake\Console\ConsoleIo;
use Cake\Console\ConsoleOptionParser;
use Cake\Console\Exception\StopException;
use Cake\Core\Configure;
use Cake\Database\Connection;
use Cake\Database\Driver\Sqlserver;
Expand Down Expand Up @@ -109,7 +108,7 @@ public function bake(string $name, Arguments $args, ConsoleIo $io): void
{
$table = $this->getTable($name, $args);
$tableObject = $this->getTableObject($name, $table);
$this->validateNames($tableObject->getSchema());
$this->validateNames($tableObject->getSchema(), $io);
$data = $this->getTableContext($tableObject, $table, $name, $args, $io);
$this->bakeTable($tableObject, $data, $args, $io);
$this->bakeEntity($tableObject, $data, $args, $io);
Expand All @@ -121,15 +120,16 @@ public function bake(string $name, Arguments $args, ConsoleIo $io): void
* Validates table and column names are supported.
*
* @param \Cake\Database\Schema\TableSchemaInterface $schema Table schema
* @param \Cake\Console\ConsoleIo $io Console io
* @return void
* @throws \Cake\Console\Exception\StopException When table or column names are not supported
*/
public function validateNames(TableSchemaInterface $schema): void
public function validateNames(TableSchemaInterface $schema, ConsoleIo $io): void
{
foreach ($schema->columns() as $column) {
if (!is_string($column) || !ctype_alpha($column[0])) {
throw new StopException(sprintf(
'Unable to bake table with integer column names or names that start with digits. Found `%s`.',
if (!is_string($column) || (!ctype_alpha($column[0]) && $column[0] !== '_')) {
$io->abort(sprintf(
'Unable to bake model. Table column names must start with a letter or underscore. Found `%s`.',
(string)$column
));
}
Expand Down
26 changes: 26 additions & 0 deletions app/vendor/cakephp/bake/tests/Fixture/ArticlesFixture.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?php
/**
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
*
* Licensed under The MIT License
* For full copyright and license information, please see the LICENSE.txt
* Redistributions of files must retain the above copyright notice
*
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org CakePHP(tm) Project
* @since 2.6.1
* @license http://www.opensource.org/licenses/mit-license.php MIT License
*/
namespace Bake\Test\Fixture;

use Cake\TestSuite\Fixture\TestFixture;

class ArticlesFixture extends TestFixture
{
public $records = [
['author_id' => 1, 'title' => 'First Article', 'body' => 'First Article Body', 'published' => 'Y'],
['author_id' => 3, 'title' => 'Second Article', 'body' => 'Second Article Body', 'published' => 'Y'],
['author_id' => 1, 'title' => 'Third Article', 'body' => 'Third Article Body', 'published' => 'Y'],
];
}
21 changes: 21 additions & 0 deletions app/vendor/cakephp/bake/tests/Fixture/ArticlesTagsFixture.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php
/**
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
*
* Licensed under The MIT License
* For full copyright and license information, please see the LICENSE.txt
* Redistributions of files must retain the above copyright notice
*
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org CakePHP(tm) Project
* @since 2.6.1
* @license http://www.opensource.org/licenses/mit-license.php MIT License
*/
namespace Bake\Test\Fixture;

use Cake\TestSuite\Fixture\TestFixture;

class ArticlesTagsFixture extends TestFixture
{
}
27 changes: 27 additions & 0 deletions app/vendor/cakephp/bake/tests/Fixture/AuthorsFixture.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?php
/**
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
*
* Licensed under The MIT License
* For full copyright and license information, please see the LICENSE.txt
* Redistributions of files must retain the above copyright notice
*
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org CakePHP(tm) Project
* @since 2.6.1
* @license http://www.opensource.org/licenses/mit-license.php MIT License
*/
namespace Bake\Test\Fixture;

use Cake\TestSuite\Fixture\TestFixture;

class AuthorsFixture extends TestFixture
{
public $records = [
['name' => 'mariano'],
['name' => 'nate'],
['name' => 'larry'],
['name' => 'garrett'],
];
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
class BakeTemplateAuthorsFixture extends TestFixture
{
/**
* Avoid overriding core.authors
* Avoid overriding AuthorsFixture's table.
*
* @var string
*/
Expand Down
Loading

0 comments on commit 10a1dde

Please sign in to comment.