Compare commits
4 Commits
d006294376
...
develop
Author | SHA1 | Date | |
---|---|---|---|
e7253acfd8 | |||
08717e42d9 | |||
12ededccc9 | |||
8ea5a14b89 |
2
.gitignore
vendored
2
.gitignore
vendored
@ -7,3 +7,5 @@
|
||||
/public/bundles/
|
||||
/var/
|
||||
###< symfony/framework-bundle ###
|
||||
/supervisord.log
|
||||
/supervisord.pid
|
@ -7,6 +7,7 @@
|
||||
"php": ">=7.2.5",
|
||||
"ext-ctype": "*",
|
||||
"ext-iconv": "*",
|
||||
"symfony/apache-pack": "^1.0",
|
||||
"symfony/console": "5.4.*",
|
||||
"symfony/dotenv": "5.4.*",
|
||||
"symfony/flex": "^1.17|^2",
|
||||
@ -14,8 +15,6 @@
|
||||
"symfony/runtime": "5.4.*",
|
||||
"symfony/yaml": "5.4.*"
|
||||
},
|
||||
"require-dev": {
|
||||
},
|
||||
"config": {
|
||||
"allow-plugins": {
|
||||
"composer/package-versions-deprecated": true,
|
||||
@ -60,7 +59,7 @@
|
||||
},
|
||||
"extra": {
|
||||
"symfony": {
|
||||
"allow-contrib": false,
|
||||
"allow-contrib": true,
|
||||
"require": "5.4.*"
|
||||
}
|
||||
}
|
||||
|
28
composer.lock
generated
28
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": "e5b48b46cc68536c0f6497e15a39811e",
|
||||
"content-hash": "32af6839ed7dc1a45c978ad0feeccabd",
|
||||
"packages": [
|
||||
{
|
||||
"name": "psr/cache",
|
||||
@ -203,6 +203,32 @@
|
||||
},
|
||||
"time": "2021-05-03T11:20:27+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/apache-pack",
|
||||
"version": "v1.0.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/apache-pack.git",
|
||||
"reference": "3aa5818d73ad2551281fc58a75afd9ca82622e6c"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/apache-pack/zipball/3aa5818d73ad2551281fc58a75afd9ca82622e6c",
|
||||
"reference": "3aa5818d73ad2551281fc58a75afd9ca82622e6c",
|
||||
"shasum": ""
|
||||
},
|
||||
"type": "symfony-pack",
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"description": "A pack for Apache support in Symfony",
|
||||
"support": {
|
||||
"issues": "https://github.com/symfony/apache-pack/issues",
|
||||
"source": "https://github.com/symfony/apache-pack/tree/master"
|
||||
},
|
||||
"time": "2017-12-12T01:46:35+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/cache",
|
||||
"version": "v5.4.7",
|
||||
|
@ -1,3 +1,3 @@
|
||||
index:
|
||||
path: /loginAppSaml
|
||||
controller: App\Controller\MainController::loginAppSaml
|
||||
# index:
|
||||
# path: /
|
||||
# controller: App\Controller\MainController::
|
||||
|
@ -8,7 +8,7 @@
|
||||
# Using SetHandler avoids issues with using ProxyPassMatch in combination
|
||||
# with mod_rewrite or mod_autoindex
|
||||
<FilesMatch \.php$>
|
||||
SetHandler "proxy:unix:/run/php/php7.4-fpm.sock|fcgi://127.0.0.1:9000"
|
||||
SetHandler "proxy:unix:/run/php/php8.1-fpm.sock|fcgi://127.0.0.1:9000"
|
||||
# for Unix sockets, Apache 2.4.10 or higher
|
||||
# SetHandler proxy:unix:/path/to/fpm.sock|fcgi://dummy
|
||||
</FilesMatch>
|
||||
|
@ -1,4 +1,4 @@
|
||||
FROM ubuntu:20.04
|
||||
FROM ubuntu:22.04
|
||||
|
||||
ARG HTTP_PROXY=
|
||||
ARG HTTPS_PROXY=
|
||||
@ -7,7 +7,7 @@ ARG https_proxy=
|
||||
|
||||
ENV WAITFORIT_VERSION="v2.4.1"
|
||||
|
||||
ARG PHP_VERSION="7.4"
|
||||
ARG PHP_VERSION="8.1"
|
||||
ENV PHP_VERSION $PHP_VERSION
|
||||
|
||||
RUN export DEBIAN_FRONTEND=noninteractive && \
|
||||
@ -17,7 +17,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
|
||||
apt-get update -y && \
|
||||
apt-get install -y --no-install-recommends \
|
||||
git bash wget ca-certificates supervisor cron rsyslog mysql-client jq \
|
||||
mutt tree vim python python3 python3-setuptools python3-pip make \
|
||||
mutt tree vim python3-setuptools python3-pip make \
|
||||
php${PHP_VERSION}-cli php${PHP_VERSION}-ldap php${PHP_VERSION}-soap \
|
||||
php${PHP_VERSION}-intl php${PHP_VERSION}-curl php${PHP_VERSION}-gd \
|
||||
php${PHP_VERSION}-xml php${PHP_VERSION}-bcmath \
|
||||
@ -26,6 +26,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
|
||||
php${PHP_VERSION}-ssh2 libxml2-utils \
|
||||
locales \
|
||||
apache2 \
|
||||
libapache2-mod-fcgid \
|
||||
ssh-client \
|
||||
acl moreutils \
|
||||
sudo
|
||||
@ -58,14 +59,14 @@ RUN chmod +x /loginapp/install-composer.sh &&\
|
||||
# On active les mods d'apache nécessaires
|
||||
RUN a2enmod rewrite
|
||||
RUN a2enmod proxy_fcgi setenvif
|
||||
RUN a2enconf php7.4-fpm
|
||||
RUN a2enconf php8.1-fpm
|
||||
RUN a2enmod proxy
|
||||
RUN a2enmod expires
|
||||
RUN a2enmod headers
|
||||
|
||||
# On injecte les bonnes configs apache et php-fpm
|
||||
COPY 000-default.conf /etc/apache2/sites-available/000-default.conf
|
||||
COPY www.conf /etc/php/7.4/fpm/pool.d/www.conf
|
||||
COPY www.conf /etc/php/8.1/fpm/pool.d/www.conf
|
||||
|
||||
EXPOSE 5000
|
||||
EXPOSE 80
|
||||
@ -73,8 +74,8 @@ EXPOSE 80
|
||||
WORKDIR /loginapp
|
||||
|
||||
# On démarre php-fpm une fois pour créer les sockets
|
||||
RUN service php7.4-fpm start
|
||||
RUN service php7.4-fpm stop
|
||||
RUN service php8.1-fpm start
|
||||
RUN service php8.1-fpm stop
|
||||
|
||||
|
||||
COPY docker-entrypoint.sh /docker-entrypoint.sh
|
||||
@ -89,7 +90,7 @@ RUN sed -i '/imklog/s/^/#/' /etc/rsyslog.conf
|
||||
|
||||
COPY rsyslog.conf /etc/rsyslog.d/loginapp.conf
|
||||
COPY supervisor.ini /etc/supervisor/supervisor.ini
|
||||
COPY php.ini /etc/php/7.4/fpm/php.ini
|
||||
COPY php.ini /etc/php/8.1/fpm/php.ini
|
||||
|
||||
VOLUME /container-lifecycle
|
||||
|
||||
|
@ -26,7 +26,7 @@ stderr_logfile_maxbytes=0
|
||||
|
||||
[program:php-fpm]
|
||||
environment=HOSTNAME="%(ENV_HOSTNAME)s"
|
||||
command = /usr/sbin/php-fpm7.4 -F
|
||||
command = /usr/sbin/php-fpm8.1 -F
|
||||
autostart = true
|
||||
autorestart = true
|
||||
directory = /loginapp
|
||||
|
@ -6,7 +6,7 @@ error_log=/dev/stderr
|
||||
user = www-data
|
||||
group = www-data
|
||||
|
||||
listen = /run/php/php7.4-fpm.sock
|
||||
listen = /run/php/php8.1-fpm.sock
|
||||
|
||||
listen.owner = www-data
|
||||
listen.group = www-data
|
||||
|
66
public/.htaccess
Normal file
66
public/.htaccess
Normal file
@ -0,0 +1,66 @@
|
||||
# Use the front controller as index file. It serves as a fallback solution when
|
||||
# every other rewrite/redirect fails (e.g. in an aliased environment without
|
||||
# mod_rewrite). Additionally, this reduces the matching process for the
|
||||
# start page (path "/") because otherwise Apache will apply the rewriting rules
|
||||
# to each configured DirectoryIndex file (e.g. index.php, index.html, index.pl).
|
||||
DirectoryIndex index.php
|
||||
|
||||
# By default, Apache does not evaluate symbolic links if you did not enable this
|
||||
# feature in your server configuration. Uncomment the following line if you
|
||||
# install assets as symlinks or if you experience problems related to symlinks
|
||||
# when compiling LESS/Sass/CoffeScript assets.
|
||||
# Options +FollowSymlinks
|
||||
|
||||
# Disabling MultiViews prevents unwanted negotiation, e.g. "/index" should not resolve
|
||||
# to the front controller "/index.php" but be rewritten to "/index.php/index".
|
||||
<IfModule mod_negotiation.c>
|
||||
Options -MultiViews
|
||||
</IfModule>
|
||||
|
||||
<IfModule mod_rewrite.c>
|
||||
RewriteEngine On
|
||||
|
||||
# Determine the RewriteBase automatically and set it as environment variable.
|
||||
# If you are using Apache aliases to do mass virtual hosting or installed the
|
||||
# project in a subdirectory, the base path will be prepended to allow proper
|
||||
# resolution of the index.php file and to redirect to the correct URI. It will
|
||||
# work in environments without path prefix as well, providing a safe, one-size
|
||||
# fits all solution. But as you do not need it in this case, you can comment
|
||||
# the following 2 lines to eliminate the overhead.
|
||||
RewriteCond %{REQUEST_URI}::$0 ^(/.+)/(.*)::\2$
|
||||
RewriteRule .* - [E=BASE:%1]
|
||||
|
||||
# Sets the HTTP_AUTHORIZATION header removed by Apache
|
||||
RewriteCond %{HTTP:Authorization} .+
|
||||
RewriteRule ^ - [E=HTTP_AUTHORIZATION:%0]
|
||||
|
||||
# Redirect to URI without front controller to prevent duplicate content
|
||||
# (with and without `/index.php`). Only do this redirect on the initial
|
||||
# rewrite by Apache and not on subsequent cycles. Otherwise we would get an
|
||||
# endless redirect loop (request -> rewrite to front controller ->
|
||||
# redirect -> request -> ...).
|
||||
# So in case you get a "too many redirects" error or you always get redirected
|
||||
# to the start page because your Apache does not expose the REDIRECT_STATUS
|
||||
# environment variable, you have 2 choices:
|
||||
# - disable this feature by commenting the following 2 lines or
|
||||
# - use Apache >= 2.3.9 and replace all L flags by END flags and remove the
|
||||
# following RewriteCond (best solution)
|
||||
RewriteCond %{ENV:REDIRECT_STATUS} =""
|
||||
RewriteRule ^index\.php(?:/(.*)|$) %{ENV:BASE}/$1 [R=301,L]
|
||||
|
||||
# If the requested filename exists, simply serve it.
|
||||
# We only want to let Apache serve files and not directories.
|
||||
# Rewrite all other queries to the front controller.
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteRule ^ %{ENV:BASE}/index.php [L]
|
||||
</IfModule>
|
||||
|
||||
<IfModule !mod_rewrite.c>
|
||||
<IfModule mod_alias.c>
|
||||
# When mod_rewrite is not available, we instruct a temporary redirect of
|
||||
# the start page to the front controller explicitly so that the website
|
||||
# and the generated links can still be used.
|
||||
RedirectMatch 307 ^/$ /index.php/
|
||||
# RedirectTemp cannot be used instead
|
||||
</IfModule>
|
||||
</IfModule>
|
2
readme.md
Normal file
2
readme.md
Normal file
@ -0,0 +1,2 @@
|
||||
definir un port à exposer entre 3000 et 6000 exclus
|
||||
définir un nom de container
|
@ -9,11 +9,5 @@ use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||
class MainController extends AbstractController
|
||||
{
|
||||
|
||||
/**
|
||||
* @Route("/loginAppSaml", name="login_app_saml")
|
||||
*/
|
||||
public function loginAppSaml(Request $request)
|
||||
{
|
||||
return new Response("saml");
|
||||
}
|
||||
|
||||
}
|
@ -4012,3 +4012,23 @@
|
||||
2022-04-07 12:57:41,576 INFO success: apache2 entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
|
||||
2022-04-07 12:57:41,576 INFO success: php-fpm entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
|
||||
2022-04-07 12:57:41,576 INFO success: rsyslog entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
|
||||
2022-04-07 13:28:49,188 CRIT Supervisor is running as root. Privileges were not dropped because no user is specified in the config file. If you intend to run as root, you can set user=root in the config file to avoid this message.
|
||||
2022-04-07 13:28:49,190 INFO RPC interface 'supervisor' initialized
|
||||
2022-04-07 13:28:49,190 CRIT Server 'unix_http_server' running without any HTTP authentication checking
|
||||
2022-04-07 13:28:49,191 INFO supervisord started with pid 26
|
||||
2022-04-07 13:28:50,194 INFO spawned: 'apache2' with pid 28
|
||||
2022-04-07 13:28:50,197 INFO spawned: 'php-fpm' with pid 29
|
||||
2022-04-07 13:28:50,199 INFO spawned: 'rsyslog' with pid 30
|
||||
2022-04-07 13:28:51,229 INFO success: apache2 entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
|
||||
2022-04-07 13:28:51,229 INFO success: php-fpm entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
|
||||
2022-04-07 13:28:51,229 INFO success: rsyslog entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
|
||||
2022-04-07 14:27:06,256 CRIT Supervisor is running as root. Privileges were not dropped because no user is specified in the config file. If you intend to run as root, you can set user=root in the config file to avoid this message.
|
||||
2022-04-07 14:27:06,258 INFO RPC interface 'supervisor' initialized
|
||||
2022-04-07 14:27:06,258 CRIT Server 'unix_http_server' running without any HTTP authentication checking
|
||||
2022-04-07 14:27:06,258 INFO supervisord started with pid 26
|
||||
2022-04-07 14:27:07,261 INFO spawned: 'apache2' with pid 27
|
||||
2022-04-07 14:27:07,264 INFO spawned: 'php-fpm' with pid 28
|
||||
2022-04-07 14:27:07,265 INFO spawned: 'rsyslog' with pid 29
|
||||
2022-04-07 14:27:08,292 INFO success: apache2 entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
|
||||
2022-04-07 14:27:08,292 INFO success: php-fpm entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
|
||||
2022-04-07 14:27:08,292 INFO success: rsyslog entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
|
||||
|
@ -1 +1 @@
|
||||
12
|
||||
26
|
||||
|
12
symfony.lock
12
symfony.lock
@ -11,6 +11,18 @@
|
||||
"psr/log": {
|
||||
"version": "2.0.0"
|
||||
},
|
||||
"symfony/apache-pack": {
|
||||
"version": "1.0",
|
||||
"recipe": {
|
||||
"repo": "github.com/symfony/recipes-contrib",
|
||||
"branch": "master",
|
||||
"version": "1.0",
|
||||
"ref": "9d254a22efca7264203eea98b866f16f944b2f09"
|
||||
},
|
||||
"files": [
|
||||
"public/.htaccess"
|
||||
]
|
||||
},
|
||||
"symfony/cache": {
|
||||
"version": "v5.4.7"
|
||||
},
|
||||
|
29
vendor/composer/installed.json
vendored
29
vendor/composer/installed.json
vendored
@ -209,6 +209,35 @@
|
||||
},
|
||||
"install-path": "../psr/log"
|
||||
},
|
||||
{
|
||||
"name": "symfony/apache-pack",
|
||||
"version": "v1.0.1",
|
||||
"version_normalized": "1.0.1.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/apache-pack.git",
|
||||
"reference": "3aa5818d73ad2551281fc58a75afd9ca82622e6c"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/apache-pack/zipball/3aa5818d73ad2551281fc58a75afd9ca82622e6c",
|
||||
"reference": "3aa5818d73ad2551281fc58a75afd9ca82622e6c",
|
||||
"shasum": ""
|
||||
},
|
||||
"time": "2017-12-12T01:46:35+00:00",
|
||||
"type": "symfony-pack",
|
||||
"installation-source": "dist",
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"description": "A pack for Apache support in Symfony",
|
||||
"support": {
|
||||
"issues": "https://github.com/symfony/apache-pack/issues",
|
||||
"source": "https://github.com/symfony/apache-pack/tree/master"
|
||||
},
|
||||
"install-path": "../symfony/apache-pack"
|
||||
},
|
||||
{
|
||||
"name": "symfony/cache",
|
||||
"version": "v5.4.7",
|
||||
|
13
vendor/composer/installed.php
vendored
13
vendor/composer/installed.php
vendored
@ -5,7 +5,7 @@
|
||||
'type' => 'project',
|
||||
'install_path' => __DIR__ . '/../../',
|
||||
'aliases' => array(),
|
||||
'reference' => 'ea47c93aa762fe2431e0de74452ee04f1f06c15d',
|
||||
'reference' => '8ac12f715c8b3d186084d274b182c22d754ce09b',
|
||||
'name' => '__root__',
|
||||
'dev' => true,
|
||||
),
|
||||
@ -16,7 +16,7 @@
|
||||
'type' => 'project',
|
||||
'install_path' => __DIR__ . '/../../',
|
||||
'aliases' => array(),
|
||||
'reference' => 'ea47c93aa762fe2431e0de74452ee04f1f06c15d',
|
||||
'reference' => '8ac12f715c8b3d186084d274b182c22d754ce09b',
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'psr/cache' => array(
|
||||
@ -85,6 +85,15 @@
|
||||
0 => '1.0|2.0',
|
||||
),
|
||||
),
|
||||
'symfony/apache-pack' => array(
|
||||
'pretty_version' => 'v1.0.1',
|
||||
'version' => '1.0.1.0',
|
||||
'type' => 'symfony-pack',
|
||||
'install_path' => __DIR__ . '/../symfony/apache-pack',
|
||||
'aliases' => array(),
|
||||
'reference' => '3aa5818d73ad2551281fc58a75afd9ca82622e6c',
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'symfony/cache' => array(
|
||||
'pretty_version' => 'v5.4.7',
|
||||
'version' => '5.4.7.0',
|
||||
|
15
vendor/psr/log/src/AbstractLogger.php
vendored
Normal file
15
vendor/psr/log/src/AbstractLogger.php
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
namespace Psr\Log;
|
||||
|
||||
/**
|
||||
* This is a simple Logger implementation that other Loggers can inherit from.
|
||||
*
|
||||
* It simply delegates all log-level-specific methods to the `log` method to
|
||||
* reduce boilerplate code that a simple Logger that does the same thing with
|
||||
* messages regardless of the error level has to implement.
|
||||
*/
|
||||
abstract class AbstractLogger implements LoggerInterface
|
||||
{
|
||||
use LoggerTrait;
|
||||
}
|
7
vendor/psr/log/src/InvalidArgumentException.php
vendored
Normal file
7
vendor/psr/log/src/InvalidArgumentException.php
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
<?php
|
||||
|
||||
namespace Psr\Log;
|
||||
|
||||
class InvalidArgumentException extends \InvalidArgumentException
|
||||
{
|
||||
}
|
18
vendor/psr/log/src/LogLevel.php
vendored
Normal file
18
vendor/psr/log/src/LogLevel.php
vendored
Normal file
@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
namespace Psr\Log;
|
||||
|
||||
/**
|
||||
* Describes log levels.
|
||||
*/
|
||||
class LogLevel
|
||||
{
|
||||
const EMERGENCY = 'emergency';
|
||||
const ALERT = 'alert';
|
||||
const CRITICAL = 'critical';
|
||||
const ERROR = 'error';
|
||||
const WARNING = 'warning';
|
||||
const NOTICE = 'notice';
|
||||
const INFO = 'info';
|
||||
const DEBUG = 'debug';
|
||||
}
|
18
vendor/psr/log/src/LoggerAwareInterface.php
vendored
Normal file
18
vendor/psr/log/src/LoggerAwareInterface.php
vendored
Normal file
@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
namespace Psr\Log;
|
||||
|
||||
/**
|
||||
* Describes a logger-aware instance.
|
||||
*/
|
||||
interface LoggerAwareInterface
|
||||
{
|
||||
/**
|
||||
* Sets a logger instance on the object.
|
||||
*
|
||||
* @param LoggerInterface $logger
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function setLogger(LoggerInterface $logger);
|
||||
}
|
26
vendor/psr/log/src/LoggerAwareTrait.php
vendored
Normal file
26
vendor/psr/log/src/LoggerAwareTrait.php
vendored
Normal file
@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
namespace Psr\Log;
|
||||
|
||||
/**
|
||||
* Basic Implementation of LoggerAwareInterface.
|
||||
*/
|
||||
trait LoggerAwareTrait
|
||||
{
|
||||
/**
|
||||
* The logger instance.
|
||||
*
|
||||
* @var LoggerInterface|null
|
||||
*/
|
||||
protected ?LoggerInterface $logger = null;
|
||||
|
||||
/**
|
||||
* Sets a logger.
|
||||
*
|
||||
* @param LoggerInterface $logger
|
||||
*/
|
||||
public function setLogger(LoggerInterface $logger)
|
||||
{
|
||||
$this->logger = $logger;
|
||||
}
|
||||
}
|
125
vendor/psr/log/src/LoggerInterface.php
vendored
Normal file
125
vendor/psr/log/src/LoggerInterface.php
vendored
Normal file
@ -0,0 +1,125 @@
|
||||
<?php
|
||||
|
||||
namespace Psr\Log;
|
||||
|
||||
/**
|
||||
* Describes a logger instance.
|
||||
*
|
||||
* The message MUST be a string or object implementing __toString().
|
||||
*
|
||||
* The message MAY contain placeholders in the form: {foo} where foo
|
||||
* will be replaced by the context data in key "foo".
|
||||
*
|
||||
* The context array can contain arbitrary data. The only assumption that
|
||||
* can be made by implementors is that if an Exception instance is given
|
||||
* to produce a stack trace, it MUST be in a key named "exception".
|
||||
*
|
||||
* See https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logger-interface.md
|
||||
* for the full interface specification.
|
||||
*/
|
||||
interface LoggerInterface
|
||||
{
|
||||
/**
|
||||
* System is unusable.
|
||||
*
|
||||
* @param string|\Stringable $message
|
||||
* @param mixed[] $context
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function emergency(string|\Stringable $message, array $context = []);
|
||||
|
||||
/**
|
||||
* Action must be taken immediately.
|
||||
*
|
||||
* Example: Entire website down, database unavailable, etc. This should
|
||||
* trigger the SMS alerts and wake you up.
|
||||
*
|
||||
* @param string|\Stringable $message
|
||||
* @param mixed[] $context
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function alert(string|\Stringable $message, array $context = []);
|
||||
|
||||
/**
|
||||
* Critical conditions.
|
||||
*
|
||||
* Example: Application component unavailable, unexpected exception.
|
||||
*
|
||||
* @param string|\Stringable $message
|
||||
* @param mixed[] $context
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function critical(string|\Stringable $message, array $context = []);
|
||||
|
||||
/**
|
||||
* Runtime errors that do not require immediate action but should typically
|
||||
* be logged and monitored.
|
||||
*
|
||||
* @param string|\Stringable $message
|
||||
* @param mixed[] $context
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function error(string|\Stringable $message, array $context = []);
|
||||
|
||||
/**
|
||||
* Exceptional occurrences that are not errors.
|
||||
*
|
||||
* Example: Use of deprecated APIs, poor use of an API, undesirable things
|
||||
* that are not necessarily wrong.
|
||||
*
|
||||
* @param string|\Stringable $message
|
||||
* @param mixed[] $context
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function warning(string|\Stringable $message, array $context = []);
|
||||
|
||||
/**
|
||||
* Normal but significant events.
|
||||
*
|
||||
* @param string|\Stringable $message
|
||||
* @param mixed[] $context
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function notice(string|\Stringable $message, array $context = []);
|
||||
|
||||
/**
|
||||
* Interesting events.
|
||||
*
|
||||
* Example: User logs in, SQL logs.
|
||||
*
|
||||
* @param string|\Stringable $message
|
||||
* @param mixed[] $context
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function info(string|\Stringable $message, array $context = []);
|
||||
|
||||
/**
|
||||
* Detailed debug information.
|
||||
*
|
||||
* @param string|\Stringable $message
|
||||
* @param mixed[] $context
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function debug(string|\Stringable $message, array $context = []);
|
||||
|
||||
/**
|
||||
* Logs with an arbitrary level.
|
||||
*
|
||||
* @param mixed $level
|
||||
* @param string|\Stringable $message
|
||||
* @param mixed[] $context
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @throws \Psr\Log\InvalidArgumentException
|
||||
*/
|
||||
public function log($level, string|\Stringable $message, array $context = []);
|
||||
}
|
142
vendor/psr/log/src/LoggerTrait.php
vendored
Normal file
142
vendor/psr/log/src/LoggerTrait.php
vendored
Normal file
@ -0,0 +1,142 @@
|
||||
<?php
|
||||
|
||||
namespace Psr\Log;
|
||||
|
||||
/**
|
||||
* This is a simple Logger trait that classes unable to extend AbstractLogger
|
||||
* (because they extend another class, etc) can include.
|
||||
*
|
||||
* It simply delegates all log-level-specific methods to the `log` method to
|
||||
* reduce boilerplate code that a simple Logger that does the same thing with
|
||||
* messages regardless of the error level has to implement.
|
||||
*/
|
||||
trait LoggerTrait
|
||||
{
|
||||
/**
|
||||
* System is unusable.
|
||||
*
|
||||
* @param string|\Stringable $message
|
||||
* @param array $context
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function emergency(string|\Stringable $message, array $context = [])
|
||||
{
|
||||
$this->log(LogLevel::EMERGENCY, $message, $context);
|
||||
}
|
||||
|
||||
/**
|
||||
* Action must be taken immediately.
|
||||
*
|
||||
* Example: Entire website down, database unavailable, etc. This should
|
||||
* trigger the SMS alerts and wake you up.
|
||||
*
|
||||
* @param string|\Stringable $message
|
||||
* @param array $context
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function alert(string|\Stringable $message, array $context = [])
|
||||
{
|
||||
$this->log(LogLevel::ALERT, $message, $context);
|
||||
}
|
||||
|
||||
/**
|
||||
* Critical conditions.
|
||||
*
|
||||
* Example: Application component unavailable, unexpected exception.
|
||||
*
|
||||
* @param string|\Stringable $message
|
||||
* @param array $context
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function critical(string|\Stringable $message, array $context = [])
|
||||
{
|
||||
$this->log(LogLevel::CRITICAL, $message, $context);
|
||||
}
|
||||
|
||||
/**
|
||||
* Runtime errors that do not require immediate action but should typically
|
||||
* be logged and monitored.
|
||||
*
|
||||
* @param string|\Stringable $message
|
||||
* @param array $context
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function error(string|\Stringable $message, array $context = [])
|
||||
{
|
||||
$this->log(LogLevel::ERROR, $message, $context);
|
||||
}
|
||||
|
||||
/**
|
||||
* Exceptional occurrences that are not errors.
|
||||
*
|
||||
* Example: Use of deprecated APIs, poor use of an API, undesirable things
|
||||
* that are not necessarily wrong.
|
||||
*
|
||||
* @param string|\Stringable $message
|
||||
* @param array $context
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function warning(string|\Stringable $message, array $context = [])
|
||||
{
|
||||
$this->log(LogLevel::WARNING, $message, $context);
|
||||
}
|
||||
|
||||
/**
|
||||
* Normal but significant events.
|
||||
*
|
||||
* @param string|\Stringable $message
|
||||
* @param array $context
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function notice(string|\Stringable $message, array $context = [])
|
||||
{
|
||||
$this->log(LogLevel::NOTICE, $message, $context);
|
||||
}
|
||||
|
||||
/**
|
||||
* Interesting events.
|
||||
*
|
||||
* Example: User logs in, SQL logs.
|
||||
*
|
||||
* @param string|\Stringable $message
|
||||
* @param array $context
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function info(string|\Stringable $message, array $context = [])
|
||||
{
|
||||
$this->log(LogLevel::INFO, $message, $context);
|
||||
}
|
||||
|
||||
/**
|
||||
* Detailed debug information.
|
||||
*
|
||||
* @param string|\Stringable $message
|
||||
* @param array $context
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function debug(string|\Stringable $message, array $context = [])
|
||||
{
|
||||
$this->log(LogLevel::DEBUG, $message, $context);
|
||||
}
|
||||
|
||||
/**
|
||||
* Logs with an arbitrary level.
|
||||
*
|
||||
* @param mixed $level
|
||||
* @param string|\Stringable $message
|
||||
* @param array $context
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @throws \Psr\Log\InvalidArgumentException
|
||||
*/
|
||||
abstract public function log($level, string|\Stringable $message, array $context = []);
|
||||
}
|
30
vendor/psr/log/src/NullLogger.php
vendored
Normal file
30
vendor/psr/log/src/NullLogger.php
vendored
Normal file
@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace Psr\Log;
|
||||
|
||||
/**
|
||||
* This Logger can be used to avoid conditional log calls.
|
||||
*
|
||||
* Logging should always be optional, and if no logger is provided to your
|
||||
* library creating a NullLogger instance to have something to throw logs at
|
||||
* is a good way to avoid littering your code with `if ($this->logger) { }`
|
||||
* blocks.
|
||||
*/
|
||||
class NullLogger extends AbstractLogger
|
||||
{
|
||||
/**
|
||||
* Logs with an arbitrary level.
|
||||
*
|
||||
* @param mixed $level
|
||||
* @param string|\Stringable $message
|
||||
* @param array $context
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @throws \Psr\Log\InvalidArgumentException
|
||||
*/
|
||||
public function log($level, string|\Stringable $message, array $context = [])
|
||||
{
|
||||
// noop
|
||||
}
|
||||
}
|
6
vendor/symfony/apache-pack/composer.json
vendored
Normal file
6
vendor/symfony/apache-pack/composer.json
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"name": "symfony/apache-pack",
|
||||
"type": "symfony-pack",
|
||||
"license": "MIT",
|
||||
"description": "A pack for Apache support in Symfony"
|
||||
}
|
Reference in New Issue
Block a user