From 6964022808c6742e8f7c1d4e0cbce50dcf2131d6 Mon Sep 17 00:00:00 2001 From: vgreb Date: Wed, 6 May 2026 01:12:42 +0200 Subject: [PATCH] Suppression du framework legacy MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit diff --git c/app/config/routing/admin.yml i/app/config/routing/admin.yml index d52a8b7ce..7e5ed08d7 100644 --- c/app/config/routing/admin.yml +++ i/app/config/routing/admin.yml @@ -6,10 +6,6 @@ admin_relances: path: /association/relances/{page} defaults: {_controller: AppBundle\Controller\Admin\Membership\ReminderLogAction} -admin_void: - path: /void - defaults: {_controller: AppBundle\Controller\LegacyController::backOffice} - admin_members: resource: "admin_members.yml" prefix: /members diff --git c/app/config/services.yml i/app/config/services.yml index d583e6735..a2d3db448 100644 --- c/app/config/services.yml +++ i/app/config/services.yml @@ -75,13 +75,6 @@ services: ### Pages legacy - FIN - AppBundle\Controller\LegacyController: - autowire: true - autoconfigure: true - public: false - arguments: - $backOfficePages: '%app.pages_backoffice%' - AppBundle\Payment\PayboxFactory: autowire: true arguments: ["@router", "%paybox_domain_server%", "%paybox_secret_key%", "%paybox_site%", "%paybox_rang%", "%paybox_identifiant%"] diff --git c/composer.json i/composer.json index 83ca4454f..8ac2498cc 100644 --- c/composer.json +++ i/composer.json @@ -43,7 +43,6 @@ "robmorgan/phinx": "0.16.*", "sabre/vobject": "^4.6", "setasign/tfpdf": "^1.33", - "smarty/smarty": "^5.8", "symfony/asset": "7.4.*", "symfony/asset-mapper": "7.4.*", "symfony/clock": "7.4.*", @@ -73,9 +72,7 @@ "twig/intl-extra": "^3.26", "twig/string-extra": "^3.24", "twig/twig": "^3.27", - "webmozart/assert": "^2.4", - "znk3r/html_common": "*", - "znk3r/html_quickform": "4.0.2" + "webmozart/assert": "^2.4" }, "scripts": { "post-install-cmd": [ @@ -104,10 +101,6 @@ "patches": { "setasign/tfpdf": [ "patches/setasign-tfpdf-tfpdf-php.patch" - ], - "znk3r/html_quickform": [ - "patches/znk3r-html-quickform-html-quickform-date-php.patch", - "patches/znk3r-html-quickform-html-quickform-php.patch" ] }, "symfony-app-dir": "app", @@ -176,38 +169,6 @@ "tomasvotruba/type-coverage": "^2.2" }, "repositories": [ - { - "type": "package", - "package": { - "name": "znk3r/html_quickform", - "version": "4.0.2", - "dist": { - "url": "https://github.com/macintoshplus/HTML_QuickForm/archive/v4.0.2.zip", - "type": "zip" - }, - "autoload": { - "classmap": [ - "HTML/" - ] - } - } - }, - { - "type": "package", - "package": { - "name": "znk3r/html_common", - "version": "v2.0.1", - "dist": { - "url": "https://github.com/znk3r/HTML_Common/archive/v2.0.1.zip", - "type": "zip" - }, - "autoload": { - "classmap": [ - "HTML/" - ] - } - } - }, { "type": "package", "package": { diff --git c/composer.lock i/composer.lock index aa336a75b..22afdb6b2 100644 --- c/composer.lock +++ i/composer.lock @@ -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": "59e380a093941853e321ac2c73ba793f", + "content-hash": "47b9656d4e2c1fbc2db900e2b46aab2d", "packages": [ { "name": "algolia/algoliasearch-client-php", @@ -5538,82 +5538,6 @@ }, "time": "2022-12-20T10:26:07+00:00" }, - { - "name": "smarty/smarty", - "version": "v5.8.0", - "source": { - "type": "git", - "url": "https://github.com/smarty-php/smarty.git", - "reference": "78d259d3b971c59a0cd719c270cc5cbb740c36a7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/smarty-php/smarty/zipball/78d259d3b971c59a0cd719c270cc5cbb740c36a7", - "reference": "78d259d3b971c59a0cd719c270cc5cbb740c36a7", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0", - "symfony/polyfill-mbstring": "^1.27" - }, - "require-dev": { - "phpunit/phpunit": "^8.5 || ^7.5", - "smarty/smarty-lexer": "^4.0.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.0.x-dev" - } - }, - "autoload": { - "files": [ - "src/functions.php" - ], - "psr-4": { - "Smarty\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "LGPL-3.0" - ], - "authors": [ - { - "name": "Monte Ohrt", - "email": "monte@ohrt.com" - }, - { - "name": "Uwe Tews", - "email": "uwe.tews@googlemail.com" - }, - { - "name": "Rodney Rehm", - "email": "rodney.rehm@medialize.de" - }, - { - "name": "Simon Wisselink", - "homepage": "https://www.iwink.nl/" - } - ], - "description": "Smarty - the compiling PHP template engine", - "homepage": "https://smarty-php.github.io/smarty/", - "keywords": [ - "templating" - ], - "support": { - "forum": "https://github.com/smarty-php/smarty/discussions", - "issues": "https://github.com/smarty-php/smarty/issues", - "source": "https://github.com/smarty-php/smarty/tree/v5.8.0" - }, - "funding": [ - { - "url": "https://github.com/wisskid", - "type": "github" - } - ], - "time": "2026-02-15T14:27:15+00:00" - }, { "name": "symfony/asset", "version": "v7.4.8", @@ -11069,34 +10993,6 @@ "source": "https://github.com/geocoder-php/php-common/tree/5.0.0" }, "time": "2025-01-01T15:52:42+00:00" - }, - { - "name": "znk3r/html_common", - "version": "v2.0.1", - "dist": { - "type": "zip", - "url": "https://github.com/znk3r/HTML_Common/archive/v2.0.1.zip" - }, - "type": "library", - "autoload": { - "classmap": [ - "HTML/" - ] - } - }, - { - "name": "znk3r/html_quickform", - "version": "4.0.2", - "dist": { - "type": "zip", - "url": "https://github.com/macintoshplus/HTML_QuickForm/archive/v4.0.2.zip" - }, - "type": "library", - "autoload": { - "classmap": [ - "HTML/" - ] - } } ], "packages-dev": [ diff --git c/htdocs/pages/administration/index.php i/htdocs/pages/administration/index.php deleted file mode 100644 index a687583ba..000000000 --- c/htdocs/pages/administration/index.php +++ /dev/null @@ -1,46 +0,0 @@ -getResponse(); -$response->send(); - -$kernel->getKernel()->terminate($request, $response); diff --git c/htdocs/pages/administration/message.php i/htdocs/pages/administration/message.php deleted file mode 100644 index 6b61296b4..000000000 --- c/htdocs/pages/administration/message.php +++ /dev/null @@ -1,25 +0,0 @@ -assign('message', stripslashes((string) $_GET['message'])); - $smarty->assign('url' , $_GET['url']); - $smarty->assign('erreur' , $_GET['erreur']); - $smarty->display('message.html'); - - // On s'arrête là pour ne pas afficher le pied de page - exit; diff --git c/htdocs/templates/administration/entete.html i/htdocs/templates/administration/entete.html deleted file mode 100644 index d90b1e45b..000000000 --- c/htdocs/templates/administration/entete.html +++ /dev/null @@ -1,17 +0,0 @@ - - - - {include file="head.html"} - - - - - -
-
-
diff --git c/htdocs/templates/administration/head.html i/htdocs/templates/administration/head.html deleted file mode 100644 index 0d071506d..000000000 --- c/htdocs/templates/administration/head.html +++ /dev/null @@ -1,16 +0,0 @@ - - - {$titre_page} - Administration AFUP - - - - - - - - - - - - - diff --git c/htdocs/templates/administration/message.html i/htdocs/templates/administration/message.html deleted file mode 100644 index 2a867bae4..000000000 --- c/htdocs/templates/administration/message.html +++ /dev/null @@ -1,14 +0,0 @@ - - - - - {include file="head.html"} - - - -
- {$message|escape|nl2br}

-

Poursuivre

-
- - \ No newline at end of file diff --git c/htdocs/templates/administration/pagination.html i/htdocs/templates/administration/pagination.html deleted file mode 100644 index ddf0221cb..000000000 --- c/htdocs/templates/administration/pagination.html +++ /dev/null @@ -1,20 +0,0 @@ -
- - {if ($numero_page < $nombre_pages)} - - {/if} - {$numero_page}/{$nombre_pages} - {if $numero_page > 1} - - {/if} -
diff --git c/htdocs/templates/administration/pied_de_page.html i/htdocs/templates/administration/pied_de_page.html deleted file mode 100644 index 99f719cb5..000000000 --- c/htdocs/templates/administration/pied_de_page.html +++ /dev/null @@ -1,55 +0,0 @@ -
-
- -
-
-
- - - - {if $flash_message} -
-

{$flash_message|escape|nl2br}

-
- - {literal} - - {/literal} - {/if} - - - - - diff --git c/htdocs/templates/commun/formulaire-en.html i/htdocs/templates/commun/formulaire-en.html deleted file mode 100644 index 9a18c8783..000000000 --- c/htdocs/templates/commun/formulaire-en.html +++ /dev/null @@ -1,55 +0,0 @@ - -{$formulaire.hidden} - {if isset($erreur)} -

{$erreur}

- {/if} - - {foreach from=$formulaire.sections item=section} - - {if $section.header}{$section.header}{/if} - - {foreach from=$section.elements item=element} -
- {if $element.type == 'submit'} - {$element.html} - {elseif $element.type == 'static' && ($element.name == 'html')} -

{$element.html|nl2br}

- {elseif $element.type == 'static' && ($element.name == 'note')} -

{$element.html|nl2br}

- {elseif $element.type == 'static' && ($element.name == 'raccourci')} -

{$element.html|nl2br}

- {elseif $element.type == 'group'} - {if $element.label != ''} - - {/if} - - {foreach from=$element.elements item=element_groupe name=groupe} - {$element_groupe.html} - {if !$smarty.foreach.groupe.last}{$element.separator}{/if} - {/foreach} - {if $element.error}

{$element.error}

{/if} -
- {else} - {if $element.label != ''} - - {/if} - - {$element.html} - {if $element.error}

{$element.error}

{/if} -
- {/if} -
- {/foreach} - - -
 
- - {/foreach} -

* required field

- diff --git c/htdocs/templates/commun/formulaire.html i/htdocs/templates/commun/formulaire.html deleted file mode 100644 index 37adaf057..000000000 --- c/htdocs/templates/commun/formulaire.html +++ /dev/null @@ -1,105 +0,0 @@ -{assign var='auMoinsUnChampsRequis' value=false} - -{$formulaire.hidden} - {if isset($erreur)} -

{$erreur}

- {/if} - - {foreach from=$formulaire.sections key=num item=section} - -
- {if $section.header} -

{$section.header}

-
- {/if} - - {foreach from=$section.elements item=element} - {if $element.required}{assign var='auMoinsUnChampsRequis' value=true}{/if} -
- - {if $element.error} -
-
-
-
-
- {$element.error} -
-
-
- {/if} - -
- {if $element.type == 'submit'} - -
- {$element.html} -
- {elseif $element.type == 'static' && ($element.name == 'html')} -

{$element.html|nl2br}

- {elseif $element.type == 'static' && ($element.name == 'note')} - -
- {$element.html|nl2br} -
- {elseif $element.type == 'static' && ($element.name == 'info')} - -
- {$element.html} -
- {elseif $element.type == 'static' && ($element.name == 'label')} - - {elseif $element.type == 'static' && ($element.name == 'raccourci')} -

{$element.html|nl2br}

- {elseif $element.type == 'group'} - {if $element.label != ''} - - {/if} -
- {foreach from=$element.elements item=element_groupe name=groupe} -
- {$element_groupe.html} -
- {if !$smarty.foreach.groupe.last}{$element.separator}{/if} - {/foreach} -
- {elseif $element.type == 'text' or $element.type == 'select' or $element.type == 'textarea' - or $element.type == 'password' or $element.type == 'checkbox' or $element.type == 'file' - or $element.type == 'date' - } - -
-
- {if $element.type == 'textarea'}
{/if} - {$element.html} - {if $element.type == 'textarea'}
{/if} -
-
- {else} - Type de champ {$element.type} {if $element.name }({$element.name}){/if} non géré. - {/if} -
-
- {/foreach} - -
- {/foreach} - {if $auMoinsUnChampsRequis} -
-

* indique un champ obligatoire

