Sto riscontrando alcuni problemi nel far funzionare correttamente phpdoc. I documenti vengono generati per la maggior parte con successo, ma ottengo il seguente avviso molte volte:PHPDocumentor warning problem warning
Warning: date(): It is not safe to rely on the system's timezone settings. You are required to use the date.timezone setting or the
date_default_timezone_set
() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Los_Angeles
' for 'PST/-8.0/no DST' instead in /Users/ben/bin/PhpDocumentor/phpDocumentor/Converter.inc on line 5064
e
Warning: strftime(): It is not safe to rely on the system's timezone settings. You are required to use the date.timezone setting or the
date_default_timezone_set
() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Los_Angeles
' for 'PST/-8.0/no DST' instead in PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/Smarty_Compiler.class.php on line 370
L'avvertimento Smarty ho potuto facilmente rimuovere dal codice dal momento che è solo la generazione di un timestamp nella parte superiore del modello nel documento reso. No biggie. Il primo errore nel phpDocumentor di cui non sono sicuro. Sembra essere solo l'assegnazione di una data per Smarty per il modello:
$templ->assign("date",date("r",time()));
Forse potrei semplicemente rimuovere tutte le variabili "data" nei modelli di Smarty e questa linea.
In ogni caso, questo avviso si trova anche nei documenti generati e la pagina dell'indice mostra solo questo avviso. Qualche idea su cosa sta succedendo qui? Sto usando la versione 1.4.3 e qui ci sono le mie bandiere/opzioni:
#!/usr/bin/env bash
phpdoc \
--title 'Asra Documentation' \
--directory library/Asra \
--target docs \
--defaultcategoryname Asra \
--defaultpackagename Asra \
--quiet on \
--output HTML:frames:phpedit
Sì, questo è il motivo esatto. @Typeoneerror: è un problema specifico per PHP 5.3, non il codice PHP che stai effettivamente utilizzando. Potresti avere lo stesso problema ogni volta che il codice chiama una funzione PHP che usa l'impostazione predefinita del fuso orario. – kiamlaluno
Ragazzi, rockate. Ho appena aggiunto una chiamata a date_default .. nel file phpdoc. Fisso. – typeoneerror
Questo succede anche con PHP 5.2, se error_reporting è impostato su E_ALL | E_STRICT – djn