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

Magento2-Framework-PDO-Adapter-MySQL8 doesn't install running composer - v install #2

Open
pioneerathletics opened this issue Sep 12, 2022 · 0 comments

Comments

@pioneerathletics
Copy link

Magento version: 2.4.3 -p3
mySQL vers: 8.0 updated from 5.7
PHP version: 7.4

I had an initial issue installing the Magento2-Framework-PDO-Adapter-MySQL8 patch, while following along with the directions listed. After installing cweagans/composer-patches and editing the composer file with the patch, I ran composer -v install to install said patch and received this error stating that the patch could not be installed (note I added xxxx in place of our root):

xxxxxxx:~/xxxxxxx$ composer -v install
Gathering patches for root package.
Removing package magento/framework so that it can be re-installed and re-patched.

  • Removing magento/framework (103.0.3-p3)
    Loading composer repositories with package information
    Installing dependencies (including require-dev) from lock file
    Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. It is recommended that you run composer update or composer update <package name>.
    Dependency resolution completed in 0.014 seconds
    Analyzed 1289 packages to resolve dependencies
    Analyzed 8542 rules to resolve dependencies
    Package operations: 1 install, 0 updates, 0 removals
    Installs: magento/framework:103.0.3-p3
    Warning from https://repo.packagist.org: Support for Composer 1 is deprecated and some packages will not be available. You should upgrade to Composer 2. See https://blog.packagist.com/deprecating-composer-1-support/
    Info from https://repo.packagist.org: #StandWithUkraine
    Gathering patches for root package.
    Gathering patches for dependencies. This might take a minute.
    Found 1 patches for magento/framework.
  • Installing magento/framework (103.0.3-p3): Downloading (100%)
    Extracting archive - Applying patches for magento/framework
    https://raw.githubusercontent.com/magemojo/m2-patches/main/framework-adapter-pdo.patch (Magento2-Framework-PDO-Adapter-MySQL8: Patch to fix PDO Adapter when MySQL 8.0 used for Temporary tables using LIKE SQL query)
    patch '-p1' --no-backup-if-mismatch -d '/srv/public_html/vendor/magento/framework' < '/tmp/631f23388fa7c.patch'
    can't find file to patch at input line 9
    Perhaps you used the wrong -p or --strip option?
    The text leading up to this was:

|---
| DB/Adapter/Pdo/Mysql.php | 2 +-
| 1 file changed, 1 insertion(+), 1 deletion(-)
|
|diff --git a/DB/Adapter/Pdo/Mysql.php b/DB/Adapter/Pdo/Mysql.php
|index 66e6bb2..0b2c27b 100644
|--- a/DB/Adapter/Pdo/Mysql.php
|+++ b/DB/Adapter/Pdo/Mysql.php

File to patch:
Skip this patch? [y]
Skipping patch.

1 out of 1 hunk ignored

patch '-p0' --no-backup-if-mismatch -d '/srv/xxxxx/vendor/magento/framework' < '/tmp/631f23388fa7c.patch'
can't find file to patch at input line 9
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:

|---
| DB/Adapter/Pdo/Mysql.php | 2 +-
| 1 file changed, 1 insertion(+), 1 deletion(-)
|
|diff --git a/DB/Adapter/Pdo/Mysql.php b/DB/Adapter/Pdo/Mysql.php
|index 66e6bb2..0b2c27b 100644
|--- a/DB/Adapter/Pdo/Mysql.php
|+++ b/DB/Adapter/Pdo/Mysql.php

File to patch:
Skip this patch? [y]
Skipping patch.

1 out of 1 hunk ignored

patch '-p2' --no-backup-if-mismatch -d '/srv/xxxxx/vendor/magento/framework' < '/tmp/631f23388fa7c.patch'
can't find file to patch at input line 9
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:

|---
| DB/Adapter/Pdo/Mysql.php | 2 +-
| 1 file changed, 1 insertion(+), 1 deletion(-)
|
|diff --git a/DB/Adapter/Pdo/Mysql.php b/DB/Adapter/Pdo/Mysql.php
|index 66e6bb2..0b2c27b 100644
|--- a/DB/Adapter/Pdo/Mysql.php
|+++ b/DB/Adapter/Pdo/Mysql.php

File to patch:
Skip this patch? [y]
Skipping patch.

1 out of 1 hunk ignored

patch '-p4' --no-backup-if-mismatch -d '/srv/xxxxxx/vendor/magento/framework' < '/tmp/631f23388fa7c.patch'
can't find file to patch at input line 9
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:

|---
| DB/Adapter/Pdo/Mysql.php | 2 +-
| 1 file changed, 1 insertion(+), 1 deletion(-)
|
|diff --git a/DB/Adapter/Pdo/Mysql.php b/DB/Adapter/Pdo/Mysql.php
|index 66e6bb2..0b2c27b 100644
|--- a/DB/Adapter/Pdo/Mysql.php
|+++ b/DB/Adapter/Pdo/Mysql.php

File to patch:
Skip this patch? [y]
Skipping patch.

1 out of 1 hunk ignored

Could not apply patch! Skipping. The error was: Cannot apply patch https://raw.githubusercontent.com/magemojo/m2-patches/main/framework-adapter-pdo.patch

The odd thing is, though, after moving forward and running composer update --lock the patch appears as if it's installed:

xxxxxx:~/xxxxxx$ composer update --lock
Gathering patches for root package.
Removing package magento/framework so that it can be re-installed and re-patched.

Writing lock file
Generating autoload files

After running php bin/magento setup:upgrade --keep-generated, php bin/magento setup:di:compile, and finally reindexing, I can see the apparently the patch was installed (even though when running install it stated it could not be patched):

xxxxxxx:~/xxxxxx/bin$ php magento indexer:reindex Design Config Grid index has been rebuilt successfully in 00:00:00 Customer Grid index has been rebuilt successfully in 00:00:01 Product Flat Data index has been rebuilt successfully in 00:00:00 Category Flat Data index has been rebuilt successfully in 00:00:00 Category Products index has been rebuilt successfully in 00:00:00 Product Categories index has been rebuilt successfully in 00:00:00 Catalog Rule Product index has been rebuilt successfully in 00:00:00 Product EAV index has been rebuilt successfully in 00:00:00 Stock index has been rebuilt successfully in 00:00:00 Product Price index has been rebuilt successfully in 00:00:02 Catalog Product Rule index has been rebuilt successfully in 00:00:00 Catalog Search index has been rebuilt successfully in 00:00:02

Not sure why the patch is stating it can't install on composer install but it apparently does on composer update? Does this mean the patch has applied correctly, since I'm getting the right end result? I applied this patch a few months ago on a dev site and didn't receive any error like this.

Any help would be great appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant