Update FuelPHP 1.8.2 and Fuel/Core 1.9-dev to fix compatibility with PHP 7.3

pull/9/head
Chewbaka69 5 years ago
parent 2029bca7c4
commit 6a8447a255

2
.gitignore vendored

@ -25,5 +25,7 @@
/fuel/app/config/crypt.php
/fuel/app/config/lock.php
/packages
/vendor
/.idea
composer.lock

@ -7,16 +7,16 @@
"require": {
"php": ">=5.6.33",
"composer/installers": "~1.0",
"fuel/core": "1.8.*",
"fuel/core": "dev-1.9/develop",
"fuel/auth": "1.8.*",
"fuel/email": "1.8.*",
"fuel/oil": "1.8.*",
"fuel/orm": "1.8.*",
"fuel/parser": "1.8.*",
"fuelphp/upload": "2.0.6",
"monolog/monolog": "1.5.*",
"monolog/monolog": "^1.18",
"phpseclib/phpseclib": "2.0.0",
"michelf/php-markdown": "1.4.0"
"michelf/php-markdown": "1.7.0"
},
"require-dev": {
"fuel/docs": "1.8.*"

229
composer.lock generated

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "85fd9d3cc030402a776db7f7553ced3f",
"content-hash": "713a477574f3f25e70b70b9ca0973c72",
"packages": [
{
"name": "composer/installers",
@ -162,20 +162,24 @@
},
{
"name": "fuel/core",
"version": "1.8.0.3",
"version": "dev-1.9/develop",
"source": {
"type": "git",
"url": "https://github.com/fuel/core.git",
"reference": "c8e190b22cb9fc1a9acfdde4ed7487e04051bbe7"
"reference": "639d766486ed90bcb6fd1e737a9374ee7345daa9"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/fuel/core/zipball/c8e190b22cb9fc1a9acfdde4ed7487e04051bbe7",
"reference": "c8e190b22cb9fc1a9acfdde4ed7487e04051bbe7",
"url": "https://api.github.com/repos/fuel/core/zipball/639d766486ed90bcb6fd1e737a9374ee7345daa9",
"reference": "639d766486ed90bcb6fd1e737a9374ee7345daa9",
"shasum": ""
},
"require": {
"composer/installers": "~1.0"
"composer/installers": "~1.0",
"michelf/php-markdown": "1.7.0",
"monolog/monolog": "^1.18",
"paragonie/sodium_compat": "^1.6",
"phpseclib/phpseclib": "^2.0.0"
},
"type": "fuel-package",
"notification-url": "https://packagist.org/downloads/",
@ -190,7 +194,7 @@
],
"description": "FuelPHP 1.x Core",
"homepage": "https://github.com/fuel/core",
"time": "2016-07-21T08:45:05+00:00"
"time": "2019-08-29T21:10:06+00:00"
},
{
"name": "fuel/email",
@ -372,16 +376,16 @@
},
{
"name": "michelf/php-markdown",
"version": "1.4.0",
"version": "1.7.0",
"source": {
"type": "git",
"url": "https://github.com/michelf/php-markdown.git",
"reference": "96d8150406f67e683ef4acc09fef91785fef1266"
"reference": "1f51cc520948f66cd2af8cbc45a5ee175e774220"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/michelf/php-markdown/zipball/96d8150406f67e683ef4acc09fef91785fef1266",
"reference": "96d8150406f67e683ef4acc09fef91785fef1266",
"url": "https://api.github.com/repos/michelf/php-markdown/zipball/1f51cc520948f66cd2af8cbc45a5ee175e774220",
"reference": "1f51cc520948f66cd2af8cbc45a5ee175e774220",
"shasum": ""
},
"require": {
@ -405,61 +409,78 @@
"authors": [
{
"name": "Michel Fortin",
"role": "Developer",
"email": "michel.fortin@michelf.ca",
"homepage": "http://michelf.ca/",
"role": "Developer"
"homepage": "https://michelf.ca/"
},
{
"name": "John Gruber",
"homepage": "http://daringfireball.net/"
"homepage": "https://daringfireball.net/"
}
],
"description": "PHP Markdown",
"homepage": "http://michelf.ca/projects/php-markdown/",
"homepage": "https://michelf.ca/projects/php-markdown/",
"keywords": [
"markdown"
],
"time": "2013-11-29T17:09:24+00:00"
"time": "2016-10-29T18:58:20+00:00"
},
{
"name": "monolog/monolog",
"version": "1.5.0",
"version": "1.24.0",
"source": {
"type": "git",
"url": "https://github.com/Seldaek/monolog.git",
"reference": "583618d5cd2115a52101694aca87afb182b3e567"
"reference": "bfc9ebb28f97e7a24c45bdc3f0ff482e47bb0266"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Seldaek/monolog/zipball/583618d5cd2115a52101694aca87afb182b3e567",
"reference": "583618d5cd2115a52101694aca87afb182b3e567",
"url": "https://api.github.com/repos/Seldaek/monolog/zipball/bfc9ebb28f97e7a24c45bdc3f0ff482e47bb0266",
"reference": "bfc9ebb28f97e7a24c45bdc3f0ff482e47bb0266",
"shasum": ""
},
"require": {
"php": ">=5.3.0",
"psr/log": "~1.0"
},
"provide": {
"psr/log-implementation": "1.0.0"
},
"require-dev": {
"doctrine/couchdb": "dev-master",
"mlehner/gelf-php": "1.0.*",
"raven/raven": "0.3.*"
"aws/aws-sdk-php": "^2.4.9 || ^3.0",
"doctrine/couchdb": "~1.0@dev",
"graylog2/gelf-php": "~1.0",
"jakub-onderka/php-parallel-lint": "0.9",
"php-amqplib/php-amqplib": "~2.4",
"php-console/php-console": "^3.1.3",
"phpunit/phpunit": "~4.5",
"phpunit/phpunit-mock-objects": "2.3.0",
"ruflin/elastica": ">=0.90 <3.0",
"sentry/sentry": "^0.13",
"swiftmailer/swiftmailer": "^5.3|^6.0"
},
"suggest": {
"aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB",
"doctrine/couchdb": "Allow sending log messages to a CouchDB server",
"ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)",
"ext-mongo": "Allow sending log messages to a MongoDB server",
"mlehner/gelf-php": "Allow sending log messages to a GrayLog2 server",
"raven/raven": "Allow sending log messages to a Sentry server"
"graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server",
"mongodb/mongodb": "Allow sending log messages to a MongoDB server via PHP Driver",
"php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib",
"php-console/php-console": "Allow sending log messages to Google Chrome",
"rollbar/rollbar": "Allow sending log messages to Rollbar",
"ruflin/elastica": "Allow sending log messages to an Elastic Search server",
"sentry/sentry": "Allow sending log messages to a Sentry server"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.4.x-dev"
"dev-master": "2.0.x-dev"
}
},
"autoload": {
"psr-0": {
"Monolog": "src/"
"psr-4": {
"Monolog\\": "src/Monolog"
}
},
"notification-url": "https://packagist.org/downloads/",
@ -470,8 +491,7 @@
{
"name": "Jordi Boggiano",
"email": "j.boggiano@seld.be",
"homepage": "http://seld.be",
"role": "Developer"
"homepage": "http://seld.be"
}
],
"description": "Sends your logs to files, sockets, inboxes, databases and various web services",
@ -481,7 +501,134 @@
"logging",
"psr-3"
],
"time": "2013-04-23T10:09:48+00:00"
"time": "2018-11-05T09:00:11+00:00"
},
{
"name": "paragonie/random_compat",
"version": "v9.99.99",
"source": {
"type": "git",
"url": "https://github.com/paragonie/random_compat.git",
"reference": "84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/paragonie/random_compat/zipball/84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95",
"reference": "84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95",
"shasum": ""
},
"require": {
"php": "^7"
},
"require-dev": {
"phpunit/phpunit": "4.*|5.*",
"vimeo/psalm": "^1"
},
"suggest": {
"ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes."
},
"type": "library",
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Paragon Initiative Enterprises",
"email": "security@paragonie.com",
"homepage": "https://paragonie.com"
}
],
"description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7",
"keywords": [
"csprng",
"polyfill",
"pseudorandom",
"random"
],
"time": "2018-07-02T15:55:56+00:00"
},
{
"name": "paragonie/sodium_compat",
"version": "v1.10.1",
"source": {
"type": "git",
"url": "https://github.com/paragonie/sodium_compat.git",
"reference": "5115fa44886d1c2785d2f135ef4626db868eac4b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/paragonie/sodium_compat/zipball/5115fa44886d1c2785d2f135ef4626db868eac4b",
"reference": "5115fa44886d1c2785d2f135ef4626db868eac4b",
"shasum": ""
},
"require": {
"paragonie/random_compat": ">=1",
"php": "^5.2.4|^5.3|^5.4|^5.5|^5.6|^7|^8"
},
"require-dev": {
"phpunit/phpunit": "^3|^4|^5"
},
"suggest": {
"ext-libsodium": "PHP < 7.0: Better performance, password hashing (Argon2i), secure memory management (memzero), and better security.",
"ext-sodium": "PHP >= 7.0: Better performance, password hashing (Argon2i), secure memory management (memzero), and better security."
},
"type": "library",
"autoload": {
"files": [
"autoload.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"ISC"
],
"authors": [
{
"name": "Paragon Initiative Enterprises",
"email": "security@paragonie.com"
},
{
"name": "Frank Denis",
"email": "jedisct1@pureftpd.org"
}
],
"description": "Pure PHP implementation of libsodium; uses the PHP extension if it exists",
"keywords": [
"Authentication",
"BLAKE2b",
"ChaCha20",
"ChaCha20-Poly1305",
"Chapoly",
"Curve25519",
"Ed25519",
"EdDSA",
"Edwards-curve Digital Signature Algorithm",
"Elliptic Curve Diffie-Hellman",
"Poly1305",
"Pure-PHP cryptography",
"RFC 7748",
"RFC 8032",
"Salpoly",
"Salsa20",
"X25519",
"XChaCha20-Poly1305",
"XSalsa20-Poly1305",
"Xchacha20",
"Xsalsa20",
"aead",
"cryptography",
"ecdh",
"elliptic curve",
"elliptic curve cryptography",
"encryption",
"libsodium",
"php",
"public-key cryptography",
"secret-key cryptography",
"side-channel resistant"
],
"time": "2019-07-12T16:36:59+00:00"
},
{
"name": "phpseclib/phpseclib",
@ -529,23 +676,23 @@
"authors": [
{
"name": "Jim Wigginton",
"email": "terrafrost@php.net",
"role": "Lead Developer"
"role": "Lead Developer",
"email": "terrafrost@php.net"
},
{
"name": "Patrick Monnerat",
"email": "pm@datasphere.ch",
"role": "Developer"
"role": "Developer",
"email": "pm@datasphere.ch"
},
{
"name": "Andreas Fischer",
"email": "bantu@phpbb.com",
"role": "Developer"
"role": "Developer",
"email": "bantu@phpbb.com"
},
{
"name": "Hans-Jürgen Petrich",
"email": "petrich@tronic-media.com",
"role": "Developer"
"role": "Developer",
"email": "petrich@tronic-media.com"
}
],
"description": "PHP Secure Communications Library - Pure-PHP implementations of RSA, AES, SSH2, SFTP, X.509 etc.",
@ -655,7 +802,9 @@
],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": [],
"stability-flags": {
"fuel/core": 20
},
"prefer-stable": false,
"prefer-lowest": false,
"platform": {

Binary file not shown.

@ -1,23 +0,0 @@
<?php
use Fuel\Core\Controller;
use Fuel\Core\Response;
use Fuel\Core\Session;
class Controller_Index extends Controller
{
public function before()
{
$user = Session::get('user');
if(!$user)
Response::redirect('/login');
else
Response::redirect('/home');
}
public function action_index()
{
// DO NOTHING
}
}

@ -11,4 +11,4 @@
'MenuServer' => isset($MenuServer) ? $MenuServer : null,
'js_bottom' => isset($js_bottom) ? $js_bottom : null,
]); ?>
</html>
</html>

