1

What I've done:

  1. I've forked this GitHub repository and added some little feature.
  2. I've updated my composer.json according this answer.
  3. I've run composer update.
  4. I've got error: Class 'Thujohn\Pdf\PdfServiceProvider' not found in ~/my-project/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php on line 157.

What I have to do for avoiding error? Any advise? Thanks in advance.

UPD1

composer.json:

   {
        "name": "laravel/laravel",
        "description": "The Laravel Framework.",
        "keywords": ["framework", "laravel"],
        "license": "MIT",
        "repositories": [{
            "type":"package",
            "package": {
                "name": "mineroot/pdf-l4",
                "version":"master",
                "source": {
                    "url": "https://github.com/mineroot/pdf-l4",
                    "type": "git",
                    "reference":"master"
                }
            }
        }],
        "require": {
            "laravel/framework": "4.2.*",
            "mineroot/pdf-l4": "master"
        },
        "autoload": {
            "classmap": [
                "app/commands",
                "app/controllers",
                "app/models",
                "app/database/migrations",
                "app/database/seeds",
                "app/tests/TestCase.php"
            ]
        },
        "scripts": {
            "post-install-cmd": [
                "php artisan clear-compiled",
                "php artisan optimize"
            ],
            "post-update-cmd": [
                "php artisan clear-compiled",
                "php artisan optimize"
            ],
            "post-create-project-cmd": [
                "php artisan key:generate"
            ]
        },
        "config": {
            "preferred-install": "dist"
        },
        "minimum-stability": "dev"
    }

UPD2

my repositories array in composer.json now:

"repositories": [
    {
        "url": "https://github.com/mineroot/pdf-l4",
        "type": "git"
    }
]
Community
  • 1
  • 1
mineroot
  • 1,607
  • 16
  • 23
  • 2
    You are pointing to an answer that explicitly states "don't do it like this". Either you linked the wrong answer and did something different, or added an error - but in any case, we need to see your `composer.json` file. – Sven Dec 13 '15 at 14:43
  • @Sven, please, see UPD1 – mineroot Dec 13 '15 at 14:54
  • Ok, you did as the answer said you should not do. Please read the first line of your linked answer and follow the link to the better answer: http://stackoverflow.com/questions/12954051/use-php-composer-to-clone-git-repo/12957929#12957929 The reason behind it is that a "package" definition is a replacement for a missing composer.json file and has to have EVERYTHING including autoloading correct. And it is more complicated to create compared to simply mentioning the repo URL and `"type":"vcs"` – Sven Dec 13 '15 at 14:56
  • @Sven, I've updated my composer.json, but the same error still appears while `composer update` – mineroot Dec 13 '15 at 15:23
  • If you want to access a branch, you have to use the prefix `dev-` in composer.json. – Sven Dec 13 '15 at 15:48

0 Answers0