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.
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 installed contao 4.4 in my localhost successfully.After successful installation I tried to install an extension via contao manager.Unfortunately it fails with console error.So I download zip file of extenson from codefog
and put it in the folder root/system/modules .But the extension is not found in backend.I think the extension is not installed successfully. How to make it works? Please help me.
This is how i install extensions in my contao 4 standard-edition. As commented, this only applies to the standard-edition, not the managed-edition. If you don't want to change to the standard-edition, you may better wait, until they fix the problem in the contao manager... Otherwise this is how it works:
Installing a Contao 4 bundle
Info: A bundle is the best thing you can find for extending contao.
It is the cleanest way of adding functionality to the contao cms.
Find the module on https://packagist.org/
Get the "require ..." command from under the title
Connect to your hosting (or if local, open cmd or terminal)
Change to the root of your hosting
Execute the require ... command for this extension
composer require madeyourday/contao-rocksolid-columns
Add the module to AppKernel (File: app/AppKernel.php)
In the "$bundles" array we can now add our bundle to the list of bundles, that contao should load: (the bundle name used in this line can be found in vendor/%developer%/%extension%/src/ and then there is a ...Bundle... php File there, that tells you the name of the bundle)
new MadeYourDay\RockSolidColumns\RockSolidColumnsBundle(),
Open the installtool of contao (contao/install) and update the database
Installing a Contao 4 extension
Info: A contao 4 extension is defined by it's developer, it is actually still the same method of programming like in 3.5 but someone has tested it in contao 4 and approved of its functionality. This is the second best thing you can find for extending contao.
Find the module on https://packagist.org/
Get the "require ..." command from under the title
Connect to your hosting (or if local, open cmd or terminal)
Change to the root of your hosting
Execute the require command for this extension
composer require heimrichhannot/dlh_googlemaps
Add the module to AppKernel (File: app/AppKernel.php)
In the "$bundles" array we can now add our extension to the list of extensions, that contao should load:
new ContaoModuleBundle('dlh_googlemaps', $this->getRootDir()),
Open the installtool of contao (contao/install) and update the database
Installing a Contao 3.5 extension
Info: A contao 3.5 extension is your last hope, it is the same code as in contao 3.5 may or may not work - you have to test it yourself.
Find the module on github (or some other repo)
Conntect to your hosting with ssh (or if local, just open cmd or terminal)
Change into "system/modules"
Download the repo (e.g. git clone https://github.com/ContaoBlackForest/contao-system-notification system-notification) - notice the added "system-notification" at the end, that should be the foldername, in which the extions has to be (you can find the folder in the composer.json file inside the extension under "Resources/contao")
Create syslinks (bin/console contao:symlinks)
Add the module to AppKernel (File: app/AppKernel.php)
This line should be added once, just after "use Symfony\Component\HttpKernel\Kernel;" (this only has to be added once and only if you are using contao 3.5 extensions)
use Contao\CoreBundle\HttpKernel\Bundle\ContaoModuleBundle;
In the "$bundles" array we can now add our extension to the list of extensions, that contao should load:
new ContaoModuleBundle('system-notification', $this->getRootDir()),
Open the installtool of contao (contao/install) and update the database
Your Question
To awnser your question, as the module you want to install, is a contao 4 extension, you could use the according instructions from above.
contao 4 extension - https://packagist.org/packages/codefog/contao-news_categories
You do not need to install this extension manually. Simply run
composer require codefog/contao-news_categories
in the root folder of your Contao installation. Depending on how you installed composer the command might be different.
I am using a working TYPO3 7.6.14 environment with many extensions. Now I want to add a composer.json file manually. I do not want to create a new project which will download the latest TYPO3 core and TYPO3 extensions. I am afraid that this could accidently overwrite some extension's PHP files.
I need a safe way to add a composer.json file which will not change the present TYPO3 PHP files automatically. I prefer to download TYPO3 and the extensions manually. Therefore I do not want to use the composer mode. I must find a way to prevent composer from overwriting my self written PHP files.
I need a composer.json file because I want to add the external TCPDF library which is on its own place on the file system and not inside of a vendor folder inside of TYPO3. And the file ext_autoload.php is not supported any more by TYPO3 7.6.
I have read the https://usetypo3.com/typo3-and-composer.html#c51 recommendations. But it only shows the way how to create a new TYPO3 project using the command line and the composer command. Is it also possible to download a composer.json file into a TYPO3 folder (which?) in order to tell the autoloader where it will find the external TCPDF library?
I have unzipped the TCPDF file under /var/www/html/TCPDF-master/tcpdf.php . I want to use TCPDF, TYPO3 and its extensions unchanged and never updated by any composer command.
Introducing Composer for not using it's features seems a bit strange to me, but yes, it's possible to define a dedicated version or commit-hash in a repository to disable updates.
However, I would recommend to make use of the tilde ~ operator to enable updates on the accordant branch, to e.g. include security updates automatically. For TYPO3 CMS this dependency would look like the following, to stay on the 7.6 branch:
"require": {
"typo3/cms": "~7.6.14"
}
Find further details on how to declare versions in the Composer documentation.
Besides that, it seems, that you're not using Composer at all for the root project. You could then create a wrapper extension for TCPDF with one of these options:
use Composer for that extension to require TCPDF and load the generated autoload file (e.g. in typo3conf/ext/tcpdf/vendor/autoload.php) in your wrapper extension
directly copy & paste TCPDF's source (which seems to be the scenario you're up to) and add the autoloading information to ext_emconf.php, which is similar to previous ext_autoload.php - find details about that in a blog post about class loading
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.
Has anyone tried to use the latest stats extension 1.3.1? I have tried, but when I unzip the file there is no stats.jar or stats.jar.gz files, like there was in the 1.2.1 version. If you have used it how did you get it to work?
I need it because it has a beta distribution function and is also easier to get up an running than the R extension (I have a locked down system).
The stats.jar file was missing from release v1.3.1. There is now a new release, v1.3.2, that contains stats.jar.
It seems like the jars have not been packaged with the currently available release at https://github.com/cstaelin/Stats-Extension/releases/tag/v1.3.1.
This is most likely a simple oversight from the author. I have opened an issue on GitHub.
In the meanwhile, you can still get an old jar from the git archive or try to build the extension yourself.