magento / meta-for-magento2

33 stars 19 forks source link

Not compatible with PHP 7.4 and Magento 2.4.5-p2 #3

Closed seak6adtn59v closed 11 months ago

seak6adtn59v commented 1 year ago

Preconditions (*)

  1. PHP 7.4
  2. Magento 2.4.5-p2

Steps to reproduce (*)

  1. Simply run composer require meta/meta-for-magento2:1.0.0

Expected result (*)

  1. It should install the plugin but it gives this error
  2. Screenshot 2023-05-16 at 18 19 49

Actual result (*)

  1. It should work with PHP 7.4 because in the requirements it says this
  2. Screenshot 2023-05-16 at 18 22 36

Please advise what should we do?

gscogna commented 1 year ago

Yes i found same problem, try to manual installation in App/code following all command for install this module.

seak6adtn59v commented 1 year ago

Thanks @gscogna I tried to install directly from app/code and also before that I had installed composer require facebook/php-business-sdk but after doing that when I compile I get this:

Compilation was started.
Repositories code generation... 1/9 [===>------------------------]  11% < 1 sec 88.0 MiBsyntax error, unexpected ')', expecting variable (T_VARIABLE)#0 /microcloud/domains/example/domains/example-domain.com/http/vendor/composer/ClassLoader.php(428): Composer\Autoload\includeFile()
#1 [internal function]: Composer\Autoload\ClassLoader->loadClass()
#2 [internal function]: spl_autoload_call()
#3 /microcloud/domains/example/domains/example-domain.com/http/setup/src/Magento/Setup/Module/Di/Code/Reader/ClassesScanner.php(134): class_exists()
#4 /microcloud/domains/example/domains/example-domain.com/http/setup/src/Magento/Setup/Module/Di/Code/Reader/ClassesScanner.php(117): Magento\Setup\Module\Di\Code\Reader\ClassesScanner->includeClass()
#5 /microcloud/domains/example/domains/example-domain.com/http/setup/src/Magento/Setup/Module/Di/Code/Reader/ClassesScanner.php(87): Magento\Setup\Module\Di\Code\Reader\ClassesScanner->extract()
#6 /microcloud/domains/example/domains/example-domain.com/http/setup/src/Magento/Setup/Module/Di/App/Task/Operation/RepositoryGenerator.php(61): Magento\Setup\Module\Di\Code\Reader\ClassesScanner->getList()
#7 /microcloud/domains/example/domains/example-domain.com/http/setup/src/Magento/Setup/Module/Di/App/Task/Manager.php(56): Magento\Setup\Module\Di\App\Task\Operation\RepositoryGenerator->doOperation()
#8 /microcloud/domains/example/domains/example-domain.com/http/setup/src/Magento/Setup/Console/Command/DiCompileCommand.php(216): Magento\Setup\Module\Di\App\Task\Manager->process()
#9 /microcloud/domains/example/domains/example-domain.com/http/vendor/symfony/console/Command/Command.php(255): Magento\Setup\Console\Command\DiCompileCommand->execute()
#10 /microcloud/domains/example/domains/example-domain.com/http/vendor/symfony/console/Application.php(1021): Symfony\Component\Console\Command\Command->run()
#11 /microcloud/domains/example/domains/example-domain.com/http/vendor/symfony/console/Application.php(275): Symfony\Component\Console\Application->doRunCommand()
#12 /microcloud/domains/example/domains/example-domain.com/http/vendor/magento/framework/Console/Cli.php(116): Symfony\Component\Console\Application->doRun()
#13 /microcloud/domains/example/domains/example-domain.com/http/vendor/symfony/console/Application.php(149): Magento\Framework\Console\Cli->doRun()
#14 /microcloud/domains/example/domains/example-domain.com/http/bin/magento(23): Symfony\Component\Console\Application->run()
#15 {main}

I think it is again because of PHP version issue as I am using PHP 7.4 (Magento 2.4.5-p1) and plugin looks required PHP 8.1

gscogna commented 1 year ago

Nope is syntass error , there is an error in the syntax constructor a comma at the end, delete it so people can recompile the code at app/code/Meta/Catalog/Observer/Product/DeleteAfter.php on line 71

Inviato da Outlook per Androidhttps://aka.ms/AAb9ysg


