S
S
Stanislav2018-12-06 14:24:24
Composer
Stanislav, 2018-12-06 14:24:24

Composer can't symlink a local package?

When you run composer install / update - the package is correctly loaded via a symlink into the vendor folder, phpstorm sees it and calmly navigates to its classes by ctrl. But Laravel throws an error:

include(/var/www/vendor/composer/../package/my-package/src/Laravel/MyPackageServiceProvider.php): failed to open stream: No such file or directory

It falls on autoload, probably a problem at the composer level.
The composer package is stored locally. I included it in coposer.json of the main project like this:
"require": {
    "package/my-package": "dev"
  },
//***
"packagist.org": false,
    "local": {
      "type": "path",
      "url": "../my-package",
      "options" : {
        "symlink": true
      }
    }

As a result, the symlink is created as it should be:
5c09065e3f1fe963644810.png
According to the created symlink, everything is correct - all the package files are located there, as they should be.
If I manually transfer the package folder to the same directory (where the composer puts it when install / update) - then everything works.
What could be the problem?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question