libertempo / web

Application web de gestion des congés en ligne
GNU General Public License v2.0
66 stars 63 forks source link

Compatibilité PHP 7 #117

Closed bbalet closed 7 years ago

bbalet commented 8 years ago

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; HTTPLocale has a deprecated constructor in misc.class.php on line 6

prytoegrian commented 8 years ago

Tant qu'on y est, afin de s'assurer de la compat' php7, il y a au minimum tout cela à surveiller (source) :


File: libertempo/includes/misc.class.php
> Line 11: PHP 4 constructors are now deprecated
    function HTTPLocale()
    {
    }

File: libertempo/library/html2pdf/html2pdf.class.php
> Line 951: Possible object property creation during by-reference assignment
    \HTML2PDF::$_subobj->parsingCss->css =& $this->parsingCss->css;
> Line 952: Possible object property creation during by-reference assignment
    \HTML2PDF::$_subobj->parsingCss->cssKeys =& $this->parsingCss->cssKeys;

File: libertempo/library/html2pdf/_tcpdf_5.0.002/fonts/utils/makefont.php
> Line 60: Removed function "set_magic_quotes_runtime" called
    set_magic_quotes_runtime(0);

File: libertempo/library/html2pdf/_tcpdf_5.0.002/tcpdf.php
> Line 5583: Removed function "set_magic_quotes_runtime" called
    set_magic_quotes_runtime($mqr);

File: libertempo/library/tcpdf/include/tcpdf_static.php
> Line 499: Removed function "set_magic_quotes_runtime" called
    set_magic_quotes_runtime($mqr);

File: libertempo/library/phpmailer/class.phpmailer.php
> Line 2356: Removed function "set_magic_quotes_runtime" called
    set_magic_quotes_runtime(false);
> Line 2368: Removed function "set_magic_quotes_runtime" called
    set_magic_quotes_runtime($magic_quotes);

File: libertempo/vendor/raveren/kint/Kint.class.php
> Line 225: Function argument(s) returned by "func_get_args" might have been modified
    func_get_args();
> Line 739: Function argument(s) returned by "func_get_args" might have been modified
    func_get_args();
> Line 757: Function argument(s) returned by "func_get_args" might have been modified
    func_get_args();
> Line 773: Function argument(s) returned by "func_get_args" might have been modified
    func_get_args();
> Line 806: Function argument(s) returned by "func_get_args" might have been modified
    func_get_args();
> Line 832: Function argument(s) returned by "func_get_args" might have been modified
    func_get_args();

File: libertempo/vendor/raveren/kint/parsers/custom/color.php
> Line 137: Nested by-reference foreach loop, make sure there is no iteration over the same array
    foreach ($decimalColors as &$color) {
    }

File: libertempo/imprim_calendrier.php
> Syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting T_STRING on line 66. Processing aborted.

File: libertempo/define.php
> Line 45: Function argument(s) returned by "func_get_args" might have been modified
    func_get_args();

Checked 410 files in 29.699 seconds
Shadok commented 8 years ago

Personnellement, sous nginx et php 7.0.4 (Ubuntu 16.04), je n'ai pas la langue qui se charge, je n'ai que les variables à l'affichage.

EDIT : Il manquait gettext et surtout la locale

$ apt-get install php-gettext
$ locale-gen fr_FR.UTF-8
$ update-locale
$ /etc/init.d/php7.0-fpm restart (ou php5, ou apache/nginx si vous n'êtes pas en fpm)
prytoegrian commented 8 years ago

J'arrive pas à me décider : ça veut dire que LT est compatible php7 et qu'on peut fermer le ticket ou on le laisse ouvert pour tes futurs autres tests ?

Shadok commented 8 years ago

Pour le moment, je n'ai rencontré aucun problème dans l'utilisation de LT avec php 7 (même en exportant le calendrier en pdf - d'ailleurs, exemple.pdf c'est un peu nul comme nom par défaut .... Il faudrait un nom avec DATE-calendrier.pdf).

Shadok commented 8 years ago

Je n'ai pas encore testé l'import/ajout d'utilisateurs (par contre je m'identifie via le ldap), mais dès qu'on a un nouveau salarié, je testerai. En attendant, tu peux laisser le ticket ouvert, mais la compatibilité me semble pour le moment en très bonne voie.

wouldsmina commented 8 years ago

déja testé le ldap avec php7 sans problème... j'ai surtout eu des problèmes de requete avec mysql5.7 durant l'installation et avec le mode responsable, c'est dans #209

Shadok commented 8 years ago

Je suis bien en PHP7 mais avec MySQL 5.5.49 donc je ne peux pas tester.

prytoegrian commented 8 years ago

À vérifier où, mais je suis certain d'avoir changé le nom du fichier d'export. Un peu plus générique que ce que tu as proposé cependant.

prytoegrian commented 7 years ago

La compat' php7 n'est pas une priorité compte tenu du parc client. Il n'y a pas eu d'avancement sur le sujet depuis 8 mois, je ferme. S'il y a un vrai besoin, ça reviendra sur le tapis.