cancel
Showing results for 
Search instead for 
Did you mean: 

upgrade 2.4.7 to 2.4.7-p1

upgrade 2.4.7 to 2.4.7-p1

Hello.

I have installed magento 2.4.7 on a local system using Composer . since recent security issue , want to upgrade to 2.4.7-p1 .

followed the upgrade .

composer require-commerce magento/community-edition 2.4.7-p1 --no-update and I keep getting following issue.

  Problem 1
    - Root composer.json requires magento/community-edition 2.4.7-p1 -> satisfiable by magento/community-edition[2.4.7-p1].
    - magento/product-community-edition 2.4.7 requires magento/framework 103.0.7 -> satisfiable by magento/framework[103.0.7].
    - Only one of these can be installed: magento/framework[100.0.2, ..., 100.1.18, 101.0.0, ..., 101.0.11, 102.0.0, ..., 102.0.7-p3, 103.0.0, ..., 103.0.7-p1], magento/community-edition[2.4.7-p1]. magento/community-edition replaces magento/framework and thus cannot coexist with it.
    - Root composer.json requires magento/product-community-edition 2.4.7 -> satisfiable by magento/product-community-edition[2.4.7].

this is my first time upgrading . have searched and could not find how to resolve and upgrade the local development .

any suggestion would be appreciated.

 

Thanks.

Linux ubuntu , php 8.1 , apache2

5 REPLIES 5

Re: upgrade 2.4.7 to 2.4.7-p1

@tonysargma79f8 

 

Hey,

 

Please replace require-dev section of composer.json files with below given file : https://github.com/magento/magento2/blob/2.4.7-p1/composer.json,
Then try to run composer update
--ignore-platform-reqs

 

Thank You!

Problem solved? Click Kudos and "Accept as Solution".
200+ Magento 2 Extensions for Enhanced Shopping Experience.

Re: upgrade 2.4.7 to 2.4.7-p1

Thanks.

my compser.json , has the same exact information for require-dev with composer.json on github.

Re: upgrade 2.4.7 to 2.4.7-p1

Upgrading Magento can sometimes be challenging due to dependency conflicts. The error message you're encountering indicates that there is a conflict between different versions of the `magento/framework` package required by `magento/community-edition` and `magento/product-community-edition`.

Here's a step-by-step guide to help resolve this issue and successfully upgrade your Magento installation:

1. **Backup Your Magento Installation**:
- Always start by backing up your current Magento files and database.

2. **Clear Composer Cache**:
- Clear the Composer cache to ensure you're not getting cached versions of packages:
```sh
composer clear-cache
```

3. **Update Composer**:
- Make sure you have the latest version of Composer:
```sh
composer self-update
```

4. **Remove the existing `magento/community-edition` package**:
- Before adding the new version, remove the existing version to avoid conflicts:
```sh
composer remove magento/community-edition
```

5. **Update the Composer JSON File**:
- Update your `composer.json` to require the new version of Magento:
```json
"require": {
"magento/product-community-edition": "2.4.7-p1"
}
```
Note: Ensure `magento/product-community-edition` is the only Magento package listed. Remove `magento/community-edition` if it’s present.

6. **Update Dependencies**:
- Run the composer update command to update your dependencies:
```sh
composer update
```

7. **Upgrade the Magento Database**:
- After updating the dependencies, run the Magento upgrade command:
```sh
php bin/magento setup:upgrade
```

8. **Recompile and Deploy Static Content**:
- Recompile Magento and deploy static content:
```sh
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy -f
```

9. **Clear Cache**:
- Clear the Magento cache:
```sh
php bin/magento cache:clean
php bin/magento cache:flush
```

### Additional Tips:

- **Check for Compatibility Issues**:
- Make sure that any third-party extensions or custom modules you have installed are compatible with Magento 2.4.7-p1. You may need to update these as well.

- **Check the Composer Lock File**:
- If the `composer.lock` file is present, delete it before running `composer update`. This will force Composer to fetch the latest versions of all packages.

- **Resolve Specific Version Conflicts**:
- If you encounter specific version conflicts, you might need to explicitly require certain versions of the conflicting packages. Add those to your `composer.json`.

### Example of `composer.json`:

```json
{
"name": "magento/magento2ce",
"description": "Magento 2 (Community Edition)",
"require": {
"magento/product-community-edition": "2.4.7-p1"
},
"autoload": {
"psr-4": {
"Magento\\Framework\\": "lib/internal/Magento/Framework/",
"Magento\\Setup\\": "setup/src/Magento/Setup/",
"Magento\\": "app/code/Magento/"
}
},
"version": "2.4.7-p1"
}
```

After making these changes, the upgrade process should complete without the dependency conflicts you were encountering. If you continue to have issues, please provide additional details about the specific errors or conflicts, and we can further troubleshoot the problem.

 

 

Re: upgrade 2.4.7 to 2.4.7-p1

If needed any help, ping us @ Secret Sinners

Re: upgrade 2.4.7 to 2.4.7-p1

I like to apologize for being so late in response

Also thank you very much for setup by setup instruction on upgrading magento .

 

It worked like charm and now I have my project that working on to 2.4.7-p1 and everything is working great . 

 

Again , thanks a lot .