From: PK @.> Sent: Thursday, May 18, 2023 8:38:13 PM To: magento/meta-for-magento2 @.> Cc: Gennaro Luca Scognamiglio @.>; Mention @.> Subject: Re: [magento/meta-for-magento2] Not compatible with PHP 7.4 and Magento 2.4.5-p2 (Issue #3)

Thanks @gscognahttps://github.com/gscogna I tried to install directly from app/code and also before that I had installed composer require facebook/php-business-sdk but after doing that when I compile I get this:

Compilation was started. Repositories code generation... 1/9 [===>------------------------] 11% < 1 sec 88.0 MiBsyntax error, unexpected ')', expecting variable (T_VARIABLE)#0 /microcloud/domains/example/domains/example-domain.com/http/vendor/composer/ClassLoader.php(428): Composer\Autoload\includeFile()

1 [internal function]: Composer\Autoload\ClassLoader->loadClass()

2 [internal function]: spl_autoload_call()

3 /microcloud/domains/example/domains/example-domain.com/http/setup/src/Magento/Setup/Module/Di/Code/Reader/ClassesScanner.php(134): class_exists()

4 /microcloud/domains/example/domains/example-domain.com/http/setup/src/Magento/Setup/Module/Di/Code/Reader/ClassesScanner.php(117): Magento\Setup\Module\Di\Code\Reader\ClassesScanner->includeClass()

5 /microcloud/domains/example/domains/example-domain.com/http/setup/src/Magento/Setup/Module/Di/Code/Reader/ClassesScanner.php(87): Magento\Setup\Module\Di\Code\Reader\ClassesScanner->extract()

6 /microcloud/domains/example/domains/example-domain.com/http/setup/src/Magento/Setup/Module/Di/App/Task/Operation/RepositoryGenerator.php(61): Magento\Setup\Module\Di\Code\Reader\ClassesScanner->getList()

7 /microcloud/domains/example/domains/example-domain.com/http/setup/src/Magento/Setup/Module/Di/App/Task/Manager.php(56): Magento\Setup\Module\Di\App\Task\Operation\RepositoryGenerator->doOperation()

8 /microcloud/domains/example/domains/example-domain.com/http/setup/src/Magento/Setup/Console/Command/DiCompileCommand.php(216): Magento\Setup\Module\Di\App\Task\Manager->process()

9 /microcloud/domains/example/domains/example-domain.com/http/vendor/symfony/console/Command/Command.php(255): Magento\Setup\Console\Command\DiCompileCommand->execute()

10 /microcloud/domains/example/domains/example-domain.com/http/vendor/symfony/console/Application.php(1021): Symfony\Component\Console\Command\Command->run()

11 /microcloud/domains/example/domains/example-domain.com/http/vendor/symfony/console/Application.php(275): Symfony\Component\Console\Application->doRunCommand()

12 /microcloud/domains/example/domains/example-domain.com/http/vendor/magento/framework/Console/Cli.php(116): Symfony\Component\Console\Application->doRun()

13 /microcloud/domains/example/domains/example-domain.com/http/vendor/symfony/console/Application.php(149): Magento\Framework\Console\Cli->doRun()

14 /microcloud/domains/example/domains/example-domain.com/http/bin/magento(23): Symfony\Component\Console\Application->run()

15 {main}

I think it is again because of PHP version issue as I am using PHP 7.4 (Magento 2.4.5-p1) and plugin looks required PHP 8.1

— Reply to this email directly, view it on GitHubhttps://github.com/magento/meta-for-magento2/issues/3#issuecomment-1553474808, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ARTWRG6PO2BESXH7IMDXJKDXGZUBLANCNFSM6AAAAAAYDTNOGQ. You are receiving this because you were mentioned.Message ID: @.***>

seak6adtn59v commented 1 year ago

Well after fixing that, still this error

Compilation was started.
Repositories code generation... 1/9 [===>------------------------]  11% < 1 sec 90.0 MiBsyntax error, unexpected '|', expecting ';' or '{'#0 ....

So looks like there's a lot of code fixing we need to do in plugin?

gscogna commented 1 year ago

@seak6adtn59v is a new plugin there are so many bugs. They are fixing them slowly, in fact if you see they have already released a new version with my fix. I advise you to tack on other products that offer the same services or alternatively correct the errors yourself one by one. let me know if you solved it. The error is Repositories code generation... 1/9 [===>------------------------] 11% < 1 sec 83.0 MiBPHP Parse error: syntax error, unexpected '|', expecting ';' or '{' app/code/Meta/Catalog/Model/Product/Feed/Builder/MultiSourceInve ntory.php on line 107 he have int|float parameter this work only in php 8 is not for old version need remove this /**

seak6adtn59v commented 1 year ago

We did upgraded to latest version still it has compatibility issues :(

gscogna commented 1 year ago

@seak6adtn59v i fix it finnaly and work follow my repository man. https://github.com/gscogna/facebook_magento2

ihor-sviziev commented 1 year ago

It was already fixed in version 1.0.1 🎉