Comments (11)
This is a real problem.
from installers.
I have the same problem.
When I launch composer in root, then I have to manually go into plugin directory and launch composer again because dependencies are installed in root/vendor.
Am I missing something?
from installers.
Composer should generate autoload definitions for dependencies of the root package as well as it's dependencies. There is one autoload file to load all of the generated autoloads which is found by default in vendor/autoload.php
and the files it loads would be located in vendor/composer/autoload_*.php
from installers.
any answer to this? composer install on root is not adding the autoloaders for dependencies of dependencies
from installers.
I can't repro this.
In my case, it's mile23/page-example
, which is a test/demo of using Drupal 8 with Composer. It requires crell/api-problem
.
When I say composer require mile23/page-example
the installer does everything it should, and then also generates a PSR-4 autoloader which includes Crell's api-problem namespace.
You should have a project vendor directory, and your code should include or require vendor/autoload.php
.
from installers.
Is this already fixed? I have the same problem. I have a php library which includes some helper functions:
"autoload": {
"files": [
"src/helpers/ethereum-client-workaround-helpers.php"
],
"psr-4": {
"Ethereum\\": "src/"
}
}
But they won't appear in the autoload_files.php files, even if I do a "composer dump".
Any ideas how to fix this?
from installers.
Facing the same issue, no solution?
from installers.
I had a similar issue with a wordpress theme I was building recently. Do the following:
-
Initialize your theme/plugin with it's own composer file, map from a subdirectory to vendor if you don't want the composer.json in your plugin root.
-
Make sure you upload the
autoload.php
file AND the composer folder in vendor. The actual autoload maps that get generated live in there. The autoload.php is just a proxy to that, and it doesn't work without them.
from installers.
It appears that vendor/composer/installed.json
isn't adding "files": [...]
for the related package.
from installers.
This was a very annoying issue. Found this and it helped:
https://stackoverflow.com/questions/18106599/composer-does-not-generate-autoloader-information-autoload-namespaces-php
from installers.
Closing as I don't really see what the problem is here. If someone still has the issue please post detailed reproduction instructions otherwise there's not much we can do.
from installers.
Related Issues (20)
- Path issue shows with composer installing via MAMP on macOS HOT 1
- Your app key is missing message issue
- Want to write a custom path for plug-in package? I don't know how to debug
- composer 2.3.5 breaks composer/installers HOT 3
- Disabling installer in my package will still trigger the installer path when it's pulled in a project HOT 4
- Add license to the package HOT 1
- Add version to installer-path variables HOT 1
- Add Support for "Generic" Library HOT 2
- Support https://asset-packagist.org/ types? HOT 3
- Using vcs repo without composer.json
- Add a installer for Laminas project HOT 1
- Renaming vendor breaks composer install HOT 2
- mediawiki-skin should install in CamelCase name directory
- Could we add support of wordpress-core type?
- Why are dependencies still present in the installer path after removal?
- Add support for Moodle "tiny" plugins HOT 1
- Extend documentation regarding disabling of installers
- Add partial support for the generic "library" and "project" types HOT 1
- Composer Install Installs Modules in "vendor" Instead of Specified "modules" Directory HOT 1
- Does not change from `vendor/` to `type:wordpress-plugin` path
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from installers.