Menu

#322 Composer installs TCPDF with .git repository

closed
nobody
None
1
2014-08-08
2014-07-28
Lubos Dz
No

Hi,

I am trying to install TCPDF via composer.
It works, but unfortunately, it always installs also whole .git directory which has 93 MB.
I only want to install TCPDF files without .git stuff.

How to do that?

Here's my composer.json:

{
    "name": "myprojects/project1",
    "require": {
        "yiisoft/yii": "~1.1.15",
        "twbs/bootstrap": "~3.2.0",
        "tecnick.com/tcpdf": "~6.0.89",
        "phpoffice/phpexcel": "~1.8.0"
    }
}

Thank you in advance.
Lubos

Discussion

  • Nicola Asuni

    Nicola Asuni - 2014-07-29

    Ticket moved from /p/tcpdf/bugs/955/

     
  • Lubos Dz

    Lubos Dz - 2014-07-30

    Hi Nicola,

    here is an answer to the issue from author of composer:

    http://stackoverflow.com/questions/25017785/composer-installs-tcpdf-with-git-repository/25020818?noredirect=1#comment38933053_25020818

    According to him, it is not possible to install via composer from sourceforge repos without cloning whole directory - which means downloading whole 93 MB rather than only TCPDF files 30 MB.

    The only solution is to move repo to github. There is already some TCPDF repo at
    https://github.com/tcpdf-clone/tcpdf having latest version of TCPDF.

    Is this git repo maintained officially by you - can I use it?
    If yes, it would be better to change composer resource link to point to git repo rather than sourceforge.

    Best regards,
    Lubos

     
  • Nicola Asuni

    Nicola Asuni - 2014-07-30

    There are not official TCPDF repos in GitHub.
    However, every TCPDF release is tagged, can't you just download the latest tagged version?

     
  • Lubos Dz

    Lubos Dz - 2014-07-30

    I can, but that is not how projects are distributed.

    The old approach is to download TCPDF zip file manually, unzip and deploy into directories and commit everything into repos along with all project files.

    Now new approach is, that we never commit external libraries into repo along with our project files. We always download/update external libs via composer. Thus we save quite a lot of time not worrying about extern libs within our project's repo.

    All our libraries work this way fine, except for TCPDF. Actually it would be OK, but we have to delete whole .git hidden directory to keep our code clean.

    It's not a big deal, of course, but I suppose I might not be the only one around dealing with the issue. So I wanted suggest solution how the things could work properly.

    It is not necessary to move everything to github, of course. It would be quite sufficient once per time sync TCPDF repo from sourceforge to git repo - that way we could use it as well. I just wanted confirmation whether it is maintained that way.

    Anyway, what are the advantages of keeping the project at sourceforge, while github provides significantly better devel environment ? - I am just wondering about your opinion.

    Thanx a lot.
    Lubos

     
  • Nicola Asuni

    Nicola Asuni - 2014-08-08
    • status: open --> closed
    • Group: v1.0_(example) --> Next_Release_(example)
     
  • Nicola Asuni

    Nicola Asuni - 2014-08-08

    TCPDF git repository is now cloned in GitHub:
    https://github.com/tecnickcom/TCPDF

     

Log in to post a comment.