@ -1,127 +1,226 @@
<?php
/**
* Fuel is a fast, lightweight, community driven PHP5 framework.
* Fuel is a fast, lightweight, community driven PHP 5.4+ framework.
*
* @package Fuel
* @version 1.8
* @version 1.8.2
* @author Fuel Development Team
* @license MIT License
* @copyright 2010 - 2016 Fuel Development Team
* @link http://fuelphp.com
* @copyright 2010 - 2019 Fuel Development Team
* @link https://fuelphp.com
*/
/**
* Set error reporting and display errors settings. You will want to change these when in production.
* -----------------------------------------------------------------------------
* Configure PHP Settings
* -----------------------------------------------------------------------------
*/
/**
* -----------------------------------------------------------------------------
* Show error reporting
* -----------------------------------------------------------------------------
*
* Set error reporting and display errors settings.
* You will want to change these when in production.
*
*/
error_reporting(-1);
ini_set('display_errors', 1);
/**
* Website document root
* -----------------------------------------------------------------------------
* Define constants
* -----------------------------------------------------------------------------
*/
/**
* -----------------------------------------------------------------------------
* Website document root
* -----------------------------------------------------------------------------
*/
define('DOCROOT', __DIR__.DIRECTORY_SEPARATOR);
/**
* Path to the application directory.
* -----------------------------------------------------------------------------
* Path to the application directory
* -----------------------------------------------------------------------------
*/
define('APPPATH', realpath(__DIR__.'/../fuel/app/').DIRECTORY_SEPARATOR);
/**
* Path to the default packages directory.
* -----------------------------------------------------------------------------
* Path to the default packages directory
* -----------------------------------------------------------------------------
*/
define('PKGPATH', realpath(__DIR__.'/../fuel/packages/').DIRECTORY_SEPARATOR);
/**
* The path to the framework core.
* -----------------------------------------------------------------------------
* The path to the framework core
* -----------------------------------------------------------------------------
*/
define('COREPATH', realpath(__DIR__.'/../fuel/core/').DIRECTORY_SEPARATOR);
// Get the start time and memory for use later
/**
* -----------------------------------------------------------------------------
* Profiling
* -----------------------------------------------------------------------------
*/
defined('FUEL_START_TIME') or define('FUEL_START_TIME', microtime(true));
defined('FUEL_START_MEM') or define('FUEL_START_MEM', memory_get_usage());
// Load in the Fuel autoloader
/**
* -----------------------------------------------------------------------------
* Preparing the Application
* -----------------------------------------------------------------------------
*/
/**
* -----------------------------------------------------------------------------
* Check for dependencies
* -----------------------------------------------------------------------------
*/
if ( ! file_exists(COREPATH.'classes'.DIRECTORY_SEPARATOR.'autoloader.php'))
{
die('No composer autoloader found. Please run composer to install the FuelPHP framework dependencies first!');
die('No composer autoloader found. Please run composer to install the FuelPHP framework dependencies first!');
}
// Activate the framework class autoloader
/**
* -----------------------------------------------------------------------------
* Activate autoloader class
* -----------------------------------------------------------------------------
*/
require COREPATH.'classes'.DIRECTORY_SEPARATOR.'autoloader.php';
class_alias('Fuel\\Core\\Autoloader', 'Autoloader');
// Exception route processing closure
$routerequest = function($route = null, $e = false)
/**
* -----------------------------------------------------------------------------
* Route processing
* -----------------------------------------------------------------------------
*
* Exception route processing closure
*
*/
$routerequest = function($request = null, $e = false)
{
Request::reset_request(true);
$route = array_key_exists($route, Router::$routes) ? Router::$routes[$route]->translation : Config::get('routes.'.$route);
if ($route instanceof Closure)
{
$response = $route();
if( ! $response instanceof Response)
{
$response = Response::forge($response);
}
}
elseif ($e === false)
{
$response = Request::forge()->execute()->response();
}
elseif ($route)
{
$response = Request::forge($route, false)->execute(array($e))->response();
}
else
{
throw $e;
}
return $response;
Request::reset_request(true);
$route = array_key_exists($request, Router::$routes) ? Router::$routes[$request]->translation : Config::get('routes.'.$request);
if ($route instanceof Closure)
{
$response = $route();
if( ! $response instanceof Response)
{
$response = Response::forge($response);
}
}
elseif ($e === false)
{
$response = Request::forge()->execute()->response();
}
elseif ($route)
{
$response = Request::forge($route, false)->execute(array($e))->response();
}
elseif ($request)
{
$response = Request::forge($request)->execute(array($e))->response();
}
else
{
throw $e;
}
return $response;
};
// Generate the request, execute it and send the output.
/**
* -----------------------------------------------------------------------------
* Starting the Application
* -----------------------------------------------------------------------------
*/
/**
* -----------------------------------------------------------------------------
* Start the engine
* -----------------------------------------------------------------------------
*
* Generate the request, execute it and send the output
*
*/
try
{
// Boot the app...
require APPPATH.'bootstrap.php';
// Boot the app...
require APPPATH.'bootstrap.php';
// ... and execute the main request
$response = $routerequest();
// ... and execute the main request
$response = $routerequest();
}
catch (HttpBadRequestException $e)
{
$response = $routerequest('_400_', $e);
$response = $routerequest('_400_', $e);
}
catch (HttpNoAccessException $e)
{
$response = $routerequest('_403_', $e);
$response = $routerequest('_403_', $e);
}
catch (HttpNotFoundException $e)
{
$response = $routerequest('_404_', $e);
$response = $routerequest('_404_', $e);
}
catch (HttpServerErrorException $e)
{
$response = $routerequest('_500_', $e);
$response = $routerequest('_500_', $e);
}
// This will add the execution time and memory usage to the output.
// Comment this out if you don't use it.
$response->body((string) $response);
/**
* -----------------------------------------------------------------------------
* Start profiling
* -----------------------------------------------------------------------------
*
* This will add the execution time and memory usage to the output.
*
* Comment these out if you don't use it.
*
*/
if (strpos($response->body(), '{exec_time}') !== false or strpos($response->body(), '{mem_usage}') !== false)
{
$bm = Profiler::app_total();
$response->body(
str_replace(
array('{exec_time}', '{mem_usage}'),
array(round($bm[0], 4), round($bm[1] / pow(1024, 2), 3)),
$response->body()
)
);
$bm = Profiler::app_total();
$response->body(
str_replace(
array('{exec_time}', '{mem_usage}'),
array(round($bm[0], 4), round($bm[1] / pow(1024, 2), 3)),
$response->body()
)
);
}
// Send the output to the client
$response->send(true);
/**
* -----------------------------------------------------------------------------
* Show the web page
* -----------------------------------------------------------------------------
*
* Send the output to the client
*
*/
$response->send(true);
Loading…
Cancel
Save