Skip to content

[NO JIRA]Fixed failing vendor dependencies #33

Merged
merged 1 commit into from
Jun 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion app/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
/config/.env
/logs/*
/tmp/*
/vendor/*

# OS generated files #
######################
Expand Down
6 changes: 4 additions & 2 deletions app/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@
"license": "MIT",
"require": {
"php": ">=8.0",
"cakephp/cakephp": "^4.3",
"cakephp/cakephp": "4.3.9",
"cakephp/migrations": "^3.2",
"cakephp/plugin-installer": "^1.3",
"doctrine/dbal": "^3.3",
"mobiledetect/mobiledetectlib": "^2.8"
"league/container": "^4.2.0",
"mobiledetect/mobiledetectlib": "^2.8",
"psr/log": "^2.0"
},
"require-dev": {
"cakephp/bake": "^2.6",
Expand Down
2 changes: 1 addition & 1 deletion app/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions app/src/Controller/AppController.php
Original file line number Diff line number Diff line change
Expand Up @@ -220,9 +220,9 @@ public function calculatePermissions(?int $id): array {
foreach($permissions['entity'] as $action => $roles) {
$ok = false;

if(($action != 'delete' || $canDelete)
&&
!$readOnly || in_array($action, $readOnlyActions)) {
if((($action != 'delete' || $canDelete)
&&
!$readOnly) || in_array($action, $readOnlyActions)) {
if(is_array($roles)) {
foreach($roles as $role) {
// eg: $role = "platformAdmin", which corresponds to the variables set, above
Expand Down
54 changes: 54 additions & 0 deletions app/vendor/cakephp/bake/src/Command/CommandHelperCommand.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<?php
declare(strict_types=1);

/**
* 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.0
* @license http://www.opensource.org/licenses/mit-license.php MIT License
*/
namespace Bake\Command;

/**
* CommandHelper code generator.
*/
class CommandHelperCommand extends SimpleBakeCommand
{
/**
* Task name used in path generation.
*
* @var string
*/
public $pathFragment = 'Command/Helper/';

/**
* @inheritDoc
*/
public function name(): string
{
return 'command_helper';
}

/**
* @inheritDoc
*/
public function fileName(string $name): string
{
return $name . 'Helper.php';
}

/**
* @inheritDoc
*/
public function template(): string
{
return 'Bake.Command/helper';
}
}
37 changes: 37 additions & 0 deletions app/vendor/cakephp/bake/templates/bake/Command/helper.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{#
/**
* 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.0
* @license http://www.opensource.org/licenses/mit-license.php MIT License
*/
#}
<?php
declare(strict_types=1);
namespace {{ namespace }}\Command\Helper;
use Cake\Console\Helper;
/**
* {{ name }} command helper.
*/
class {{ name }}Helper extends Helper
{
/**
* This method should output content using `$this->_io`.
*
* @param array $args The arguments for the helper.
* @return void
*/
public function output(array $args): void
{
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
-- Test database schema for {{ plugin }}
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'],
];
}
29 changes: 29 additions & 0 deletions app/vendor/cakephp/bake/tests/Fixture/CommentsFixture.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?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 CommentsFixture extends TestFixture
{
public $records = [
['article_id' => 1, 'user_id' => 2, 'comment' => 'First Comment for First Article', 'published' => 'Y', 'created' => '2007-03-18 10:45:23', 'updated' => '2007-03-18 10:47:31'],
['article_id' => 1, 'user_id' => 4, 'comment' => 'Second Comment for First Article', 'published' => 'Y', 'created' => '2007-03-18 10:47:23', 'updated' => '2007-03-18 10:49:31'],
['article_id' => 1, 'user_id' => 1, 'comment' => 'Third Comment for First Article', 'published' => 'Y', 'created' => '2007-03-18 10:49:23', 'updated' => '2007-03-18 10:51:31'],
['article_id' => 1, 'user_id' => 1, 'comment' => 'Fourth Comment for First Article', 'published' => 'N', 'created' => '2007-03-18 10:51:23', 'updated' => '2007-03-18 10:53:31'],
['article_id' => 2, 'user_id' => 1, 'comment' => 'First Comment for Second Article', 'published' => 'Y', 'created' => '2007-03-18 10:53:23', 'updated' => '2007-03-18 10:55:31'],
['article_id' => 2, 'user_id' => 2, 'comment' => 'Second Comment for Second Article', 'published' => 'Y', 'created' => '2007-03-18 10:55:23', 'updated' => '2007-03-18 10:57:31'],
];
}
47 changes: 47 additions & 0 deletions app/vendor/cakephp/bake/tests/Fixture/HiddenFieldsFixture.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<?php
/**
* CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
* Copyright (c) Cake Software Foundation, Inc. (https://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. (https://cakefoundation.org)
* @link https://cakephp.org CakePHP(tm) Project
* @since 2.6.0
* @license https://opensource.org/licenses/mit-license.php MIT License
*/
namespace Bake\Test\Fixture;

use Cake\TestSuite\Fixture\TestFixture;

/**
* UserFixture
*/
class HiddenFieldsFixture extends TestFixture
{
/**
* fields property
*
* @var array<string, mixed>
*/
public $fields = [
'id' => ['type' => 'integer'],
'password' => ['type' => 'string', 'null' => true, 'length' => 255],
'auth_token' => ['type' => 'string', 'null' => true, 'length' => 255],
'_constraints' => [
'primary' => ['type' => 'primary', 'columns' => ['id']],
],
];

/**
* records property
*
* @var array
*/
public $records = [
['password' => '$2a$10$u05j8FjsvLBNdfhBhc21LOuVMpzpabVXQ9OpC2wO3pSO0q6t7HHMO', 'auth_token' => '12345'],
['password' => '$2a$10$u05j8FjsvLBNdfhBhc21LOuVMpzpabVXQ9OpC2wO3pSO0q6t7HHMO', 'auth_token' => '23456'],
];
}
26 changes: 26 additions & 0 deletions app/vendor/cakephp/bake/tests/Fixture/PostsFixture.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 PostsFixture extends TestFixture
{
public $records = [
['author_id' => 1, 'title' => 'First Post', 'body' => 'First Post Body', 'published' => 'Y'],
['author_id' => 3, 'title' => 'Second Post', 'body' => 'Second Post Body', 'published' => 'Y'],
['author_id' => 1, 'title' => 'Third Post', 'body' => 'Third Post Body', 'published' => 'Y'],
];
}
26 changes: 26 additions & 0 deletions app/vendor/cakephp/bake/tests/Fixture/TagsFixture.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 TagsFixture extends TestFixture
{
public $records = [
['name' => 'tag1', 'description' => 'A big description', 'created' => '2016-01-01 00:00'],
['name' => 'tag2', 'description' => 'Another big description', 'created' => '2016-01-01 00:00'],
['name' => 'tag3', 'description' => 'Yet another one', 'created' => '2016-01-01 00:00'],
];
}
Loading