I'm using composer install to deploy my Symfony projects. I recently got errors from GitHub rate limit. I then created a token and I'd like not to have it globally configured, but to store it into the config section of the composer.json, so it will be shared by everyone.
EDIT: Concretely in composer.json, I have
"config": {
"github-oauth": {
"github.com": "mygithubtokenhere"
}
}
However, when I generate the composer.lock file, there is no trace of my token inside.
My question is: What will happen while executing composer install, that from my understanding is only reading composer.lock file?
Does composer install also read the composer.json to get the config data?
EDIT: Or, is it impossible to have config data runing composer install?
EDIT:
Just to be clear, I don't want composer install to generate the .lock from the .json (my .lock is already generated). I want composer install to read my .lock already generated. But I don't know if/how it reads the config section, that is only present in the composer.json.
This link might help you:
https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file
Composer install checks whether if composer.lock exists. If it exists, it takes the info from the composer.lock ,else it generates the composer.lock
If I delete the composer.json (but keep the composer.lock), composer install prints the following error:
Composer could not find a composer.json file in /path/to/my/project
To initialize a project, please create a composer.json file as described in the https://getcomposer.org/ "Getting Started" section
That actually answers my question : composer install does not only read composer.lock file, but also the composer.json. So, it gets the config data from there.
Related
I need to create a Private Composer Repository - it has 300 zipped extensions. which I want to install on Magento 2 site.
Each zipped extension file inside has its own composer.json file. as some extensions rely on other extensions to be installed aswell in order for them to work.
However when I try to run composer update it is looking for composer.json in the main directory url
Is there any way I can create a simple composer.json to direct it to look for the composer.json of the extensions I want to install inside the different extensions zipped files.
I have spent 2 days looking for tutorial or help on this but its very confusing for me.
tried to get composer to look inside the zipped folders
I just created a new private reposotory and uploaded all the zipped extensions to there - Do I have to do anything futher or is that it?
do I need to convert it to package - very confused
I manage to create the composer.json file
However if I try to run composer update it is giving errors like
- Root composer.json requires extcrea/extension == 1.13.5.0, found extcrea/extension[1.13.5] in the lock file but not in remote repositories, make sure you avoid updating this package to keep the one from the lock file.
I tried to change the urls of the extensions inside composer.lock file to the new private repo
then run
composer update --lock
which is suppose to sync to new repository but I get same error again - how do I tell it to look for extensions in the new repository
tried deleting the composer.lock file but getting extension not found error
tried these aswell
composer dump-autoload
composer clear-cache
Or can someone provide a more simple way of being able to do what I want as
I've downloaded the sources for kdesvn from the github repo as I'm thinking to look into working on an addition to the project. Now turns out, I'm not even able to properly compile the downloaded sources: I've created a directory kdesvn-build changed into it and launched cmake ../ (as described on https://github.com/KDE/kdesvn/blob/master/INSTALL-cmake) which does some stuff but then stops saying:
CMake Error: The following variables are used in this project, but
they are set to NOTFOUND. Please set them or make sure they are set
and tested correctly in the CMake files: SUBVERSION_INCLUDE_DIR
Now, I don't know what SUBVERSION_INCLUDE_DIR should be set to nor could I find it searching around the web. Anyone?
It is a directory containing svn_*.h files. If you are on Linux, you'd need to install something like subversion-dev package. On FreeBSD headers are installed with main package, and the directory is /usr/local/include/subversion-1/.
When I download the extension as ZIP file the ext_emconf.php file looks fine, but when I install the extension with composer "typo3-ter/jh-captcha": "1.3.0" the ext_emconf.php is broken and lets the extensionmanager crash.
Here are both files: https://gist.github.com/misterboe/5386df69c7ea70c6538de5fd3a52e70f
The original extension has no composer.json file so this must be auto generated.
The problem is the empty '' => '', dependencie
This actually isn't related to the composer installers, but is due to a (now already fixed) error in TER, which caused generating corrupted ext_emconf information in the t3x extension archive. The composer installers rely on this information and extract them to a (faulty) ext_emconf.php.
You could contact the extension author and tell him to remove and then re-upload this extension version, which will make the error go away.
Alternatively the author could upload a version 1.3.1.
If you then change your version constraint from "1.3.0" to "~1.3.1", which is recommended anyway, composer will download the fixed extension archive.
When adding https://www.npmjs.com/package/material-design-icons as a dependency to my Node application, cf push fails with Disk quota exceeded when running npm install. Since the complete application including node_modules has about 100 MB (way below the limit of 1 GB), I assume it might have to do with the fact that material-design-icons has about 86'000 files (for whatever reason).
Is there any workaround for this?
Another solution is to ignore the node_modules directory using the .cfignore file (the same concept as the .gitignore file). The files described in the .cfignore aren't uploaded to Cloud Foundry when you push your app.
You can find more about .cfignore here: https://docs.developer.swisscom.com/apps/deploy-apps/prepare-to-deploy.html#exclude
The solution is to delete the directory node_modules from your app directory before to push it. The description of the needed modules must be in the file package.json under dependencies. I tested a simple express app adding the material-design-icons module. Pushing the application without the content of the directory node_modules works, since in staging the modules are downloaded and added to the application.
The solution is to delete the directory node_modules from your app directory before to push it. The description of the needed modules must be in the file package.json under dependencies. I tested a simple express app adding the material-design-icons module. Pushing the application without the content of the directory node_modules works, since in staging the modules are downloaded and added to the application.
The solution with .cfignore should work. You might need to delete and re-push your app though, since Cloud Foundry caches some files and the container might be filled with these cached files. If you delete and re-push the app, you're getting a clean container from scratch which might solve your problem.
I have faced the same problem. I solved it by doing the following:
Using .cfignore
Specifying the update nodejs in package.json
Using the latest buildpack
I am unable to install the following question types with my moodle
1. Drag and drop into text (qtype_ddwtos)
2. Drag and drop matching (qtype_ddmatch)
I am using I am using Moodle 2.5.4 (Build: 20140113), php 5.4.7, MySQL 5.5.27, Apache 2.4.3, XAMPP server version 1.8.1
I have downloaded the plugins and unzip it then placed in the moodle->question->type. After that if I click the notifications link it is showing only blank page. Please advise me how to go further and how to resolve this issue and make use of those plugins.
the idea is to give the 755 permission to the "ddmatch" and "ddwtos" folders.
1- copy the two folder to moodle->question->type (as you did)
2- cd to this this directory:
cd /opt/lampp/htdocs/moodle/question/type
3- and change the permission of the two folder:
sudo chmod -R 755 ddwtos ddmatch
it worked for me !
I just checked out 2.5.4 and downloaded the plugins you mentioned - making sure they were both 2.5 versions - and extracted them into /question/type
https://moodle.org/plugins/view.php?plugin=qtype_ddmatch
https://moodle.org/plugins/view.php?plugin=qtype_ddwtos
Then went to notifications, they both require other plugins
qtype_match doesn't exist unfortunately
https://moodle.org/plugins/view.php?plugin=qtype_match
However gapselect does, so I downloaded that one too
https://moodle.org/plugins/view.php?plugin=qtype_gapselect
Then ran the upgrade and no errors were shown.
Is this on linux? Its possible that the extracted files haven't got the correct permissions - check the ownership of the folders : http://docs.moodle.org/25/en/Security_recommendations#Running_Moodle_on_a_dedicated_server
I would also double check that the files have been unzipped into the correct folder - so you should have /question/type/ddmatch, /question/type/ddwtos and /question/type/gapselect
If all that is okay then, like davosmith says, if you can switch on debugging and paste the error here. If you can't get into the system then edit /config.php and add these 2 lines after $CFG = new stdClass();
$CFG->debug = 32767;
$CFG->debugdisplay = 1;
Then try going to notifications again and see what the error is /admin/index.php