Visualizzazione dei risultati da 1 a 6 su 6

Discussione: dockerizzare phpdoc

  1. #1
    Utente di HTML.it
    Registrato dal
    Dec 2013
    Messaggi
    142

    dockerizzare phpdoc

    Ho provato così:
    codice:
    $ cat Dockerfile
    FROM php:cli
    
    RUN apt-get update
    RUN apt-get install -y libxslt-dev graphviz
    RUN docker-php-ext-install xsl
    
    docker build -t phpdoc-docker test-dir
    Sending build context to Docker daemon 5.523MB
    Step 1/4 : FROM php:cli
    ---> 0ceab3be41fb
    Step 2/4 : RUN apt-get update
    ---> Using cache
    ---> 097f829be7f2
    Step 3/4 : RUN apt-get install -y libxslt-dev graphviz
    ---> Using cache
    ---> e474fcd06b7a
    Step 4/4 : RUN docker-php-ext-install xsl
    ---> Using cache
    ---> d151706c4e2d
    Successfully built d151706c4e2d
    Successfully tagged phpdoc-docker:latest
    
    $ docker run --rm -v phpDocumentor.phar:/usr/local/my-app/phpDocumentor.phar:ro -v mio-progetto/src:/usr/local/my-app/src:ro -v mio-progetto/docs:/usr/local/my-app/docs -w /usr/local/my-app phpdoc-docker ./phpDocumentor.phar --template=responsive --directory /usr/local/my-app/src --target /usr/local/my-app/docs
    phpDocumentor v3.0.0-alpha.4-6-gc5f3834c
    
    [2019-12-12 12:32:18] app.NOTICE: Using the configuration file at the default location [] []
    [2019-12-12 12:32:18] app.INFO: Collecting files .. [] []
    [2019-12-12 12:32:18] app.INFO: OK [] []
    [2019-12-12 12:32:18] app.INFO: Loading project from cache [] []
    [2019-12-12 12:32:18] app.NOTICE: Parsing files [] []
    Parsing files
    [2019-12-12 12:32:18] app.INFO: Starting to parse file: Example.php [] []
    [2019-12-12 12:32:18] app.NOTICE: Parsing Example.php [] []
    
    1/1 [============================] 100%[2019-12-12 12:32:18] app.INFO: Elapsed time to parse all files: 0.01s [] []
    [2019-12-12 12:32:18] app.INFO: Peak memory usage: 14M [] []
    [2019-12-12 12:32:18] app.NOTICE: Storing cache .. [] []
    [2019-12-12 12:32:18] app.INFO: OK [] []
    [2019-12-12 12:32:18] app.INFO: Loading project from cache [] []
    [2019-12-12 12:32:18] app.INFO: Applying 13 transformations [] []
    
    Applying transformations (can take a while)
    [2019-12-12 12:32:18] app.INFO: Initialize writer "phpDocumentor\Transformer\Writer\FileIo" [] []
    [2019-12-12 12:32:18] app.INFO: Initialize writer "phpDocumentor\Transformer\Writer\Xml" [] []
    [2019-12-12 12:32:18] app.INFO: Initialize writer "phpDocumentor\Transformer\Writer\Xsl" [] []
    [2019-12-12 12:32:18] app.INFO: Initialize writer "phpDocumentor\Transformer\Writer\Graph" [] []
    [2019-12-12 12:32:18] app.NOTICE: Writer FileIo using query "copy" on img [] []
    
    1/13 [==>-------------------------] 7%[2019-12-12 12:32:18] app.NOTICE: Writer FileIo using query "copy" on css [] []
    
    2/13 [====>-----------------------] 15%[2019-12-12 12:32:18] app.NOTICE: Writer FileIo using query "copy" on js [] []
    
    3/13 [======>---------------------] 23%[2019-12-12 12:32:19] app.NOTICE: Writer xml on structure.xml [] []
    
    4/13 [========>-------------------] 30%[2019-12-12 12:32:19] app.NOTICE: Writer xsl on index.html [] []
    [2019-12-12 12:32:19] php.WARNING: Warning: XSLTProcessor::transformToUri(): No stylesheet associated to this object {"exception":"[object] (ErrorException(code: 0): Warning: XSLTProcessor::transformToUri(): No stylesheet associated to this object at phar:///usr/local/my-app/phpDocumentor.phar/src/phpDocumentor/Transformer/Writer/Xsl.php:291)"} []
    [2019-12-12 12:32:19] php.WARNING: Warning: XSLTProcessor::transformToUri(): No stylesheet associated to this object {"exception":"[object] (ErrorException(code: 0): Warning: XSLTProcessor::transformToUri(): No stylesheet associated to this object at phar:///usr/local/my-app/phpDocumentor.phar/src/phpDocumentor/Transformer/Writer/Xsl.php:291)"} []
    
    5/13 [==========>-----------------] 38%[2019-12-12 12:32:19] app.NOTICE: Writer xsl using query "//namespace/@full_name" on namespaces/{$full_name} [] []
    [2019-12-12 12:32:19] php.WARNING: Warning: XSLTProcessor::transformToUri(): No stylesheet associated to this object {"exception":"[object] (ErrorException(code: 0): Warning: XSLTProcessor::transformToUri(): No stylesheet associated to this object at phar:///usr/local/my-app/phpDocumentor.phar/src/phpDocumentor/Transformer/Writer/Xsl.php:291)"} []
    [2019-12-12 12:32:19] php.WARNING: Warning: XSLTProcessor::transformToUri(): No stylesheet associated to this object {"exception":"[object] (ErrorException(code: 0): Warning: XSLTProcessor::transformToUri(): No stylesheet associated to this object at phar:///usr/local/my-app/phpDocumentor.phar/src/phpDocumentor/Transformer/Writer/Xsl.php:291)"} []
    
    6/13 [============>---------------] 46%[2019-12-12 12:32:19] app.NOTICE: Writer xsl using query "//package/@full_name" on packages/{$full_name} [] []
    [2019-12-12 12:32:19] php.WARNING: Warning: XSLTProcessor::transformToUri(): No stylesheet associated to this object {"exception":"[object] (ErrorException(code: 0): Warning: XSLTProcessor::transformToUri(): No stylesheet associated to this object at phar:///usr/local/my-app/phpDocumentor.phar/src/phpDocumentor/Transformer/Writer/Xsl.php:291)"} []
    [2019-12-12 12:32:19] php.WARNING: Warning: XSLTProcessor::transformToUri(): No stylesheet associated to this object {"exception":"[object] (ErrorException(code: 0): Warning: XSLTProcessor::transformToUri(): No stylesheet associated to this object at phar:///usr/local/my-app/phpDocumentor.phar/src/phpDocumentor/Transformer/Writer/Xsl.php:291)"} []
    
    7/13 [===============>------------] 53%[2019-12-12 12:32:19] app.NOTICE: Writer xsl using query "//class/full_name|//interface/full_name|//trait/full_name" on classes/{$full_name} [] []
    [2019-12-12 12:32:19] php.WARNING: Warning: XSLTProcessor::transformToUri(): No stylesheet associated to this object {"exception":"[object] (ErrorException(code: 0): Warning: XSLTProcessor::transformToUri(): No stylesheet associated to this object at phar:///usr/local/my-app/phpDocumentor.phar/src/phpDocumentor/Transformer/Writer/Xsl.php:291)"} []
    [2019-12-12 12:32:19] php.WARNING: Warning: XSLTProcessor::transformToUri(): No stylesheet associated to this object {"exception":"[object] (ErrorException(code: 0): Warning: XSLTProcessor::transformToUri(): No stylesheet associated to this object at phar:///usr/local/my-app/phpDocumentor.phar/src/phpDocumentor/Transformer/Writer/Xsl.php:291)"} []
    
    8/13 [=================>----------] 61%[2019-12-12 12:32:19] app.NOTICE: Writer xsl on markers.html [] []
    [2019-12-12 12:32:19] php.WARNING: Warning: XSLTProcessor::transformToUri(): No stylesheet associated to this object {"exception":"[object] (ErrorException(code: 0): Warning: XSLTProcessor::transformToUri(): No stylesheet associated to this object at phar:///usr/local/my-app/phpDocumentor.phar/src/phpDocumentor/Transformer/Writer/Xsl.php:291)"} []
    [2019-12-12 12:32:19] php.WARNING: Warning: XSLTProcessor::transformToUri(): No stylesheet associated to this object {"exception":"[object] (ErrorException(code: 0): Warning: XSLTProcessor::transformToUri(): No stylesheet associated to this object at phar:///usr/local/my-app/phpDocumentor.phar/src/phpDocumentor/Transformer/Writer/Xsl.php:291)"} []
    
    9/13 [===================>--------] 69%[2019-12-12 12:32:19] app.NOTICE: Writer xsl on errors.html [] []
    [2019-12-12 12:32:19] php.WARNING: Warning: XSLTProcessor::transformToUri(): No stylesheet associated to this object {"exception":"[object] (ErrorException(code: 0): Warning: XSLTProcessor::transformToUri(): No stylesheet associated to this object at phar:///usr/local/my-app/phpDocumentor.phar/src/phpDocumentor/Transformer/Writer/Xsl.php:291)"} []
    [2019-12-12 12:32:19] php.WARNING: Warning: XSLTProcessor::transformToUri(): No stylesheet associated to this object {"exception":"[object] (ErrorException(code: 0): Warning: XSLTProcessor::transformToUri(): No stylesheet associated to this object at phar:///usr/local/my-app/phpDocumentor.phar/src/phpDocumentor/Transformer/Writer/Xsl.php:291)"} []
    
    10/13 [=====================>------] 76%[2019-12-12 12:32:19] app.NOTICE: Writer xsl on deprecated.html [] []
    [2019-12-12 12:32:19] php.WARNING: Warning: XSLTProcessor::transformToUri(): No stylesheet associated to this object {"exception":"[object] (ErrorException(code: 0): Warning: XSLTProcessor::transformToUri(): No stylesheet associated to this object at phar:///usr/local/my-app/phpDocumentor.phar/src/phpDocumentor/Transformer/Writer/Xsl.php:291)"} []
    [2019-12-12 12:32:19] php.WARNING: Warning: XSLTProcessor::transformToUri(): No stylesheet associated to this object {"exception":"[object] (ErrorException(code: 0): Warning: XSLTProcessor::transformToUri(): No stylesheet associated to this object at phar:///usr/local/my-app/phpDocumentor.phar/src/phpDocumentor/Transformer/Writer/Xsl.php:291)"} []
    
    11/13 [=======================>----] 84%[2019-12-12 12:32:19] app.NOTICE: Writer xsl on graph_class.html [] []
    [2019-12-12 12:32:19] php.WARNING: Warning: XSLTProcessor::transformToUri(): No stylesheet associated to this object {"exception":"[object] (ErrorException(code: 0): Warning: XSLTProcessor::transformToUri(): No stylesheet associated to this object at phar:///usr/local/my-app/phpDocumentor.phar/src/phpDocumentor/Transformer/Writer/Xsl.php:291)"} []
    [2019-12-12 12:32:19] php.WARNING: Warning: XSLTProcessor::transformToUri(): No stylesheet associated to this object {"exception":"[object] (ErrorException(code: 0): Warning: XSLTProcessor::transformToUri(): No stylesheet associated to this object at phar:///usr/local/my-app/phpDocumentor.phar/src/phpDocumentor/Transformer/Writer/Xsl.php:291)"} []
    
    12/13 [=========================>--] 92%[2019-12-12 12:32:19] app.NOTICE: Writer Graph on classes.svg [] []
    
    13/13 [============================] 100%[2019-12-12 12:32:19] app.NOTICE: Finished transformation process [] []
    
    All done!

    Ma come vedete ci sono molti errori. Perchè?

  2. #2
    Utente di HTML.it
    Registrato dal
    Sep 2016
    Messaggi
    783
    Sembra che il problema sia sui file .html, sui .php funziona correttamente?

  3. #3
    Utente di HTML.it
    Registrato dal
    Dec 2013
    Messaggi
    142
    Quote Originariamente inviata da M4V1 Visualizza il messaggio
    Sembra che il problema sia sui file .html, sui .php funziona correttamente?
    Cioè?

    PS
    È da due giorni che tento risponderti, ma in questi giorni questo forum ha avuto dei problemi.

  4. #4
    Utente di HTML.it
    Registrato dal
    Sep 2016
    Messaggi
    783
    Cioè ti crea qualcosa in output, oppure proprio non funziona?
    Non ho capito se il problema sono solo i warning o se proprio non funziona phpdoc.

  5. #5
    Utente di HTML.it
    Registrato dal
    Dec 2013
    Messaggi
    142
    Quote Originariamente inviata da M4V1 Visualizza il messaggio
    Cioè ti crea qualcosa in output, oppure proprio non funziona?
    Non ho capito se il problema sono solo i warning o se proprio non funziona phpdoc.
    La documentazione viene generata (vedi allegato).

    Ma se voglio vedere la documentazione specifica per la classe Example, come vedi, la voce non è cliccabile.
    Example dovrebbe essere un link, invece è un testo normale.
    Immagini allegate Immagini allegate
    Ultima modifica di astros3; 15-11-2019 a 12:54

  6. #6
    Utente di HTML.it
    Registrato dal
    Sep 2016
    Messaggi
    783
    Lo stylesheet che non trova dovrebbe essere dentro al phar, ma non ho idea del perché ti dia quell'errore.

    Io proverei ad utilizzare l'immagine ufficiale di phpdoc: https://hub.docker.com/r/phpdoc/phpdoc
    Magari con quella non ti si presenta il problema.

  7. #7
    Utente di HTML.it
    Registrato dal
    Dec 2013
    Messaggi
    142
    Quote Originariamente inviata da M4V1 Visualizza il messaggio
    Lo stylesheet che non trova dovrebbe essere dentro al phar, ma non ho idea del perché ti dia quell'errore.

    Io proverei ad utilizzare l'immagine ufficiale di phpdoc: https://hub.docker.com/r/phpdoc/phpdoc
    Magari con quella non ti si presenta il problema.
    codice:
    $ cat src/Example.php 
    <?php
    
    class Example {
        /**
         * Esempio di metodo
         */
        function metodo() {
            
        }
    }
    $ docker run --rm -v $(pwd):/data phpdoc/phpdoc -d src -t docs
    Collecting files .. OK
    Initializing parser .. OK
    Parsing files
    Parsing /data/src/Example.php
      No summary was found for this file
      No summary for class \Example
    Storing cache in "/data/docs" .. OK
    Load cache                                                         ..    0.000s
    Preparing template "clean"                                         ..    0.003s
    Preparing 17 transformations                                       ..    0.000s
    Build "elements" index                                             ..    0.000s
    Replace textual FQCNs with object aliases                          ..    0.000s
    Resolve @link and @see tags in descriptions                        ..    0.000s
    Enriches inline example tags with their sources                    ..    0.000s
    Build "packages" index                                             ..    0.000s
    Build "namespaces" index and add namespaces to "elements"          ..    0.000s
    Collect all markers embedded in tags                               ..    0.000s
    Transform analyzed project into artifacts                          .. 
    Applying 17 transformations
      Initialize writer "phpDocumentor\Plugin\Core\Transformer\Writer\FileIo"
      Initialize writer "phpDocumentor\Plugin\Twig\Writer\Twig"
      Initialize writer "phpDocumentor\Plugin\Graphs\Writer\Graph"
      Execute transformation using writer "FileIo"
      Execute transformation using writer "FileIo"
      Execute transformation using writer "FileIo"
      Execute transformation using writer "FileIo"
      Execute transformation using writer "FileIo"
      Execute transformation using writer "twig"
      Execute transformation using writer "twig"
      Execute transformation using writer "twig"
      Execute transformation using writer "twig"
      Execute transformation using writer "twig"
      Execute transformation using writer "twig"
      Execute transformation using writer "twig"
      Execute transformation using writer "twig"
      Execute transformation using writer "twig"
      Execute transformation using writer "twig"
      Execute transformation using writer "twig"
      Execute transformation using writer "Graph"
       0.144s
    Analyze results and write report to log                            ..    0.000s
    Output (docs/classes/Example.html): https://i.ibb.co/0sMMFt9/a.png

    da notare

    Warning: count(): Parameter must be an array or an object that implements Countable in /opt/phpdoc/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275 Warning: count(): Parameter must be an array or an object that implements Countable in /opt/phpdoc/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275
    Ma come cavolo li fanno questi softguer
    Ultima modifica di astros3; 15-11-2019 a 18:44

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.