-
- {/if} - diff --git c/patches/znk3r-html-quickform-html-quickform-date-php.patch i/patches/znk3r-html-quickform-html-quickform-date-php.patch deleted file mode 100644 index 6a35addd5..000000000 --- c/patches/znk3r-html-quickform-html-quickform-date-php.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- /dev/null -+++ ../HTML/QuickForm/date.php -@@ -317,7 +317,7 @@ - $locale = $this->_locale[$this->_options['language']]; - $backslash = false; - for ($i = 0, $length = strlen($this->_options['format']); $i < $length; $i++) { -- $sign = $this->_options['format']{$i}; -+ $sign = $this->_options['format'][$i]; - if ($backslash) { - $backslash = false; - $separator .= $sign; diff --git c/patches/znk3r-html-quickform-html-quickform-php.patch i/patches/znk3r-html-quickform-html-quickform-php.patch deleted file mode 100644 index 0e37fd97e..000000000 --- c/patches/znk3r-html-quickform-html-quickform-php.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- /dev/null -+++ ../HTML/QuickForm.php -@@ -281,7 +281,7 @@ - $attributes = array('action'=>$action, 'method'=>$method, 'name'=>$formName, 'id'=>$formName) + $target; - $this->updateAttributes($attributes); - if (!$trackSubmit || isset($_REQUEST['_qf__' . $formName])) { -- if (1 == get_magic_quotes_gpc()) { -+ if (function_exists('get_magic_quotes_gpc') && 1 == get_magic_quotes_gpc()) { - $this->_submitValues = $this->_recursiveFilter('stripslashes', 'get' == $method? $_GET: $_POST); - foreach ($_FILES as $keyFirst => $valFirst) { - foreach ($valFirst as $keySecond => $valSecond) { diff --git c/phpstan-baseline.php i/phpstan-baseline.php index 0f31c6fc4..09b75c962 100644 --- c/phpstan-baseline.php +++ i/phpstan-baseline.php @@ -1,54 +1,6 @@ '#^Binary operation "\\." between \'https\\://\' and mixed results in an error\\.$#', - 'identifier' => 'binaryOp.invalid', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Bootstrap/Http.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Cannot cast mixed to string\\.$#', - 'identifier' => 'cast.string', - 'count' => 5, - 'path' => __DIR__ . '/sources/Afup/Bootstrap/Http.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Parameter \\#3 \\$length of function substr expects int\\|null, int\\|false given\\.$#', - 'identifier' => 'argument.type', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Bootstrap/Http.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Cannot call method batchLoadMetadata\\(\\) on mixed\\.$#', - 'identifier' => 'method.nonObject', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Bootstrap/commonStart.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Cannot call method obtenir\\(\\) on mixed\\.$#', - 'identifier' => 'method.nonObject', - 'count' => 4, - 'path' => __DIR__ . '/sources/Afup/Bootstrap/commonStart.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Cannot call method register_modifier\\(\\) on mixed\\.$#', - 'identifier' => 'method.nonObject', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Bootstrap/commonStart.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Cannot call method setConfig\\(\\) on mixed\\.$#', - 'identifier' => 'method.nonObject', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Bootstrap/commonStart.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Parameter \\#1 \\$locale of class Symfony\\\\Component\\\\Translation\\\\Translator constructor expects string, mixed given\\.$#', - 'identifier' => 'argument.type', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Bootstrap/commonStart.php', -]; $ignoreErrors[] = [ 'message' => '#^Argument of an invalid type mixed supplied for foreach, only iterables are supported\\.$#', 'identifier' => 'foreach.nonIterable', @@ -145,942 +97,12 @@ $ignoreErrors[] = [ 'count' => 1, 'path' => __DIR__ . '/sources/Afup/Corporate/Page.php', ]; -$ignoreErrors[] = [ - 'message' => '#^Parameter \\#1 \\$host of method Afup\\\\Site\\\\Utils\\\\Base_De_Donnees\\:\\:__construct\\(\\) expects string, mixed given\\.$#', - 'identifier' => 'argument.type', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Corporate/_Site_Base_De_Donnees.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Parameter \\#2 \\$database of method Afup\\\\Site\\\\Utils\\\\Base_De_Donnees\\:\\:__construct\\(\\) expects string, mixed given\\.$#', - 'identifier' => 'argument.type', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Corporate/_Site_Base_De_Donnees.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Parameter \\#3 \\$user of method Afup\\\\Site\\\\Utils\\\\Base_De_Donnees\\:\\:__construct\\(\\) expects string, mixed given\\.$#', - 'identifier' => 'argument.type', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Corporate/_Site_Base_De_Donnees.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Parameter \\#4 \\$password of method Afup\\\\Site\\\\Utils\\\\Base_De_Donnees\\:\\:__construct\\(\\) expects string, mixed given\\.$#', - 'identifier' => 'argument.type', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Corporate/_Site_Base_De_Donnees.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Cannot access offset \'elements\' on mixed\\.$#', - 'identifier' => 'offsetAccess.nonOffsetAccessible', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Droits.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Cannot access offset \'niveau\' on mixed\\.$#', - 'identifier' => 'offsetAccess.nonOffsetAccessible', - 'count' => 2, - 'path' => __DIR__ . '/sources/Afup/Droits.php', -]; $ignoreErrors[] = [ 'message' => '#^Cannot call method getUser\\(\\) on Symfony\\\\Component\\\\Security\\\\Core\\\\Authentication\\\\Token\\\\TokenInterface\\|null\\.$#', 'identifier' => 'method.nonObject', 'count' => 2, 'path' => __DIR__ . '/sources/Afup/Droits.php', ]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Droits\\:\\:chargerToutesLesPages\\(\\) has parameter \\$pages with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Droits.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Property Afup\\\\Site\\\\Droits\\:\\:\\$_pages type has no value type specified in iterable type array\\.$#', - 'identifier' => 'missingType.iterableValue', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Droits.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Argument of an invalid type mixed supplied for foreach, only iterables are supported\\.$#', - 'identifier' => 'foreach.nonIterable', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Binary operation "\\." between \' / \' and mixed results in an error\\.$#', - 'identifier' => 'binaryOp.invalid', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Binary operation "\\." between \' \\ 'binaryOp.invalid', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Binary operation "\\." between \'l\\.id_forum \\= \' and mixed results in an error\\.$#', - 'identifier' => 'binaryOp.invalid', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Binary operation "\\." between mixed and \' \\: \' results in an error\\.$#', - 'identifier' => 'binaryOp.invalid', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Binary operation "\\." between mixed and \'\\-\' results in an error\\.$#', - 'identifier' => 'binaryOp.invalid', - 'count' => 7, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Binary operation "\\." between non\\-falsy\\-string and mixed results in an error\\.$#', - 'identifier' => 'binaryOp.invalid', - 'count' => 8, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Cannot access offset \'conf1\' on mixed\\.$#', - 'identifier' => 'offsetAccess.nonOffsetAccessible', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Cannot access offset \'conf2\' on mixed\\.$#', - 'identifier' => 'offsetAccess.nonOffsetAccessible', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Cannot access offset \'debut\' on mixed\\.$#', - 'identifier' => 'offsetAccess.nonOffsetAccessible', - 'count' => 7, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Cannot access offset \'fin\' on mixed\\.$#', - 'identifier' => 'offsetAccess.nonOffsetAccessible', - 'count' => 7, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Cannot access offset \'id_salle\' on mixed\\.$#', - 'identifier' => 'offsetAccess.nonOffsetAccessible', - 'count' => 3, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Cannot access offset \'jour\' on mixed\\.$#', - 'identifier' => 'offsetAccess.nonOffsetAccessible', - 'count' => 2, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Cannot access offset \'keynote\' on mixed\\.$#', - 'identifier' => 'offsetAccess.nonOffsetAccessible', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Cannot access offset \'nom\' on mixed\\.$#', - 'identifier' => 'offsetAccess.nonOffsetAccessible', - 'count' => 4, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Cannot access offset \'session_id\' on mixed\\.$#', - 'identifier' => 'offsetAccess.nonOffsetAccessible', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Cannot access offset \'titre\' on mixed\\.$#', - 'identifier' => 'offsetAccess.nonOffsetAccessible', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Cannot access offset int\\<0, max\\> on mixed\\.$#', - 'identifier' => 'offsetAccess.nonOffsetAccessible', - 'count' => 6, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Cannot cast mixed to int\\.$#', - 'identifier' => 'cast.int', - 'count' => 5, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:ajouter\\(\\) has no return type specified\\.$#', - 'identifier' => 'missingType.return', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:ajouter\\(\\) has parameter \\$accomodationEnabled with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:ajouter\\(\\) has parameter \\$chemin_template with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:ajouter\\(\\) has parameter \\$date_annonce_planning with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:ajouter\\(\\) has parameter \\$date_debut with no value type specified in iterable type array\\.$#', - 'identifier' => 'missingType.iterableValue', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:ajouter\\(\\) has parameter \\$date_fin with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:ajouter\\(\\) has parameter \\$date_fin_appel_conferencier with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:ajouter\\(\\) has parameter \\$date_fin_appel_projet with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:ajouter\\(\\) has parameter \\$date_fin_prevente with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:ajouter\\(\\) has parameter \\$date_fin_saisie_nuites_hotel with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:ajouter\\(\\) has parameter \\$date_fin_saisie_repas_speakers with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:ajouter\\(\\) has parameter \\$date_fin_vente with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:ajouter\\(\\) has parameter \\$date_fin_vente_token_sponsor with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:ajouter\\(\\) has parameter \\$date_fin_vote with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:ajouter\\(\\) has parameter \\$hasPricesDefinedWithVat with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:ajouter\\(\\) has parameter \\$logoUrl with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:ajouter\\(\\) has parameter \\$nb_places with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:ajouter\\(\\) has parameter \\$placeAddress with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:ajouter\\(\\) has parameter \\$placeName with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:ajouter\\(\\) has parameter \\$speakersDinerEnabled with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:ajouter\\(\\) has parameter \\$text with no value type specified in iterable type array\\.$#', - 'identifier' => 'missingType.iterableValue', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:ajouter\\(\\) has parameter \\$titre with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:ajouter\\(\\) has parameter \\$transportInformationEnabled with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:ajouter\\(\\) has parameter \\$voteEnabled with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:ajouter\\(\\) has parameter \\$waitingListUrl with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:genAgenda\\(\\) has no return type specified\\.$#', - 'identifier' => 'missingType.return', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:genAgenda\\(\\) has parameter \\$annee with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:genAgenda\\(\\) has parameter \\$for_bo with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:genAgenda\\(\\) has parameter \\$forum_id with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:genAgenda\\(\\) has parameter \\$linkFormat with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:genAgenda\\(\\) has parameter \\$only_data with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:modifier\\(\\) has no return type specified\\.$#', - 'identifier' => 'missingType.return', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:modifier\\(\\) has parameter \\$accomodationEnabled with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:modifier\\(\\) has parameter \\$chemin_template with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:modifier\\(\\) has parameter \\$date_annonce_planning with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:modifier\\(\\) has parameter \\$date_debut with no value type specified in iterable type array\\.$#', - 'identifier' => 'missingType.iterableValue', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:modifier\\(\\) has parameter \\$date_fin with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:modifier\\(\\) has parameter \\$date_fin_appel_conferencier with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:modifier\\(\\) has parameter \\$date_fin_appel_projet with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:modifier\\(\\) has parameter \\$date_fin_prevente with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:modifier\\(\\) has parameter \\$date_fin_saisie_nuites_hotel with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:modifier\\(\\) has parameter \\$date_fin_saisie_repas_speakers with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:modifier\\(\\) has parameter \\$date_fin_vente with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:modifier\\(\\) has parameter \\$date_fin_vente_token_sponsor with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:modifier\\(\\) has parameter \\$date_fin_vote with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:modifier\\(\\) has parameter \\$hasPricesDefinedWithVat with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:modifier\\(\\) has parameter \\$logoUrl with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:modifier\\(\\) has parameter \\$nb_places with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:modifier\\(\\) has parameter \\$placeAddress with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:modifier\\(\\) has parameter \\$placeName with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:modifier\\(\\) has parameter \\$speakersDinerEnabled with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:modifier\\(\\) has parameter \\$text with no value type specified in iterable type array\\.$#', - 'identifier' => 'missingType.iterableValue', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:modifier\\(\\) has parameter \\$titre with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:modifier\\(\\) has parameter \\$transportInformationEnabled with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:modifier\\(\\) has parameter \\$voteEnabled with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:modifier\\(\\) has parameter \\$waitingListUrl with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:obtenir\\(\\) return type has no value type specified in iterable type array\\.$#', - 'identifier' => 'missingType.iterableValue', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:obtenir\\(\\) should return array but returns mixed\\.$#', - 'identifier' => 'return.type', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:obtenirAgenda\\(\\) has no return type specified\\.$#', - 'identifier' => 'missingType.return', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:obtenirAgenda\\(\\) has parameter \\$forum_id with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:obtenirDernier\\(\\) has no return type specified\\.$#', - 'identifier' => 'missingType.return', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:obtenirForumPrecedent\\(\\) has no return type specified\\.$#', - 'identifier' => 'missingType.return', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:obtenirForumPrecedent\\(\\) has parameter \\$id_forum with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:obtenirListActive\\(\\) has no return type specified\\.$#', - 'identifier' => 'missingType.return', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:obtenirListe\\(\\) has parameter \\$filtre with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:obtenirListe\\(\\) has parameter \\$id_forum with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:obtenirListe\\(\\) return type has no value type specified in iterable type array\\.$#', - 'identifier' => 'missingType.iterableValue', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:obtenirListe\\(\\) should return array but returns array\\|false\\.$#', - 'identifier' => 'return.type', - 'count' => 2, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:supprimer\\(\\) has no return type specified\\.$#', - 'identifier' => 'missingType.return', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:supprimer\\(\\) has parameter \\$id_forum with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Parameter \\#1 \\$annee of method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:obtenirAgenda\\(\\) expects int\\|null, mixed given\\.$#', - 'identifier' => 'argument.type', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Parameter \\#1 \\$date of method Afup\\\\Site\\\\Utils\\\\Base_De_Donnees\\:\\:echapperSqlDateFromQuickForm\\(\\) expects array, mixed given\\.$#', - 'identifier' => 'argument.type', - 'count' => 20, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Parameter \\#1 \\$value of function count expects array\\|Countable, mixed given\\.$#', - 'identifier' => 'argument.type', - 'count' => 2, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Parameter \\#2 \\$for_bo of method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:lienSeance\\(\\) expects bool, mixed given\\.$#', - 'identifier' => 'argument.type', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Parameter \\#2 \\$timestamp of function date expects int\\|null, int\\|false given\\.$#', - 'identifier' => 'argument.type', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Parameter \\#3 \\$linkFormat of method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:lienSeance\\(\\) expects string\\|null, mixed given\\.$#', - 'identifier' => 'argument.type', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Part \\$nomSalle \\(mixed\\) of encapsed string cannot be cast to string\\.$#', - 'identifier' => 'encapsedStringPart.nonString', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Possibly invalid array key type mixed\\.$#', - 'identifier' => 'offsetAccess.invalidOffset', - 'count' => 15, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Binary operation "/" between mixed and mixed results in an error\\.$#', - 'identifier' => 'binaryOp.invalid', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Pagination.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Cannot call method assign\\(\\) on mixed\\.$#', - 'identifier' => 'method.nonObject', - 'count' => 2, - 'path' => __DIR__ . '/sources/Afup/Pagination.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Cannot call method display\\(\\) on mixed\\.$#', - 'identifier' => 'method.nonObject', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Pagination.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Cannot call method register_function\\(\\) on mixed\\.$#', - 'identifier' => 'method.nonObject', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Pagination.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Pagination\\:\\:__construct\\(\\) has parameter \\$genere_route with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Pagination.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Pagination\\:\\:__construct\\(\\) has parameter \\$nombre_elements_par_page with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Pagination.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Pagination\\:\\:__construct\\(\\) has parameter \\$nombre_elements_total with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Pagination.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Pagination\\:\\:__construct\\(\\) has parameter \\$page_courante with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Pagination.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Binary operation "\\." between \' \' and mixed results in an error\\.$#', - 'identifier' => 'binaryOp.invalid', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Utils/Base_De_Donnees.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Binary operation "\\." between \'\\:\' and mixed results in an error\\.$#', - 'identifier' => 'binaryOp.invalid', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Utils/Base_De_Donnees.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Binary operation "\\." between mixed and \'\\-\' results in an error\\.$#', - 'identifier' => 'binaryOp.invalid', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Utils/Base_De_Donnees.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Binary operation "\\." between non\\-falsy\\-string and mixed results in an error\\.$#', - 'identifier' => 'binaryOp.invalid', - 'count' => 3, - 'path' => __DIR__ . '/sources/Afup/Utils/Base_De_Donnees.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Cannot access offset 0 on mixed\\.$#', - 'identifier' => 'offsetAccess.nonOffsetAccessible', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Utils/Base_De_Donnees.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Cannot cast mixed to int\\.$#', - 'identifier' => 'cast.int', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Utils/Base_De_Donnees.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Cannot cast mixed to string\\.$#', - 'identifier' => 'cast.string', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Utils/Base_De_Donnees.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Utils\\\\Base_De_Donnees\\:\\:__construct\\(\\) has parameter \\$port with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Utils/Base_De_Donnees.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Utils\\\\Base_De_Donnees\\:\\:echapperSqlDateFromQuickForm\\(\\) has parameter \\$date with no value type specified in iterable type array\\.$#', - 'identifier' => 'missingType.iterableValue', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Utils/Base_De_Donnees.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Utils\\\\Base_De_Donnees\\:\\:echapperSqlDateFromQuickForm\\(\\) should return int\\|string but returns int\\|false\\.$#', - 'identifier' => 'return.type', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Utils/Base_De_Donnees.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Utils\\\\Base_De_Donnees\\:\\:executer\\(\\) should return bool but returns mysqli_result\\|true\\.$#', - 'identifier' => 'return.type', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Utils/Base_De_Donnees.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Utils\\\\Base_De_Donnees\\:\\:getDbLink\\(\\) has no return type specified\\.$#', - 'identifier' => 'missingType.return', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Utils/Base_De_Donnees.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Utils\\\\Base_De_Donnees\\:\\:obtenirAssociatif\\(\\) return type has no value type specified in iterable type array\\.$#', - 'identifier' => 'missingType.iterableValue', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Utils/Base_De_Donnees.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Utils\\\\Base_De_Donnees\\:\\:obtenirDernierId\\(\\) has no return type specified\\.$#', - 'identifier' => 'missingType.return', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Utils/Base_De_Donnees.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Utils\\\\Base_De_Donnees\\:\\:obtenirTous\\(\\) return type has no value type specified in iterable type array\\.$#', - 'identifier' => 'missingType.iterableValue', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Utils/Base_De_Donnees.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Parameter \\#1 \\$hostname of function mysqli_connect expects string\\|null, mixed given\\.$#', - 'identifier' => 'argument.type', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Utils/Base_De_Donnees.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Parameter \\#1 \\$mysql of function mysqli_error expects mysqli, mixed given\\.$#', - 'identifier' => 'argument.type', - 'count' => 2, - 'path' => __DIR__ . '/sources/Afup/Utils/Base_De_Donnees.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Parameter \\#1 \\$mysql of function mysqli_insert_id expects mysqli, mixed given\\.$#', - 'identifier' => 'argument.type', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Utils/Base_De_Donnees.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Parameter \\#1 \\$mysql of function mysqli_query expects mysqli, mixed given\\.$#', - 'identifier' => 'argument.type', - 'count' => 5, - 'path' => __DIR__ . '/sources/Afup/Utils/Base_De_Donnees.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Parameter \\#1 \\$mysql of function mysqli_real_escape_string expects mysqli, mixed given\\.$#', - 'identifier' => 'argument.type', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Utils/Base_De_Donnees.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Parameter \\#1 \\$mysql of function mysqli_select_db expects mysqli, mixed given\\.$#', - 'identifier' => 'argument.type', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Utils/Base_De_Donnees.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Parameter \\#1 \\$nom of method Afup\\\\Site\\\\Utils\\\\Base_De_Donnees\\:\\:selectionnerBase\\(\\) expects string, mixed given\\.$#', - 'identifier' => 'argument.type', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Utils/Base_De_Donnees.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Parameter \\#1 \\$result of function mysqli_fetch_array expects mysqli_result, mysqli_result\\|true given\\.$#', - 'identifier' => 'argument.type', - 'count' => 5, - 'path' => __DIR__ . '/sources/Afup/Utils/Base_De_Donnees.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Parameter \\#1 \\$result of function mysqli_fetch_fields expects mysqli_result, mysqli_result\\|true given\\.$#', - 'identifier' => 'argument.type', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Utils/Base_De_Donnees.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Parameter \\#1 \\$result of function mysqli_free_result expects mysqli_result, mysqli_result\\|true given\\.$#', - 'identifier' => 'argument.type', - 'count' => 4, - 'path' => __DIR__ . '/sources/Afup/Utils/Base_De_Donnees.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Parameter \\#1 \\$result of function mysqli_num_fields expects mysqli_result, bool\\|mysqli_result given\\.$#', - 'identifier' => 'argument.type', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Utils/Base_De_Donnees.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Parameter \\#2 \\$username of function mysqli_connect expects string\\|null, mixed given\\.$#', - 'identifier' => 'argument.type', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Utils/Base_De_Donnees.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Parameter \\#3 \\$password of function mysqli_connect expects string\\|null, mixed given\\.$#', - 'identifier' => 'argument.type', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Utils/Base_De_Donnees.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Possibly invalid array key type mixed\\.$#', - 'identifier' => 'offsetAccess.invalidOffset', - 'count' => 2, - 'path' => __DIR__ . '/sources/Afup/Utils/Base_De_Donnees.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Property Afup\\\\Site\\\\Utils\\\\Base_De_Donnees\\:\\:\\$config type has no value type specified in iterable type array\\.$#', - 'identifier' => 'missingType.iterableValue', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Utils/Base_De_Donnees.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Property Afup\\\\Site\\\\Utils\\\\Base_De_Donnees\\:\\:\\$link \\(mysqli\\) does not accept mysqli\\|false\\.$#', - 'identifier' => 'assign.propertyType', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Utils/Base_De_Donnees.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Binary operation "\\." between literal\\-string&non\\-falsy\\-string and mixed results in an error\\.$#', - 'identifier' => 'binaryOp.invalid', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Utils/Configuration.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Cannot access offset \'database_host\'\\|\'database_name\'\\|\'database_password\'\\|\'database_port\'\\|\'database_user\'\\|\'smtp_host\'\\|\'smtp_password\'\\|\'smtp_port\'\\|\'smtp_tls\'\\|\'smtp_username\' on 0\\|0\\.0\\|\'\'\\|\'0\'\\|array\\{\\}\\|array\\{database_host\\?\\: mixed, database_name\\?\\: mixed, database_password\\?\\: mixed, database_port\\?\\: mixed, database_user\\?\\: mixed, smtp_host\\?\\: mixed, smtp_password\\?\\: string, smtp_port\\?\\: mixed, \\.\\.\\.\\}\\|false\\|null\\.$#', - 'identifier' => 'offsetAccess.nonOffsetAccessible', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Utils/Configuration.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Cannot access offset \'database_host\'\\|\'database_name\'\\|\'database_password\'\\|\'database_port\'\\|\'database_user\'\\|\'smtp_host\'\\|\'smtp_password\'\\|\'smtp_port\'\\|\'smtp_tls\'\\|\'smtp_username\' on 0\\|0\\.0\\|\'\'\\|\'0\'\\|array\\{\\}\\|array\\{database_host\\?\\: mixed, database_name\\?\\: mixed, database_user\\?\\: mixed, database_password\\?\\: mixed, database_port\\?\\: mixed, smtp_host\\?\\: mixed, smtp_port\\?\\: mixed, smtp_tls\\?\\: mixed, \\.\\.\\.\\}\\|false\\|null\\.$#', - 'identifier' => 'offsetAccess.nonOffsetAccessible', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Utils/Configuration.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Cannot access offset \'parameters\' on mixed\\.$#', - 'identifier' => 'offsetAccess.nonOffsetAccessible', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Utils/Configuration.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Cannot access offset mixed on mixed\\.$#', - 'identifier' => 'offsetAccess.nonOffsetAccessible', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Utils/Configuration.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Utils\\\\Configuration\\:\\:loadSymfonyParameters\\(\\) return type has no value type specified in iterable type array\\.$#', - 'identifier' => 'missingType.iterableValue', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Utils/Configuration.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Utils\\\\Configuration\\:\\:obtenir\\(\\) has no return type specified\\.$#', - 'identifier' => 'missingType.return', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Utils/Configuration.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Utils\\\\Configuration\\:\\:obtenir\\(\\) has parameter \\$cle with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Utils/Configuration.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Parameter \\#2 \\.\\.\\.\\$arrays of function array_merge expects array, mixed given\\.$#', - 'identifier' => 'argument.type', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Utils/Configuration.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Property Afup\\\\Site\\\\Utils\\\\Configuration\\:\\:\\$values has no type specified\\.$#', - 'identifier' => 'missingType.property', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Utils/Configuration.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Property Afup\\\\Site\\\\Utils\\\\LegacyConnectionFactory\\:\\:\\$bdd \\(Afup\\\\Site\\\\Utils\\\\Base_De_Donnees\\) does not accept mixed\\.$#', - 'identifier' => 'assign.propertyType', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Utils/LegacyConnectionFactory.php', -]; $ignoreErrors[] = [ 'message' => '#^Cannot call method getEmail\\(\\) on mixed\\.$#', 'identifier' => 'method.nonObject', @@ -1219,108 +241,6 @@ $ignoreErrors[] = [ 'count' => 1, 'path' => __DIR__ . '/sources/Afup/Utils/Vat.php', ]; -$ignoreErrors[] = [ - 'message' => '#^Argument of an invalid type mixed supplied for foreach, only iterables are supported\\.$#', - 'identifier' => 'foreach.nonIterable', - 'count' => 2, - 'path' => __DIR__ . '/sources/Afup/fonctions.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Cannot access offset \'class\' on mixed\\.$#', - 'identifier' => 'offsetAccess.nonOffsetAccessible', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/fonctions.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Cannot access offset \'elements\' on mixed\\.$#', - 'identifier' => 'offsetAccess.nonOffsetAccessible', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/fonctions.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Cannot access offset \'erreur\' on mixed\\.$#', - 'identifier' => 'offsetAccess.nonOffsetAccessible', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/fonctions.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Cannot access offset \'event_selector_current_id\' on mixed\\.$#', - 'identifier' => 'offsetAccess.nonOffsetAccessible', - 'count' => 2, - 'path' => __DIR__ . '/sources/Afup/fonctions.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Cannot access offset \'message\' on mixed\\.$#', - 'identifier' => 'offsetAccess.nonOffsetAccessible', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/fonctions.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Cannot access offset \'nom\' on mixed\\.$#', - 'identifier' => 'offsetAccess.nonOffsetAccessible', - 'count' => 2, - 'path' => __DIR__ . '/sources/Afup/fonctions.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Cannot access offset \'path\' on array\\{scheme\\?\\: string, host\\?\\: string, port\\?\\: int\\<0, 65535\\>, user\\?\\: string, pass\\?\\: string, path\\?\\: string, query\\?\\: string, fragment\\?\\: string\\}\\|false\\.$#', - 'identifier' => 'offsetAccess.nonOffsetAccessible', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/fonctions.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Cannot call method getAttributes\\(\\) on mixed\\.$#', - 'identifier' => 'method.nonObject', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/fonctions.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Cannot call method setAttributes\\(\\) on mixed\\.$#', - 'identifier' => 'method.nonObject', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/fonctions.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Cannot cast mixed to string\\.$#', - 'identifier' => 'cast.string', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/fonctions.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Function genererFormulaire\\(\\) return type has no value type specified in iterable type array\\.$#', - 'identifier' => 'missingType.iterableValue', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/fonctions.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Function obtenirTitre\\(\\) has no return type specified\\.$#', - 'identifier' => 'missingType.return', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/fonctions.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Function obtenirTitre\\(\\) has parameter \\$page with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/fonctions.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Function obtenirTitre\\(\\) has parameter \\$pages with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/fonctions.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Function verifierAction\\(\\) should return string but returns mixed\\.$#', - 'identifier' => 'return.type', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/fonctions.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Parameter \\#3 \\$action of class AppBundle\\\\Association\\\\Form\\\\HTML_QuickForm constructor expects string, mixed given\\.$#', - 'identifier' => 'argument.type', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/fonctions.php', -]; $ignoreErrors[] = [ 'message' => '#^Method AppBundle\\\\Accounting\\\\Entity\\\\Repository\\\\AccountRepository\\:\\:getAllSortedByName\\(\\) should return array\\ but returns mixed\\.$#', 'identifier' => 'return.type', @@ -1765,12 +685,6 @@ $ignoreErrors[] = [ 'count' => 1, 'path' => __DIR__ . '/sources/AppBundle/Association/Form/ContactDetailsType.php', ]; -$ignoreErrors[] = [ - 'message' => '#^Method AppBundle\\\\Association\\\\Form\\\\HTML_QuickForm\\:\\:getElements\\(\\) has no return type specified\\.$#', - 'identifier' => 'missingType.return', - 'count' => 1, - 'path' => __DIR__ . '/sources/AppBundle/Association/Form/HTML_QuickForm.php', -]; $ignoreErrors[] = [ 'message' => '#^Class AppBundle\\\\Association\\\\Form\\\\NearestOfficeChoiceType extends generic class Symfony\\\\Component\\\\Form\\\\AbstractType but does not specify its types\\: TData$#', 'identifier' => 'missingType.generics', @@ -6217,72 +5131,6 @@ $ignoreErrors[] = [ 'count' => 1, 'path' => __DIR__ . '/sources/AppBundle/Controller/Event/Vote/VoteController.php', ]; -$ignoreErrors[] = [ - 'message' => '#^Binary operation "\\." between literal\\-string&non\\-falsy\\-string and mixed results in an error\\.$#', - 'identifier' => 'binaryOp.invalid', - 'count' => 2, - 'path' => __DIR__ . '/sources/AppBundle/Controller/LegacyController.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Binary operation "\\." between mixed and \'\\.html\' results in an error\\.$#', - 'identifier' => 'binaryOp.invalid', - 'count' => 1, - 'path' => __DIR__ . '/sources/AppBundle/Controller/LegacyController.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Binary operation "\\." between mixed and \'\\.js\\.html\' results in an error\\.$#', - 'identifier' => 'binaryOp.invalid', - 'count' => 1, - 'path' => __DIR__ . '/sources/AppBundle/Controller/LegacyController.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Cannot access offset \'erreur\' on mixed\\.$#', - 'identifier' => 'offsetAccess.nonOffsetAccessible', - 'count' => 1, - 'path' => __DIR__ . '/sources/AppBundle/Controller/LegacyController.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Cannot access offset \'message\' on mixed\\.$#', - 'identifier' => 'offsetAccess.nonOffsetAccessible', - 'count' => 1, - 'path' => __DIR__ . '/sources/AppBundle/Controller/LegacyController.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Cannot call method fetch\\(\\) on mixed\\.$#', - 'identifier' => 'method.nonObject', - 'count' => 2, - 'path' => __DIR__ . '/sources/AppBundle/Controller/LegacyController.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Cannot call method templateExists\\(\\) on mixed\\.$#', - 'identifier' => 'method.nonObject', - 'count' => 1, - 'path' => __DIR__ . '/sources/AppBundle/Controller/LegacyController.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method AppBundle\\\\Controller\\\\LegacyController\\:\\:__construct\\(\\) has parameter \\$backOfficePages with no value type specified in iterable type array\\.$#', - 'identifier' => 'missingType.iterableValue', - 'count' => 1, - 'path' => __DIR__ . '/sources/AppBundle/Controller/LegacyController.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method AppBundle\\\\Controller\\\\LegacyController\\:\\:backOffice\\(\\) has no return type specified\\.$#', - 'identifier' => 'missingType.return', - 'count' => 1, - 'path' => __DIR__ . '/sources/AppBundle/Controller/LegacyController.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method AppBundle\\\\Controller\\\\LegacyController\\:\\:void\\(\\) has no return type specified\\.$#', - 'identifier' => 'missingType.return', - 'count' => 1, - 'path' => __DIR__ . '/sources/AppBundle/Controller/LegacyController.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Parameter \\#1 \\$page of method Afup\\\\Site\\\\Droits\\:\\:verifierDroitSurLaPage\\(\\) expects int\\|string, mixed given\\.$#', - 'identifier' => 'argument.type', - 'count' => 1, - 'path' => __DIR__ . '/sources/AppBundle/Controller/LegacyController.php', -]; $ignoreErrors[] = [ 'message' => '#^Parameter \\#1 \\$content of class Symfony\\\\Component\\\\HttpFoundation\\\\Response constructor expects string\\|null, string\\|false given\\.$#', 'identifier' => 'argument.type', diff --git c/phpstan.neon i/phpstan.neon index e1a42dc58..518a44700 100644 --- c/phpstan.neon +++ i/phpstan.neon @@ -9,10 +9,6 @@ parameters: stubFiles: - tests/stubs/Ting/Repository/Repository.php.stub - tests/stubs/Ting/Repository/RepositoryFactory.php.stub - ignoreErrors: - - - identifier: property.onlyWritten - path: sources/AppBundle/Controller/LegacyController.php type_coverage: return: 71 param: 71 diff --git c/sources/Afup/Bootstrap/Cli.php i/sources/Afup/Bootstrap/Cli.php deleted file mode 100644 index 83385ea8f..000000000 --- c/sources/Afup/Bootstrap/Cli.php +++ /dev/null @@ -1,27 +0,0 @@ - - * @author Olivier Hoareau - * @copyright 2010 Association Française des Utilisateurs de PHP - * - * @category AFUP - * @package AFUP - * @group Bootstraps - */ - - -$startMicrotime = microtime(true); - -require_once __DIR__ . '/_Common.php'; -require_once __DIR__ . '/../../../vendor/autoload.php'; diff --git c/sources/Afup/Bootstrap/Http.php i/sources/Afup/Bootstrap/Http.php deleted file mode 100644 index 562c85a77..000000000 --- c/sources/Afup/Bootstrap/Http.php +++ /dev/null @@ -1,78 +0,0 @@ - - * @author Olivier Hoareau - * @copyright 2010 Association Française des Utilisateurs de PHP - * - * @category AFUP - * @package AFUP - * @group Bootstraps - */ - -// chargement des paramétrages génériques / multi-contextuels de l'application - -use Afup\Site\Corporate\Site; -use Smarty\Smarty; - -require_once __DIR__ . '/_Common.php'; - -// initialisation de la session / requête -if (ob_get_level() === 0) { - ob_start(); -} - -// mise à jour des paramétrages PHP en fonction de la configuration - -if (getenv('APP_ENV') === 'prod') { - ini_set('error_reporting', (string) (E_ALL ^ E_WARNING ^ E_NOTICE)); - ini_set('display_errors', '0'); -} else { - ini_set('error_reporting', (string) E_ALL); - ini_set('display_errors', '1'); -} - -header('Content-type: text/html; charset=UTF-8'); - -// choix du 'sous-site' en fonction de l'url - -$serveur = ''; -$url = $_SERVER['REQUEST_URI']; -if (strrpos((string) $url, '?') !== false) { - $position = strrpos((string) $url, '?'); - $url = substr((string) $url, 0, $position); -} -$position = strrpos((string) $url, '/'); -$url = substr((string) $_SERVER['REQUEST_URI'], 0, $position); -$parties = explode('/', $url); -$sous_site = array_pop($parties); - -// initialisation de Smarty, le moteur de template (html) - -$smarty = new Smarty(); -$smarty->setTemplateDir([ - AFUP_CHEMIN_RACINE . 'templates/' . $sous_site . '/', - AFUP_CHEMIN_RACINE . 'templates/commun/', -]); -$smarty->setCompileDir(AFUP_CHEMIN_RACINE . 'cache/templates'); -$smarty->compile_id = $sous_site; -$smarty->use_sub_dirs = true; -$smarty->compile_check = Smarty::COMPILECHECK_ON; -$smarty->registerPlugin("modifier","stripslashes", "stripslashes"); -$smarty->registerPlugin("modifier","floatval", "floatval"); - -$smarty->assign('url_base', 'https://' . $_SERVER['HTTP_HOST'] . '/'); -$smarty->assign('chemin_template', $serveur . '/templates/' . $sous_site . '/'); -$smarty->assign('chemin_javascript', $serveur . '/javascript/'); - -require_once(__DIR__ . '/commonStart.php'); diff --git c/sources/Afup/Bootstrap/_Common.php i/sources/Afup/Bootstrap/_Common.php index 3a00b18d0..249bfe240 100644 --- c/sources/Afup/Bootstrap/_Common.php +++ i/sources/Afup/Bootstrap/_Common.php @@ -33,17 +33,9 @@ if (!defined('AFUP_CHEMIN_RACINE')) { } date_default_timezone_set('Europe/Paris'); -// préparation de la requête / session -require_once __DIR__ . '/../fonctions.php'; - // chargement de la configuration $conf = new Configuration(); // mets la configuration dans une 'clé de registre' accessible à tout moment $GLOBALS['AFUP_CONF'] = $conf; -// initialisation de la couche d'abstraction de la base de données -$bdd = new _Site_Base_De_Donnees(); - -// mets la connexion db dans une 'clé de registre' accessible à tout moment -$GLOBALS['AFUP_DB'] = $bdd; diff --git c/sources/Afup/Bootstrap/commonStart.php i/sources/Afup/Bootstrap/commonStart.php index 8cc76624c..087cdba44 100644 --- c/sources/Afup/Bootstrap/commonStart.php +++ i/sources/Afup/Bootstrap/commonStart.php @@ -2,11 +2,6 @@ declare(strict_types=1); -use CCMBenchmark\Ting\Services; -use Symfony\Component\Security\Csrf\CsrfTokenManager; -use Symfony\Component\Translation\Loader\XliffFileLoader; -use Symfony\Component\Translation\Translator; - // Inclusion de l'autoload de composer require_once __DIR__ . '/../../../vendor/autoload.php'; @@ -16,41 +11,9 @@ $langs = ['fr', 'en']; if (isset($_GET['lang']) && in_array($_GET['lang'], $langs)) { $lang = $_GET['lang']; } -$translator = new Translator($lang); -$translator->addLoader('xliff', new XliffFileLoader()); -$translator->addResource('xliff', __DIR__ . '/../../../translations/inscription.en.xlf', 'en'); -$translator->addResource('xliff', __DIR__ . '/../../../translations/cfp.en.xlf', 'en'); -$translator->setFallbackLocales(['fr']); -if (isset($smarty)) { - $smarty->register_modifier('trans', $translator->trans(...)); -} $debug = false; if (isset($_SERVER['HTTP_HOST']) && $_SERVER['HTTP_HOST'] === 'afup.dev') { $debug = true; } - -// Initialisation de ting -$services = new Services(); -$services->get('ConnectionPool')->setConfig([ - 'main' => [ - 'namespace' => '\CCMBenchmark\Ting\Driver\Mysqli', - 'master' => [ - 'host' => $GLOBALS['AFUP_CONF']->obtenir('database_host'), - 'user' => $GLOBALS['AFUP_CONF']->obtenir('database_user'), - 'password' => $GLOBALS['AFUP_CONF']->obtenir('database_password'), - 'port' => 3306, - ], - ], -]); - -$services - ->get('MetadataRepository') - ->batchLoadMetadata( - 'AppBundle\Event\Model\Repository', - __DIR__ . '/../Event/Model/Repository/*.php', - ['default' => ['database' => $GLOBALS['AFUP_CONF']->obtenir('database_name')]], - ) -; -$services->set('security.csrf.token_manager', fn(): CsrfTokenManager => new CsrfTokenManager()); diff --git c/sources/Afup/Corporate/_Site_Base_De_Donnees.php i/sources/Afup/Corporate/_Site_Base_De_Donnees.php deleted file mode 100644 index 6a4da1b57..000000000 --- c/sources/Afup/Corporate/_Site_Base_De_Donnees.php +++ /dev/null @@ -1,25 +0,0 @@ -obtenir('database_host'), - $conf->obtenir('database_name'), - $conf->obtenir('database_user'), - $conf->obtenir('database_password'), - $conf->obtenir('database_port'), - ); - } -} diff --git c/sources/Afup/Droits.php i/sources/Afup/Droits.php index cafd5eed3..20dcc6e89 100644 --- c/sources/Afup/Droits.php +++ i/sources/Afup/Droits.php @@ -22,11 +22,6 @@ define('AFUP_DROITS_ETAT_ACTIF', 1); */ class Droits { - /** - * Liste structurée avec toutes les pages référencées dans l'application - */ - private array $_pages = []; - public function __construct( private readonly TokenStorageInterface $tokenStorage, private readonly AuthorizationCheckerInterface $authorizationChecker, @@ -46,37 +41,6 @@ class Droits return null; } - public function chargerToutesLesPages($pages): void - { - if (is_array($pages)) { - $this->_pages = $pages; - } - } - - /** - * @param int|string $page - */ - public function verifierDroitSurLaPage($page): bool - { - if ($this->authorizationChecker->isGranted('ROLE_SUPER_ADMIN')) { - return true; - } - foreach ($this->_pages as $_page => $_page_details) { - if ($page == $_page && (isset($_page_details['niveau']) && $this->authorizationChecker->isGranted($_page_details['niveau']))) { - return true; - } - if (isset($_page_details['elements']) && is_array($_page_details['elements'])) { - foreach ($_page_details['elements'] as $_element => $_element_details) { - if ($page == $_element && (isset($_element_details['niveau']) && $this->authorizationChecker->isGranted($_element_details['niveau']))) { - return true; - } - } - } - } - - return false; - } - /** * @param int $compagnyId */ diff --git c/sources/Afup/Forum/Forum.php i/sources/Afup/Forum/Forum.php deleted file mode 100644 index 14d2d34e6..000000000 --- c/sources/Afup/Forum/Forum.php +++ /dev/null @@ -1,460 +0,0 @@ -_bdd->obtenirEnregistrement($requete); - } - - public function obtenirForumPrecedent($id_forum) - { - $requete = 'SELECT MAX(id)'; - $requete .= 'FROM'; - $requete .= ' afup_forum '; - $requete .= 'WHERE'; - $requete .= ' id < ' . (int) $id_forum . ' AND titre like "%Forum%"'; - return $this->_bdd->obtenirUn($requete); - } - - public function obtenirDernier() - { - $requete = 'SELECT id '; - $requete .= 'FROM afup_forum '; - $requete .= 'ORDER BY date_debut desc'; - return $this->_bdd->obtenirUn($requete); - } - - /** - * Renvoit la liste des inscriptions à facturer ou facturé au forum - * - * @param string $champs Champs à renvoyer - * @param string $ordre Tri des enregistrements - * @param bool $associatif Renvoyer un tableau associatif ? - * @return array - */ - public function obtenirListe($id_forum = null, - string $champs = '*', - string $ordre = 'titre', - $associatif = false, - $filtre = false) - { - $requete = 'SELECT'; - $requete .= ' ' . $champs . ' '; - $requete .= 'FROM'; - $requete .= ' afup_forum '; - $requete .= 'ORDER BY ' . $ordre; - if ($associatif) { - return $this->_bdd->obtenirAssociatif($requete); - } else { - return $this->_bdd->obtenirTous($requete); - } - } - - public function obtenirListActive() - { - return $this->_bdd->obtenirTous('SELECT * FROM afup_forum WHERE archived_at IS NULL ORDER BY titre'); - } - - /** - * Récupérer l'agenda du forum. - * - * Pour une année donnée pass�e en paramètre, retourne - * les informations nécessaires à la construction du tableau - * de l'agenda du forum AFUP correspondant. - * - * @param Int $annee (Optionnel, retournera tout si aucunne année indiquée) - */ - public function obtenirAgenda($annee = null, $forum_id = null) - { - $aWhere = []; - if (isset($annee)) { - $tdebut = mktime(0, 0, 0, 1, 1, (int) $annee); - $tfin = mktime(0, 0, 0, 1, 1, (int) ($annee + 1)); - $aWhere[] = "p.debut >= " . $tdebut; - $aWhere[] = "p.fin < " . $tfin; - $aWhere[] = "s.plannifie = 1"; - } - - if (null !== $forum_id) { - $aWhere[] = "l.id_forum = " . $forum_id; - } - - $sWhere = "WHERE " . implode(" AND ", $aWhere); - $requete = "SELECT " - . " ( SELECT CONCAT(c.nom,' ', c.prenom , ' - ', c.societe ) FROM afup_conferenciers_sessions cs INNER JOIN afup_conferenciers c ON c.conferencier_id = cs.conferencier_id WHERE cs.session_id = s.session_id order by c.conferencier_id asc limit 1) as conf1 , - ( SELECT CONCAT(c.nom,' ', c.prenom, ' - ', c.societe) FROM afup_conferenciers_sessions cs INNER JOIN afup_conferenciers c ON c.conferencier_id = cs.conferencier_id WHERE cs.session_id = s.session_id order by c.conferencier_id asc limit 1,1) as conf2 , " - - . " s.session_id, s.titre, s.journee, " - . " FROM_UNIXTIME(p.debut, '%d-%m-%Y') AS 'jour', " - . " FROM_UNIXTIME(p.debut, '%H:%i') AS 'debut', " - . " FROM_UNIXTIME(p.fin, '%H:%i') AS 'fin', " - . " p.id_salle, " - . " p.keynote, " - . " l.nom " - . "FROM afup_sessions s " - . " JOIN afup_forum_planning p ON s.session_id = p.id_session " - . " JOIN afup_forum_salle l ON p.id_salle = l.id " - . $sWhere . " " - . "ORDER BY p.debut ASC, p.id_salle ASC"; - return $this->_bdd->obtenirTous($requete); - } - - /** - * Compte en nombre de demi-heures. - * - * Sur la base des horaires d'une scéance au format «HH:mm - HH:mm» - * calcule la durée en nombre de demi-heures. - * Servira à calculer combien de lignes d'affichage occupera une - * scéance. - * - * @param String $heures - * @return Int - */ - public function dureeSeance($heures) - { - $aHeures = explode("-", $heures); - $aDebut = explode(":", $aHeures[0]); - $aFin = explode(":", $aHeures[1]); - $iDebut = ((int) $aDebut[0] * 60) + (int) $aDebut[1]; - $iFin = ((int) $aFin[0] * 60) + (int) $aFin[1]; - return ($iFin - $iDebut) / 5; - } - - /** - * Construction des liens vers les fiches détaillées des conférences. - * - * @param String $infoSeance - * @param Boolean $for_bo - * @param ?string $linkFormat if $for_bo = false, this format will be used (if not null) to construct the link. - * i.e : "/sessions.php#%1" . %1 is the session id - * @return String - */ - public function lienSeance($infoSeance, $for_bo, $linkFormat): ?string - { - $masque = "#^(\\d+) ?: ?(.*)#"; - //$masque = "#^([0-9]+) ?| ?(.*) ?| ?(.*)#"; - - - $lien = '#$1'; - if ($for_bo === false) { - $lien = $linkFormat !== null ? sprintf($linkFormat, '$1') : './sessions.php#$1'; - } - return preg_replace($masque, '

$2

', $infoSeance); - } - - public function genAgenda($annee, $for_bo = false, $only_data = false, $forum_id = null, $linkFormat = null) - { - $aProgrammeData = []; - $aAgenda = $this->obtenirAgenda($annee, $forum_id); - if (isset($aAgenda) && count($aAgenda) > 0) { - $nbConf = count($aAgenda); - $nomSalles = []; - $j = 0; - $d = null; - $aProgramme = []; - foreach ($aAgenda as $session) { - if (!isset($nomSalles[$session['id_salle']])) { - $nomSalles[$session['id_salle']] = $session['nom']; - } - $dj = $session['jour']; - if ($dj != $d) { - $j++; - $d = $dj; - $aProgramme[$dj] = []; - } - if (!isset($aProgramme[$dj][$session['debut'] . "-" . $session['fin']])) { - $aProgramme[$dj][$session['debut'] . "-" . $session['fin']] = []; - } - if (!isset($aProgramme[$dj][$session['debut'] . "-" . $session['fin']][$session['nom']])) { - $aProgramme[$dj][$session['debut'] . "-" . $session['fin']][$session['nom']] = []; - } - $aProgrammeData[$dj][$session['debut'] . "-" . $session['fin']][] = $session; - $aProgramme[$dj][$session['debut'] . "-" . $session['fin']][$session['nom']][] = $session['session_id'] . " : " . $session['titre'] . (' ' . $session['conf1'] . ($session['conf2'] ? (' / ' . $session['conf2']) : '') . ''); - //$aProgramme[$dj][$session['debut'] ."-". $session['fin']][$session['nom']][] = array('id'=>$session['session_id'], 'titre'=> $session['titre'],'conf1'=> $session['titre'],'titre'=> $session['titre']); - } - //var_dump($aProgrammeData['12-11-2009']);die; - if ($only_data) { - return $aProgrammeData; - } - $nbSalles = count($nomSalles); - $tdWith = round(84 / $nbSalles); - - // - $sTable = ''; - $j = 1; - $aRowSpan = []; - - /* On boucle sur chaque journée du programme. */ - foreach ($aProgramme as $journee => $aInfos) { - $journee_aff = date('d/m/Y', strtotime((string) $journee)); - $sTable .= << -

Jour {$j} : {$journee_aff}

-
- - - - - -CODE_HTML; - $s = 1; - $confNumber = 0; - foreach ($nomSalles as $idSalle => $nomSalle) { - $sTable .= <<{$nomSalle} - -CODE_HTML; - $aRowSpan[$idSalle] = 0; - $s++; - } - $sTable .= << - - - -CODE_HTML; - /* On boucle maintenant sur chaque demi-heure de l'agenda (de 08h00 à 18h00 */ - for ($h = 8; $h < 19; $h++) { - for ($i = 0; $i < 12; $i++) { - $bKeynote = false; - $m = sprintf('%02d', 5 * $i); - $m_next = sprintf('%02d', (5 * ($i + 1)) % 60); - $style = ($i % 2 == 0) ? 'lp' : 'li'; - $sHeure = ($h < 10) ? '0' . $h : $h; - $h_next = ($i < 11) ? $h : $h + 1; - $sHeure_next = ($h_next < 10) ? '0' . $h_next : $h_next; - /* Création de la ligne avec la cellule indiquant l'heure */ - $sTable .= << - - -CODE_HTML; - - /* On cherche les scéances commençant à cette heure pour chaque salle. */ - foreach ($nomSalles as $idSalle => $nomSalle) { - /* On vérifie qu'on est pas déjà sur une scéance commencée à un tour précédent. */ - if ($aRowSpan[$idSalle] <= 1): - $bSeance = false; - $rs = null; - /* Calcul du nombre de lignes occupées par la scéance s'il y en a une. */ - for ($c = 0; $c < $nbConf; $c++): - //var_dump($aAgenda[$c]); - if ( - $aAgenda[$c]['debut'] == $sHeure . ":" . $m - && $aAgenda[$c]['id_salle'] == $idSalle - && $aAgenda[$c]['jour'] == $journee - ): - /* Si on toruve une scéance, on ne mettra pas de cellule vide. */ - $bSeance = true; - - $bKeynote = $aAgenda[$c]['keynote']; - $colspan = $bKeynote ? ' colspan="' . $nbSalles . '" class="keynote" ' : ''; - $heures = $aAgenda[$c]['debut'] . "-" . $aAgenda[$c]['fin']; - $nl = $this->dureeSeance($heures); - $aRowSpan[$idSalle] = $nl; - - $class = 'conf conf_' . ($confNumber % 2 === 0 ? 'odd' : 'even'); - - $rs = ($nl > 1) ? ' rowspan="' . $nl . '"' : null; - $nbSeances = (isset($aInfos[$heures][$nomSalle])) ? count($aInfos[$heures][$nomSalle]) : 0; - if ($nbSeances > 0): - $conflit = $nbSeances > 1 ? ' style="color: inherit; background-color: #f99"' : null; - $sTable .= << - -CODE_HTML; - for ($sc = 0; $sc < $nbSeances; $sc++): - - $lien = $this->lienSeance($aInfos[$heures][$nomSalle][$sc], $for_bo, $linkFormat); - //$lien = '

$2

'; - $sTable .= $lien; - endfor; - $sTable .= ""; - $confNumber++; - endif; - break; - endif; - endfor; - if (in_array($sHeure . '_' . $m . '_' . $journee, ['17_00_12-11-2009', '10_30_12-11-2009'])) { - $bKeynote = true; - } - if (false === $bSeance && !$bKeynote): - $sTable .= "
"; - endif; - else: - $aRowSpan[$idSalle]--; - endif; - } - $sTable .= " "; - } - } - $sTable .= << -
 
{$sHeure}h{$m} - {$sHeure_next}h{$m_next}  

- -CODE_HTML; - $j++; - } - } else { - // Aucune donnée dans la base. Affichage alternatif. - $sTable = <<Aucune entrée disponible. - -CODE_HTML; - } - return $sTable; - } - - public function ajouter( - $titre, - $nb_places, - array $date_debut, - $date_fin, - $date_fin_appel_projet, - $date_fin_appel_conferencier, - $date_fin_vote, - $date_fin_prevente, - $date_fin_vente, - $date_fin_vente_token_sponsor, - $date_fin_saisie_repas_speakers, - $date_fin_saisie_nuites_hotel, - $date_annonce_planning, - $chemin_template, - array $text, - $logoUrl, - $placeName, - $placeAddress, - $voteEnabled = true, - $speakersDinerEnabled = true, - $accomodationEnabled = true, - $waitingListUrl = null, - $hasPricesDefinedWithVat = false, - $transportInformationEnabled = false, - ) { - $requete = 'INSERT INTO '; - $requete .= ' afup_forum (id, titre, nb_places, date_debut, date_fin, annee, date_fin_appel_projet,'; - $requete .= ' date_fin_appel_conferencier, date_fin_vote, date_fin_prevente, date_fin_vente, date_fin_vente_token_sponsor, date_fin_saisie_repas_speakers, date_fin_saisie_nuites_hotel, date_annonce_planning, path, `text`, - `logo_url`, `place_name`, `has_prices_defined_with_vat`, `vote_enabled`, `speakers_diner_enabled`, `accomodation_enabled`, `waiting_list_url`, `place_address`, `transport_information_enabled`) '; - $requete .= 'VALUES (null,'; - $requete .= $this->_bdd->echapper($titre) . ','; - $requete .= (int) $nb_places . ','; - $requete .= $this->_bdd->echapperSqlDateFromQuickForm($date_debut) . ','; - $requete .= $this->_bdd->echapperSqlDateFromQuickForm($date_fin) . ','; - $requete .= (int) $date_debut['Y'] . ','; - $requete .= $this->_bdd->echapperSqlDateFromQuickForm($date_fin_appel_projet, true) . ','; - $requete .= $this->_bdd->echapperSqlDateFromQuickForm($date_fin_appel_conferencier, true) . ','; - $requete .= $this->_bdd->echapperSqlDateFromQuickForm($date_fin_vote, false) . ','; - $requete .= $this->_bdd->echapperSqlDateFromQuickForm($date_fin_prevente, true) . ','; - $requete .= $this->_bdd->echapperSqlDateFromQuickForm($date_fin_vente, true) . ','; - $requete .= $this->_bdd->echapperSqlDateFromQuickForm($date_fin_vente_token_sponsor, true) . ','; - $requete .= $this->_bdd->echapperSqlDateFromQuickForm($date_fin_saisie_repas_speakers, true) . ','; - $requete .= $this->_bdd->echapperSqlDateFromQuickForm($date_fin_saisie_nuites_hotel, true) . ','; - $requete .= $this->_bdd->echapperSqlDateFromQuickForm($date_annonce_planning, true) . ','; - $requete .= $this->_bdd->echapper($chemin_template) . ','; - $requete .= $this->_bdd->echapper(json_encode($text)) . ', '; - $requete .= $this->_bdd->echapper($logoUrl) . ','; - $requete .= $this->_bdd->echapper($placeName) . ','; - $requete .= $this->_bdd->echapper($hasPricesDefinedWithVat ? 1 : 0) . ','; - $requete .= $this->_bdd->echapper($voteEnabled ? 1 : 0) . ','; - $requete .= $this->_bdd->echapper($speakersDinerEnabled ? 1 : 0) . ','; - $requete .= $this->_bdd->echapper($accomodationEnabled ? 1 : 0) . ','; - $requete .= $this->_bdd->echapper($waitingListUrl) . ','; - $requete .= $this->_bdd->echapper($placeAddress) . ','; - $requete .= $this->_bdd->echapper($transportInformationEnabled ? 1 : 0); - - $requete .= ')'; - - return $this->_bdd->executer($requete); - } - - public function modifier( - string $id, - $titre, - $nb_places, - array $date_debut, - $date_fin, - $date_fin_appel_projet, - $date_fin_appel_conferencier, - $date_fin_vote, - $date_fin_prevente, - $date_fin_vente, - $date_fin_vente_token_sponsor, - $date_fin_saisie_repas_speakers, - $date_fin_saisie_nuites_hotel, - $date_annonce_planning, - $chemin_template, - array $text, - $logoUrl = null, - $placeName = null, - $placeAddress = null, - $voteEnabled = true, - $speakersDinerEnabled = true, - $accomodationEnabled = true, - $waitingListUrl = null, - $hasPricesDefinedWithVat = false, - $transportInformationEnabled = false, - ) { - $requete = 'UPDATE '; - $requete .= ' afup_forum '; - $requete .= 'SET'; - $requete .= ' titre=' . $this->_bdd->echapper($titre) . ','; - $requete .= ' nb_places=' . (int) $nb_places . ','; - $requete .= ' date_debut=' . $this->_bdd->echapperSqlDateFromQuickForm($date_debut) . ','; - $requete .= ' date_fin=' . $this->_bdd->echapperSqlDateFromQuickForm($date_fin) . ','; - $requete .= ' annee=' . (int) $date_debut['Y'] . ','; - $requete .= ' date_fin_appel_projet=' . $this->_bdd->echapperSqlDateFromQuickForm($date_fin_appel_projet, true) . ','; - $requete .= ' date_fin_appel_conferencier=' . $this->_bdd->echapperSqlDateFromQuickForm($date_fin_appel_conferencier, true) . ','; - $requete .= ' date_fin_vote=' . $this->_bdd->echapperSqlDateFromQuickForm($date_fin_vote, false) . ','; - $requete .= ' date_fin_prevente=' . $this->_bdd->echapperSqlDateFromQuickForm($date_fin_prevente, true) . ','; - $requete .= ' date_fin_vente=' . $this->_bdd->echapperSqlDateFromQuickForm($date_fin_vente, true) . ','; - $requete .= ' date_fin_vente_token_sponsor=' . $this->_bdd->echapperSqlDateFromQuickForm($date_fin_vente_token_sponsor, true) . ','; - $requete .= ' date_fin_saisie_repas_speakers=' . $this->_bdd->echapperSqlDateFromQuickForm($date_fin_saisie_repas_speakers, true) . ','; - $requete .= ' date_fin_saisie_nuites_hotel=' . $this->_bdd->echapperSqlDateFromQuickForm($date_fin_saisie_nuites_hotel, true) . ','; - $requete .= ' date_annonce_planning=' . $this->_bdd->echapperSqlDateFromQuickForm($date_annonce_planning, true) . ','; - $requete .= ' path=' . $this->_bdd->echapper($chemin_template) . ', '; - $requete .= ' `text` = ' . $this->_bdd->echapper(json_encode($text)) . ', '; - $requete .= ' `logo_url` = ' . $this->_bdd->echapper($logoUrl) . ', '; - $requete .= ' `place_name` = ' . $this->_bdd->echapper($placeName) . ', '; - $requete .= ' `vote_enabled` = ' . $this->_bdd->echapper($voteEnabled ? 1 : 0) . ', '; - $requete .= ' `has_prices_defined_with_vat` = ' . $this->_bdd->echapper($hasPricesDefinedWithVat ? 1 : 0) . ', '; - $requete .= ' `speakers_diner_enabled` = ' . $this->_bdd->echapper($speakersDinerEnabled ? 1 : 0) . ', '; - $requete .= ' `accomodation_enabled` = ' . $this->_bdd->echapper($accomodationEnabled ? 1 : 0) . ', '; - $requete .= ' `waiting_list_url` = ' . $this->_bdd->echapper($waitingListUrl) . ','; - $requete .= ' `place_address` = ' . $this->_bdd->echapper($placeAddress) . ', '; - $requete .= ' `transport_information_enabled` = ' . $this->_bdd->echapper($transportInformationEnabled ? 1 : 0) . ' '; - $requete .= 'WHERE'; - $requete .= ' id=' . $id; - - return $this->_bdd->executer($requete); - } - - public function supprimer($id_forum) - { - $id_forum = $this->_bdd->echapper($id_forum); - - $requete = 'DELETE FROM afup_forum WHERE id = ' . $id_forum; - - return $this->_bdd->executer($requete); - } -} diff --git c/sources/Afup/Pagination.php i/sources/Afup/Pagination.php deleted file mode 100644 index a8d6b4959..000000000 --- c/sources/Afup/Pagination.php +++ /dev/null @@ -1,35 +0,0 @@ -nombre_elements_total / $this->nombre_elements_par_page); - $pages = []; - for ($i = 1; $i <= $page_max; $i++) { - $pages[] = $i; - } - - $smarty->assign('pagination_page_courante', $this->page_courante); - $smarty->assign('pagination_pages', $pages); - - $smarty->register_function('pagination_genere_route', $this->genere_route, false); - - ob_start(); - $smarty->display('pagination.html'); - return (string) ob_get_clean(); - } -} diff --git c/sources/Afup/Utils/Base_De_Donnees.php i/sources/Afup/Utils/Base_De_Donnees.php deleted file mode 100644 index 3847fe03a..000000000 --- c/sources/Afup/Utils/Base_De_Donnees.php +++ /dev/null @@ -1,252 +0,0 @@ -config = [ - 'host' => $host, - 'database' => $database, - 'user' => $user, - 'password' => $password, - 'port' => $port, - ]; - } - - public function getDbLink() - { - if ($this->link === null) { - $this->link = mysqli_connect($this->config['host'], $this->config['user'], $this->config['password'], null, (int) $this->config['port']) or die('Connexion à la base de données impossible'); - mysqli_set_charset($this->link, "utf8mb4"); - $this->selectionnerBase($this->config['database']); - } - return $this->link; - } - - /** - * Sélectionne la base de données indiquée - * - * @param string $nom Nom de la base - */ - public function selectionnerBase($nom): bool - { - return mysqli_select_db($this->getDbLink(), $nom); - } - - /** - * Prépare une valeur qui va être incorporée dans une requête SQL - * - * @param mixed $valeur Valeur à traiter - * @return string La valeur traitée - */ - public function echapper($valeur): string - { - if (is_string($valeur)) { - $valeur = "'" . mysqli_real_escape_string($this->getDbLink(), $valeur) . "'"; - } elseif (is_null($valeur)) { - $valeur = 'NULL'; - } - return (string) $valeur; - } - - /** - * - * @param array $date - * @param boolean $timestamp - * @return int|string - */ - public function echapperSqlDateFromQuickForm($date, $timestamp = false) - { - $dateChaine = $date['Y'] . '-' . $date['M'] . '-' . $date['d']; - if (isset($date['H']) && isset($date['i'])) { - $dateChaine .= ' ' . $date['H'] . ':' . $date['i']; - if (isset($date['s'])) { - $dateChaine .= ':' . $date['s']; - } - } - if ($timestamp) { - return strtotime($dateChaine); - } else { - return $this->echapper($dateChaine); - } - } - - /** - * Retrieve the last error message - * @return string - */ - public function getLastErrorMessage(): ?string - { - return mysqli_error($this->getDbLink()); - } - - /** - * Exécute une requête SQL - * - * @param string $requete Requête à exécuter - * @return bool - */ - public function executer($requete) - { - $result = mysqli_query($this->getDbLink(), $requete); - if (!$result) { - throw new \RuntimeException(mysqli_error($this->getDbLink())); - } - - return $result; - } - - /** - * Exécute une requête SQL et retourne le premier champ du premier enregistrement - * - * @param string $requete Requête à exécuter - * @return mixed Le premier champ du premier enregistrement ou false si la requête échoue - */ - public function obtenirUn($requete) - { - $enregistrement = $this->obtenirEnregistrement($requete, MYSQLI_NUM); - if ($enregistrement === false) { - return false; - } else { - return $enregistrement[0]; - } - } - - /** - * Exécute une requête SQL et retourne le premier enregistrement correspondant - * - * @param string $requete Requête à exécuter - * @param int $type Type de résultat souhaité. Les valeurs possibles sont MYSQLI_ASSOC, MYSQLI_NUM, MYSQLI_BOTH. - * Elles permettent respectivement de récupérer les valeurs sous forme d'un tableau associatif, indexé ou les deux. - * La valeur par défaut est MYSQLI_ASSOC. - * @return mixed L'enregistrement correspondant dans un tableau ou false si la requête échoue - */ - public function obtenirEnregistrement($requete, $type = MYSQLI_ASSOC) - { - $ressource = mysqli_query($this->getDbLink(), $requete); - if ($ressource === false) { - return false; - } - $enregistrement = mysqli_fetch_array($ressource, $type); - mysqli_free_result($ressource); - - if ($enregistrement === null) { - return false; - } else { - return $enregistrement; - } - } - - /** - * Exécute une requête SQL et retourne les enregistrements correspondant - * - * @param string $requete Requête à exécuter - * @param int $type Type de résultat souhaité. Les valeurs possibles sont MYSQLI_ASSOC, MYSQLI_NUM, MYSQLI_BOTH. - * Elles permettent respectivement de récupérer les valeurs sous forme d'un tableau associatif, indexé ou les deux. - * La valeur par défaut est MYSQLI_ASSOC. - * @return array|false Les enregistrements correspondant dans un tableau ou false si la requête échoue - */ - public function obtenirTous($requete, $type = MYSQLI_ASSOC) - { - $ressource = mysqli_query($this->getDbLink(), $requete); - if ($ressource === false) { - return false; - } - - $resultat = []; - while ($enregistrement = mysqli_fetch_array($ressource, $type)) { - $resultat[] = $enregistrement; - } - mysqli_free_result($ressource); - - return $resultat; - } - - /** - * Exécute une requête SQL et retourne les enregistrements correspondant - * - * @param string $requete Requête à exécuter - * @return mixed Les enregistrements correspondant dans un tableau ou false si la requête échoue - */ - public function obtenirColonne($requete) - { - $ressource = mysqli_query($this->getDbLink(), $requete); - if ($ressource === false) { - return false; - } - - $resultat = []; - while ($enregistrement = mysqli_fetch_array($ressource)) { - $resultat[] = $enregistrement[0]; - } - mysqli_free_result($ressource); - - return $resultat; - } - - /** - * Exécute une requête SQL et retourne les enregistrements correspondant dans un tableau associatif dont le premier champ est la clé - * - * @param string $requete Requête à exécuter - * @return array|false Les enregistrements correspondant dans un tableau associatif ou false si la requête échoue - */ - public function obtenirAssociatif($requete) - { - $ressource = mysqli_query($this->getDbLink(), $requete); - $nombre_champs = mysqli_num_fields($ressource); - if ($ressource === false || $nombre_champs < 2) { - return false; - } - - // $i = 0; - // $champs = array(); - // while ($i < $nombre_champs) { - // $champs[$i] = MYSQLI_field_name($ressource, $i); - // $i++; - // } - $champs = mysqli_fetch_fields($ressource); - - $resultat = []; - if ($nombre_champs == 2) { - while ($enregistrement = mysqli_fetch_array($ressource, MYSQLI_NUM)) { - $resultat[$enregistrement[0]] = $enregistrement[1]; - } - } else { - while ($enregistrement = mysqli_fetch_array($ressource, MYSQLI_ASSOC)) { - $resultat[$enregistrement[$champs[0]->name]] = array_slice($enregistrement, 1); - } - } - mysqli_free_result($ressource); - - return $resultat; - } - - public function obtenirDernierId() - { - return mysqli_insert_id($this->getDbLink()); - } -} diff --git c/sources/Afup/Utils/LegacyConnectionFactory.php i/sources/Afup/Utils/LegacyConnectionFactory.php deleted file mode 100644 index c3522cb47..000000000 --- c/sources/Afup/Utils/LegacyConnectionFactory.php +++ /dev/null @@ -1,23 +0,0 @@ -bdd)) { - if (isset($GLOBALS['AFUP_DB']) === false) { - throw new \RuntimeException('Could not find the legacy database connexion'); - } - - $this->bdd = $GLOBALS['AFUP_DB']; - } - - return $this->bdd; - } -} diff --git c/sources/Afup/fonctions.php i/sources/Afup/fonctions.php deleted file mode 100644 index d48e43038..000000000 --- c/sources/Afup/fonctions.php +++ /dev/null @@ -1,128 +0,0 @@ -removeAttribute('name'); - return $formulaire; -} - -/** - * Renvoit un tableau contenant les éléments d'un formulaire - * - * @param HTML_QuickForm $formulaire Formulaire à traiter - * @return array - */ -function genererFormulaire(HTML_QuickForm &$formulaire) -{ - foreach ($formulaire->getElements() as $el) { - $attrs = $el->getAttributes(); - if ($el instanceof HTML_QuickForm_submit) { - $attrs['class'] = 'ui primary button'; - } - $el->setAttributes($attrs); - } - - $renderer = new HTML_QuickForm_Renderer_Array(true, true); - $formulaire->accept($renderer); - $resultat = $renderer->toArray(); - unset($renderer); - return $resultat; -} - -/** - * Vérifie qu'une action est disponible et si ce n'est pas le cas, renvoit l'action par défaut - * - * L'action par défaut est la première des actions disponibles. - * - * @param array $actions_disponibles Actions disponibles - * @return string - */ -function verifierAction(array $actions_disponibles) -{ - if (count($actions_disponibles) == 0) { - trigger_error("Les actions disponibles doivent être passées sous forme d'un tableau d'au moins un élément", E_USER_ERROR); - } - - if (!empty($_GET['action']) && in_array($_GET['action'], $actions_disponibles)) { - return $_GET['action']; - } else { - return $actions_disponibles[0]; - } -} - -function obtenirTitre($pages, $page) -{ - foreach ($pages as $_page => $_page_details) { - if ($page == $_page) { - return $_page_details['nom']; - } - if (isset($_page_details['elements']) && is_array($_page_details['elements'])) { - foreach ($_page_details['elements'] as $_element => $_element_details) { - if ($page == $_element) { - return $_element_details['nom']; - } - } - } - } - return null; -} - -function chargerForumId(): void -{ - $_GET['id_forum'] ??= $_SESSION['_sf2_attributes'][RedirectEventFromSessionListener::SESSION_KEY] ?? 0; -} - -function checkForumRedirection(): void -{ - $idFromSession = $_SESSION['_sf2_attributes'][RedirectEventFromSessionListener::SESSION_KEY] ?? null; - - if ( - $_SERVER['REQUEST_METHOD'] === 'GET' - && !isset($_GET['id_forum']) - && $idFromSession !== null - ) { - $url = $_SERVER['REQUEST_URI']; - - $parsedUrl = parse_url((string) $url); - parse_str($parsedUrl['query'] ?? '', $queryParams); - - $queryParams['id_forum'] = $idFromSession; - - $newQuery = http_build_query($queryParams); - $newUrl = $parsedUrl['path'] . '?' . $newQuery; - - header("Location: $newUrl"); - exit(); - } -} diff --git c/sources/AppBundle/Association/Form/HTML_QuickForm.php i/sources/AppBundle/Association/Form/HTML_QuickForm.php deleted file mode 100644 index 83a028db0..000000000 --- c/sources/AppBundle/Association/Form/HTML_QuickForm.php +++ /dev/null @@ -1,13 +0,0 @@ -_elements; - } -} diff --git c/sources/AppBundle/Controller/LegacyController.php i/sources/AppBundle/Controller/LegacyController.php deleted file mode 100644 index dca75765c..000000000 --- c/sources/AppBundle/Controller/LegacyController.php +++ /dev/null @@ -1,105 +0,0 @@ -tokenStorage, $this->authorizationChecker); - $pages = $this->backOfficePages; - /** @var Session $session */ - $session = $this->requestStack->getSession(); - - if ($_GET['page'] == 'index' || !file_exists(__DIR__ . '/../../../htdocs/pages/administration/' . $_GET['page'] . '.php')) { - return $this->redirectToRoute('admin_home'); - } - // On vérifie que l'utilisateur a le droit d'accéder à la page - $droits->chargerToutesLesPages($pages); - if (!$droits->verifierDroitSurLaPage($_GET['page'])) { - $this->addFlash('error', "Vous n'avez pas le droit d'accéder à\u{a0}cette page"); - return $this->redirectToRoute('admin_home'); - } - // Initialisation de AFUP_Log - require_once __DIR__ . '/../../../htdocs/pages/administration/' . $_GET['page'] . '.php'; - // On gère des infos popups - if (isset($_SESSION['flash']['message'])) { - $this->addFlash('notice', $_SESSION['flash']['message']); - } - if (isset($_SESSION['flash']['erreur'])) { - $this->addFlash('error', $_SESSION['flash']['erreur']); - } - unset($_SESSION['flash']); - // Récupération du contenu de la page généré par smarty - $content = $smarty->fetch($_GET['page'] . '.html'); - - $file = $_GET['page'] . '.js.html'; - $js = ''; - if ($smarty->templateExists($file)) { - $js = $smarty->fetch($file); - } - - return $this->render('admin/base_with_header.html.twig', [ - 'title' => obtenirTitre($pages, $_GET['page']), - 'page' => $_GET['page'], - 'content' => $content, - 'js' => $js, - ]); - } -} diff --git c/templates/admin/base_with_header.html.twig i/templates/admin/base_with_header.html.twig index 2bf4175e8..06ef65edc 100644 --- c/templates/admin/base_with_header.html.twig +++ i/templates/admin/base_with_header.html.twig @@ -207,10 +207,6 @@ } - - {% if js is defined %} - {{ js|raw }} - {% endif %} {% endblock %} {% endblock %} --- app/config/routing/admin.yml | 4 - app/config/services.yml | 22 - composer.json | 42 +- composer.lock | 187 +-- .../ADR-002-acces-base-de-donnees.md | 1 - htdocs/pages/administration/index.php | 46 - htdocs/pages/administration/message.php | 25 - htdocs/templates/administration/entete.html | 17 - htdocs/templates/administration/head.html | 16 - htdocs/templates/administration/message.html | 14 - .../templates/administration/pagination.html | 20 - .../administration/pied_de_page.html | 55 - htdocs/templates/commun/formulaire-en.html | 55 - htdocs/templates/commun/formulaire.html | 105 -- ...ml-quickform-html-quickform-date-php.patch | 11 - ...3r-html-quickform-html-quickform-php.patch | 11 - phpstan-baseline.php | 1240 +---------------- phpstan.neon | 4 - sources/Afup/Bootstrap/Cli.php | 27 - sources/Afup/Bootstrap/Http.php | 78 -- sources/Afup/Bootstrap/_Common.php | 19 - sources/Afup/Bootstrap/commonStart.php | 37 - .../Afup/Corporate/_Site_Base_De_Donnees.php | 25 - sources/Afup/Droits.php | 36 - sources/Afup/Forum/Forum.php | 460 ------ sources/Afup/Pagination.php | 35 - sources/Afup/Utils/Base_De_Donnees.php | 252 ---- .../Afup/Utils/LegacyConnectionFactory.php | 23 - sources/Afup/Utils/Mail.php | 27 - sources/Afup/Utils/Mailing.php | 22 - sources/Afup/fonctions.php | 128 -- .../AppBundle/Accounting/InvoicingMailer.php | 8 +- .../Association/Form/HTML_QuickForm.php | 13 - .../Admin/HealthcheckController.php | 12 +- .../AppBundle/Controller/LegacyController.php | 105 -- .../Email/Mailer/Adapter/PhpMailerAdapter.php | 90 -- templates/admin/base_with_header.html.twig | 4 - templates/admin/healthcheck.html.twig | 4 +- 38 files changed, 66 insertions(+), 3214 deletions(-) delete mode 100644 htdocs/pages/administration/index.php delete mode 100644 htdocs/pages/administration/message.php delete mode 100644 htdocs/templates/administration/entete.html delete mode 100644 htdocs/templates/administration/head.html delete mode 100644 htdocs/templates/administration/message.html delete mode 100644 htdocs/templates/administration/pagination.html delete mode 100644 htdocs/templates/administration/pied_de_page.html delete mode 100644 htdocs/templates/commun/formulaire-en.html delete mode 100644 htdocs/templates/commun/formulaire.html delete mode 100644 patches/znk3r-html-quickform-html-quickform-date-php.patch delete mode 100644 patches/znk3r-html-quickform-html-quickform-php.patch delete mode 100644 sources/Afup/Bootstrap/Cli.php delete mode 100644 sources/Afup/Bootstrap/Http.php delete mode 100644 sources/Afup/Corporate/_Site_Base_De_Donnees.php delete mode 100644 sources/Afup/Forum/Forum.php delete mode 100644 sources/Afup/Pagination.php delete mode 100644 sources/Afup/Utils/Base_De_Donnees.php delete mode 100644 sources/Afup/Utils/LegacyConnectionFactory.php delete mode 100644 sources/Afup/Utils/Mail.php delete mode 100644 sources/Afup/Utils/Mailing.php delete mode 100644 sources/Afup/fonctions.php delete mode 100644 sources/AppBundle/Association/Form/HTML_QuickForm.php delete mode 100644 sources/AppBundle/Controller/LegacyController.php delete mode 100644 sources/AppBundle/Email/Mailer/Adapter/PhpMailerAdapter.php diff --git a/app/config/routing/admin.yml b/app/config/routing/admin.yml index d52a8b7ce..7e5ed08d7 100644 --- a/app/config/routing/admin.yml +++ b/app/config/routing/admin.yml @@ -6,10 +6,6 @@ admin_relances: path: /association/relances/{page} defaults: {_controller: AppBundle\Controller\Admin\Membership\ReminderLogAction} -admin_void: - path: /void - defaults: {_controller: AppBundle\Controller\LegacyController::backOffice} - admin_members: resource: "admin_members.yml" prefix: /members diff --git a/app/config/services.yml b/app/config/services.yml index d583e6735..3eaf303bc 100644 --- a/app/config/services.yml +++ b/app/config/services.yml @@ -75,13 +75,6 @@ services: ### Pages legacy - FIN - AppBundle\Controller\LegacyController: - autowire: true - autoconfigure: true - public: false - arguments: - $backOfficePages: '%app.pages_backoffice%' - AppBundle\Payment\PayboxFactory: autowire: true arguments: ["@router", "%paybox_domain_server%", "%paybox_secret_key%", "%paybox_site%", "%paybox_rang%", "%paybox_identifiant%"] @@ -125,11 +118,6 @@ services: $mailchimp: '@app.mailchimp_api' $listId: "%mailchimp_members_list%" - mailer.adapter.php: - class: AppBundle\Email\Mailer\Adapter\PhpMailerAdapter - factory: [AppBundle\Email\Mailer\Adapter\PhpMailerAdapter, createFromConfiguration] - arguments: ['@Afup\Site\Utils\Configuration'] - mailer.adapter.symfony: class: AppBundle\Email\Mailer\Adapter\SymfonyMailerAdapter autowire: true @@ -154,19 +142,9 @@ services: Afup\Site\Utils\Configuration: autowire: true - Afup\Site\Utils\LegacyConnectionFactory: ~ - Afup\Site\Utils\Base_De_Donnees: - factory: '@Afup\Site\Utils\LegacyConnectionFactory' - - Afup\Site\Forum\Forum: - autowire: true - Afup\Site\Utils\Pays: autowire: true - Afup\Site\Forum\Inscriptions: - autowire: true - AppBundle\Accounting\Invoices\Generator\MemberInvoiceGenerator: ~ AppBundle\Accounting\Invoices\Generator\CompanyMemberInvoiceGenerator: ~ diff --git a/composer.json b/composer.json index 83ca4454f..d44f7ecb9 100644 --- a/composer.json +++ b/composer.json @@ -35,7 +35,6 @@ "league/oauth2-github": "^3.1", "nyholm/psr7": "^1.8", "pear/pear": "^1.10", - "phpmailer/phpmailer": "^6.12", "phpoffice/phpspreadsheet": "^5.7.0", "pimple/pimple": "^3.6", "presta/sitemap-bundle": "^4.3", @@ -43,7 +42,6 @@ "robmorgan/phinx": "0.16.*", "sabre/vobject": "^4.6", "setasign/tfpdf": "^1.33", - "smarty/smarty": "^5.8", "symfony/asset": "7.4.*", "symfony/asset-mapper": "7.4.*", "symfony/clock": "7.4.*", @@ -73,9 +71,7 @@ "twig/intl-extra": "^3.26", "twig/string-extra": "^3.24", "twig/twig": "^3.27", - "webmozart/assert": "^2.4", - "znk3r/html_common": "*", - "znk3r/html_quickform": "4.0.2" + "webmozart/assert": "^2.4" }, "scripts": { "post-install-cmd": [ @@ -104,10 +100,6 @@ "patches": { "setasign/tfpdf": [ "patches/setasign-tfpdf-tfpdf-php.patch" - ], - "znk3r/html_quickform": [ - "patches/znk3r-html-quickform-html-quickform-date-php.patch", - "patches/znk3r-html-quickform-html-quickform-php.patch" ] }, "symfony-app-dir": "app", @@ -176,38 +168,6 @@ "tomasvotruba/type-coverage": "^2.2" }, "repositories": [ - { - "type": "package", - "package": { - "name": "znk3r/html_quickform", - "version": "4.0.2", - "dist": { - "url": "https://github.com/macintoshplus/HTML_QuickForm/archive/v4.0.2.zip", - "type": "zip" - }, - "autoload": { - "classmap": [ - "HTML/" - ] - } - } - }, - { - "type": "package", - "package": { - "name": "znk3r/html_common", - "version": "v2.0.1", - "dist": { - "url": "https://github.com/znk3r/HTML_Common/archive/v2.0.1.zip", - "type": "zip" - }, - "autoload": { - "classmap": [ - "HTML/" - ] - } - } - }, { "type": "package", "package": { diff --git a/composer.lock b/composer.lock index aa336a75b..d615a060c 100644 --- a/composer.lock +++ b/composer.lock @@ -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": "59e380a093941853e321ac2c73ba793f", + "content-hash": "1e640736f643d9fc8df9261fac72f28b", "packages": [ { "name": "algolia/algoliasearch-client-php", @@ -4296,87 +4296,6 @@ }, "time": "2024-10-02T11:20:13+00:00" }, - { - "name": "phpmailer/phpmailer", - "version": "v6.12.0", - "source": { - "type": "git", - "url": "https://github.com/PHPMailer/PHPMailer.git", - "reference": "d1ac35d784bf9f5e61b424901d5a014967f15b12" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/d1ac35d784bf9f5e61b424901d5a014967f15b12", - "reference": "d1ac35d784bf9f5e61b424901d5a014967f15b12", - "shasum": "" - }, - "require": { - "ext-ctype": "*", - "ext-filter": "*", - "ext-hash": "*", - "php": ">=5.5.0" - }, - "require-dev": { - "dealerdirect/phpcodesniffer-composer-installer": "^1.0", - "doctrine/annotations": "^1.2.6 || ^1.13.3", - "php-parallel-lint/php-console-highlighter": "^1.0.0", - "php-parallel-lint/php-parallel-lint": "^1.3.2", - "phpcompatibility/php-compatibility": "^9.3.5", - "roave/security-advisories": "dev-latest", - "squizlabs/php_codesniffer": "^3.7.2", - "yoast/phpunit-polyfills": "^1.0.4" - }, - "suggest": { - "decomplexity/SendOauth2": "Adapter for using XOAUTH2 authentication", - "ext-mbstring": "Needed to send email in multibyte encoding charset or decode encoded addresses", - "ext-openssl": "Needed for secure SMTP sending and DKIM signing", - "greew/oauth2-azure-provider": "Needed for Microsoft Azure XOAUTH2 authentication", - "hayageek/oauth2-yahoo": "Needed for Yahoo XOAUTH2 authentication", - "league/oauth2-google": "Needed for Google XOAUTH2 authentication", - "psr/log": "For optional PSR-3 debug logging", - "symfony/polyfill-mbstring": "To support UTF-8 if the Mbstring PHP extension is not enabled (^1.2)", - "thenetworg/oauth2-azure": "Needed for Microsoft XOAUTH2 authentication" - }, - "type": "library", - "autoload": { - "psr-4": { - "PHPMailer\\PHPMailer\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "LGPL-2.1-only" - ], - "authors": [ - { - "name": "Marcus Bointon", - "email": "phpmailer@synchromedia.co.uk" - }, - { - "name": "Jim Jagielski", - "email": "jimjag@gmail.com" - }, - { - "name": "Andy Prevost", - "email": "codeworxtech@users.sourceforge.net" - }, - { - "name": "Brent R. Matzelle" - } - ], - "description": "PHPMailer is a full-featured email creation and transfer class for PHP", - "support": { - "issues": "https://github.com/PHPMailer/PHPMailer/issues", - "source": "https://github.com/PHPMailer/PHPMailer/tree/v6.12.0" - }, - "funding": [ - { - "url": "https://github.com/Synchro", - "type": "github" - } - ], - "time": "2025-10-15T16:49:08+00:00" - }, { "name": "phpoffice/phpspreadsheet", "version": "5.7.0", @@ -5538,82 +5457,6 @@ }, "time": "2022-12-20T10:26:07+00:00" }, - { - "name": "smarty/smarty", - "version": "v5.8.0", - "source": { - "type": "git", - "url": "https://github.com/smarty-php/smarty.git", - "reference": "78d259d3b971c59a0cd719c270cc5cbb740c36a7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/smarty-php/smarty/zipball/78d259d3b971c59a0cd719c270cc5cbb740c36a7", - "reference": "78d259d3b971c59a0cd719c270cc5cbb740c36a7", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0", - "symfony/polyfill-mbstring": "^1.27" - }, - "require-dev": { - "phpunit/phpunit": "^8.5 || ^7.5", - "smarty/smarty-lexer": "^4.0.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.0.x-dev" - } - }, - "autoload": { - "files": [ - "src/functions.php" - ], - "psr-4": { - "Smarty\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "LGPL-3.0" - ], - "authors": [ - { - "name": "Monte Ohrt", - "email": "monte@ohrt.com" - }, - { - "name": "Uwe Tews", - "email": "uwe.tews@googlemail.com" - }, - { - "name": "Rodney Rehm", - "email": "rodney.rehm@medialize.de" - }, - { - "name": "Simon Wisselink", - "homepage": "https://www.iwink.nl/" - } - ], - "description": "Smarty - the compiling PHP template engine", - "homepage": "https://smarty-php.github.io/smarty/", - "keywords": [ - "templating" - ], - "support": { - "forum": "https://github.com/smarty-php/smarty/discussions", - "issues": "https://github.com/smarty-php/smarty/issues", - "source": "https://github.com/smarty-php/smarty/tree/v5.8.0" - }, - "funding": [ - { - "url": "https://github.com/wisskid", - "type": "github" - } - ], - "time": "2026-02-15T14:27:15+00:00" - }, { "name": "symfony/asset", "version": "v7.4.8", @@ -11069,34 +10912,6 @@ "source": "https://github.com/geocoder-php/php-common/tree/5.0.0" }, "time": "2025-01-01T15:52:42+00:00" - }, - { - "name": "znk3r/html_common", - "version": "v2.0.1", - "dist": { - "type": "zip", - "url": "https://github.com/znk3r/HTML_Common/archive/v2.0.1.zip" - }, - "type": "library", - "autoload": { - "classmap": [ - "HTML/" - ] - } - }, - { - "name": "znk3r/html_quickform", - "version": "4.0.2", - "dist": { - "type": "zip", - "url": "https://github.com/macintoshplus/HTML_QuickForm/archive/v4.0.2.zip" - }, - "type": "library", - "autoload": { - "classmap": [ - "HTML/" - ] - } } ], "packages-dev": [ diff --git a/doc/decisions/ADR-002-acces-base-de-donnees.md b/doc/decisions/ADR-002-acces-base-de-donnees.md index 2c563a566..a2d463de6 100644 --- a/doc/decisions/ADR-002-acces-base-de-donnees.md +++ b/doc/decisions/ADR-002-acces-base-de-donnees.md @@ -13,7 +13,6 @@ Le projet web de l'AFUP a beaucoup d'historique et a vu passer beaucoup d'évolu Il y a à ce jour 3 façon d'accéder à la base de données : - [Ting][ting] : un datamapper léger - [Doctrine DBAL][doctrine-dbal] : un query builder -- La classe `Base_De_Donnees` : un wrapper autour des fonctions `mysqli_*` ## Décision diff --git a/htdocs/pages/administration/index.php b/htdocs/pages/administration/index.php deleted file mode 100644 index a687583ba..000000000 --- a/htdocs/pages/administration/index.php +++ /dev/null @@ -1,46 +0,0 @@ -getResponse(); -$response->send(); - -$kernel->getKernel()->terminate($request, $response); diff --git a/htdocs/pages/administration/message.php b/htdocs/pages/administration/message.php deleted file mode 100644 index 6b61296b4..000000000 --- a/htdocs/pages/administration/message.php +++ /dev/null @@ -1,25 +0,0 @@ -assign('message', stripslashes((string) $_GET['message'])); - $smarty->assign('url' , $_GET['url']); - $smarty->assign('erreur' , $_GET['erreur']); - $smarty->display('message.html'); - - // On s'arrête là pour ne pas afficher le pied de page - exit; diff --git a/htdocs/templates/administration/entete.html b/htdocs/templates/administration/entete.html deleted file mode 100644 index d90b1e45b..000000000 --- a/htdocs/templates/administration/entete.html +++ /dev/null @@ -1,17 +0,0 @@ - - - - {include file="head.html"} - - - - - -
-
-
diff --git a/htdocs/templates/administration/head.html b/htdocs/templates/administration/head.html deleted file mode 100644 index 0d071506d..000000000 --- a/htdocs/templates/administration/head.html +++ /dev/null @@ -1,16 +0,0 @@ - - - {$titre_page} - Administration AFUP - - - - - - - - - - - - - diff --git a/htdocs/templates/administration/message.html b/htdocs/templates/administration/message.html deleted file mode 100644 index 2a867bae4..000000000 --- a/htdocs/templates/administration/message.html +++ /dev/null @@ -1,14 +0,0 @@ - - - - - {include file="head.html"} - - - -
- {$message|escape|nl2br}

-

Poursuivre

-
- - \ No newline at end of file diff --git a/htdocs/templates/administration/pagination.html b/htdocs/templates/administration/pagination.html deleted file mode 100644 index ddf0221cb..000000000 --- a/htdocs/templates/administration/pagination.html +++ /dev/null @@ -1,20 +0,0 @@ -
- - {if ($numero_page < $nombre_pages)} - - {/if} - {$numero_page}/{$nombre_pages} - {if $numero_page > 1} - - {/if} -
diff --git a/htdocs/templates/administration/pied_de_page.html b/htdocs/templates/administration/pied_de_page.html deleted file mode 100644 index 99f719cb5..000000000 --- a/htdocs/templates/administration/pied_de_page.html +++ /dev/null @@ -1,55 +0,0 @@ -
-
- -
-
-
- - - - {if $flash_message} -
-

{$flash_message|escape|nl2br}

-
- - {literal} - - {/literal} - {/if} - - - - - diff --git a/htdocs/templates/commun/formulaire-en.html b/htdocs/templates/commun/formulaire-en.html deleted file mode 100644 index 9a18c8783..000000000 --- a/htdocs/templates/commun/formulaire-en.html +++ /dev/null @@ -1,55 +0,0 @@ - -{$formulaire.hidden} - {if isset($erreur)} -

{$erreur}

- {/if} - - {foreach from=$formulaire.sections item=section} - - {if $section.header}{$section.header}{/if} - - {foreach from=$section.elements item=element} -
- {if $element.type == 'submit'} - {$element.html} - {elseif $element.type == 'static' && ($element.name == 'html')} -

{$element.html|nl2br}

- {elseif $element.type == 'static' && ($element.name == 'note')} -

{$element.html|nl2br}

- {elseif $element.type == 'static' && ($element.name == 'raccourci')} -

{$element.html|nl2br}

- {elseif $element.type == 'group'} - {if $element.label != ''} - - {/if} - - {foreach from=$element.elements item=element_groupe name=groupe} - {$element_groupe.html} - {if !$smarty.foreach.groupe.last}{$element.separator}{/if} - {/foreach} - {if $element.error}

{$element.error}

{/if} -
- {else} - {if $element.label != ''} - - {/if} - - {$element.html} - {if $element.error}

{$element.error}

{/if} -
- {/if} -
- {/foreach} - - -
 
- - {/foreach} -

* required field

- diff --git a/htdocs/templates/commun/formulaire.html b/htdocs/templates/commun/formulaire.html deleted file mode 100644 index 37adaf057..000000000 --- a/htdocs/templates/commun/formulaire.html +++ /dev/null @@ -1,105 +0,0 @@ -{assign var='auMoinsUnChampsRequis' value=false} - -{$formulaire.hidden} - {if isset($erreur)} -

{$erreur}

- {/if} - - {foreach from=$formulaire.sections key=num item=section} - -
- {if $section.header} -

{$section.header}

-
- {/if} - - {foreach from=$section.elements item=element} - {if $element.required}{assign var='auMoinsUnChampsRequis' value=true}{/if} -
- - {if $element.error} -
-
-
-
-
- {$element.error} -
-
-
- {/if} - -
- {if $element.type == 'submit'} - -
- {$element.html} -
- {elseif $element.type == 'static' && ($element.name == 'html')} -

{$element.html|nl2br}

- {elseif $element.type == 'static' && ($element.name == 'note')} - -
- {$element.html|nl2br} -
- {elseif $element.type == 'static' && ($element.name == 'info')} - -
- {$element.html} -
- {elseif $element.type == 'static' && ($element.name == 'label')} - - {elseif $element.type == 'static' && ($element.name == 'raccourci')} -

{$element.html|nl2br}

- {elseif $element.type == 'group'} - {if $element.label != ''} - - {/if} -
- {foreach from=$element.elements item=element_groupe name=groupe} -
- {$element_groupe.html} -
- {if !$smarty.foreach.groupe.last}{$element.separator}{/if} - {/foreach} -
- {elseif $element.type == 'text' or $element.type == 'select' or $element.type == 'textarea' - or $element.type == 'password' or $element.type == 'checkbox' or $element.type == 'file' - or $element.type == 'date' - } - -
-
- {if $element.type == 'textarea'}
{/if} - {$element.html} - {if $element.type == 'textarea'}
{/if} -
-
- {else} - Type de champ {$element.type} {if $element.name }({$element.name}){/if} non géré. - {/if} -
-
- {/foreach} - -
- {/foreach} - {if $auMoinsUnChampsRequis} -
-

* indique un champ obligatoire

-
- {/if} - diff --git a/patches/znk3r-html-quickform-html-quickform-date-php.patch b/patches/znk3r-html-quickform-html-quickform-date-php.patch deleted file mode 100644 index 6a35addd5..000000000 --- a/patches/znk3r-html-quickform-html-quickform-date-php.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- /dev/null -+++ ../HTML/QuickForm/date.php -@@ -317,7 +317,7 @@ - $locale = $this->_locale[$this->_options['language']]; - $backslash = false; - for ($i = 0, $length = strlen($this->_options['format']); $i < $length; $i++) { -- $sign = $this->_options['format']{$i}; -+ $sign = $this->_options['format'][$i]; - if ($backslash) { - $backslash = false; - $separator .= $sign; diff --git a/patches/znk3r-html-quickform-html-quickform-php.patch b/patches/znk3r-html-quickform-html-quickform-php.patch deleted file mode 100644 index 0e37fd97e..000000000 --- a/patches/znk3r-html-quickform-html-quickform-php.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- /dev/null -+++ ../HTML/QuickForm.php -@@ -281,7 +281,7 @@ - $attributes = array('action'=>$action, 'method'=>$method, 'name'=>$formName, 'id'=>$formName) + $target; - $this->updateAttributes($attributes); - if (!$trackSubmit || isset($_REQUEST['_qf__' . $formName])) { -- if (1 == get_magic_quotes_gpc()) { -+ if (function_exists('get_magic_quotes_gpc') && 1 == get_magic_quotes_gpc()) { - $this->_submitValues = $this->_recursiveFilter('stripslashes', 'get' == $method? $_GET: $_POST); - foreach ($_FILES as $keyFirst => $valFirst) { - foreach ($valFirst as $keySecond => $valSecond) { diff --git a/phpstan-baseline.php b/phpstan-baseline.php index 0f31c6fc4..4d5d2a526 100644 --- a/phpstan-baseline.php +++ b/phpstan-baseline.php @@ -2,1018 +2,106 @@ $ignoreErrors = []; $ignoreErrors[] = [ - 'message' => '#^Binary operation "\\." between \'https\\://\' and mixed results in an error\\.$#', - 'identifier' => 'binaryOp.invalid', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Bootstrap/Http.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Cannot cast mixed to string\\.$#', - 'identifier' => 'cast.string', - 'count' => 5, - 'path' => __DIR__ . '/sources/Afup/Bootstrap/Http.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Parameter \\#3 \\$length of function substr expects int\\|null, int\\|false given\\.$#', - 'identifier' => 'argument.type', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Bootstrap/Http.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Cannot call method batchLoadMetadata\\(\\) on mixed\\.$#', - 'identifier' => 'method.nonObject', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Bootstrap/commonStart.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Cannot call method obtenir\\(\\) on mixed\\.$#', - 'identifier' => 'method.nonObject', - 'count' => 4, - 'path' => __DIR__ . '/sources/Afup/Bootstrap/commonStart.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Cannot call method register_modifier\\(\\) on mixed\\.$#', - 'identifier' => 'method.nonObject', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Bootstrap/commonStart.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Cannot call method setConfig\\(\\) on mixed\\.$#', - 'identifier' => 'method.nonObject', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Bootstrap/commonStart.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Parameter \\#1 \\$locale of class Symfony\\\\Component\\\\Translation\\\\Translator constructor expects string, mixed given\\.$#', - 'identifier' => 'argument.type', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Bootstrap/commonStart.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Argument of an invalid type mixed supplied for foreach, only iterables are supported\\.$#', - 'identifier' => 'foreach.nonIterable', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Comptabilite/PDF.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Cannot access offset 0 on mixed\\.$#', - 'identifier' => 'offsetAccess.nonOffsetAccessible', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Comptabilite/PDF.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Cannot access offset 1 on mixed\\.$#', - 'identifier' => 'offsetAccess.nonOffsetAccessible', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Comptabilite/PDF.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Cannot access offset 2 on mixed\\.$#', - 'identifier' => 'offsetAccess.nonOffsetAccessible', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Comptabilite/PDF.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Cannot cast mixed to string\\.$#', - 'identifier' => 'cast.string', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Comptabilite/PDF.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Comptabilite\\\\PDF\\:\\:__construct\\(\\) has parameter \\$orientation with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Comptabilite/PDF.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Comptabilite\\\\PDF\\:\\:__construct\\(\\) has parameter \\$size with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Comptabilite/PDF.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Comptabilite\\\\PDF\\:\\:__construct\\(\\) has parameter \\$unit with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Comptabilite/PDF.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Comptabilite\\\\PDF\\:\\:tableau\\(\\) has parameter \\$data with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Comptabilite/PDF.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Comptabilite\\\\PDF\\:\\:tableau\\(\\) has parameter \\$header with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Comptabilite/PDF.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Comptabilite\\\\PDF\\:\\:tableau\\(\\) has parameter \\$position with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Comptabilite/PDF.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Parameter \\#1 \\$num of function number_format expects float, mixed given\\.$#', - 'identifier' => 'argument.type', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Comptabilite/PDF.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Cannot cast mixed to string\\.$#', - 'identifier' => 'cast.string', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Corporate/Page.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Corporate\\\\Page\\:\\:header\\(\\) has parameter \\$url with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Corporate/Page.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Parameter \\#1 \\$parentId of method AppBundle\\\\Site\\\\Entity\\\\Repository\\\\FeuilleRepository\\:\\:getFeuillesEnfant\\(\\) expects int, int\\|null given\\.$#', - 'identifier' => 'argument.type', - 'count' => 3, - 'path' => __DIR__ . '/sources/Afup/Corporate/Page.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Possibly invalid array key type int\\|null\\.$#', - 'identifier' => 'offsetAccess.invalidOffset', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Corporate/Page.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Parameter \\#1 \\$host of method Afup\\\\Site\\\\Utils\\\\Base_De_Donnees\\:\\:__construct\\(\\) expects string, mixed given\\.$#', - 'identifier' => 'argument.type', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Corporate/_Site_Base_De_Donnees.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Parameter \\#2 \\$database of method Afup\\\\Site\\\\Utils\\\\Base_De_Donnees\\:\\:__construct\\(\\) expects string, mixed given\\.$#', - 'identifier' => 'argument.type', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Corporate/_Site_Base_De_Donnees.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Parameter \\#3 \\$user of method Afup\\\\Site\\\\Utils\\\\Base_De_Donnees\\:\\:__construct\\(\\) expects string, mixed given\\.$#', - 'identifier' => 'argument.type', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Corporate/_Site_Base_De_Donnees.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Parameter \\#4 \\$password of method Afup\\\\Site\\\\Utils\\\\Base_De_Donnees\\:\\:__construct\\(\\) expects string, mixed given\\.$#', - 'identifier' => 'argument.type', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Corporate/_Site_Base_De_Donnees.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Cannot access offset \'elements\' on mixed\\.$#', - 'identifier' => 'offsetAccess.nonOffsetAccessible', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Droits.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Cannot access offset \'niveau\' on mixed\\.$#', - 'identifier' => 'offsetAccess.nonOffsetAccessible', - 'count' => 2, - 'path' => __DIR__ . '/sources/Afup/Droits.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Cannot call method getUser\\(\\) on Symfony\\\\Component\\\\Security\\\\Core\\\\Authentication\\\\Token\\\\TokenInterface\\|null\\.$#', - 'identifier' => 'method.nonObject', - 'count' => 2, - 'path' => __DIR__ . '/sources/Afup/Droits.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Droits\\:\\:chargerToutesLesPages\\(\\) has parameter \\$pages with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Droits.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Property Afup\\\\Site\\\\Droits\\:\\:\\$_pages type has no value type specified in iterable type array\\.$#', - 'identifier' => 'missingType.iterableValue', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Droits.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Argument of an invalid type mixed supplied for foreach, only iterables are supported\\.$#', - 'identifier' => 'foreach.nonIterable', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Binary operation "\\." between \' / \' and mixed results in an error\\.$#', - 'identifier' => 'binaryOp.invalid', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Binary operation "\\." between \' \\ 'binaryOp.invalid', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Binary operation "\\." between \'l\\.id_forum \\= \' and mixed results in an error\\.$#', - 'identifier' => 'binaryOp.invalid', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Binary operation "\\." between mixed and \' \\: \' results in an error\\.$#', - 'identifier' => 'binaryOp.invalid', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Binary operation "\\." between mixed and \'\\-\' results in an error\\.$#', - 'identifier' => 'binaryOp.invalid', - 'count' => 7, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Binary operation "\\." between non\\-falsy\\-string and mixed results in an error\\.$#', - 'identifier' => 'binaryOp.invalid', - 'count' => 8, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Cannot access offset \'conf1\' on mixed\\.$#', - 'identifier' => 'offsetAccess.nonOffsetAccessible', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Cannot access offset \'conf2\' on mixed\\.$#', - 'identifier' => 'offsetAccess.nonOffsetAccessible', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Cannot access offset \'debut\' on mixed\\.$#', - 'identifier' => 'offsetAccess.nonOffsetAccessible', - 'count' => 7, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Cannot access offset \'fin\' on mixed\\.$#', - 'identifier' => 'offsetAccess.nonOffsetAccessible', - 'count' => 7, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Cannot access offset \'id_salle\' on mixed\\.$#', - 'identifier' => 'offsetAccess.nonOffsetAccessible', - 'count' => 3, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Cannot access offset \'jour\' on mixed\\.$#', - 'identifier' => 'offsetAccess.nonOffsetAccessible', - 'count' => 2, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Cannot access offset \'keynote\' on mixed\\.$#', - 'identifier' => 'offsetAccess.nonOffsetAccessible', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Cannot access offset \'nom\' on mixed\\.$#', - 'identifier' => 'offsetAccess.nonOffsetAccessible', - 'count' => 4, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Cannot access offset \'session_id\' on mixed\\.$#', - 'identifier' => 'offsetAccess.nonOffsetAccessible', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Cannot access offset \'titre\' on mixed\\.$#', - 'identifier' => 'offsetAccess.nonOffsetAccessible', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Cannot access offset int\\<0, max\\> on mixed\\.$#', - 'identifier' => 'offsetAccess.nonOffsetAccessible', - 'count' => 6, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Cannot cast mixed to int\\.$#', - 'identifier' => 'cast.int', - 'count' => 5, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:ajouter\\(\\) has no return type specified\\.$#', - 'identifier' => 'missingType.return', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:ajouter\\(\\) has parameter \\$accomodationEnabled with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:ajouter\\(\\) has parameter \\$chemin_template with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:ajouter\\(\\) has parameter \\$date_annonce_planning with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:ajouter\\(\\) has parameter \\$date_debut with no value type specified in iterable type array\\.$#', - 'identifier' => 'missingType.iterableValue', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:ajouter\\(\\) has parameter \\$date_fin with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:ajouter\\(\\) has parameter \\$date_fin_appel_conferencier with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:ajouter\\(\\) has parameter \\$date_fin_appel_projet with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:ajouter\\(\\) has parameter \\$date_fin_prevente with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:ajouter\\(\\) has parameter \\$date_fin_saisie_nuites_hotel with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:ajouter\\(\\) has parameter \\$date_fin_saisie_repas_speakers with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:ajouter\\(\\) has parameter \\$date_fin_vente with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:ajouter\\(\\) has parameter \\$date_fin_vente_token_sponsor with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:ajouter\\(\\) has parameter \\$date_fin_vote with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:ajouter\\(\\) has parameter \\$hasPricesDefinedWithVat with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:ajouter\\(\\) has parameter \\$logoUrl with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:ajouter\\(\\) has parameter \\$nb_places with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:ajouter\\(\\) has parameter \\$placeAddress with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:ajouter\\(\\) has parameter \\$placeName with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:ajouter\\(\\) has parameter \\$speakersDinerEnabled with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:ajouter\\(\\) has parameter \\$text with no value type specified in iterable type array\\.$#', - 'identifier' => 'missingType.iterableValue', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:ajouter\\(\\) has parameter \\$titre with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:ajouter\\(\\) has parameter \\$transportInformationEnabled with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:ajouter\\(\\) has parameter \\$voteEnabled with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:ajouter\\(\\) has parameter \\$waitingListUrl with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:genAgenda\\(\\) has no return type specified\\.$#', - 'identifier' => 'missingType.return', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:genAgenda\\(\\) has parameter \\$annee with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:genAgenda\\(\\) has parameter \\$for_bo with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:genAgenda\\(\\) has parameter \\$forum_id with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:genAgenda\\(\\) has parameter \\$linkFormat with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:genAgenda\\(\\) has parameter \\$only_data with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:modifier\\(\\) has no return type specified\\.$#', - 'identifier' => 'missingType.return', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:modifier\\(\\) has parameter \\$accomodationEnabled with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:modifier\\(\\) has parameter \\$chemin_template with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:modifier\\(\\) has parameter \\$date_annonce_planning with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:modifier\\(\\) has parameter \\$date_debut with no value type specified in iterable type array\\.$#', - 'identifier' => 'missingType.iterableValue', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:modifier\\(\\) has parameter \\$date_fin with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:modifier\\(\\) has parameter \\$date_fin_appel_conferencier with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:modifier\\(\\) has parameter \\$date_fin_appel_projet with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:modifier\\(\\) has parameter \\$date_fin_prevente with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:modifier\\(\\) has parameter \\$date_fin_saisie_nuites_hotel with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:modifier\\(\\) has parameter \\$date_fin_saisie_repas_speakers with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:modifier\\(\\) has parameter \\$date_fin_vente with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:modifier\\(\\) has parameter \\$date_fin_vente_token_sponsor with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:modifier\\(\\) has parameter \\$date_fin_vote with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:modifier\\(\\) has parameter \\$hasPricesDefinedWithVat with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:modifier\\(\\) has parameter \\$logoUrl with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:modifier\\(\\) has parameter \\$nb_places with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:modifier\\(\\) has parameter \\$placeAddress with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:modifier\\(\\) has parameter \\$placeName with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:modifier\\(\\) has parameter \\$speakersDinerEnabled with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:modifier\\(\\) has parameter \\$text with no value type specified in iterable type array\\.$#', - 'identifier' => 'missingType.iterableValue', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:modifier\\(\\) has parameter \\$titre with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:modifier\\(\\) has parameter \\$transportInformationEnabled with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:modifier\\(\\) has parameter \\$voteEnabled with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:modifier\\(\\) has parameter \\$waitingListUrl with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:obtenir\\(\\) return type has no value type specified in iterable type array\\.$#', - 'identifier' => 'missingType.iterableValue', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:obtenir\\(\\) should return array but returns mixed\\.$#', - 'identifier' => 'return.type', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:obtenirAgenda\\(\\) has no return type specified\\.$#', - 'identifier' => 'missingType.return', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:obtenirAgenda\\(\\) has parameter \\$forum_id with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:obtenirDernier\\(\\) has no return type specified\\.$#', - 'identifier' => 'missingType.return', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:obtenirForumPrecedent\\(\\) has no return type specified\\.$#', - 'identifier' => 'missingType.return', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:obtenirForumPrecedent\\(\\) has parameter \\$id_forum with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:obtenirListActive\\(\\) has no return type specified\\.$#', - 'identifier' => 'missingType.return', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:obtenirListe\\(\\) has parameter \\$filtre with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:obtenirListe\\(\\) has parameter \\$id_forum with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:obtenirListe\\(\\) return type has no value type specified in iterable type array\\.$#', - 'identifier' => 'missingType.iterableValue', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:obtenirListe\\(\\) should return array but returns array\\|false\\.$#', - 'identifier' => 'return.type', - 'count' => 2, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:supprimer\\(\\) has no return type specified\\.$#', - 'identifier' => 'missingType.return', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:supprimer\\(\\) has parameter \\$id_forum with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Parameter \\#1 \\$annee of method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:obtenirAgenda\\(\\) expects int\\|null, mixed given\\.$#', - 'identifier' => 'argument.type', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Parameter \\#1 \\$date of method Afup\\\\Site\\\\Utils\\\\Base_De_Donnees\\:\\:echapperSqlDateFromQuickForm\\(\\) expects array, mixed given\\.$#', - 'identifier' => 'argument.type', - 'count' => 20, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Parameter \\#1 \\$value of function count expects array\\|Countable, mixed given\\.$#', - 'identifier' => 'argument.type', - 'count' => 2, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Parameter \\#2 \\$for_bo of method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:lienSeance\\(\\) expects bool, mixed given\\.$#', - 'identifier' => 'argument.type', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Parameter \\#2 \\$timestamp of function date expects int\\|null, int\\|false given\\.$#', - 'identifier' => 'argument.type', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Parameter \\#3 \\$linkFormat of method Afup\\\\Site\\\\Forum\\\\Forum\\:\\:lienSeance\\(\\) expects string\\|null, mixed given\\.$#', - 'identifier' => 'argument.type', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Part \\$nomSalle \\(mixed\\) of encapsed string cannot be cast to string\\.$#', - 'identifier' => 'encapsedStringPart.nonString', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Possibly invalid array key type mixed\\.$#', - 'identifier' => 'offsetAccess.invalidOffset', - 'count' => 15, - 'path' => __DIR__ . '/sources/Afup/Forum/Forum.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Binary operation "/" between mixed and mixed results in an error\\.$#', - 'identifier' => 'binaryOp.invalid', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Pagination.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Cannot call method assign\\(\\) on mixed\\.$#', - 'identifier' => 'method.nonObject', - 'count' => 2, - 'path' => __DIR__ . '/sources/Afup/Pagination.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Cannot call method display\\(\\) on mixed\\.$#', - 'identifier' => 'method.nonObject', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Pagination.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Cannot call method register_function\\(\\) on mixed\\.$#', - 'identifier' => 'method.nonObject', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Pagination.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Pagination\\:\\:__construct\\(\\) has parameter \\$genere_route with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Pagination.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Pagination\\:\\:__construct\\(\\) has parameter \\$nombre_elements_par_page with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Pagination.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Pagination\\:\\:__construct\\(\\) has parameter \\$nombre_elements_total with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Pagination.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Pagination\\:\\:__construct\\(\\) has parameter \\$page_courante with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Pagination.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Binary operation "\\." between \' \' and mixed results in an error\\.$#', - 'identifier' => 'binaryOp.invalid', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Utils/Base_De_Donnees.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Binary operation "\\." between \'\\:\' and mixed results in an error\\.$#', - 'identifier' => 'binaryOp.invalid', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Utils/Base_De_Donnees.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Binary operation "\\." between mixed and \'\\-\' results in an error\\.$#', - 'identifier' => 'binaryOp.invalid', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Utils/Base_De_Donnees.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Binary operation "\\." between non\\-falsy\\-string and mixed results in an error\\.$#', - 'identifier' => 'binaryOp.invalid', - 'count' => 3, - 'path' => __DIR__ . '/sources/Afup/Utils/Base_De_Donnees.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Cannot access offset 0 on mixed\\.$#', - 'identifier' => 'offsetAccess.nonOffsetAccessible', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Utils/Base_De_Donnees.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Cannot cast mixed to int\\.$#', - 'identifier' => 'cast.int', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Utils/Base_De_Donnees.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Cannot cast mixed to string\\.$#', - 'identifier' => 'cast.string', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Utils/Base_De_Donnees.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Utils\\\\Base_De_Donnees\\:\\:__construct\\(\\) has parameter \\$port with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Utils/Base_De_Donnees.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Utils\\\\Base_De_Donnees\\:\\:echapperSqlDateFromQuickForm\\(\\) has parameter \\$date with no value type specified in iterable type array\\.$#', - 'identifier' => 'missingType.iterableValue', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Utils/Base_De_Donnees.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Utils\\\\Base_De_Donnees\\:\\:echapperSqlDateFromQuickForm\\(\\) should return int\\|string but returns int\\|false\\.$#', - 'identifier' => 'return.type', + 'message' => '#^Argument of an invalid type mixed supplied for foreach, only iterables are supported\\.$#', + 'identifier' => 'foreach.nonIterable', 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Utils/Base_De_Donnees.php', + 'path' => __DIR__ . '/sources/Afup/Comptabilite/PDF.php', ]; $ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Utils\\\\Base_De_Donnees\\:\\:executer\\(\\) should return bool but returns mysqli_result\\|true\\.$#', - 'identifier' => 'return.type', + 'message' => '#^Cannot access offset 0 on mixed\\.$#', + 'identifier' => 'offsetAccess.nonOffsetAccessible', 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Utils/Base_De_Donnees.php', + 'path' => __DIR__ . '/sources/Afup/Comptabilite/PDF.php', ]; $ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Utils\\\\Base_De_Donnees\\:\\:getDbLink\\(\\) has no return type specified\\.$#', - 'identifier' => 'missingType.return', + 'message' => '#^Cannot access offset 1 on mixed\\.$#', + 'identifier' => 'offsetAccess.nonOffsetAccessible', 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Utils/Base_De_Donnees.php', + 'path' => __DIR__ . '/sources/Afup/Comptabilite/PDF.php', ]; $ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Utils\\\\Base_De_Donnees\\:\\:obtenirAssociatif\\(\\) return type has no value type specified in iterable type array\\.$#', - 'identifier' => 'missingType.iterableValue', + 'message' => '#^Cannot access offset 2 on mixed\\.$#', + 'identifier' => 'offsetAccess.nonOffsetAccessible', 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Utils/Base_De_Donnees.php', + 'path' => __DIR__ . '/sources/Afup/Comptabilite/PDF.php', ]; $ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Utils\\\\Base_De_Donnees\\:\\:obtenirDernierId\\(\\) has no return type specified\\.$#', - 'identifier' => 'missingType.return', + 'message' => '#^Cannot cast mixed to string\\.$#', + 'identifier' => 'cast.string', 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Utils/Base_De_Donnees.php', + 'path' => __DIR__ . '/sources/Afup/Comptabilite/PDF.php', ]; $ignoreErrors[] = [ - 'message' => '#^Method Afup\\\\Site\\\\Utils\\\\Base_De_Donnees\\:\\:obtenirTous\\(\\) return type has no value type specified in iterable type array\\.$#', - 'identifier' => 'missingType.iterableValue', + 'message' => '#^Method Afup\\\\Site\\\\Comptabilite\\\\PDF\\:\\:__construct\\(\\) has parameter \\$orientation with no type specified\\.$#', + 'identifier' => 'missingType.parameter', 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Utils/Base_De_Donnees.php', + 'path' => __DIR__ . '/sources/Afup/Comptabilite/PDF.php', ]; $ignoreErrors[] = [ - 'message' => '#^Parameter \\#1 \\$hostname of function mysqli_connect expects string\\|null, mixed given\\.$#', - 'identifier' => 'argument.type', + 'message' => '#^Method Afup\\\\Site\\\\Comptabilite\\\\PDF\\:\\:__construct\\(\\) has parameter \\$size with no type specified\\.$#', + 'identifier' => 'missingType.parameter', 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Utils/Base_De_Donnees.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Parameter \\#1 \\$mysql of function mysqli_error expects mysqli, mixed given\\.$#', - 'identifier' => 'argument.type', - 'count' => 2, - 'path' => __DIR__ . '/sources/Afup/Utils/Base_De_Donnees.php', + 'path' => __DIR__ . '/sources/Afup/Comptabilite/PDF.php', ]; $ignoreErrors[] = [ - 'message' => '#^Parameter \\#1 \\$mysql of function mysqli_insert_id expects mysqli, mixed given\\.$#', - 'identifier' => 'argument.type', + 'message' => '#^Method Afup\\\\Site\\\\Comptabilite\\\\PDF\\:\\:__construct\\(\\) has parameter \\$unit with no type specified\\.$#', + 'identifier' => 'missingType.parameter', 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Utils/Base_De_Donnees.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Parameter \\#1 \\$mysql of function mysqli_query expects mysqli, mixed given\\.$#', - 'identifier' => 'argument.type', - 'count' => 5, - 'path' => __DIR__ . '/sources/Afup/Utils/Base_De_Donnees.php', + 'path' => __DIR__ . '/sources/Afup/Comptabilite/PDF.php', ]; $ignoreErrors[] = [ - 'message' => '#^Parameter \\#1 \\$mysql of function mysqli_real_escape_string expects mysqli, mixed given\\.$#', - 'identifier' => 'argument.type', + 'message' => '#^Method Afup\\\\Site\\\\Comptabilite\\\\PDF\\:\\:tableau\\(\\) has parameter \\$data with no type specified\\.$#', + 'identifier' => 'missingType.parameter', 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Utils/Base_De_Donnees.php', + 'path' => __DIR__ . '/sources/Afup/Comptabilite/PDF.php', ]; $ignoreErrors[] = [ - 'message' => '#^Parameter \\#1 \\$mysql of function mysqli_select_db expects mysqli, mixed given\\.$#', - 'identifier' => 'argument.type', + 'message' => '#^Method Afup\\\\Site\\\\Comptabilite\\\\PDF\\:\\:tableau\\(\\) has parameter \\$header with no type specified\\.$#', + 'identifier' => 'missingType.parameter', 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Utils/Base_De_Donnees.php', + 'path' => __DIR__ . '/sources/Afup/Comptabilite/PDF.php', ]; $ignoreErrors[] = [ - 'message' => '#^Parameter \\#1 \\$nom of method Afup\\\\Site\\\\Utils\\\\Base_De_Donnees\\:\\:selectionnerBase\\(\\) expects string, mixed given\\.$#', - 'identifier' => 'argument.type', + 'message' => '#^Method Afup\\\\Site\\\\Comptabilite\\\\PDF\\:\\:tableau\\(\\) has parameter \\$position with no type specified\\.$#', + 'identifier' => 'missingType.parameter', 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Utils/Base_De_Donnees.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Parameter \\#1 \\$result of function mysqli_fetch_array expects mysqli_result, mysqli_result\\|true given\\.$#', - 'identifier' => 'argument.type', - 'count' => 5, - 'path' => __DIR__ . '/sources/Afup/Utils/Base_De_Donnees.php', + 'path' => __DIR__ . '/sources/Afup/Comptabilite/PDF.php', ]; $ignoreErrors[] = [ - 'message' => '#^Parameter \\#1 \\$result of function mysqli_fetch_fields expects mysqli_result, mysqli_result\\|true given\\.$#', + 'message' => '#^Parameter \\#1 \\$num of function number_format expects float, mixed given\\.$#', 'identifier' => 'argument.type', 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Utils/Base_De_Donnees.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Parameter \\#1 \\$result of function mysqli_free_result expects mysqli_result, mysqli_result\\|true given\\.$#', - 'identifier' => 'argument.type', - 'count' => 4, - 'path' => __DIR__ . '/sources/Afup/Utils/Base_De_Donnees.php', + 'path' => __DIR__ . '/sources/Afup/Comptabilite/PDF.php', ]; $ignoreErrors[] = [ - 'message' => '#^Parameter \\#1 \\$result of function mysqli_num_fields expects mysqli_result, bool\\|mysqli_result given\\.$#', - 'identifier' => 'argument.type', + 'message' => '#^Cannot cast mixed to string\\.$#', + 'identifier' => 'cast.string', 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Utils/Base_De_Donnees.php', + 'path' => __DIR__ . '/sources/Afup/Corporate/Page.php', ]; $ignoreErrors[] = [ - 'message' => '#^Parameter \\#2 \\$username of function mysqli_connect expects string\\|null, mixed given\\.$#', - 'identifier' => 'argument.type', + 'message' => '#^Method Afup\\\\Site\\\\Corporate\\\\Page\\:\\:header\\(\\) has parameter \\$url with no type specified\\.$#', + 'identifier' => 'missingType.parameter', 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Utils/Base_De_Donnees.php', + 'path' => __DIR__ . '/sources/Afup/Corporate/Page.php', ]; $ignoreErrors[] = [ - 'message' => '#^Parameter \\#3 \\$password of function mysqli_connect expects string\\|null, mixed given\\.$#', + 'message' => '#^Parameter \\#1 \\$parentId of method AppBundle\\\\Site\\\\Entity\\\\Repository\\\\FeuilleRepository\\:\\:getFeuillesEnfant\\(\\) expects int, int\\|null given\\.$#', 'identifier' => 'argument.type', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Utils/Base_De_Donnees.php', + 'count' => 3, + 'path' => __DIR__ . '/sources/Afup/Corporate/Page.php', ]; $ignoreErrors[] = [ - 'message' => '#^Possibly invalid array key type mixed\\.$#', + 'message' => '#^Possibly invalid array key type int\\|null\\.$#', 'identifier' => 'offsetAccess.invalidOffset', - 'count' => 2, - 'path' => __DIR__ . '/sources/Afup/Utils/Base_De_Donnees.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Property Afup\\\\Site\\\\Utils\\\\Base_De_Donnees\\:\\:\\$config type has no value type specified in iterable type array\\.$#', - 'identifier' => 'missingType.iterableValue', 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Utils/Base_De_Donnees.php', + 'path' => __DIR__ . '/sources/Afup/Corporate/Page.php', ]; $ignoreErrors[] = [ - 'message' => '#^Property Afup\\\\Site\\\\Utils\\\\Base_De_Donnees\\:\\:\\$link \\(mysqli\\) does not accept mysqli\\|false\\.$#', - 'identifier' => 'assign.propertyType', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Utils/Base_De_Donnees.php', + 'message' => '#^Cannot call method getUser\\(\\) on Symfony\\\\Component\\\\Security\\\\Core\\\\Authentication\\\\Token\\\\TokenInterface\\|null\\.$#', + 'identifier' => 'method.nonObject', + 'count' => 2, + 'path' => __DIR__ . '/sources/Afup/Droits.php', ]; $ignoreErrors[] = [ 'message' => '#^Binary operation "\\." between literal\\-string&non\\-falsy\\-string and mixed results in an error\\.$#', @@ -1075,30 +163,6 @@ 'count' => 1, 'path' => __DIR__ . '/sources/Afup/Utils/Configuration.php', ]; -$ignoreErrors[] = [ - 'message' => '#^Property Afup\\\\Site\\\\Utils\\\\LegacyConnectionFactory\\:\\:\\$bdd \\(Afup\\\\Site\\\\Utils\\\\Base_De_Donnees\\) does not accept mixed\\.$#', - 'identifier' => 'assign.propertyType', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Utils/LegacyConnectionFactory.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Cannot call method getEmail\\(\\) on mixed\\.$#', - 'identifier' => 'method.nonObject', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Utils/Mailing.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Parameter \\#1 \\$array of function reset expects array\\|object, array\\\\|null given\\.$#', - 'identifier' => 'argument.type', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Utils/Mailing.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Parameter \\#2 \\$replace of function str_replace expects array\\\\|string, mixed given\\.$#', - 'identifier' => 'argument.type', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/Utils/Mailing.php', -]; $ignoreErrors[] = [ 'message' => '#^Binary operation "\\." between mixed and \' \' results in an error\\.$#', 'identifier' => 'binaryOp.invalid', @@ -1219,108 +283,6 @@ 'count' => 1, 'path' => __DIR__ . '/sources/Afup/Utils/Vat.php', ]; -$ignoreErrors[] = [ - 'message' => '#^Argument of an invalid type mixed supplied for foreach, only iterables are supported\\.$#', - 'identifier' => 'foreach.nonIterable', - 'count' => 2, - 'path' => __DIR__ . '/sources/Afup/fonctions.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Cannot access offset \'class\' on mixed\\.$#', - 'identifier' => 'offsetAccess.nonOffsetAccessible', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/fonctions.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Cannot access offset \'elements\' on mixed\\.$#', - 'identifier' => 'offsetAccess.nonOffsetAccessible', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/fonctions.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Cannot access offset \'erreur\' on mixed\\.$#', - 'identifier' => 'offsetAccess.nonOffsetAccessible', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/fonctions.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Cannot access offset \'event_selector_current_id\' on mixed\\.$#', - 'identifier' => 'offsetAccess.nonOffsetAccessible', - 'count' => 2, - 'path' => __DIR__ . '/sources/Afup/fonctions.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Cannot access offset \'message\' on mixed\\.$#', - 'identifier' => 'offsetAccess.nonOffsetAccessible', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/fonctions.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Cannot access offset \'nom\' on mixed\\.$#', - 'identifier' => 'offsetAccess.nonOffsetAccessible', - 'count' => 2, - 'path' => __DIR__ . '/sources/Afup/fonctions.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Cannot access offset \'path\' on array\\{scheme\\?\\: string, host\\?\\: string, port\\?\\: int\\<0, 65535\\>, user\\?\\: string, pass\\?\\: string, path\\?\\: string, query\\?\\: string, fragment\\?\\: string\\}\\|false\\.$#', - 'identifier' => 'offsetAccess.nonOffsetAccessible', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/fonctions.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Cannot call method getAttributes\\(\\) on mixed\\.$#', - 'identifier' => 'method.nonObject', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/fonctions.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Cannot call method setAttributes\\(\\) on mixed\\.$#', - 'identifier' => 'method.nonObject', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/fonctions.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Cannot cast mixed to string\\.$#', - 'identifier' => 'cast.string', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/fonctions.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Function genererFormulaire\\(\\) return type has no value type specified in iterable type array\\.$#', - 'identifier' => 'missingType.iterableValue', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/fonctions.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Function obtenirTitre\\(\\) has no return type specified\\.$#', - 'identifier' => 'missingType.return', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/fonctions.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Function obtenirTitre\\(\\) has parameter \\$page with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/fonctions.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Function obtenirTitre\\(\\) has parameter \\$pages with no type specified\\.$#', - 'identifier' => 'missingType.parameter', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/fonctions.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Function verifierAction\\(\\) should return string but returns mixed\\.$#', - 'identifier' => 'return.type', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/fonctions.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Parameter \\#3 \\$action of class AppBundle\\\\Association\\\\Form\\\\HTML_QuickForm constructor expects string, mixed given\\.$#', - 'identifier' => 'argument.type', - 'count' => 1, - 'path' => __DIR__ . '/sources/Afup/fonctions.php', -]; $ignoreErrors[] = [ 'message' => '#^Method AppBundle\\\\Accounting\\\\Entity\\\\Repository\\\\AccountRepository\\:\\:getAllSortedByName\\(\\) should return array\\ but returns mixed\\.$#', 'identifier' => 'return.type', @@ -1765,12 +727,6 @@ 'count' => 1, 'path' => __DIR__ . '/sources/AppBundle/Association/Form/ContactDetailsType.php', ]; -$ignoreErrors[] = [ - 'message' => '#^Method AppBundle\\\\Association\\\\Form\\\\HTML_QuickForm\\:\\:getElements\\(\\) has no return type specified\\.$#', - 'identifier' => 'missingType.return', - 'count' => 1, - 'path' => __DIR__ . '/sources/AppBundle/Association/Form/HTML_QuickForm.php', -]; $ignoreErrors[] = [ 'message' => '#^Class AppBundle\\\\Association\\\\Form\\\\NearestOfficeChoiceType extends generic class Symfony\\\\Component\\\\Form\\\\AbstractType but does not specify its types\\: TData$#', 'identifier' => 'missingType.generics', @@ -6217,72 +5173,6 @@ 'count' => 1, 'path' => __DIR__ . '/sources/AppBundle/Controller/Event/Vote/VoteController.php', ]; -$ignoreErrors[] = [ - 'message' => '#^Binary operation "\\." between literal\\-string&non\\-falsy\\-string and mixed results in an error\\.$#', - 'identifier' => 'binaryOp.invalid', - 'count' => 2, - 'path' => __DIR__ . '/sources/AppBundle/Controller/LegacyController.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Binary operation "\\." between mixed and \'\\.html\' results in an error\\.$#', - 'identifier' => 'binaryOp.invalid', - 'count' => 1, - 'path' => __DIR__ . '/sources/AppBundle/Controller/LegacyController.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Binary operation "\\." between mixed and \'\\.js\\.html\' results in an error\\.$#', - 'identifier' => 'binaryOp.invalid', - 'count' => 1, - 'path' => __DIR__ . '/sources/AppBundle/Controller/LegacyController.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Cannot access offset \'erreur\' on mixed\\.$#', - 'identifier' => 'offsetAccess.nonOffsetAccessible', - 'count' => 1, - 'path' => __DIR__ . '/sources/AppBundle/Controller/LegacyController.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Cannot access offset \'message\' on mixed\\.$#', - 'identifier' => 'offsetAccess.nonOffsetAccessible', - 'count' => 1, - 'path' => __DIR__ . '/sources/AppBundle/Controller/LegacyController.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Cannot call method fetch\\(\\) on mixed\\.$#', - 'identifier' => 'method.nonObject', - 'count' => 2, - 'path' => __DIR__ . '/sources/AppBundle/Controller/LegacyController.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Cannot call method templateExists\\(\\) on mixed\\.$#', - 'identifier' => 'method.nonObject', - 'count' => 1, - 'path' => __DIR__ . '/sources/AppBundle/Controller/LegacyController.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method AppBundle\\\\Controller\\\\LegacyController\\:\\:__construct\\(\\) has parameter \\$backOfficePages with no value type specified in iterable type array\\.$#', - 'identifier' => 'missingType.iterableValue', - 'count' => 1, - 'path' => __DIR__ . '/sources/AppBundle/Controller/LegacyController.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method AppBundle\\\\Controller\\\\LegacyController\\:\\:backOffice\\(\\) has no return type specified\\.$#', - 'identifier' => 'missingType.return', - 'count' => 1, - 'path' => __DIR__ . '/sources/AppBundle/Controller/LegacyController.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Method AppBundle\\\\Controller\\\\LegacyController\\:\\:void\\(\\) has no return type specified\\.$#', - 'identifier' => 'missingType.return', - 'count' => 1, - 'path' => __DIR__ . '/sources/AppBundle/Controller/LegacyController.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Parameter \\#1 \\$page of method Afup\\\\Site\\\\Droits\\:\\:verifierDroitSurLaPage\\(\\) expects int\\|string, mixed given\\.$#', - 'identifier' => 'argument.type', - 'count' => 1, - 'path' => __DIR__ . '/sources/AppBundle/Controller/LegacyController.php', -]; $ignoreErrors[] = [ 'message' => '#^Parameter \\#1 \\$content of class Symfony\\\\Component\\\\HttpFoundation\\\\Response constructor expects string\\|null, string\\|false given\\.$#', 'identifier' => 'argument.type', @@ -6907,36 +5797,6 @@ 'count' => 1, 'path' => __DIR__ . '/sources/AppBundle/Email/Mailer/Adapter/MailerAdapter.php', ]; -$ignoreErrors[] = [ - 'message' => '#^Argument of an invalid type array\\\\|null supplied for foreach, only iterables are supported\\.$#', - 'identifier' => 'foreach.nonIterable', - 'count' => 1, - 'path' => __DIR__ . '/sources/AppBundle/Email/Mailer/Adapter/PhpMailerAdapter.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Cannot cast mixed to string\\.$#', - 'identifier' => 'cast.string', - 'count' => 2, - 'path' => __DIR__ . '/sources/AppBundle/Email/Mailer/Adapter/PhpMailerAdapter.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Parameter \\#1 \\$smtpServer of class AppBundle\\\\Email\\\\Mailer\\\\Adapter\\\\PhpMailerAdapter constructor expects string\\|null, mixed given\\.$#', - 'identifier' => 'argument.type', - 'count' => 1, - 'path' => __DIR__ . '/sources/AppBundle/Email/Mailer/Adapter/PhpMailerAdapter.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Parameter \\#3 \\$username of class AppBundle\\\\Email\\\\Mailer\\\\Adapter\\\\PhpMailerAdapter constructor expects string\\|null, mixed given\\.$#', - 'identifier' => 'argument.type', - 'count' => 1, - 'path' => __DIR__ . '/sources/AppBundle/Email/Mailer/Adapter/PhpMailerAdapter.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Parameter \\#4 \\$password of class AppBundle\\\\Email\\\\Mailer\\\\Adapter\\\\PhpMailerAdapter constructor expects string\\|null, mixed given\\.$#', - 'identifier' => 'argument.type', - 'count' => 1, - 'path' => __DIR__ . '/sources/AppBundle/Email/Mailer/Adapter/PhpMailerAdapter.php', -]; $ignoreErrors[] = [ 'message' => '#^Argument of an invalid type array\\\\|null supplied for foreach, only iterables are supported\\.$#', 'identifier' => 'foreach.nonIterable', diff --git a/phpstan.neon b/phpstan.neon index e1a42dc58..518a44700 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -9,10 +9,6 @@ parameters: stubFiles: - tests/stubs/Ting/Repository/Repository.php.stub - tests/stubs/Ting/Repository/RepositoryFactory.php.stub - ignoreErrors: - - - identifier: property.onlyWritten - path: sources/AppBundle/Controller/LegacyController.php type_coverage: return: 71 param: 71 diff --git a/sources/Afup/Bootstrap/Cli.php b/sources/Afup/Bootstrap/Cli.php deleted file mode 100644 index 83385ea8f..000000000 --- a/sources/Afup/Bootstrap/Cli.php +++ /dev/null @@ -1,27 +0,0 @@ - - * @author Olivier Hoareau - * @copyright 2010 Association Française des Utilisateurs de PHP - * - * @category AFUP - * @package AFUP - * @group Bootstraps - */ - - -$startMicrotime = microtime(true); - -require_once __DIR__ . '/_Common.php'; -require_once __DIR__ . '/../../../vendor/autoload.php'; diff --git a/sources/Afup/Bootstrap/Http.php b/sources/Afup/Bootstrap/Http.php deleted file mode 100644 index 562c85a77..000000000 --- a/sources/Afup/Bootstrap/Http.php +++ /dev/null @@ -1,78 +0,0 @@ - - * @author Olivier Hoareau - * @copyright 2010 Association Française des Utilisateurs de PHP - * - * @category AFUP - * @package AFUP - * @group Bootstraps - */ - -// chargement des paramétrages génériques / multi-contextuels de l'application - -use Afup\Site\Corporate\Site; -use Smarty\Smarty; - -require_once __DIR__ . '/_Common.php'; - -// initialisation de la session / requête -if (ob_get_level() === 0) { - ob_start(); -} - -// mise à jour des paramétrages PHP en fonction de la configuration - -if (getenv('APP_ENV') === 'prod') { - ini_set('error_reporting', (string) (E_ALL ^ E_WARNING ^ E_NOTICE)); - ini_set('display_errors', '0'); -} else { - ini_set('error_reporting', (string) E_ALL); - ini_set('display_errors', '1'); -} - -header('Content-type: text/html; charset=UTF-8'); - -// choix du 'sous-site' en fonction de l'url - -$serveur = ''; -$url = $_SERVER['REQUEST_URI']; -if (strrpos((string) $url, '?') !== false) { - $position = strrpos((string) $url, '?'); - $url = substr((string) $url, 0, $position); -} -$position = strrpos((string) $url, '/'); -$url = substr((string) $_SERVER['REQUEST_URI'], 0, $position); -$parties = explode('/', $url); -$sous_site = array_pop($parties); - -// initialisation de Smarty, le moteur de template (html) - -$smarty = new Smarty(); -$smarty->setTemplateDir([ - AFUP_CHEMIN_RACINE . 'templates/' . $sous_site . '/', - AFUP_CHEMIN_RACINE . 'templates/commun/', -]); -$smarty->setCompileDir(AFUP_CHEMIN_RACINE . 'cache/templates'); -$smarty->compile_id = $sous_site; -$smarty->use_sub_dirs = true; -$smarty->compile_check = Smarty::COMPILECHECK_ON; -$smarty->registerPlugin("modifier","stripslashes", "stripslashes"); -$smarty->registerPlugin("modifier","floatval", "floatval"); - -$smarty->assign('url_base', 'https://' . $_SERVER['HTTP_HOST'] . '/'); -$smarty->assign('chemin_template', $serveur . '/templates/' . $sous_site . '/'); -$smarty->assign('chemin_javascript', $serveur . '/javascript/'); - -require_once(__DIR__ . '/commonStart.php'); diff --git a/sources/Afup/Bootstrap/_Common.php b/sources/Afup/Bootstrap/_Common.php index 3a00b18d0..8c2678107 100644 --- a/sources/Afup/Bootstrap/_Common.php +++ b/sources/Afup/Bootstrap/_Common.php @@ -19,10 +19,6 @@ * @group Bootstraps */ -// racine de l'application (pas du document root !) -use Afup\Site\Corporate\_Site_Base_De_Donnees; -use Afup\Site\Utils\Configuration; - $root = dirname(__DIR__, 3); require_once $root . '/vendor/autoload.php'; @@ -32,18 +28,3 @@ define('AFUP_CHEMIN_RACINE', $root . '/htdocs/'); } date_default_timezone_set('Europe/Paris'); - -// préparation de la requête / session -require_once __DIR__ . '/../fonctions.php'; - -// chargement de la configuration -$conf = new Configuration(); - -// mets la configuration dans une 'clé de registre' accessible à tout moment -$GLOBALS['AFUP_CONF'] = $conf; - -// initialisation de la couche d'abstraction de la base de données -$bdd = new _Site_Base_De_Donnees(); - -// mets la connexion db dans une 'clé de registre' accessible à tout moment -$GLOBALS['AFUP_DB'] = $bdd; diff --git a/sources/Afup/Bootstrap/commonStart.php b/sources/Afup/Bootstrap/commonStart.php index 8cc76624c..087cdba44 100644 --- a/sources/Afup/Bootstrap/commonStart.php +++ b/sources/Afup/Bootstrap/commonStart.php @@ -2,11 +2,6 @@ declare(strict_types=1); -use CCMBenchmark\Ting\Services; -use Symfony\Component\Security\Csrf\CsrfTokenManager; -use Symfony\Component\Translation\Loader\XliffFileLoader; -use Symfony\Component\Translation\Translator; - // Inclusion de l'autoload de composer require_once __DIR__ . '/../../../vendor/autoload.php'; @@ -16,41 +11,9 @@ if (isset($_GET['lang']) && in_array($_GET['lang'], $langs)) { $lang = $_GET['lang']; } -$translator = new Translator($lang); -$translator->addLoader('xliff', new XliffFileLoader()); -$translator->addResource('xliff', __DIR__ . '/../../../translations/inscription.en.xlf', 'en'); -$translator->addResource('xliff', __DIR__ . '/../../../translations/cfp.en.xlf', 'en'); -$translator->setFallbackLocales(['fr']); -if (isset($smarty)) { - $smarty->register_modifier('trans', $translator->trans(...)); -} $debug = false; if (isset($_SERVER['HTTP_HOST']) && $_SERVER['HTTP_HOST'] === 'afup.dev') { $debug = true; } - -// Initialisation de ting -$services = new Services(); -$services->get('ConnectionPool')->setConfig([ - 'main' => [ - 'namespace' => '\CCMBenchmark\Ting\Driver\Mysqli', - 'master' => [ - 'host' => $GLOBALS['AFUP_CONF']->obtenir('database_host'), - 'user' => $GLOBALS['AFUP_CONF']->obtenir('database_user'), - 'password' => $GLOBALS['AFUP_CONF']->obtenir('database_password'), - 'port' => 3306, - ], - ], -]); - -$services - ->get('MetadataRepository') - ->batchLoadMetadata( - 'AppBundle\Event\Model\Repository', - __DIR__ . '/../Event/Model/Repository/*.php', - ['default' => ['database' => $GLOBALS['AFUP_CONF']->obtenir('database_name')]], - ) -; -$services->set('security.csrf.token_manager', fn(): CsrfTokenManager => new CsrfTokenManager()); diff --git a/sources/Afup/Corporate/_Site_Base_De_Donnees.php b/sources/Afup/Corporate/_Site_Base_De_Donnees.php deleted file mode 100644 index 6a4da1b57..000000000 --- a/sources/Afup/Corporate/_Site_Base_De_Donnees.php +++ /dev/null @@ -1,25 +0,0 @@ -obtenir('database_host'), - $conf->obtenir('database_name'), - $conf->obtenir('database_user'), - $conf->obtenir('database_password'), - $conf->obtenir('database_port'), - ); - } -} diff --git a/sources/Afup/Droits.php b/sources/Afup/Droits.php index cafd5eed3..20dcc6e89 100644 --- a/sources/Afup/Droits.php +++ b/sources/Afup/Droits.php @@ -22,11 +22,6 @@ */ class Droits { - /** - * Liste structurée avec toutes les pages référencées dans l'application - */ - private array $_pages = []; - public function __construct( private readonly TokenStorageInterface $tokenStorage, private readonly AuthorizationCheckerInterface $authorizationChecker, @@ -46,37 +41,6 @@ public function obtenirIdentifiant(): ?int return null; } - public function chargerToutesLesPages($pages): void - { - if (is_array($pages)) { - $this->_pages = $pages; - } - } - - /** - * @param int|string $page - */ - public function verifierDroitSurLaPage($page): bool - { - if ($this->authorizationChecker->isGranted('ROLE_SUPER_ADMIN')) { - return true; - } - foreach ($this->_pages as $_page => $_page_details) { - if ($page == $_page && (isset($_page_details['niveau']) && $this->authorizationChecker->isGranted($_page_details['niveau']))) { - return true; - } - if (isset($_page_details['elements']) && is_array($_page_details['elements'])) { - foreach ($_page_details['elements'] as $_element => $_element_details) { - if ($page == $_element && (isset($_element_details['niveau']) && $this->authorizationChecker->isGranted($_element_details['niveau']))) { - return true; - } - } - } - } - - return false; - } - /** * @param int $compagnyId */ diff --git a/sources/Afup/Forum/Forum.php b/sources/Afup/Forum/Forum.php deleted file mode 100644 index 14d2d34e6..000000000 --- a/sources/Afup/Forum/Forum.php +++ /dev/null @@ -1,460 +0,0 @@ -_bdd->obtenirEnregistrement($requete); - } - - public function obtenirForumPrecedent($id_forum) - { - $requete = 'SELECT MAX(id)'; - $requete .= 'FROM'; - $requete .= ' afup_forum '; - $requete .= 'WHERE'; - $requete .= ' id < ' . (int) $id_forum . ' AND titre like "%Forum%"'; - return $this->_bdd->obtenirUn($requete); - } - - public function obtenirDernier() - { - $requete = 'SELECT id '; - $requete .= 'FROM afup_forum '; - $requete .= 'ORDER BY date_debut desc'; - return $this->_bdd->obtenirUn($requete); - } - - /** - * Renvoit la liste des inscriptions à facturer ou facturé au forum - * - * @param string $champs Champs à renvoyer - * @param string $ordre Tri des enregistrements - * @param bool $associatif Renvoyer un tableau associatif ? - * @return array - */ - public function obtenirListe($id_forum = null, - string $champs = '*', - string $ordre = 'titre', - $associatif = false, - $filtre = false) - { - $requete = 'SELECT'; - $requete .= ' ' . $champs . ' '; - $requete .= 'FROM'; - $requete .= ' afup_forum '; - $requete .= 'ORDER BY ' . $ordre; - if ($associatif) { - return $this->_bdd->obtenirAssociatif($requete); - } else { - return $this->_bdd->obtenirTous($requete); - } - } - - public function obtenirListActive() - { - return $this->_bdd->obtenirTous('SELECT * FROM afup_forum WHERE archived_at IS NULL ORDER BY titre'); - } - - /** - * Récupérer l'agenda du forum. - * - * Pour une année donnée pass�e en paramètre, retourne - * les informations nécessaires à la construction du tableau - * de l'agenda du forum AFUP correspondant. - * - * @param Int $annee (Optionnel, retournera tout si aucunne année indiquée) - */ - public function obtenirAgenda($annee = null, $forum_id = null) - { - $aWhere = []; - if (isset($annee)) { - $tdebut = mktime(0, 0, 0, 1, 1, (int) $annee); - $tfin = mktime(0, 0, 0, 1, 1, (int) ($annee + 1)); - $aWhere[] = "p.debut >= " . $tdebut; - $aWhere[] = "p.fin < " . $tfin; - $aWhere[] = "s.plannifie = 1"; - } - - if (null !== $forum_id) { - $aWhere[] = "l.id_forum = " . $forum_id; - } - - $sWhere = "WHERE " . implode(" AND ", $aWhere); - $requete = "SELECT " - . " ( SELECT CONCAT(c.nom,' ', c.prenom , ' - ', c.societe ) FROM afup_conferenciers_sessions cs INNER JOIN afup_conferenciers c ON c.conferencier_id = cs.conferencier_id WHERE cs.session_id = s.session_id order by c.conferencier_id asc limit 1) as conf1 , - ( SELECT CONCAT(c.nom,' ', c.prenom, ' - ', c.societe) FROM afup_conferenciers_sessions cs INNER JOIN afup_conferenciers c ON c.conferencier_id = cs.conferencier_id WHERE cs.session_id = s.session_id order by c.conferencier_id asc limit 1,1) as conf2 , " - - . " s.session_id, s.titre, s.journee, " - . " FROM_UNIXTIME(p.debut, '%d-%m-%Y') AS 'jour', " - . " FROM_UNIXTIME(p.debut, '%H:%i') AS 'debut', " - . " FROM_UNIXTIME(p.fin, '%H:%i') AS 'fin', " - . " p.id_salle, " - . " p.keynote, " - . " l.nom " - . "FROM afup_sessions s " - . " JOIN afup_forum_planning p ON s.session_id = p.id_session " - . " JOIN afup_forum_salle l ON p.id_salle = l.id " - . $sWhere . " " - . "ORDER BY p.debut ASC, p.id_salle ASC"; - return $this->_bdd->obtenirTous($requete); - } - - /** - * Compte en nombre de demi-heures. - * - * Sur la base des horaires d'une scéance au format «HH:mm - HH:mm» - * calcule la durée en nombre de demi-heures. - * Servira à calculer combien de lignes d'affichage occupera une - * scéance. - * - * @param String $heures - * @return Int - */ - public function dureeSeance($heures) - { - $aHeures = explode("-", $heures); - $aDebut = explode(":", $aHeures[0]); - $aFin = explode(":", $aHeures[1]); - $iDebut = ((int) $aDebut[0] * 60) + (int) $aDebut[1]; - $iFin = ((int) $aFin[0] * 60) + (int) $aFin[1]; - return ($iFin - $iDebut) / 5; - } - - /** - * Construction des liens vers les fiches détaillées des conférences. - * - * @param String $infoSeance - * @param Boolean $for_bo - * @param ?string $linkFormat if $for_bo = false, this format will be used (if not null) to construct the link. - * i.e : "/sessions.php#%1" . %1 is the session id - * @return String - */ - public function lienSeance($infoSeance, $for_bo, $linkFormat): ?string - { - $masque = "#^(\\d+) ?: ?(.*)#"; - //$masque = "#^([0-9]+) ?| ?(.*) ?| ?(.*)#"; - - - $lien = '#$1'; - if ($for_bo === false) { - $lien = $linkFormat !== null ? sprintf($linkFormat, '$1') : './sessions.php#$1'; - } - return preg_replace($masque, '

$2

', $infoSeance); - } - - public function genAgenda($annee, $for_bo = false, $only_data = false, $forum_id = null, $linkFormat = null) - { - $aProgrammeData = []; - $aAgenda = $this->obtenirAgenda($annee, $forum_id); - if (isset($aAgenda) && count($aAgenda) > 0) { - $nbConf = count($aAgenda); - $nomSalles = []; - $j = 0; - $d = null; - $aProgramme = []; - foreach ($aAgenda as $session) { - if (!isset($nomSalles[$session['id_salle']])) { - $nomSalles[$session['id_salle']] = $session['nom']; - } - $dj = $session['jour']; - if ($dj != $d) { - $j++; - $d = $dj; - $aProgramme[$dj] = []; - } - if (!isset($aProgramme[$dj][$session['debut'] . "-" . $session['fin']])) { - $aProgramme[$dj][$session['debut'] . "-" . $session['fin']] = []; - } - if (!isset($aProgramme[$dj][$session['debut'] . "-" . $session['fin']][$session['nom']])) { - $aProgramme[$dj][$session['debut'] . "-" . $session['fin']][$session['nom']] = []; - } - $aProgrammeData[$dj][$session['debut'] . "-" . $session['fin']][] = $session; - $aProgramme[$dj][$session['debut'] . "-" . $session['fin']][$session['nom']][] = $session['session_id'] . " : " . $session['titre'] . (' ' . $session['conf1'] . ($session['conf2'] ? (' / ' . $session['conf2']) : '') . ''); - //$aProgramme[$dj][$session['debut'] ."-". $session['fin']][$session['nom']][] = array('id'=>$session['session_id'], 'titre'=> $session['titre'],'conf1'=> $session['titre'],'titre'=> $session['titre']); - } - //var_dump($aProgrammeData['12-11-2009']);die; - if ($only_data) { - return $aProgrammeData; - } - $nbSalles = count($nomSalles); - $tdWith = round(84 / $nbSalles); - - // - $sTable = ''; - $j = 1; - $aRowSpan = []; - - /* On boucle sur chaque journée du programme. */ - foreach ($aProgramme as $journee => $aInfos) { - $journee_aff = date('d/m/Y', strtotime((string) $journee)); - $sTable .= << -

Jour {$j} : {$journee_aff}

-
- - - - - -CODE_HTML; - $s = 1; - $confNumber = 0; - foreach ($nomSalles as $idSalle => $nomSalle) { - $sTable .= <<{$nomSalle} - -CODE_HTML; - $aRowSpan[$idSalle] = 0; - $s++; - } - $sTable .= << - - - -CODE_HTML; - /* On boucle maintenant sur chaque demi-heure de l'agenda (de 08h00 à 18h00 */ - for ($h = 8; $h < 19; $h++) { - for ($i = 0; $i < 12; $i++) { - $bKeynote = false; - $m = sprintf('%02d', 5 * $i); - $m_next = sprintf('%02d', (5 * ($i + 1)) % 60); - $style = ($i % 2 == 0) ? 'lp' : 'li'; - $sHeure = ($h < 10) ? '0' . $h : $h; - $h_next = ($i < 11) ? $h : $h + 1; - $sHeure_next = ($h_next < 10) ? '0' . $h_next : $h_next; - /* Création de la ligne avec la cellule indiquant l'heure */ - $sTable .= << - - -CODE_HTML; - - /* On cherche les scéances commençant à cette heure pour chaque salle. */ - foreach ($nomSalles as $idSalle => $nomSalle) { - /* On vérifie qu'on est pas déjà sur une scéance commencée à un tour précédent. */ - if ($aRowSpan[$idSalle] <= 1): - $bSeance = false; - $rs = null; - /* Calcul du nombre de lignes occupées par la scéance s'il y en a une. */ - for ($c = 0; $c < $nbConf; $c++): - //var_dump($aAgenda[$c]); - if ( - $aAgenda[$c]['debut'] == $sHeure . ":" . $m - && $aAgenda[$c]['id_salle'] == $idSalle - && $aAgenda[$c]['jour'] == $journee - ): - /* Si on toruve une scéance, on ne mettra pas de cellule vide. */ - $bSeance = true; - - $bKeynote = $aAgenda[$c]['keynote']; - $colspan = $bKeynote ? ' colspan="' . $nbSalles . '" class="keynote" ' : ''; - $heures = $aAgenda[$c]['debut'] . "-" . $aAgenda[$c]['fin']; - $nl = $this->dureeSeance($heures); - $aRowSpan[$idSalle] = $nl; - - $class = 'conf conf_' . ($confNumber % 2 === 0 ? 'odd' : 'even'); - - $rs = ($nl > 1) ? ' rowspan="' . $nl . '"' : null; - $nbSeances = (isset($aInfos[$heures][$nomSalle])) ? count($aInfos[$heures][$nomSalle]) : 0; - if ($nbSeances > 0): - $conflit = $nbSeances > 1 ? ' style="color: inherit; background-color: #f99"' : null; - $sTable .= << - -CODE_HTML; - for ($sc = 0; $sc < $nbSeances; $sc++): - - $lien = $this->lienSeance($aInfos[$heures][$nomSalle][$sc], $for_bo, $linkFormat); - //$lien = '

$2

'; - $sTable .= $lien; - endfor; - $sTable .= ""; - $confNumber++; - endif; - break; - endif; - endfor; - if (in_array($sHeure . '_' . $m . '_' . $journee, ['17_00_12-11-2009', '10_30_12-11-2009'])) { - $bKeynote = true; - } - if (false === $bSeance && !$bKeynote): - $sTable .= "
"; - endif; - else: - $aRowSpan[$idSalle]--; - endif; - } - $sTable .= " "; - } - } - $sTable .= << -
 
{$sHeure}h{$m} - {$sHeure_next}h{$m_next}  

- -CODE_HTML; - $j++; - } - } else { - // Aucune donnée dans la base. Affichage alternatif. - $sTable = <<Aucune entrée disponible. - -CODE_HTML; - } - return $sTable; - } - - public function ajouter( - $titre, - $nb_places, - array $date_debut, - $date_fin, - $date_fin_appel_projet, - $date_fin_appel_conferencier, - $date_fin_vote, - $date_fin_prevente, - $date_fin_vente, - $date_fin_vente_token_sponsor, - $date_fin_saisie_repas_speakers, - $date_fin_saisie_nuites_hotel, - $date_annonce_planning, - $chemin_template, - array $text, - $logoUrl, - $placeName, - $placeAddress, - $voteEnabled = true, - $speakersDinerEnabled = true, - $accomodationEnabled = true, - $waitingListUrl = null, - $hasPricesDefinedWithVat = false, - $transportInformationEnabled = false, - ) { - $requete = 'INSERT INTO '; - $requete .= ' afup_forum (id, titre, nb_places, date_debut, date_fin, annee, date_fin_appel_projet,'; - $requete .= ' date_fin_appel_conferencier, date_fin_vote, date_fin_prevente, date_fin_vente, date_fin_vente_token_sponsor, date_fin_saisie_repas_speakers, date_fin_saisie_nuites_hotel, date_annonce_planning, path, `text`, - `logo_url`, `place_name`, `has_prices_defined_with_vat`, `vote_enabled`, `speakers_diner_enabled`, `accomodation_enabled`, `waiting_list_url`, `place_address`, `transport_information_enabled`) '; - $requete .= 'VALUES (null,'; - $requete .= $this->_bdd->echapper($titre) . ','; - $requete .= (int) $nb_places . ','; - $requete .= $this->_bdd->echapperSqlDateFromQuickForm($date_debut) . ','; - $requete .= $this->_bdd->echapperSqlDateFromQuickForm($date_fin) . ','; - $requete .= (int) $date_debut['Y'] . ','; - $requete .= $this->_bdd->echapperSqlDateFromQuickForm($date_fin_appel_projet, true) . ','; - $requete .= $this->_bdd->echapperSqlDateFromQuickForm($date_fin_appel_conferencier, true) . ','; - $requete .= $this->_bdd->echapperSqlDateFromQuickForm($date_fin_vote, false) . ','; - $requete .= $this->_bdd->echapperSqlDateFromQuickForm($date_fin_prevente, true) . ','; - $requete .= $this->_bdd->echapperSqlDateFromQuickForm($date_fin_vente, true) . ','; - $requete .= $this->_bdd->echapperSqlDateFromQuickForm($date_fin_vente_token_sponsor, true) . ','; - $requete .= $this->_bdd->echapperSqlDateFromQuickForm($date_fin_saisie_repas_speakers, true) . ','; - $requete .= $this->_bdd->echapperSqlDateFromQuickForm($date_fin_saisie_nuites_hotel, true) . ','; - $requete .= $this->_bdd->echapperSqlDateFromQuickForm($date_annonce_planning, true) . ','; - $requete .= $this->_bdd->echapper($chemin_template) . ','; - $requete .= $this->_bdd->echapper(json_encode($text)) . ', '; - $requete .= $this->_bdd->echapper($logoUrl) . ','; - $requete .= $this->_bdd->echapper($placeName) . ','; - $requete .= $this->_bdd->echapper($hasPricesDefinedWithVat ? 1 : 0) . ','; - $requete .= $this->_bdd->echapper($voteEnabled ? 1 : 0) . ','; - $requete .= $this->_bdd->echapper($speakersDinerEnabled ? 1 : 0) . ','; - $requete .= $this->_bdd->echapper($accomodationEnabled ? 1 : 0) . ','; - $requete .= $this->_bdd->echapper($waitingListUrl) . ','; - $requete .= $this->_bdd->echapper($placeAddress) . ','; - $requete .= $this->_bdd->echapper($transportInformationEnabled ? 1 : 0); - - $requete .= ')'; - - return $this->_bdd->executer($requete); - } - - public function modifier( - string $id, - $titre, - $nb_places, - array $date_debut, - $date_fin, - $date_fin_appel_projet, - $date_fin_appel_conferencier, - $date_fin_vote, - $date_fin_prevente, - $date_fin_vente, - $date_fin_vente_token_sponsor, - $date_fin_saisie_repas_speakers, - $date_fin_saisie_nuites_hotel, - $date_annonce_planning, - $chemin_template, - array $text, - $logoUrl = null, - $placeName = null, - $placeAddress = null, - $voteEnabled = true, - $speakersDinerEnabled = true, - $accomodationEnabled = true, - $waitingListUrl = null, - $hasPricesDefinedWithVat = false, - $transportInformationEnabled = false, - ) { - $requete = 'UPDATE '; - $requete .= ' afup_forum '; - $requete .= 'SET'; - $requete .= ' titre=' . $this->_bdd->echapper($titre) . ','; - $requete .= ' nb_places=' . (int) $nb_places . ','; - $requete .= ' date_debut=' . $this->_bdd->echapperSqlDateFromQuickForm($date_debut) . ','; - $requete .= ' date_fin=' . $this->_bdd->echapperSqlDateFromQuickForm($date_fin) . ','; - $requete .= ' annee=' . (int) $date_debut['Y'] . ','; - $requete .= ' date_fin_appel_projet=' . $this->_bdd->echapperSqlDateFromQuickForm($date_fin_appel_projet, true) . ','; - $requete .= ' date_fin_appel_conferencier=' . $this->_bdd->echapperSqlDateFromQuickForm($date_fin_appel_conferencier, true) . ','; - $requete .= ' date_fin_vote=' . $this->_bdd->echapperSqlDateFromQuickForm($date_fin_vote, false) . ','; - $requete .= ' date_fin_prevente=' . $this->_bdd->echapperSqlDateFromQuickForm($date_fin_prevente, true) . ','; - $requete .= ' date_fin_vente=' . $this->_bdd->echapperSqlDateFromQuickForm($date_fin_vente, true) . ','; - $requete .= ' date_fin_vente_token_sponsor=' . $this->_bdd->echapperSqlDateFromQuickForm($date_fin_vente_token_sponsor, true) . ','; - $requete .= ' date_fin_saisie_repas_speakers=' . $this->_bdd->echapperSqlDateFromQuickForm($date_fin_saisie_repas_speakers, true) . ','; - $requete .= ' date_fin_saisie_nuites_hotel=' . $this->_bdd->echapperSqlDateFromQuickForm($date_fin_saisie_nuites_hotel, true) . ','; - $requete .= ' date_annonce_planning=' . $this->_bdd->echapperSqlDateFromQuickForm($date_annonce_planning, true) . ','; - $requete .= ' path=' . $this->_bdd->echapper($chemin_template) . ', '; - $requete .= ' `text` = ' . $this->_bdd->echapper(json_encode($text)) . ', '; - $requete .= ' `logo_url` = ' . $this->_bdd->echapper($logoUrl) . ', '; - $requete .= ' `place_name` = ' . $this->_bdd->echapper($placeName) . ', '; - $requete .= ' `vote_enabled` = ' . $this->_bdd->echapper($voteEnabled ? 1 : 0) . ', '; - $requete .= ' `has_prices_defined_with_vat` = ' . $this->_bdd->echapper($hasPricesDefinedWithVat ? 1 : 0) . ', '; - $requete .= ' `speakers_diner_enabled` = ' . $this->_bdd->echapper($speakersDinerEnabled ? 1 : 0) . ', '; - $requete .= ' `accomodation_enabled` = ' . $this->_bdd->echapper($accomodationEnabled ? 1 : 0) . ', '; - $requete .= ' `waiting_list_url` = ' . $this->_bdd->echapper($waitingListUrl) . ','; - $requete .= ' `place_address` = ' . $this->_bdd->echapper($placeAddress) . ', '; - $requete .= ' `transport_information_enabled` = ' . $this->_bdd->echapper($transportInformationEnabled ? 1 : 0) . ' '; - $requete .= 'WHERE'; - $requete .= ' id=' . $id; - - return $this->_bdd->executer($requete); - } - - public function supprimer($id_forum) - { - $id_forum = $this->_bdd->echapper($id_forum); - - $requete = 'DELETE FROM afup_forum WHERE id = ' . $id_forum; - - return $this->_bdd->executer($requete); - } -} diff --git a/sources/Afup/Pagination.php b/sources/Afup/Pagination.php deleted file mode 100644 index a8d6b4959..000000000 --- a/sources/Afup/Pagination.php +++ /dev/null @@ -1,35 +0,0 @@ -nombre_elements_total / $this->nombre_elements_par_page); - $pages = []; - for ($i = 1; $i <= $page_max; $i++) { - $pages[] = $i; - } - - $smarty->assign('pagination_page_courante', $this->page_courante); - $smarty->assign('pagination_pages', $pages); - - $smarty->register_function('pagination_genere_route', $this->genere_route, false); - - ob_start(); - $smarty->display('pagination.html'); - return (string) ob_get_clean(); - } -} diff --git a/sources/Afup/Utils/Base_De_Donnees.php b/sources/Afup/Utils/Base_De_Donnees.php deleted file mode 100644 index 3847fe03a..000000000 --- a/sources/Afup/Utils/Base_De_Donnees.php +++ /dev/null @@ -1,252 +0,0 @@ -config = [ - 'host' => $host, - 'database' => $database, - 'user' => $user, - 'password' => $password, - 'port' => $port, - ]; - } - - public function getDbLink() - { - if ($this->link === null) { - $this->link = mysqli_connect($this->config['host'], $this->config['user'], $this->config['password'], null, (int) $this->config['port']) or die('Connexion à la base de données impossible'); - mysqli_set_charset($this->link, "utf8mb4"); - $this->selectionnerBase($this->config['database']); - } - return $this->link; - } - - /** - * Sélectionne la base de données indiquée - * - * @param string $nom Nom de la base - */ - public function selectionnerBase($nom): bool - { - return mysqli_select_db($this->getDbLink(), $nom); - } - - /** - * Prépare une valeur qui va être incorporée dans une requête SQL - * - * @param mixed $valeur Valeur à traiter - * @return string La valeur traitée - */ - public function echapper($valeur): string - { - if (is_string($valeur)) { - $valeur = "'" . mysqli_real_escape_string($this->getDbLink(), $valeur) . "'"; - } elseif (is_null($valeur)) { - $valeur = 'NULL'; - } - return (string) $valeur; - } - - /** - * - * @param array $date - * @param boolean $timestamp - * @return int|string - */ - public function echapperSqlDateFromQuickForm($date, $timestamp = false) - { - $dateChaine = $date['Y'] . '-' . $date['M'] . '-' . $date['d']; - if (isset($date['H']) && isset($date['i'])) { - $dateChaine .= ' ' . $date['H'] . ':' . $date['i']; - if (isset($date['s'])) { - $dateChaine .= ':' . $date['s']; - } - } - if ($timestamp) { - return strtotime($dateChaine); - } else { - return $this->echapper($dateChaine); - } - } - - /** - * Retrieve the last error message - * @return string - */ - public function getLastErrorMessage(): ?string - { - return mysqli_error($this->getDbLink()); - } - - /** - * Exécute une requête SQL - * - * @param string $requete Requête à exécuter - * @return bool - */ - public function executer($requete) - { - $result = mysqli_query($this->getDbLink(), $requete); - if (!$result) { - throw new \RuntimeException(mysqli_error($this->getDbLink())); - } - - return $result; - } - - /** - * Exécute une requête SQL et retourne le premier champ du premier enregistrement - * - * @param string $requete Requête à exécuter - * @return mixed Le premier champ du premier enregistrement ou false si la requête échoue - */ - public function obtenirUn($requete) - { - $enregistrement = $this->obtenirEnregistrement($requete, MYSQLI_NUM); - if ($enregistrement === false) { - return false; - } else { - return $enregistrement[0]; - } - } - - /** - * Exécute une requête SQL et retourne le premier enregistrement correspondant - * - * @param string $requete Requête à exécuter - * @param int $type Type de résultat souhaité. Les valeurs possibles sont MYSQLI_ASSOC, MYSQLI_NUM, MYSQLI_BOTH. - * Elles permettent respectivement de récupérer les valeurs sous forme d'un tableau associatif, indexé ou les deux. - * La valeur par défaut est MYSQLI_ASSOC. - * @return mixed L'enregistrement correspondant dans un tableau ou false si la requête échoue - */ - public function obtenirEnregistrement($requete, $type = MYSQLI_ASSOC) - { - $ressource = mysqli_query($this->getDbLink(), $requete); - if ($ressource === false) { - return false; - } - $enregistrement = mysqli_fetch_array($ressource, $type); - mysqli_free_result($ressource); - - if ($enregistrement === null) { - return false; - } else { - return $enregistrement; - } - } - - /** - * Exécute une requête SQL et retourne les enregistrements correspondant - * - * @param string $requete Requête à exécuter - * @param int $type Type de résultat souhaité. Les valeurs possibles sont MYSQLI_ASSOC, MYSQLI_NUM, MYSQLI_BOTH. - * Elles permettent respectivement de récupérer les valeurs sous forme d'un tableau associatif, indexé ou les deux. - * La valeur par défaut est MYSQLI_ASSOC. - * @return array|false Les enregistrements correspondant dans un tableau ou false si la requête échoue - */ - public function obtenirTous($requete, $type = MYSQLI_ASSOC) - { - $ressource = mysqli_query($this->getDbLink(), $requete); - if ($ressource === false) { - return false; - } - - $resultat = []; - while ($enregistrement = mysqli_fetch_array($ressource, $type)) { - $resultat[] = $enregistrement; - } - mysqli_free_result($ressource); - - return $resultat; - } - - /** - * Exécute une requête SQL et retourne les enregistrements correspondant - * - * @param string $requete Requête à exécuter - * @return mixed Les enregistrements correspondant dans un tableau ou false si la requête échoue - */ - public function obtenirColonne($requete) - { - $ressource = mysqli_query($this->getDbLink(), $requete); - if ($ressource === false) { - return false; - } - - $resultat = []; - while ($enregistrement = mysqli_fetch_array($ressource)) { - $resultat[] = $enregistrement[0]; - } - mysqli_free_result($ressource); - - return $resultat; - } - - /** - * Exécute une requête SQL et retourne les enregistrements correspondant dans un tableau associatif dont le premier champ est la clé - * - * @param string $requete Requête à exécuter - * @return array|false Les enregistrements correspondant dans un tableau associatif ou false si la requête échoue - */ - public function obtenirAssociatif($requete) - { - $ressource = mysqli_query($this->getDbLink(), $requete); - $nombre_champs = mysqli_num_fields($ressource); - if ($ressource === false || $nombre_champs < 2) { - return false; - } - - // $i = 0; - // $champs = array(); - // while ($i < $nombre_champs) { - // $champs[$i] = MYSQLI_field_name($ressource, $i); - // $i++; - // } - $champs = mysqli_fetch_fields($ressource); - - $resultat = []; - if ($nombre_champs == 2) { - while ($enregistrement = mysqli_fetch_array($ressource, MYSQLI_NUM)) { - $resultat[$enregistrement[0]] = $enregistrement[1]; - } - } else { - while ($enregistrement = mysqli_fetch_array($ressource, MYSQLI_ASSOC)) { - $resultat[$enregistrement[$champs[0]->name]] = array_slice($enregistrement, 1); - } - } - mysqli_free_result($ressource); - - return $resultat; - } - - public function obtenirDernierId() - { - return mysqli_insert_id($this->getDbLink()); - } -} diff --git a/sources/Afup/Utils/LegacyConnectionFactory.php b/sources/Afup/Utils/LegacyConnectionFactory.php deleted file mode 100644 index c3522cb47..000000000 --- a/sources/Afup/Utils/LegacyConnectionFactory.php +++ /dev/null @@ -1,23 +0,0 @@ -bdd)) { - if (isset($GLOBALS['AFUP_DB']) === false) { - throw new \RuntimeException('Could not find the legacy database connexion'); - } - - $this->bdd = $GLOBALS['AFUP_DB']; - } - - return $this->bdd; - } -} diff --git a/sources/Afup/Utils/Mail.php b/sources/Afup/Utils/Mail.php deleted file mode 100644 index c9c6017c5..000000000 --- a/sources/Afup/Utils/Mail.php +++ /dev/null @@ -1,27 +0,0 @@ -getRecipients(); - $recipient = reset($recipients); - $message->setContent(str_replace('$EMAIL$', $recipient->getEmail(), $body)); - - return Mail::createMailer()->send($message); - } -} diff --git a/sources/Afup/fonctions.php b/sources/Afup/fonctions.php deleted file mode 100644 index d48e43038..000000000 --- a/sources/Afup/fonctions.php +++ /dev/null @@ -1,128 +0,0 @@ -removeAttribute('name'); - return $formulaire; -} - -/** - * Renvoit un tableau contenant les éléments d'un formulaire - * - * @param HTML_QuickForm $formulaire Formulaire à traiter - * @return array - */ -function genererFormulaire(HTML_QuickForm &$formulaire) -{ - foreach ($formulaire->getElements() as $el) { - $attrs = $el->getAttributes(); - if ($el instanceof HTML_QuickForm_submit) { - $attrs['class'] = 'ui primary button'; - } - $el->setAttributes($attrs); - } - - $renderer = new HTML_QuickForm_Renderer_Array(true, true); - $formulaire->accept($renderer); - $resultat = $renderer->toArray(); - unset($renderer); - return $resultat; -} - -/** - * Vérifie qu'une action est disponible et si ce n'est pas le cas, renvoit l'action par défaut - * - * L'action par défaut est la première des actions disponibles. - * - * @param array $actions_disponibles Actions disponibles - * @return string - */ -function verifierAction(array $actions_disponibles) -{ - if (count($actions_disponibles) == 0) { - trigger_error("Les actions disponibles doivent être passées sous forme d'un tableau d'au moins un élément", E_USER_ERROR); - } - - if (!empty($_GET['action']) && in_array($_GET['action'], $actions_disponibles)) { - return $_GET['action']; - } else { - return $actions_disponibles[0]; - } -} - -function obtenirTitre($pages, $page) -{ - foreach ($pages as $_page => $_page_details) { - if ($page == $_page) { - return $_page_details['nom']; - } - if (isset($_page_details['elements']) && is_array($_page_details['elements'])) { - foreach ($_page_details['elements'] as $_element => $_element_details) { - if ($page == $_element) { - return $_element_details['nom']; - } - } - } - } - return null; -} - -function chargerForumId(): void -{ - $_GET['id_forum'] ??= $_SESSION['_sf2_attributes'][RedirectEventFromSessionListener::SESSION_KEY] ?? 0; -} - -function checkForumRedirection(): void -{ - $idFromSession = $_SESSION['_sf2_attributes'][RedirectEventFromSessionListener::SESSION_KEY] ?? null; - - if ( - $_SERVER['REQUEST_METHOD'] === 'GET' - && !isset($_GET['id_forum']) - && $idFromSession !== null - ) { - $url = $_SERVER['REQUEST_URI']; - - $parsedUrl = parse_url((string) $url); - parse_str($parsedUrl['query'] ?? '', $queryParams); - - $queryParams['id_forum'] = $idFromSession; - - $newQuery = http_build_query($queryParams); - $newUrl = $parsedUrl['path'] . '?' . $newQuery; - - header("Location: $newUrl"); - exit(); - } -} diff --git a/sources/AppBundle/Accounting/InvoicingMailer.php b/sources/AppBundle/Accounting/InvoicingMailer.php index fbee75835..7037fd2f1 100644 --- a/sources/AppBundle/Accounting/InvoicingMailer.php +++ b/sources/AppBundle/Accounting/InvoicingMailer.php @@ -4,10 +4,10 @@ namespace AppBundle\Accounting; -use Afup\Site\Utils\Mailing; use AppBundle\Afup; use AppBundle\Accounting\Model\Invoicing; use AppBundle\Email\Mailer\Attachment; +use AppBundle\Email\Mailer\Mailer; use AppBundle\Email\Mailer\MailUser; use AppBundle\Email\Mailer\Message; use Symfony\Component\DependencyInjection\Attribute\Autowire; @@ -16,6 +16,7 @@ { public function __construct( private InvoicingPdfGenerator $pdfGenerator, + private Mailer $mailer, #[Autowire('%kernel.project_dir%/../htdocs/cache/')] private string $publicCacheDir, ) {} @@ -24,7 +25,7 @@ public function sendInvoice(Invoicing $invoicing): bool { $invoiceNumber = $invoicing->getInvoiceNumber(); - $sujet = "Facture AFUP\n"; + $sujet = "Facture AFUP"; $corps = "Bonjour, \n\n"; $corps .= "Veuillez trouver ci-joint la facture correspondant à la participation au forum organisé par l'AFUP.\n"; @@ -48,7 +49,8 @@ public function sendInvoice(Invoicing $invoicing): bool 'base64', 'application/pdf', )); - $ok = Mailing::envoyerMail($message, $corps); + $message->setContent($corps); + $ok = $this->mailer->send($message); @unlink($cheminFacture); diff --git a/sources/AppBundle/Association/Form/HTML_QuickForm.php b/sources/AppBundle/Association/Form/HTML_QuickForm.php deleted file mode 100644 index 83a028db0..000000000 --- a/sources/AppBundle/Association/Form/HTML_QuickForm.php +++ /dev/null @@ -1,13 +0,0 @@ -_elements; - } -} diff --git a/sources/AppBundle/Controller/Admin/HealthcheckController.php b/sources/AppBundle/Controller/Admin/HealthcheckController.php index 97698d57b..f519f876a 100644 --- a/sources/AppBundle/Controller/Admin/HealthcheckController.php +++ b/sources/AppBundle/Controller/Admin/HealthcheckController.php @@ -4,23 +4,25 @@ namespace AppBundle\Controller\Admin; -use Afup\Site\Corporate\_Site_Base_De_Donnees; use AppBundle\Event\Model\Repository\EventRepository; use DateTime; +use Doctrine\DBAL\Connection; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpKernel\Kernel; class HealthcheckController extends AbstractController { - public function __construct(private readonly EventRepository $eventRepository) {} + public function __construct( + private readonly EventRepository $eventRepository, + private readonly Connection $dbalConnection, + ) {} public function __invoke(): Response { $php = new DateTime(); - $bdd = new _Site_Base_De_Donnees(); - $mysqlBdd = $bdd->obtenirUn('SELECT CURRENT_TIMESTAMP'); + $mysqlBdd = $this->dbalConnection->executeQuery('SELECT CURRENT_TIMESTAMP')->fetchOne(); $mysqlBdd = new DateTime($mysqlBdd); $mysqlTing = $this->eventRepository->getQuery('SELECT CURRENT_TIMESTAMP')->execute()['CURRENT_TIMESTAMP']; @@ -31,7 +33,7 @@ public function __invoke(): Response return $this->render('admin/healthcheck.html.twig', [ 'dates' => [ 'php' => $php->format(\DateTime::ATOM), - 'mysql_bdd' => $mysqlBdd->format(\DateTime::ATOM), + 'mysql_dbal' => $mysqlBdd->format(\DateTime::ATOM), 'mysql_ting' => $mysqlTing->format(\DateTime::ATOM), 'diff' => $diff, ], diff --git a/sources/AppBundle/Controller/LegacyController.php b/sources/AppBundle/Controller/LegacyController.php deleted file mode 100644 index dca75765c..000000000 --- a/sources/AppBundle/Controller/LegacyController.php +++ /dev/null @@ -1,105 +0,0 @@ -tokenStorage, $this->authorizationChecker); - $pages = $this->backOfficePages; - /** @var Session $session */ - $session = $this->requestStack->getSession(); - - if ($_GET['page'] == 'index' || !file_exists(__DIR__ . '/../../../htdocs/pages/administration/' . $_GET['page'] . '.php')) { - return $this->redirectToRoute('admin_home'); - } - // On vérifie que l'utilisateur a le droit d'accéder à la page - $droits->chargerToutesLesPages($pages); - if (!$droits->verifierDroitSurLaPage($_GET['page'])) { - $this->addFlash('error', "Vous n'avez pas le droit d'accéder à\u{a0}cette page"); - return $this->redirectToRoute('admin_home'); - } - // Initialisation de AFUP_Log - require_once __DIR__ . '/../../../htdocs/pages/administration/' . $_GET['page'] . '.php'; - // On gère des infos popups - if (isset($_SESSION['flash']['message'])) { - $this->addFlash('notice', $_SESSION['flash']['message']); - } - if (isset($_SESSION['flash']['erreur'])) { - $this->addFlash('error', $_SESSION['flash']['erreur']); - } - unset($_SESSION['flash']); - // Récupération du contenu de la page généré par smarty - $content = $smarty->fetch($_GET['page'] . '.html'); - - $file = $_GET['page'] . '.js.html'; - $js = ''; - if ($smarty->templateExists($file)) { - $js = $smarty->fetch($file); - } - - return $this->render('admin/base_with_header.html.twig', [ - 'title' => obtenirTitre($pages, $_GET['page']), - 'page' => $_GET['page'], - 'content' => $content, - 'js' => $js, - ]); - } -} diff --git a/sources/AppBundle/Email/Mailer/Adapter/PhpMailerAdapter.php b/sources/AppBundle/Email/Mailer/Adapter/PhpMailerAdapter.php deleted file mode 100644 index 3510c7b66..000000000 --- a/sources/AppBundle/Email/Mailer/Adapter/PhpMailerAdapter.php +++ /dev/null @@ -1,90 +0,0 @@ -obtenir('smtp_host'), - (string) $configuration->obtenir('smtp_tls'), - $configuration->obtenir('smtp_username'), - $configuration->obtenir('smtp_password'), - (string) $configuration->obtenir('smtp_port'), - ); - } - - public function send(Message $message): void - { - $from = $message->getFrom(); - if (!$from instanceof MailUser) { - throw new UnexpectedValueException('Trying to send a mail with no sender'); - } - $phpMailer = $this->createPhpMailer(); - $phpMailer->setFrom($from->getEmail(), $from->getName()); - $phpMailer->isHTML($message->isHtml()); - $phpMailer->Subject = $message->getSubject(); - $phpMailer->Body = $message->getContent(); - foreach ($message->getRecipients() as $user) { - $phpMailer->addAddress($user->getEmail(), $user->getName()); - } - foreach ($message->getCc() as $user) { - $phpMailer->addAddress($user->getEmail(), $user->getName()); - } - foreach ($message->getBcc() as $user) { - $phpMailer->addAddress($user->getEmail(), $user->getName()); - } - foreach ($message->getAttachments() as $attachment) { - $phpMailer->addAttachment($attachment->getPath(), $attachment->getName(), $attachment->getEncoding(), $attachment->getType()); - } - - $phpMailer->send(); - } - - /** - * Génération et configuration de l'objet PHPMailer - */ - private function createPhpMailer(): PHPMailer - { - // Exceptions gérées - $mailer = new PHPMailer(true); - $mailer->CharSet = 'utf-8'; - if (null !== $this->smtpServer) { - $mailer->IsSMTP(); - $mailer->Host = $this->smtpServer; - $mailer->SMTPAuth = false; - } - if (null !== $this->tls && $this->tls !== '0') { - $mailer->SMTPAuth = true; - $mailer->SMTPSecure = 'tls'; - } - if ($this->username) { - $mailer->Username = $this->username; - } - if ($this->password) { - $mailer->Password = $this->password; - } - if ($this->port) { - $mailer->Port = (int) $this->port; - } - - return $mailer; - } -} diff --git a/templates/admin/base_with_header.html.twig b/templates/admin/base_with_header.html.twig index 2bf4175e8..06ef65edc 100644 --- a/templates/admin/base_with_header.html.twig +++ b/templates/admin/base_with_header.html.twig @@ -207,10 +207,6 @@ } - - {% if js is defined %} - {{ js|raw }} - {% endif %} {% endblock %} {% endblock %} diff --git a/templates/admin/healthcheck.html.twig b/templates/admin/healthcheck.html.twig index be62c90a3..e0625241a 100644 --- a/templates/admin/healthcheck.html.twig +++ b/templates/admin/healthcheck.html.twig @@ -10,8 +10,8 @@
PHP
{{ dates.php }}
-
MySQL Base_De_Donnees
-
{{ dates.mysql_bdd }}
+
MySQL (DBAL)
+
{{ dates.mysql_dbal }}
MySQL Ting
{{ dates.mysql_ting }}
Différence MySQL et PHP