Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

patch:undo command resets applied patches info, but does not undo the changes #54

Open
artemmikhalitsin opened this issue Feb 26, 2020 · 0 comments
Labels

Comments

@artemmikhalitsin
Copy link

artemmikhalitsin commented Feb 26, 2020

Using the command patch:undo does not undo the changes done to files in the vendor folder. When subsequently running patch:apply, receive an error that the patch is already applied.

Pre-requisites
This is based on an installation of Magento 2.3.0 and composter-patches 4.20.2
patches.json file:

{
    "magento/product-enterprise-edition": {
        "[MDVA-1400] Unable to send the cookie; Maximum number of cookies would be exceeded": {
            "source": {
                "2.0.* || 2.1.0 - 2.1.17 || 2.2.0 - 2.2.3": "https://magentopatches.com/2.2/MDVA-1400_2.0_COMPOSER_v1.patch",
                "2.2.4 - 2.2.11 || 2.3.0 - 2.3.4": "https://magentopatches.com/2.2/MDVA-1400_2.0_v1.patch"
            }
        }
    }
}

patch file:

From 3776a9196ba858da9b51ea745f13aa2f61faaa58 Mon Sep 17 00:00:00 2001
From: Ivan Novykov <[email protected]>
Date: Mon, 7 Nov 2016 21:30:22 +0200
Subject: [PATCH] MDVA-1400: [Magento Cloud] - Regular 503 errors on production

---
 vendor/magento/framework/Stdlib/Cookie/PhpCookieManager.php       | 2 +-
 1 files changed, 1 insertions(+), 2 1eletions(-)

diff --git a/vendor/magento/framework/Stdlib/Cookie/PhpCookieManager.php b/vendor/magento/framework/Stdlib/Cookie/PhpCookieManager.php
index 0463fd8..ce5e5d8 100644
--- a/vendor/magento/framework/Stdlib/Cookie/PhpCookieManager.php
+++ b/vendor/magento/framework/Stdlib/Cookie/PhpCookieManager.php
@@ -29,7 +29,7 @@ class PhpCookieManager implements CookieManagerInterface
      * RFC 2109 - Page 15
      * http://www.ietf.org/rfc/rfc6265.txt
      */
-    const MAX_NUM_COOKIES = 50;
+    const MAX_NUM_COOKIES = 200;
     const MAX_COOKIE_SIZE = 4096;
     const EXPIRE_NOW_TIME = 1;
     const EXPIRE_AT_END_OF_SESSION_TIME = 0;

To Reproduce
Steps to reproduce the behavior:

  1. Have the above configuration
  2. Run composer patch:apply (or have it automatically applied as part of composer install)
  3. Run composer patch:undo
  4. Run composer patch:apply

Expected
All patches are reverted and re-applied

Actual
Patch info is reset, but changes are not revered

Notes
As we are supporting several clients on different Magento versions, we are trying to maintain a single list of patches and apply patches based on the version of magento/product-enterprise-edition

@allanpaiste allanpaiste added this to the 3.53.3 / 4.22.3 milestone Feb 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants