Revert "chg: [internal] Install CakePHP by Composer"

This reverts commit 74eccfe9
pull/7352/head
Jakub Onderka 2021-04-19 13:18:51 +02:00
parent d3b1eb51fb
commit 74acfacde0
6 changed files with 20 additions and 41 deletions

4
.gitmodules vendored
View File

@ -1,3 +1,7 @@
[submodule "app/Lib/cakephp"]
path = app/Lib/cakephp
url = https://github.com/cakephp/cakephp.git
branch = 2.x
[submodule "PyMISP"]
path = PyMISP
url = https://github.com/MISP/PyMISP.git

View File

@ -3,45 +3,30 @@
/**
* Command-line code generation utility to automate programmer chores.
*
* CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
* Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
* PHP 5
*
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright 2005-2012, Cake Software Foundation, Inc.
*
* 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
* @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org CakePHP(tm) Project
* @package app.Console
* @since CakePHP(tm) v 2.0
* @license https://opensource.org/licenses/mit-license.php MIT License
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
if (!defined('DS')) {
define('DS', DIRECTORY_SEPARATOR);
}
$dispatcher = 'Cake' . DS . 'Console' . DS . 'ShellDispatcher.php';
$ds = DIRECTORY_SEPARATOR;
$dispatcher = dirname(__DIR__) . $ds . 'Lib' . $ds . 'cakephp' . $ds . 'lib' . $ds . 'Cake' . $ds . 'Console' . $ds . 'ShellDispatcher.php';
if (function_exists('ini_set')) {
$root = dirname(dirname(dirname(__FILE__)));
$appDir = basename(dirname(dirname(__FILE__)));
$install = $root . DS . 'lib';
$composerInstall = $root . DS . $appDir . DS . 'Vendor' . DS . 'cakephp' . DS . 'cakephp' . DS . 'lib';
// the following lines differ from its sibling
// /lib/Cake/Console/Templates/skel/Console/cake.php
if (file_exists($composerInstall . DS . $dispatcher)) {
$install = $composerInstall;
}
ini_set('include_path', $install . PATH_SEPARATOR . ini_get('include_path'));
unset($root, $appDir, $install, $composerInstall);
$root = dirname(dirname(dirname(__FILE__)));
ini_set('include_path', $root . $ds . 'lib' . PATH_SEPARATOR . ini_get('include_path'));
}
if (!include $dispatcher) {
trigger_error('Could not locate CakePHP core files.', E_USER_ERROR);
if (!include ($dispatcher)) {
trigger_error('Could not locate CakePHP core files.', E_USER_ERROR);
}
unset($dispatcher);
unset($paths, $path, $dispatcher, $root, $ds);
return ShellDispatcher::run($argv);

View File

@ -476,7 +476,7 @@ class SecurityAudit
*/
private function getCakeVersion()
{
$filePath = CAKE_CORE_INCLUDE_PATH . '/Cake/VERSION.txt';
$filePath = APP . 'Lib/cakephp/lib/Cake/VERSION.txt';
$version = file_get_contents($filePath);
if (!$version) {
throw new RuntimeException("Could not open CakePHP version file '$filePath'.");

1
app/Lib/cakephp Submodule

@ -0,0 +1 @@
Subproject commit cf14e6546ec44e3369e3531add11fdb946656280

View File

@ -9,7 +9,6 @@
"ext-dom": "*",
"ext-simplexml": "*",
"ext-pcre": "*",
"cakephp/cakephp": "2.10.24",
"kamisama/cake-resque": "4.1.2",
"pear/crypt_gpg": "1.6.3",
"monolog/monolog": "1.24.0"

View File

@ -58,16 +58,6 @@ if (!defined('APP_DIR')) {
*/
define('CAKE_CORE_INCLUDE_PATH', ROOT . DS . APP_DIR . DS .'Lib' . DS . 'cakephp' . DS . 'lib');
/**
* This auto-detects CakePHP as a composer installed library.
* You may remove this if you are not planning to use composer (not recommended, though).
*/
$vendorPath = ROOT . DS . APP_DIR . DS . 'Vendor' . DS . 'cakephp' . DS . 'cakephp' . DS . 'lib';
$dispatcher = 'Cake' . DS . 'Console' . DS . 'ShellDispatcher.php';
if (!defined('CAKE_CORE_INCLUDE_PATH') && file_exists($vendorPath . DS . $dispatcher)) {
define('CAKE_CORE_INCLUDE_PATH', $vendorPath);
}
/**
* Editing below this line should NOT be necessary.
* Change at your own risk.