Private Repository Composer json Confused - github

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

Related

how to compile kdesvn from githib repo

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/.

How can I add a composer.json to a static TYPO3 project?

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

Composer install / GitHub token & API rate limits

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.

How to read local packages folder using NuGet?

I am trying to read my local solution packages folder using NuGet.Core.
If I create new UnzippedPackageRepository(pathToPackages) and call GetPackages() on it, the result is empty. I am looking at the source of UnzippedPackageRepository and it has:
from file in FileSystem.GetFiles("", "*" + Constants.PackageExtension)
let packageName = Path.GetFileNameWithoutExtension(file)
where FileSystem.DirectoryExists(packageName)
select new UnzippedPackage(FileSystem, packageName)
So it seems to expect *.nupkg for each package in top level?
Anyway, what is right way to read solution package store aside from going through each folder and creating UnzippedPackage manually?
Solved it, solution packages folder is handled by SharedPackageRepository.

TYPO3 install from dummy and source

I want to install typo3 using dummy and source packages, how is it done ? i unpack both tar.gz into each own directory or mix them into one single directory ?
Even creating ENABLE_INSTALL_TOOL file and giving permissions, the instalation is is still locked.
Thank's in advance
There is also source+dummy package available, download it and unzip. Downloading separate dummy or source packs makes sense only when you want to add missing element or update the sources.
http://typo3.org/download/