Upgrade to php 8
This commit is contained in:
@ -2,7 +2,7 @@ FROM php:8.1-fpm
|
|||||||
|
|
||||||
RUN apt-get update && apt-get install -y libzip-dev libicu-dev git libpng-dev unzip
|
RUN apt-get update && apt-get install -y libzip-dev libicu-dev git libpng-dev unzip
|
||||||
|
|
||||||
RUN docker-php-ext-install pdo pdo_mysql zip intl gd
|
RUN docker-php-ext-install pdo pdo_mysql zip intl gd bcmath
|
||||||
|
|
||||||
RUN pecl install xdebug-3.1.3 \
|
RUN pecl install xdebug-3.1.3 \
|
||||||
&& docker-php-ext-enable xdebug
|
&& docker-php-ext-enable xdebug
|
||||||
|
@ -122,7 +122,11 @@ class Config
|
|||||||
$ini = strpos($value, '{') + 1;
|
$ini = strpos($value, '{') + 1;
|
||||||
$end = strpos($value, '}', $ini);
|
$end = strpos($value, '}', $ini);
|
||||||
$rep = substr($value, $ini, $end - $ini);
|
$rep = substr($value, $ini, $end - $ini);
|
||||||
$value = str_replace('{' . $rep . '}', $this->get($rep), $value);
|
$new = $this->get($rep);
|
||||||
|
if ($new === null) {
|
||||||
|
$new = '';
|
||||||
|
}
|
||||||
|
$value = str_replace('{' . $rep . '}', $new, $value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return $value;
|
return $value;
|
||||||
|
@ -59,4 +59,4 @@ class Response
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
"description" : "Response handler module for my apps",
|
"description" : "Response handler module for my apps",
|
||||||
"type" : "library",
|
"type" : "library",
|
||||||
"require" : {
|
"require" : {
|
||||||
"wixel/gump" : "*",
|
"wixel/gump" : "^2.0",
|
||||||
"aldarien/contract" : "*"
|
"aldarien/contract" : "*"
|
||||||
},
|
},
|
||||||
"require-dev" : {
|
"require-dev" : {
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace App\Service;
|
namespace App\Service;
|
||||||
|
|
||||||
use League\Uri\Http;
|
use League\Uri\Uri as Http;
|
||||||
use League\Uri\Components\Host;
|
use League\Uri\Components\Domain as Host;
|
||||||
use League\Uri\Components\HierarchicalPath;
|
use League\Uri\Components\HierarchicalPath;
|
||||||
|
|
||||||
class URL
|
class URL
|
||||||
@ -19,7 +19,13 @@ class URL
|
|||||||
protected function findRoot()
|
protected function findRoot()
|
||||||
{
|
{
|
||||||
$base = $_SERVER['HTTP_HOST'] . ((isset($_SERVER['HTTP_PORT'])) ? ':' . $_SERVER['HTTP_PORT'] : '');
|
$base = $_SERVER['HTTP_HOST'] . ((isset($_SERVER['HTTP_PORT'])) ? ':' . $_SERVER['HTTP_PORT'] : '');
|
||||||
$scheme = $_SERVER['HTTPS'] ? 'https' : 'http';
|
$scheme = 'http';
|
||||||
|
if (isset($_SERVER['REQUEST_SCHEME'])) {
|
||||||
|
$scheme = $_SERVER['REQUEST_SCHEME'];
|
||||||
|
}
|
||||||
|
if (isset($_SERVER['HTTPS'])) {
|
||||||
|
$scheme = 'https';
|
||||||
|
}
|
||||||
$uri = Http::createFromString(\Sabre\Uri\resolve($scheme . '://' . $base, $_SERVER['SCRIPT_NAME']));
|
$uri = Http::createFromString(\Sabre\Uri\resolve($scheme . '://' . $base, $_SERVER['SCRIPT_NAME']));
|
||||||
$host = new Host($uri->getHost());
|
$host = new Host($uri->getHost());
|
||||||
if ($host->isAbsolute()) {
|
if ($host->isAbsolute()) {
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
"aldarien/contract" : "*",
|
"aldarien/contract" : "*",
|
||||||
"aldarien/root" : "*",
|
"aldarien/root" : "*",
|
||||||
"league/uri": "*",
|
"league/uri": "*",
|
||||||
|
"league/uri-components": "*",
|
||||||
"sabre/uri": "*"
|
"sabre/uri": "*"
|
||||||
},
|
},
|
||||||
"require-dev" : {
|
"require-dev" : {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace App\Service;
|
namespace App\Service;
|
||||||
|
|
||||||
use Philo\Blade\Blade;
|
use eftec\bladeone\BladeOne;
|
||||||
|
|
||||||
class View
|
class View
|
||||||
{
|
{
|
||||||
@ -14,14 +14,14 @@ class View
|
|||||||
$this->views = config('locations.views');
|
$this->views = config('locations.views');
|
||||||
$this->cache = config('locations.cache');
|
$this->cache = config('locations.cache');
|
||||||
|
|
||||||
$this->blade = new Blade($this->views, $this->cache);
|
$this->blade = new BladeOne($this->views, $this->cache);
|
||||||
}
|
}
|
||||||
public function show($template, $vars = null)
|
public function show($template, $vars = null)
|
||||||
{
|
{
|
||||||
if ($vars) {
|
if ($vars) {
|
||||||
return $this->blade->view()->make($template, $vars)->render();
|
return $this->blade->run($template, $vars);
|
||||||
}
|
}
|
||||||
return $this->blade->view()->make($template)->render();
|
return $this->blade->run($template);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
"description": "View module for my apps",
|
"description": "View module for my apps",
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"require": {
|
"require": {
|
||||||
"philo/laravel-blade": "*",
|
"eftec/bladeone": "*",
|
||||||
"aldarien/contract": "*",
|
"aldarien/contract": "*",
|
||||||
"aldarien/config": "*"
|
"aldarien/config": "*"
|
||||||
},
|
},
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
"nesbot/carbon": "^2",
|
"nesbot/carbon": "^2",
|
||||||
"phpoffice/phpword": "^0",
|
"phpoffice/phpword": "^0",
|
||||||
"slam/php-excel": "^4.4",
|
"slam/php-excel": "^4.4",
|
||||||
"fabpot/goutte": "^3.2",
|
"guzzlehttp/guzzle": "*",
|
||||||
"incoviba/modelos": "*",
|
"incoviba/modelos": "*",
|
||||||
"slim/slim": "^4",
|
"slim/slim": "^4",
|
||||||
"php-di/slim-bridge": "*",
|
"php-di/slim-bridge": "*",
|
||||||
@ -53,7 +53,7 @@
|
|||||||
"type": "path",
|
"type": "path",
|
||||||
"url": "./aldarien/**",
|
"url": "./aldarien/**",
|
||||||
"options": {
|
"options": {
|
||||||
"symlink": false
|
"symlink": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user