yireo / magento2-replace-all

Meta-package to replace all optional Magento 2 modules
129 stars 32 forks source link

Magento 2.4.3. issue #24

Closed JelleGe closed 2 years ago

JelleGe commented 2 years ago

Hi,

Sadly it does not work well anymore for Magento 2.4.3. Problem is within the Vertex modules.

        "vertex/module-address-validation": "*",
        "vertex/module-tax": "*",
        "vertex/module-tax-staging": "*",
        "vertex/product-magento-module": "*",
        "vertex/sdk": "*",
        "vertexinc/module-tax": "*",
        "vertexinc/module-tax-staging": "*",
        "vertexinc/product-magento-module": "*",
        "vertexinc/product-magento-module-commerce": "*",

When removing these modules and running php bin/magento setup:upgrade, we get the error:

There are no commands defined in the "setup" namespace.

Check it using the php bin/magento list command we get the following error:

In ServiceManager.php line 620:

Service with name "Magento\Setup\Console\Command\DbStatusCommand" could not be created. Reason: Class Vertex\Tax\Setup\Schema\Triggers\MigrateVertexInvoiceSent does not exist

In ClassReader.php line 28:

Class Vertex\Tax\Setup\Schema\Triggers\MigrateVertexInvoiceSent does not exist

jissereitsma commented 2 years ago

I'm unable to confirm things at this moment. But if you are saying that this occurs because of this package, then there should still be a package vertex/abc in the vendor/ folder. Which package is that?

fnogatz commented 2 years ago

Can confirm this issue when upgrading from v2.4.2 to v2.4.3-p1. Unresolved dependencies because of vertex/module-tax:

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

  Problem 1
    - magento/project-community-edition is present at version 2.4.3-p1 and cannot be modified by Composer
    - vertexinc/product-magento-module 4.2.2 requires vertexinc/module-tax 4.2.2 -> satisfiable by vertexinc/module-tax[4.2.2].
    - magento/product-community-edition 2.4.3-p1 requires vertexinc/product-magento-module 4.2.2 -> satisfiable by vertexinc/product-magento-module[4.2.2].
    - vertexinc/module-tax[4.2.0, 4.2.1, 4.2.2] cannot be installed as that would require removing magento/project-community-edition[2.4.3-p1]. They all replace vertex/module-tax and thus cannot coexist.
    - Root composer.json requires magento/product-community-edition 2.4.3-p1 -> satisfiable by magento/product-community-edition[2.4.3-p1].

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.

Unresolved dependencies because of vertex/module-address-validation:

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

  Problem 1
    - magento/project-community-edition is present at version 2.4.3-p1 and cannot be modified by Composer
    - vertexinc/product-magento-module 4.2.2 requires vertexinc/module-address-validation 2.1.3 -> satisfiable by vertexinc/module-address-validation[2.1.3].
    - magento/product-community-edition 2.4.3-p1 requires vertexinc/product-magento-module 4.2.2 -> satisfiable by vertexinc/product-magento-module[4.2.2].
    - vertexinc/module-address-validation[2.1.3] cannot be installed as that would require removing magento/project-community-edition[2.4.3-p1]. They both replace vertex/module-address-validation and thus cannot coexist.
    - Root composer.json requires magento/product-community-edition 2.4.3-p1 -> satisfiable by magento/product-community-edition[2.4.3-p1].

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.

We had to remove the lines "vertex/module-tax": "*" and "vertex/module-address-validation": "*" to perform the upgrade. Similarly, for magento/module-analytics, which raised another error.

jissereitsma commented 2 years ago

Unfortunately, I can't confirm anything on this. I've upgraded to 2.4.3-p1 in multiple instances now and was able to use the yireo/magento2-replace-all package without issues. So there must be something else at play.

I feel that I might be stating the obvious, but do not just run setup:upgrade after this composer replacement upgrade procedure: Wipe out the cache (rm -r var/cache or redis-cli flushall), wipe out the generated folder and only then start with setup:upgrade.

The very error message that you are reporting shows a class in a composer package that is replaced. If it is replaced, it is removed, so no longer causing issues. I really suspect that the issue is not with this package, but with the upgrade procedure.

JoostWan commented 2 years ago

@jissereitsma I have the same issue. Fixed it with remove the lines with vertex. After that composer install runs fine. Also there a no package installed from vertex.

jissereitsma commented 2 years ago

So which specific vertex package was removed and which code was responsible for this? I'm unable to reproduce this in a clean environment. If there are packages with the word vertex in them, you can replace them. If those packages again have dependencies with other packages with the word vertex in them as well, those can again be replaced. If all packages with the word vertex are then replaced, composer will not mention anything about those packages again.

With a clean Magento 2.4.2, 2.4.3 and 2.4.3-p1, all vertex packages are correctly replaced, as they are also being mentioned in the releases of this repository. So as of yet, a lot of people are saying it doesn't work but they are failing to mention what they did and what they didn't. For instance, wiping out composer.lock and vendor/ as part of the troubleshooting (even though you might think differently) but I get no reports back on this: https://github.com/yireo/magento2-replace-tools#troubleshooting

As of yet, I don't think this issue is related to this specific package but to the way this issue is being troubleshooted.

jissereitsma commented 2 years ago

I'm closing this issue as of yet. Feel free to open but make sure to have gone through all of the troubleshooting tips.

Skyfly2021 commented 2 years ago

@jissereitsma I have the same issue. Fixed it with remove the lines with vertex. After that composer install runs fine. Also there a no package installed from vertex.

HI I have the same problem from magento 2.4.3 upgrade 2.4.4, how did you fix it, please help and tell me, thanks.

jissereitsma commented 2 years ago

Note that if troubleshooting is to be more than just confirming how others fixed an unknown issue, more troubleshooting questions (see above) would need to be answered.

Skyfly2021 commented 2 years ago

Thanks

Sent from my iPhone

On 28 May 2022, at 4:43 PM, Jisse Reitsma @.***> wrote:



Note that if troubleshooting is to be more than just confirming how others fixed an unknown issue, more troubleshooting questions (see above) would need to be answered.

— Reply to this email directly, view it on GitHubhttps://github.com/yireo/magento2-replace-all/issues/24#issuecomment-1140213707, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AM3GKHLFPB3Q5I64K6GVQ3TVMHMCHANCNFSM5FNWGGIA. You are receiving this because you commented.Message ID: @.***>

vrajeshpatel4u commented 2 years ago

Hello,

I am also getting the same issue after upgrading Magento From 2.4.3-p2 to Magento 2.4.4.

jissereitsma commented 2 years ago

If the same error applies, the same questions apply as well. If you want help, don't report that "you have the same issue". Instead, report which Vertex packages are still in your vendor/ folder. And cross-check them with the replacements in this repository and let me know which Vertex package is not replaced yet. Alternatively, you can hire me to do the research for you.