Composer setup of TYPO3 in exact version - composer-php

Is it possible to require the whole TYPO3 and all of its components in exact version without putting this exact version to all components ? Pls. see part of my composer.json file:
"require": {
"typo3/cms-core": "10.4.20",
"typo3/cms-about": "^10.4",
"typo3/cms-adminpanel": "^10.4",
"typo3/cms-backend": "^10.4",
"typo3/cms-belog": "^10.4",
"typo3/cms-beuser": "^10.4",
In other words:
Do I have write "10.4.20" to all of the components below the the first line where I require the TYPO3 10.4.20 core or is there another way to do that with one line of code ?

Yes. It is possible. Just give it a try:
$ composer require typo3/cms-core:10.4.20 typo3/cms-about:^10.4
./composer.json has been updated
Running composer update typo3/cms-core typo3/cms-about
Loading composer repositories with package information
Updating dependencies
Lock file operations: 63 installs, 0 updates, 0 removals
- Locking cogpowered/finediff (0.3.1)
...
- Locking typo3/class-alias-loader (v1.1.3)
- Locking typo3/cms-about (v10.4.20)
- Locking typo3/cms-cli (2.0.0)
- Locking typo3/cms-composer-installers (v3.1.2)
- Locking typo3/cms-core (v10.4.20)
- Locking typo3/html-sanitizer (v2.0.13)
...
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 63 installs, 0 updates, 0 removals
- Installing typo3/cms-composer-installers (v3.1.2): Extracting archive
...
- Installing cogpowered/finediff (0.3.1): Extracting archive
- Installing typo3/cms-core (v10.4.20): Extracting archive
- Installing typo3/cms-about (v10.4.20): Extracting archive
6 package suggestions were added by new dependencies, use `composer suggest` to see details.
Generating autoload files
Generating class alias map file

You need to use the same version number for all typo3/cms-* packages. With search & replace that should be quite easy.

Related

how can i fix this package installation error and install require hardevine/shoppingcart for my laravel project

PS F:\web\Laravel-Advance-Ecommerce-master>
PS F:\web\Laravel-Advance-Ecommerce-master>
PS F:\web\Laravel-Advance-Ecommerce-master> composer require hardevine/shoppingcart
Info from https://repo.packagist.org: #StandWithUkraine
Using version ^3.1 for hardevine/shoppingcart
./composer.json has been updated
Running composer update hardevine/shoppingcart
Loading composer repositories with package information
Updating dependencies
Nothing to modify in lock file
Installing dependencies from lock file (including require-dev)
Nothing to install, update or remove
Package swiftmailer/swiftmailer is abandoned, you should avoid using it. Use symfony/mailer instead.
Generating optimized autoload files
Warning: Ambiguous class resolution, "Gloudemans\Shoppingcart\CanBeBought" was found in both "F:/web/Laravel-Advance-Ecommerce-master/vendor/bumbummen99/shoppingcart/src\CanBeBought.php" and "F:/web/Laravel-Advance-Ecommerce-master/vendor/hardevine/shoppingcart/src\CanBeBought.php", the first will be used.
Warning: Ambiguous class resolution, "Gloudemans\Shoppingcart\Cart" was found in both "F:/web/Laravel-Advance-Ecommerce-master/vendor/bumbummen99/shoppingcart/src\Cart.php" and "F:/web/Laravel-Advance-Ecommerce-master/vendor/hardevine/shoppingcart/src\Cart.php", the first will be used.
Warning: Ambiguous class resolution, "Gloudemans\Shoppingcart\CartItem" was found in both "F:/web/Laravel-Advance-Ecommerce-master/vendor/bumbummen99/shoppingcart/src\CartItem.php" and "F:/web/Laravel-Advance-Ecommerce-master/vendor/hardevine/shoppingcart/src\CartItem.php", the first will be used.
Warning: Ambiguous class resolution, "Gloudemans\Shoppingcart\CartItemOptions" was found in both "F:/web/Laravel-Advance-Ecommerce-master/vendor/bumbummen99/shoppingcart/src\CartItemOptions.php" and "F:/web/Laravel-Advance-Ecommerce-master/vendor/hardevine/shoppingcart/src\CartItemOptions.php", the first will be used.
Warning: Ambiguous class resolution, "Gloudemans\Shoppingcart\Contracts\Buyable" was found in both "F:/web/Laravel-Advance-Ecommerce-master/vendor/bumbummen99/shoppingcart/src\Contracts\Buyable.php" and "F:/web/Laravel-Advance-Ecommerce-master/vendor/hardevine/shoppingcart/src\Contracts\Buyable.php", the first will be used.
Warning: Ambiguous class resolution, "Gloudemans\Shoppingcart\Exceptions\CartAlreadyStoredException" was found in both "F:/web/Laravel-Advance-Ecommerce-master/vendor/bumbummen99/shoppingcart/src\Exceptions\CartAlrDiscovered Package: laravel/tinker
Discovered Package: livewire/livewireDiscovered Package: nesbot/carbon
Discovered Package: nunomaduro/collisionDiscovered Package: sven/artisan-view
Package manifest generated successfully.84 packages you are using are looking for funding.
Use the `composer fund` command to find out more!Found 11 security vulnerability advisories affecting 4 packages.
Run composer audit for a full list of advisories.
PS F:\web\Laravel-Advance-Ecommerce-master>
im trying to install this package and create shopping cart for my laravel project
the package you're trying to install hardevine/shoppingcart and the package that already exists in your installation bumbummen99/LaravelShoppingcart are both a fork of the same original package Crinsane/LaravelShoppingcart which is not compatible with the latest version of laravel. You can only use one of them.
Or if you have the patience, make your own fork that merges the functionalities of both forks or just use bumbummen99's which is the most up to date one. Depends on your needs and what those packages add to the original one.

Error installing Openmage (Undefined index: process)

Friends, I am trying to install Openmage and getting the following error:
Installing dependencies from lock file (including require-dev)
Verifying lock file contents can be installed on current platform.
Package operations: 2 installs, 0 updates, 0 removals
- Downloading aoepeople/composer-installers (v0.0.4)
- Installing aoepeople/composer-installers (v0.0.4): Extracting archive
Install of aoepeople/composer-installers failed
[ErrorException]
Undefined index: process
Have you ever exeperienced such an error? My composer version is 2.0.6 and the PHP versIon is 7.3.27.This is how my composer.json looks like in case you guys want to take a look at it:
{
"require": {
"aoepeople/composer-installers": "*",
"openmage/magento-lts": "19.4.6"
}
}
Any idea how could I solve this problem?
Friends,
I have just found a solution: the function "proc_open" was disabled in mys php.ini. Changing this solved my problem.

Should extension shims be avoided in Composer?

Let's say I have some code in a package that requires ext-oauth to handle OAuth signature generation.
{
"name":"vendor/my-package",
"type":"library",
"require":{
"ext-oauth":"*"
}
}
When I try to install this package on a system that doesn't have the extension, Composer raises an error, as expected.
$ composer install
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- The requested PHP extension ext-oauth * is missing from your system. Install or enable PHP's oauth extension.
Clearly the ext-oauth package is missing on this system, checking via composer show --platform confirms this.
Assume the system can't be updated to include the extension, virtualization (via Docker or Vagrant) also isn't an option. Would hacking around it by using a package that provides the ext-oauth extension or require'ng a package from packagist be a reasonable solution?
This synthetic test appears to work.
{
"name":"vendor/my-package",
"type":"library",
"require":{
"vendor/ext-oauth":"1.0",
"ext-oauth":"*"
},
"repositories":[
{
"type":"package",
"package":{
"name":"vendor/ext-oauth",
"version":"1.0",
"dist":{
"url":"https://example.com/ext-oauth.zip",
"type":"zip"
},
"provide":{
"ext-oauth":"1.0"
},
"autoload":[
"files":[
"src/oauth.php",
"src/oauthexception.php"
]
]
}
}
]
}
Composer then downloads the provided shim and installs it, marking the ext-oauth dependency as met.
$ composer install
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 1 install, 0 updates, 0 removals
- Installing vendor/ext-oauth (1.0): Downloading (100%)
Writing lock file
Generating autoload files
This feels wrong, but appears to accomplish satisfying the dependency in a maintainable way. Is there a good reason - other than code smell - to avoid providing this sort of shim when PHP extensions can't be installed?

issue with Userfrosting & Composer - no matching packages

Just working my way through the Userfrosting 4 tutorial. The basic app is up and running and am now creating the first sprinkle under "Your First UserFrosting Site".
On running composer update I get the following:
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- userfrosting/config dev-master requires userfrosting/support ^4.0.0 -> no matching package found.
- userfrosting/config dev-master requires userfrosting/support ^4.0.0 -> no matching package found.
- Installation request for userfrosting/config dev-master -> satisfiable by userfrosting/config[dev-master].
Potential causes:
- A typo in the package name
- The package is not available in a stable-enough version according to your minimum-stability setting
I've replaced my code with the copied / pasted code from the tutorial and still get the errors. I've absolutely no idea where to go from here - any pointers would be appreciated.
Make sure you have the latest version (4.0.11-alpha as of now) since the component versioning was changed/fixed in a recent version.
The core composer.json file shoudn't use the dev-master version of userfrosting/config component anymore, but one of the 4.0.x version. See : https://github.com/userfrosting/UserFrosting/blob/master/app/sprinkles/core/composer.json#L31. If you have a custom ^composer.json` file in your sprinkle, you don't need to add the packages define in the core composer file again.
That being said, if you're still having some issues, you can try running composer clear-cache as composer might have cached some outdated info.

Composer: Your requirements could not be resolved to an installable set of packages

I am trying to install a composer package and I continuously get the following error:
Your requirements could not be resolved to an installable set of packages.
Problem 1
- The requested package rondobley/extended-respect-validation could not be found in any version, there may be a typo in the package name.
Here is the composer.json
{
"minimum-stability": "dev",
"require": {
"rondobley/extended-respect-validation": "^1.0"
}
}
And the output from composer install -vvv:
vagrant#wheezy:/code/test$ composer install -vvv
Reading ./composer.json
Loading config file ./composer.json
Checked CA file /etc/ssl/certs/ca-certificates.crt: valid
Executing command (/code/test): git branch --no-color --no-abbrev -v
Executing command (/code/test): git describe --exact-match --tags
Executing command (/code/test): git log --pretty="%H" -n1 HEAD
Failed to initialize global composer: Composer could not find the config file: /home/vagrant/.composer/composer.json
To initialize a project, please create a composer.json file as described in the https://getcomposer.org/ "Getting Started" section
Running 1.2.0 (2016-07-19 01:28:52) with PHP 5.5.38-1~dotdeb+7.1 on Linux / 3.2.0-4-amd64
Loading composer repositories with package information
Downloading https://packagist.org/packages.json
Writing /home/vagrant/.composer/cache/repo/https---packagist.org/packages.json into cache
Updating dependencies (including require-dev)
Reading /home/vagrant/.composer/cache/repo/https---packagist.org/p-provider-2013.json from cache
Reading /home/vagrant/.composer/cache/repo/https---packagist.org/p-provider-2014.json from cache
Reading /home/vagrant/.composer/cache/repo/https---packagist.org/p-provider-2015.json from cache
Reading /home/vagrant/.composer/cache/repo/https---packagist.org/p-provider-2015-10.json from cache
Reading /home/vagrant/.composer/cache/repo/https---packagist.org/p-provider-2016-01.json from cache
Reading /home/vagrant/.composer/cache/repo/https---packagist.org/p-provider-2016-04.json from cache
Reading /home/vagrant/.composer/cache/repo/https---packagist.org/p-provider-2016-07.json from cache
Reading /home/vagrant/.composer/cache/repo/https---packagist.org/p-provider-archived.json from cache
Reading /home/vagrant/.composer/cache/repo/https---packagist.org/p-provider-latest.json from cache
Resolving dependencies through SAT
Dependency resolution completed in 0.001 seconds
Your requirements could not be resolved to an installable set of packages.
Problem 1
- The requested package rondobley/extended-respect-validation could not be found in any version, there may be a typo in the package name.
Potential causes:
- A typo in the package name
- The package is not available in a stable-enough version according to your minimum-stability setting
see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.
Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.
The package seems to be fine to me:
https://packagist.org/packages/rondobley/extended-respect-validation
It is a new package, just published today, but it has been several hours. I have also tried composer clearcache and that does not help. I have read many of the other similar issues here with no luck. I am new to publishing composer packages, so maybe I an missing a simple step?
Ideally I would like to install version ^1.0.
Thanks for the help in advance.
See https://twitter.com/packagist/status/772034610632990720 - it was a temporary failure on packagist

Resources