-
Notifications
You must be signed in to change notification settings - Fork 9.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
\Magento\Framework\Module\PackageInfo assumes locations #3400
Comments
I'm not sure if you can query a composer instance for these paths, but it would be pretty easy to find them. Since the composer.json is always in the root directory of the package, it just has to go to the parent dir until it finds the composer.json. This could be limited to the vendor dir, so that it does not go any higher in the directory structure. The vendor-dir can be read from the root composer.json (default: vendor) |
I think the underlying problem is that Magento has an internal name for a module which is defined via Just trialling something here https://github.com/magento/magento2/compare/develop...fooman:component-manager-reader-improvements?expand=1, where at least the parent dir is checked. It works but it's not quite right as this currently determines the name from the autoload section, and I think it would be better if it would get back the module name from the reader. |
but, to read the module name from the composer.json, it would have first to know, where it is. Searching it in the parent dirs would work but also is not really nice. It would be possible to create a map in the magento-composer-installer: composer-name to magento module name. The it would be easy to find the composer.json |
That is what Magento currently tries to do, even though the
This is the overall process of how I currently have it pieced together: 1.) Magento application gets started Overall there are a few things to note - between step 3.) and 4.) there is a disconnect between composer and Magento which in step 5 is brought back together based on the assumption that the location registered via I have attached a screenshot with a problem of the current approach: I am currently thinking to make the ComponentRegistrar smarter by optionally allowing to register the composer name. And we could then query |
Internal ticket MAGETWO-49459 |
Thank you for your submission. We recently made some changes to the way we process GitHub submissions to more quickly identify and respond to core code issues. Feature Requests and Improvements should now be submitted to the new Magento 2 Feature Requests and Improvements forum (see details here). We are closing this GitHub ticket and have moved your request to the new forum. |
[TSG] Backporting for 2.2 (pr51) (2.2.8)
This code
assumes that the registered path also holds the composer.json file which is not necessarily the case (for example https://github.com/fooman/sameorderinvoicenumber-m2/tree/v2.0.2/src). I am hoping there is a way to query composer itself for all packages of type magento2-module.
The text was updated successfully, but these errors were encountered: