Sylius / PayPalPlugin

Official integration with PayPal Commerce Platform
36 stars 55 forks source link

[Bug] Issue with PayPalClientInterface #295

Closed maximehuran closed 2 months ago

maximehuran commented 4 months ago

SyliusPayPalPlugin version affected: 1.12.15

Description

Executing script cache:clear [KO]
 [KO]
Script cache:clear returned with error code 1
!!
!!  In CheckExceptionOnInvalidReferenceBehaviorPass.php line 119:
!!
!!    The service "Sylius\PayPalPlugin\Client\PayPalClientInterface" has a depend
!!    ency on a non-existent service "Psr\Http\Message\RequestFactoryInterface".
!!
!!
!!  2024-04-29T14:32:18+00:00 [info] User Deprecated: Method "Symfony\Component\HttpKernel\Bundle\Bundle::build()" might add "void" as a native return type declaration in the future. Do the same in child class "Bazinga\Bundle\HateoasBundle\BazingaHateoasBundle" now to avoid errors or add an explicit @return annotation to suppress this message.
!!  2024-04-29T14:32:18+00:00 [info] User Deprecated: Method "Symfony\Component\HttpKernel\Bundle\Bundle::build()" might add "void" as a native return type declaration in the future. Do the same in child class "JMS\SerializerBundle\JMSSerializerBundle" now to avoid errors or add an explicit @return annotation to suppress this message.
!!  2024-04-29T14:32:18+00:00 [info] User Deprecated: Method "Symfony\Component\HttpKernel\Bundle\Bundle::boot()" might add "void" as a native return type declaration in the future. Do the same in child class "Knp\Bundle\GaufretteBundle\KnpGaufretteBundle" now to avoid errors or add an explicit @return annotation to suppress this message.
!!  2024-04-29T14:32:18+00:00 [info] User Deprecated: Method "Symfony\Component\HttpKernel\Bundle\Bundle::build()" might add "void" as a native return type declaration in the future. Do the same in child class "Sylius\Bundle\ShopBundle\SyliusShopBundle" now to avoid errors or add an explicit @return annotation to suppress this message.
!!  2024-04-29T14:32:18+00:00 [info] User Deprecated: Method "Symfony\Component\HttpKernel\Bundle\Bundle::build()" might add "void" as a native return type declaration in the future. Do the same in child class "ApiPlatform\Symfony\Bundle\ApiPlatformBundle" now to avoid errors or add an explicit @return annotation to suppress this message.
!!  2024-04-29T14:32:18+00:00 [info] User Deprecated: Method "Symfony\Component\HttpKernel\Bundle\Bundle::build()" might add "void" as a native return type declaration in the future. Do the same in child class "ApiPlatform\Symfony\Bundle\ApiPlatformBundle" now to avoid errors or add an explicit @return annotation to suppress this message.
!!  2024-04-29T14:32:18+00:00 [info] User Deprecated: Method "Symfony\Component\HttpKernel\Bundle\Bundle::build()" might add "void" as a native return type declaration in the future. Do the same in child class "Lexik\Bundle\JWTAuthenticationBundle\LexikJWTAuthenticationBundle" now to avoid errors or add an explicit @return annotation to suppress this message.
!!  2024-04-29T14:32:18+00:00 [info] User Deprecated: Method "Symfony\Component\HttpKernel\Bundle\Bundle::registerCommands()" might add "void" as a native return type declaration in the future. Do the same in child class "Lexik\Bundle\JWTAuthenticationBundle\LexikJWTAuthenticationBundle" now to avoid errors or add an explicit @return annotation to suppress this message.
!!  2024-04-29T14:32:18+00:00 [info] User Deprecated: Method "Symfony\Component\HttpKernel\Bundle\Bundle::build()" might add "void" as a native return type declaration in the future. Do the same in child class "League\FlysystemBundle\FlysystemBundle" now to avoid errors or add an explicit @return annotation to suppress this message.
!!
Script @auto-scripts was called via post-install-cmd
unable to run /usr/local/bin/composer install --no-interaction

Steps to reproduce
Setup a standard Sylius

Possible Solution
I will update the issue if I found a solution

LucaGallinari commented 3 months ago

I had the same issue yesterday, i just found out that this is due to the fact that during the composer update from an old version directly to 1.6, Symfony Flex (?) do not configure php-http/discovery package, and it leads to this error.

Instead of doing this, i tried to do smaller updates by firstly requiring 1.5. with `composer require sylius/paypal-plugin "1.5."and then doingcomposer require sylius/paypal-plugin "^1.6"`. This way it properly trigger the configuration of the discovery package.

maximehuran commented 3 months ago

I also have this message when I retry my composer require

symfony composer require --no-install --no-scripts --no-progress sylius/sylius="~1.12.0"

image

And then I have this error :

  curl error 6 while downloading https://repo.packagist.org/p2/psr/http-factory-implementation.json: getaddrinfo() thread failed to start

This URL is in 404 https://repo.packagist.org/p2/psr/http-factory-implementation.json

maximehuran commented 3 months ago

All my command ran and the output if it can helps :

(cd tests/Application && symfony composer config repositories.plugin '{"type": "path", "url": "../../"}')

(cd tests/Application && symfony composer config extra.symfony.allow-contrib true)

(cd tests/Application && symfony composer config minimum-stability dev)

(cd tests/Application && symfony composer config --no-plugins allow-plugins true)

(cd tests/Application && symfony composer require --no-install --no-scripts --no-progress sylius/sylius="~1.12.0")
  ./composer.json has been updated
  Running composer update sylius/sylius
  Loading composer repositories with package information
  Updating dependencies
  Lock file operations: 245 installs, 0 updates, 0 removals
    - Locking aeon-php/calendar (1.0.9)
    - Locking alcohol/iso4217 (4.1.0)
    - Locking api-platform/core (v2.7.18)
    - Locking babdev/pagerfanta-bundle (v3.8.0)
    - Locking behat/behat (v3.14.0)
    - Locking behat/gherkin (v4.9.0)
    - Locking behat/mink-selenium2-driver (v1.6.0)
    - Locking behat/transliterator (v1.5.0)
    - Locking brick/math (0.12.1)
    - Locking clue/stream-filter (v1.7.0)
    - Locking coduo/php-matcher (6.0.14)
    - Locking coduo/php-to-string (3.2.1)
    - Locking dbrekelmans/bdi (1.3.0)
    - Locking dealerdirect/phpcodesniffer-composer-installer (v1.0.0)
    - Locking dmore/behat-chrome-extension (1.4.0)
    - Locking dmore/chrome-mink-driver (2.9.2)
    - Locking doctrine/annotations (2.0.1)
    - Locking doctrine/cache (2.2.0)
    - Locking doctrine/collections (1.8.0)
    - Locking doctrine/common (3.4.4)
    - Locking doctrine/data-fixtures (1.7.0)
    - Locking doctrine/dbal (3.8.4)
    - Locking doctrine/deprecations (1.1.3)
    - Locking doctrine/doctrine-bundle (2.11.1)
    - Locking doctrine/doctrine-migrations-bundle (3.3.0)
    - Locking doctrine/event-manager (1.2.0)
    - Locking doctrine/inflector (2.0.10)
    - Locking doctrine/instantiator (1.5.0)
    - Locking doctrine/lexer (2.1.1)
    - Locking doctrine/migrations (3.7.4)
    - Locking doctrine/orm (2.15.5)
    - Locking doctrine/persistence (3.3.2)
    - Locking doctrine/sql-formatter (1.2.0)
    - Locking egulias/email-validator (3.2.6)
    - Locking enshrined/svg-sanitize (0.16.0)
    - Locking ezyang/htmlpurifier (v4.17.0)
    - Locking fakerphp/faker (v1.23.1)
    - Locking friends-of-behat/mink (v1.11.0)
    - Locking friends-of-behat/mink-browserkit-driver (v1.6.2)
    - Locking friends-of-behat/mink-debug-extension (v2.1.0)
    - Locking friends-of-behat/mink-extension (v2.7.5)
    - Locking friends-of-behat/page-object-extension (v0.3.2)
    - Locking friends-of-behat/suite-settings-extension (v1.1.0)
    - Locking friends-of-behat/symfony-extension (v2.5.0)
    - Locking friends-of-behat/variadic-extension (v1.6.0)
    - Locking friendsofphp/proxy-manager-lts (v1.0.18)
    - Locking friendsofsymfony/rest-bundle (3.7.1)
    - Locking gedmo/doctrine-extensions (v3.15.0)
    - Locking guzzlehttp/guzzle (6.5.8)
    - Locking guzzlehttp/promises (1.5.3)
    - Locking guzzlehttp/psr7 (1.9.1)
    - Locking hamcrest/hamcrest-php (v2.0.1)
    - Locking imagine/imagine (1.3.5)
    - Locking instaclick/php-webdriver (1.4.19)
    - Locking jms/metadata (2.8.0)
    - Locking jms/serializer (3.30.0)
    - Locking jms/serializer-bundle (4.2.0)
    - Locking knplabs/gaufrette (v0.11.1)
    - Locking knplabs/knp-gaufrette-bundle (v0.8.0)
    - Locking knplabs/knp-menu (v3.5.0)
    - Locking knplabs/knp-menu-bundle (v3.4.1)
    - Locking laminas/laminas-code (4.13.0)
    - Locking laminas/laminas-stdlib (3.19.0)
    - Locking lchrusciel/api-test-case (v5.2.0)
    - Locking lcobucci/clock (3.0.0)
    - Locking lcobucci/jwt (4.3.0)
    - Locking league/flysystem (2.5.0)
    - Locking league/flysystem-bundle (2.4.0)
    - Locking league/mime-type-detection (1.15.0)
    - Locking league/uri (6.8.0)
    - Locking league/uri-components (2.4.2)
    - Locking league/uri-interfaces (2.3.0)
    - Locking lexik/jwt-authentication-bundle (v2.17.0)
    - Locking liip/imagine-bundle (2.12.2)
    - Locking marcj/topsort (1.1.0)
    - Locking masterminds/html5 (2.9.0)
    - Locking mockery/mockery (1.6.11)
    - Locking monolog/monolog (2.9.3)
    - Locking myclabs/deep-copy (1.11.1)
    - Locking namshi/jose (7.2.3)
    - Locking nelmio/alice (3.13.5)
    - Locking openlss/lib-array2xml (1.0.0)
    - Locking pagerfanta/pagerfanta (v3.8.0)
    - Locking payum/iso4217 (1.0.2)
    - Locking payum/payum (1.7.4)
    - Locking payum/payum-bundle (2.5.2)
    - Locking phar-io/manifest (2.0.4)
    - Locking phar-io/version (3.2.1)
    - Locking php-http/discovery (1.19.4)
    - Locking php-http/guzzle6-adapter (v2.0.2)
    - Locking php-http/httplug (2.4.0)
    - Locking php-http/message (1.16.1)
    - Locking php-http/message-factory (1.1.0)
    - Locking php-http/promise (1.3.1)
    - Locking php-webdriver/webdriver (1.15.1)
    - Locking phpdocumentor/reflection-common (2.2.0)
    - Locking phpdocumentor/reflection-docblock (5.4.0)
    - Locking phpdocumentor/type-resolver (1.8.2)
    - Locking phpseclib/phpseclib (2.0.47)
    - Locking phpspec/php-diff (v1.1.3)
    - Locking phpspec/phpspec (7.5.0)
    - Locking phpspec/prophecy (v1.19.0)
    - Locking phpstan/extension-installer (1.3.1)
    - Locking phpstan/phpdoc-parser (1.28.0)
    - Locking phpstan/phpstan (1.10.67)
    - Locking phpstan/phpstan-doctrine (1.3.69)
    - Locking phpstan/phpstan-webmozart-assert (1.2.6)
    - Locking phpunit/php-code-coverage (7.0.17)
    - Locking phpunit/php-file-iterator (2.0.6)
    - Locking phpunit/php-text-template (1.2.1)
    - Locking phpunit/php-timer (2.1.4)
    - Locking phpunit/php-token-stream (4.0.4)
    - Locking phpunit/phpunit (8.5.38)
    - Locking phrity/net-uri (1.3.0)
    - Locking phrity/util-errorhandler (1.1.0)
    - Locking polishsymfonycommunity/symfony-mocker-container (v1.0.7)
    - Locking psr/cache (2.0.0)
    - Locking psr/clock (1.0.0)
    - Locking psr/container (2.0.2)
    - Locking psr/event-dispatcher (1.0.0)
    - Locking psr/http-client (1.0.3)
    - Locking psr/http-factory (1.0.2)
    - Locking psr/http-message (1.1)
    - Locking psr/link (2.0.1)
    - Locking psr/log (2.0.0)
    - Locking ralouphie/getallheaders (3.0.3)
    - Locking ramsey/collection (2.0.0)
    - Locking ramsey/uuid (4.7.6)
    - Locking rector/rector (1.0.4)
    - Locking robertfausk/behat-panther-extension (v1.1.2)
    - Locking robertfausk/mink-panther-driver (v1.1.1)
    - Locking sebastian/code-unit-reverse-lookup (1.0.3)
    - Locking sebastian/comparator (3.0.5)
    - Locking sebastian/diff (3.0.6)
    - Locking sebastian/environment (4.2.5)
    - Locking sebastian/exporter (3.1.6)
    - Locking sebastian/global-state (3.0.5)
    - Locking sebastian/object-enumerator (3.0.5)
    - Locking sebastian/object-reflector (1.1.3)
    - Locking sebastian/recursion-context (3.0.2)
    - Locking sebastian/resource-operations (2.0.3)
    - Locking sebastian/type (1.1.5)
    - Locking sebastian/version (2.0.1)
    - Locking slevomat/coding-standard (8.15.0)
    - Locking sonata-project/block-bundle (4.21.0)
    - Locking sonata-project/cache (2.2.0)
    - Locking sonata-project/form-extensions (2.4.0)
    - Locking squizlabs/php_codesniffer (3.9.2)
    - Locking stof/doctrine-extensions-bundle (v1.11.0)
    - Locking stripe/stripe-php (v6.43.1)
    - Locking sylius-labs/association-hydrator (v1.2.1)
    - Locking sylius-labs/coding-standard (v4.3.1)
    - Locking sylius-labs/doctrine-migrations-extra-bundle (v0.2.0)
    - Locking sylius-labs/polyfill-symfony-event-dispatcher (v1.2.0)
    - Locking sylius-labs/polyfill-symfony-framework-bundle (v1.1.1)
    - Locking sylius-labs/polyfill-symfony-security (v1.1.2)
    - Locking sylius/calendar (v0.4.0)
    - Locking sylius/fixtures-bundle (v1.8.0)
    - Locking sylius/grid-bundle (v1.12.1)
    - Locking sylius/mailer-bundle (v2.0.0)
    - Locking sylius/paypal-plugin (v1.6.0)
    - Locking sylius/registry (v1.6.0)
    - Locking sylius/resource-bundle (v1.10.3)
    - Locking sylius/state-machine-abstraction (v1.13.0)
    - Locking sylius/sylius (v1.12.15)
    - Locking sylius/sylius-rector (v2.0)
    - Locking sylius/theme-bundle (v2.3.0)
    - Locking symfony/asset (v6.4.7)
    - Locking symfony/browser-kit (v6.4.7)
    - Locking symfony/cache (v6.4.7)
    - Locking symfony/cache-contracts (v2.5.3)
    - Locking symfony/clock (v6.4.7)
    - Locking symfony/config (v6.4.7)
    - Locking symfony/console (v6.4.7)
    - Locking symfony/css-selector (v6.4.7)
    - Locking symfony/debug-bundle (v6.4.7)
    - Locking symfony/dependency-injection (v6.4.7)
    - Locking symfony/deprecation-contracts (v2.5.3)
    - Locking symfony/doctrine-bridge (v6.4.7)
    - Locking symfony/doctrine-messenger (v6.4.7)
    - Locking symfony/dom-crawler (v6.4.7)
    - Locking symfony/dotenv (v6.4.7)
    - Locking symfony/error-handler (v6.4.7)
    - Locking symfony/event-dispatcher (v6.4.7)
    - Locking symfony/event-dispatcher-contracts (v3.5.0)
    - Locking symfony/expression-language (v6.4.7)
    - Locking symfony/filesystem (v6.4.7)
    - Locking symfony/finder (v6.4.7)
    - Locking symfony/flex (v2.4.5)
    - Locking symfony/form (v6.4.7)
    - Locking symfony/framework-bundle (v6.4.7)
    - Locking symfony/http-client (v6.4.7)
    - Locking symfony/http-client-contracts (v3.5.0)
    - Locking symfony/http-foundation (v6.4.7)
    - Locking symfony/http-kernel (v6.4.7)
    - Locking symfony/intl (v6.4.7)
    - Locking symfony/mailer (v6.4.7)
    - Locking symfony/messenger (v6.4.7)
    - Locking symfony/mime (v6.4.7)
    - Locking symfony/monolog-bridge (v6.4.7)
    - Locking symfony/monolog-bundle (v3.10.0)
    - Locking symfony/options-resolver (v6.4.7)
    - Locking symfony/panther (v2.1.1)
    - Locking symfony/password-hasher (v6.4.7)
    - Locking symfony/polyfill-php83 (v1.29.0)
    - Locking symfony/process (v6.4.7)
    - Locking symfony/property-access (v6.4.7)
    - Locking symfony/property-info (v6.4.7)
    - Locking symfony/proxy-manager-bridge (v6.4.7)
    - Locking symfony/routing (v6.4.7)
    - Locking symfony/runtime (v6.4.7)
    - Locking symfony/security-bundle (v6.4.7)
    - Locking symfony/security-core (v6.4.7)
    - Locking symfony/security-csrf (v6.4.7)
    - Locking symfony/security-http (v6.4.7)
    - Locking symfony/serializer (v6.4.7)
    - Locking symfony/service-contracts (v3.5.0)
    - Locking symfony/stopwatch (v6.4.7)
    - Locking symfony/string (v6.4.7)
    - Locking symfony/templating (v6.4.7)
    - Locking symfony/translation (v6.4.7)
    - Locking symfony/translation-contracts (v2.5.3)
    - Locking symfony/twig-bridge (v6.4.7)
    - Locking symfony/twig-bundle (v6.4.7)
    - Locking symfony/validator (v6.4.7)
    - Locking symfony/var-dumper (v6.4.7)
    - Locking symfony/var-exporter (v6.4.7)
    - Locking symfony/web-link (v6.4.7)
    - Locking symfony/web-profiler-bundle (v6.4.7)
    - Locking symfony/webpack-encore-bundle (v1.17.2)
    - Locking symfony/workflow (v6.4.7)
    - Locking symfony/yaml (v6.4.7)
    - Locking symplify/easy-coding-standard (11.5.0)
    - Locking textalk/websocket (1.6.3)
    - Locking theofidry/alice-data-fixtures (1.6.0)
    - Locking theseer/tokenizer (1.2.3)
    - Locking twig/intl-extra (v3.9.2)
    - Locking twig/twig (v3.9.3)
    - Locking webmozart/assert (1.11.0)
    - Locking willdurand/hateoas (3.10.0)
    - Locking willdurand/hateoas-bundle (2.6.0)
    - Locking willdurand/jsonp-callback-validator (v2.0.0)
    - Locking willdurand/negotiation (3.1.0)
    - Locking winzou/state-machine (0.4.4)
    - Locking winzou/state-machine-bundle (v0.6.1)
  Writing lock file
  68 package suggestions were added by new dependencies, use `composer suggest` to see details.
  Package php-http/guzzle6-adapter is abandoned, you should avoid using it. Use guzzlehttp/guzzle or php-http/guzzle7-adapter instead.
  Package php-http/message-factory is abandoned, you should avoid using it. Use psr/http-factory instead.
  Package sonata-project/cache is abandoned, you should avoid using it. No replacement was suggested.
  Package phpunit/php-token-stream is abandoned, you should avoid using it. No replacement was suggested.
  No security vulnerability advisories found
(cd tests/Application && symfony composer install --no-interaction)
  Installing dependencies from lock file (including require-dev)
  Verifying lock file contents can be installed on current platform.
  Package operations: 245 installs, 0 updates, 0 removals
    - Installing php-http/discovery (1.19.4): Extracting archive
    - Installing symfony/flex (v2.4.5): Extracting archive
    - Installing symfony/runtime (v6.4.7): Extracting archive
    - Installing squizlabs/php_codesniffer (3.9.2): Extracting archive
    - Installing dealerdirect/phpcodesniffer-composer-installer (v1.0.0): Extracting archive
    - Installing phpstan/phpstan (1.10.67): Extracting archive
    - Installing phpstan/extension-installer (1.3.1): Extracting archive
    - Installing aeon-php/calendar (1.0.9): Extracting archive
    - Installing alcohol/iso4217 (4.1.0): Extracting archive
    - Installing behat/gherkin (v4.9.0): Extracting archive
    - Installing instaclick/php-webdriver (1.4.19): Extracting archive
    - Installing symfony/css-selector (v6.4.7): Extracting archive
    - Installing friends-of-behat/mink (v1.11.0): Extracting archive
    - Installing behat/mink-selenium2-driver (v1.6.0): Extracting archive
    - Installing brick/math (0.12.1): Extracting archive
    - Installing coduo/php-to-string (3.2.1): Extracting archive
    - Installing dbrekelmans/bdi (1.3.0): Extracting archive
    - Installing symfony/process (v6.4.7): Extracting archive
    - Installing symfony/filesystem (v6.4.7): Extracting archive
    - Installing symfony/deprecation-contracts (v2.5.3): Extracting archive
    - Installing symfony/config (v6.4.7): Extracting archive
    - Installing symfony/yaml (v6.4.7): Extracting archive
    - Installing symfony/translation-contracts (v2.5.3): Extracting archive
    - Installing symfony/translation (v6.4.7): Extracting archive
    - Installing psr/event-dispatcher (1.0.0): Extracting archive
    - Installing symfony/event-dispatcher-contracts (v3.5.0): Extracting archive
    - Installing symfony/event-dispatcher (v6.4.7): Extracting archive
    - Installing symfony/var-exporter (v6.4.7): Extracting archive
    - Installing psr/container (2.0.2): Extracting archive
    - Installing symfony/service-contracts (v3.5.0): Extracting archive
    - Installing symfony/dependency-injection (v6.4.7): Extracting archive
    - Installing symfony/string (v6.4.7): Extracting archive
    - Installing symfony/console (v6.4.7): Extracting archive
    - Installing behat/transliterator (v1.5.0): Extracting archive
    - Installing behat/behat (v3.14.0): Extracting archive
    - Installing friends-of-behat/mink-extension (v2.7.5): Extracting archive
    - Installing psr/log (2.0.0): Extracting archive
    - Installing psr/http-message (1.1): Extracting archive
    - Installing phrity/util-errorhandler (1.1.0): Extracting archive
    - Installing psr/http-factory (1.0.2): Extracting archive
    - Installing phrity/net-uri (1.3.0): Extracting archive
    - Installing textalk/websocket (1.6.3): Extracting archive
    - Installing dmore/chrome-mink-driver (2.9.2): Extracting archive
    - Installing dmore/behat-chrome-extension (1.4.0): Extracting archive
    - Installing psr/cache (2.0.0): Extracting archive
    - Installing doctrine/deprecations (1.1.3): Extracting archive
    - Installing doctrine/lexer (2.1.1): Extracting archive
    - Installing doctrine/annotations (2.0.1): Extracting archive
    - Installing doctrine/cache (2.2.0): Extracting archive
    - Installing doctrine/sql-formatter (1.2.0): Extracting archive
    - Installing ezyang/htmlpurifier (v4.17.0): Extracting archive
    - Installing masterminds/html5 (2.9.0): Extracting archive
    - Installing symfony/dom-crawler (v6.4.7): Extracting archive
    - Installing symfony/browser-kit (v6.4.7): Extracting archive
    - Installing friends-of-behat/mink-browserkit-driver (v1.6.2): Extracting archive
    - Installing friends-of-behat/mink-debug-extension (v2.1.0): Extracting archive
    - Installing friends-of-behat/page-object-extension (v0.3.2): Extracting archive
    - Installing friends-of-behat/suite-settings-extension (v1.1.0): Extracting archive
    - Installing symfony/polyfill-php83 (v1.29.0): Extracting archive
    - Installing symfony/http-foundation (v6.4.7): Extracting archive
    - Installing symfony/var-dumper (v6.4.7): Extracting archive
    - Installing symfony/error-handler (v6.4.7): Extracting archive
    - Installing symfony/http-kernel (v6.4.7): Extracting archive
    - Installing friends-of-behat/symfony-extension (v2.5.0): Extracting archive
    - Installing friends-of-behat/variadic-extension (v1.6.0): Extracting archive
    - Installing guzzlehttp/promises (1.5.3): Extracting archive
    - Installing hamcrest/hamcrest-php (v2.0.1): Extracting archive
    - Installing imagine/imagine (1.3.5): Extracting archive
    - Installing phpstan/phpdoc-parser (1.28.0): Extracting archive
    - Installing jms/metadata (2.8.0): Extracting archive
    - Installing doctrine/instantiator (1.5.0): Extracting archive
    - Installing jms/serializer (3.30.0): Extracting archive
    - Installing laminas/laminas-code (4.13.0): Extracting archive
    - Installing webmozart/assert (1.11.0): Extracting archive
    - Installing symfony/property-info (v6.4.7): Extracting archive
    - Installing symfony/property-access (v6.4.7): Extracting archive
    - Installing sebastian/recursion-context (3.0.2): Extracting archive
    - Installing sebastian/exporter (3.1.6): Extracting archive
    - Installing sebastian/diff (3.0.6): Extracting archive
    - Installing sebastian/comparator (3.0.5): Extracting archive
    - Installing myclabs/deep-copy (1.11.1): Extracting archive
    - Installing fakerphp/faker (v1.23.1): Extracting archive
    - Installing nelmio/alice (3.13.5): Extracting archive
    - Installing theofidry/alice-data-fixtures (1.6.0): Extracting archive
    - Installing symfony/routing (v6.4.7): Extracting archive
    - Installing symfony/finder (v6.4.7): Extracting archive
    - Installing symfony/cache-contracts (v2.5.3): Extracting archive
    - Installing symfony/cache (v6.4.7): Extracting archive
    - Installing symfony/framework-bundle (v6.4.7): Extracting archive
    - Installing sebastian/version (2.0.1): Extracting archive
    - Installing sebastian/type (1.1.5): Extracting archive
    - Installing sebastian/resource-operations (2.0.3): Extracting archive
    - Installing sebastian/object-reflector (1.1.3): Extracting archive
    - Installing sebastian/object-enumerator (3.0.5): Extracting archive
    - Installing sebastian/global-state (3.0.5): Extracting archive
    - Installing sebastian/environment (4.2.5): Extracting archive
    - Installing phpunit/php-timer (2.1.4): Extracting archive
    - Installing phpunit/php-text-template (1.2.1): Extracting archive
    - Installing phpunit/php-file-iterator (2.0.6): Extracting archive
    - Installing theseer/tokenizer (1.2.3): Extracting archive
    - Installing sebastian/code-unit-reverse-lookup (1.0.3): Extracting archive
    - Installing phpunit/php-token-stream (4.0.4): Extracting archive
    - Installing phpunit/php-code-coverage (7.0.17): Extracting archive
    - Installing phar-io/version (3.2.1): Extracting archive
    - Installing phar-io/manifest (2.0.4): Extracting archive
    - Installing phpunit/phpunit (8.5.38): Extracting archive
    - Installing phpspec/php-diff (v1.1.3): Extracting archive
    - Installing openlss/lib-array2xml (1.0.0): Extracting archive
    - Installing doctrine/event-manager (1.2.0): Extracting archive
    - Installing doctrine/persistence (3.3.2): Extracting archive
    - Installing doctrine/inflector (2.0.10): Extracting archive
    - Installing doctrine/dbal (3.8.4): Extracting archive
    - Installing doctrine/common (3.4.4): Extracting archive
    - Installing doctrine/collections (1.8.0): Extracting archive
    - Installing doctrine/orm (2.15.5): Extracting archive
    - Installing symfony/doctrine-bridge (v6.4.7): Extracting archive
    - Installing doctrine/doctrine-bundle (2.11.1): Extracting archive
    - Installing doctrine/data-fixtures (1.7.0): Extracting archive
    - Installing coduo/php-matcher (6.0.14): Extracting archive
    - Installing lchrusciel/api-test-case (v5.2.0): Extracting archive
    - Installing psr/clock (1.0.0): Extracting archive
    - Installing lcobucci/clock (3.0.0): Extracting archive
    - Installing lcobucci/jwt (4.3.0): Extracting archive
    - Installing league/mime-type-detection (1.15.0): Extracting archive
    - Installing league/flysystem (2.5.0): Extracting archive
    - Installing league/uri-interfaces (2.3.0): Extracting archive
    - Installing league/uri (6.8.0): Extracting archive
    - Installing league/uri-components (2.4.2): Extracting archive
    - Installing marcj/topsort (1.1.0): Extracting archive
    - Installing namshi/jose (7.2.3): Extracting archive
    - Installing payum/iso4217 (1.0.2): Extracting archive
    - Installing psr/http-client (1.0.3): Extracting archive
    - Installing php-http/promise (1.3.1): Extracting archive
    - Installing php-http/httplug (2.4.0): Extracting archive
    - Installing clue/stream-filter (v1.7.0): Extracting archive
    - Installing php-http/message (1.16.1): Extracting archive
    - Installing phpdocumentor/reflection-common (2.2.0): Extracting archive
    - Installing phpdocumentor/type-resolver (1.8.2): Extracting archive
    - Installing phpdocumentor/reflection-docblock (5.4.0): Extracting archive
    - Installing phpspec/prophecy (v1.19.0): Extracting archive
    - Installing phpspec/phpspec (7.5.0): Extracting archive
    - Installing phpstan/phpstan-doctrine (1.3.69): Extracting archive
    - Installing phpstan/phpstan-webmozart-assert (1.2.6): Extracting archive
    - Installing mockery/mockery (1.6.11): Extracting archive
    - Installing polishsymfonycommunity/symfony-mocker-container (v1.0.7): Extracting archive
    - Installing ralouphie/getallheaders (3.0.3): Extracting archive
    - Installing ramsey/collection (2.0.0): Extracting archive
    - Installing symfony/http-client-contracts (v3.5.0): Extracting archive
    - Installing symfony/http-client (v6.4.7): Extracting archive
    - Installing php-webdriver/webdriver (1.15.1): Extracting archive
    - Installing symfony/panther (v2.1.1): Extracting archive
    - Installing robertfausk/mink-panther-driver (v1.1.1): Extracting archive
    - Installing robertfausk/behat-panther-extension (v1.1.2): Extracting archive
    - Installing sonata-project/cache (2.2.0): Extracting archive
    - Installing twig/twig (v3.9.3): Extracting archive
    - Installing symfony/validator (v6.4.7): Extracting archive
    - Installing symfony/password-hasher (v6.4.7): Extracting archive
    - Installing symfony/security-core (v6.4.7): Extracting archive
    - Installing symfony/security-csrf (v6.4.7): Extracting archive
    - Installing symfony/options-resolver (v6.4.7): Extracting archive
    - Installing symfony/form (v6.4.7): Extracting archive
    - Installing sonata-project/form-extensions (2.4.0): Extracting archive
    - Installing stripe/stripe-php (v6.43.1): Extracting archive
    - Installing symplify/easy-coding-standard (11.5.0): Extracting archive
    - Installing slevomat/coding-standard (8.15.0): Extracting archive
    - Installing sylius-labs/coding-standard (v4.3.1): Extracting archive
    - Installing symfony/mime (v6.4.7): Extracting archive
    - Installing egulias/email-validator (3.2.6): Extracting archive
    - Installing symfony/mailer (v6.4.7): Extracting archive
    - Installing symfony/expression-language (v6.4.7): Extracting archive
    - Installing winzou/state-machine (0.4.4): Extracting archive
    - Installing winzou/state-machine-bundle (v0.6.1): Extracting archive
    - Installing willdurand/hateoas (3.10.0): Extracting archive
    - Installing jms/serializer-bundle (4.2.0): Extracting archive
    - Installing willdurand/hateoas-bundle (2.6.0): Extracting archive
    - Installing symfony/intl (v6.4.7): Extracting archive
    - Installing twig/intl-extra (v3.9.2): Extracting archive
    - Installing symfony/asset (v6.4.7): Extracting archive
    - Installing symfony/webpack-encore-bundle (v1.17.2): Extracting archive
    - Installing symfony/twig-bridge (v6.4.7): Extracting archive
    - Installing symfony/twig-bundle (v6.4.7): Extracting archive
    - Installing symfony/templating (v6.4.7): Extracting archive
    - Installing symfony/serializer (v6.4.7): Extracting archive
    - Installing symfony/security-http (v6.4.7): Extracting archive
    - Installing symfony/clock (v6.4.7): Extracting archive
    - Installing symfony/security-bundle (v6.4.7): Extracting archive
    - Installing friendsofphp/proxy-manager-lts (v1.0.18): Extracting archive
    - Installing symfony/proxy-manager-bridge (v6.4.7): Extracting archive
    - Installing monolog/monolog (2.9.3): Extracting archive
    - Installing symfony/monolog-bridge (v6.4.7): Extracting archive
    - Installing symfony/monolog-bundle (v3.10.0): Extracting archive
    - Installing symfony/messenger (v6.4.7): Extracting archive
    - Installing symfony/doctrine-messenger (v6.4.7): Extracting archive
    - Installing sylius/theme-bundle (v2.3.0): Extracting archive
    - Installing sylius/registry (v1.6.0): Extracting archive
    - Installing gedmo/doctrine-extensions (v3.15.0): Extracting archive
    - Installing willdurand/negotiation (3.1.0): Extracting archive
    - Installing willdurand/jsonp-callback-validator (v2.0.0): Extracting archive
    - Installing friendsofsymfony/rest-bundle (3.7.1): Extracting archive
    - Installing pagerfanta/pagerfanta (v3.8.0): Extracting archive
    - Installing babdev/pagerfanta-bundle (v3.8.0): Extracting archive
    - Installing sylius/resource-bundle (v1.10.3): Extracting archive
    - Installing sylius-labs/polyfill-symfony-event-dispatcher (v1.2.0): Extracting archive
    - Installing sylius/mailer-bundle (v2.0.0): Extracting archive
    - Installing sylius/grid-bundle (v1.12.1): Extracting archive
    - Installing sylius/fixtures-bundle (v1.8.0): Extracting archive
    - Installing sylius/calendar (v0.4.0): Extracting archive
    - Installing sylius-labs/polyfill-symfony-security (v1.1.2): Extracting archive
    - Installing sylius-labs/polyfill-symfony-framework-bundle (v1.1.1): Extracting archive
    - Installing symfony/stopwatch (v6.4.7): Extracting archive
    - Installing doctrine/migrations (3.7.4): Extracting archive
    - Installing doctrine/doctrine-migrations-bundle (3.3.0): Extracting archive
    - Installing sylius-labs/doctrine-migrations-extra-bundle (v0.2.0): Extracting archive
    - Installing sylius-labs/association-hydrator (v1.2.1): Extracting archive
    - Installing stof/doctrine-extensions-bundle (v1.11.0): Extracting archive
    - Installing sonata-project/block-bundle (4.21.0): Extracting archive
    - Installing ramsey/uuid (4.7.6): Extracting archive
    - Installing php-http/message-factory (1.1.0): Extracting archive
    - Installing guzzlehttp/psr7 (1.9.1): Extracting archive
    - Installing guzzlehttp/guzzle (6.5.8): Extracting archive
    - Installing php-http/guzzle6-adapter (v2.0.2): Extracting archive
    - Installing payum/payum (1.7.4): Extracting archive
    - Installing payum/payum-bundle (2.5.2): Extracting archive
    - Installing liip/imagine-bundle (2.12.2): Extracting archive
    - Installing lexik/jwt-authentication-bundle (v2.17.0): Extracting archive
    - Installing league/flysystem-bundle (2.4.0): Extracting archive
    - Installing laminas/laminas-stdlib (3.19.0): Extracting archive
    - Installing knplabs/knp-menu (v3.5.0): Extracting archive
    - Installing knplabs/knp-menu-bundle (v3.4.1): Extracting archive
    - Installing knplabs/gaufrette (v0.11.1): Extracting archive
    - Installing knplabs/knp-gaufrette-bundle (v0.8.0): Extracting archive
    - Installing enshrined/svg-sanitize (0.16.0): Extracting archive
    - Installing psr/link (2.0.1): Extracting archive
    - Installing symfony/web-link (v6.4.7): Extracting archive
    - Installing api-platform/core (v2.7.18): Extracting archive
    - Installing sylius/sylius (v1.12.15): Extracting archive
    - Installing symfony/workflow (v6.4.7): Extracting archive
    - Installing sylius/state-machine-abstraction (v1.13.0): Extracting archive
    - Installing phpseclib/phpseclib (2.0.47): Extracting archive
    - Installing sylius/paypal-plugin (v1.6.0): Extracting archive
    - Installing rector/rector (1.0.4): Extracting archive
    - Installing sylius/sylius-rector (v2.0): Extracting archive
    - Installing symfony/debug-bundle (v6.4.7): Extracting archive
    - Installing symfony/dotenv (v6.4.7): Extracting archive
    - Installing symfony/web-profiler-bundle (v6.4.7): Extracting archive
  Package php-http/guzzle6-adapter is abandoned, you should avoid using it. Use guzzlehttp/guzzle or php-http/guzzle7-adapter instead.
  Package php-http/message-factory is abandoned, you should avoid using it. Use psr/http-factory instead.
  Package sonata-project/cache is abandoned, you should avoid using it. No replacement was suggested.
  Package phpunit/php-token-stream is abandoned, you should avoid using it. No replacement was suggested.
  Generating autoload files
  136 packages you are using are looking for funding.
  Use the `composer fund` command to find out more!

  Run composer recipes at any time to see the status of your Symfony recipes.

  PHP CodeSniffer Config installed_paths set to ../../slevomat/coding-standard
  phpstan/extension-installer: Extensions installed
  > phpstan/phpstan-doctrine: installed
  > phpstan/phpstan-webmozart-assert: installed
  Executing script cache:clear [KO]
   [KO]
  Script cache:clear returned with error code 1
  !!
  !!  In CheckExceptionOnInvalidReferenceBehaviorPass.php line 119:
  !!
  !!    The service "Sylius\PayPalPlugin\Client\PayPalClientInterface" has a depend
  !!    ency on a non-existent service "Psr\Http\Message\RequestFactoryInterface".
  !!
  !!
maximehuran commented 3 months ago

If I force my test application with the 1.5.2 version it's ok but we cannot add it in all our plugins. The best way is to have a working sylius setup.

    (cd ${APP_DIR} && ${COMPOSER} require --no-install --no-scripts --no-progress sylius/sylius="~1.12.0")
    (cd ${APP_DIR} && ${COMPOSER} require --no-install --no-scripts --no-progress sylius/paypal-plugin="~1.5.0")
    (cd ${APP_DIR} && ${COMPOSER} install --no-interaction)

@GSadee Have you got an idea of a fix I can try ?

dunghoangtekos commented 3 months ago

I had the same issue yesterday, i just found out that this is due to the fact that during the composer update from an old version directly to 1.6, Symfony Flex (?) do not configure php-http/discovery package, and it leads to this error.

Instead of doing this, i tried to do smaller updates by firstly requiring 1.5. with `composer require sylius/paypal-plugin "1.5."and then doingcomposer require sylius/paypal-plugin "^1.6"`. This way it properly trigger the configuration of the discovery package.

You saved my day ^^

maximehuran commented 3 months ago

Here is an example of a CI which fails due to Paypal plugin : https://github.com/monsieurbiz/SyliusRichEditorPlugin/actions/runs/9235367034/job/25410106094

5_Flex recipe (PHP 8.1, Sylius ~1.12.0).txt

maximehuran commented 3 months ago

Any news on this issue ? For now we have to restrict manually the version 1.5 in our plugin's test app

maximehuran commented 2 months ago

Any plan to remove this plugin from sylius standard ?

GSadee commented 2 months ago

Hi Maxime!

First of all, I apologise for the long wait for a reply.

Moving on to the problem, does the one you originally had with thePayPalClientInterface still exist? Because in the message you sent with the failing build:

Here is an example of a CI which fails due to Paypal plugin : https://github.com/monsieurbiz/SyliusRichEditorPlugin/actions/runs/9235367034/job/25410106094

5_Flex recipe (PHP 8.1, Sylius ~1.12.0).txt

there is another error:

Script cache:clear returned with error code 1
!!  
!!  In CheckExceptionOnInvalidReferenceBehaviorPass.php line 119:
!!                                                                                 
!!    The service "Sylius\PayPalPlugin\Controller\Webhook\RefundOrderAction" has   
!!    a dependency on a non-existent service "sylius_abstraction.state_machine".  

This one is because when you created the project, it didn't run the Sylius recipe and didn't add the SyliusStateMachineAbstractionBundle to the bundle list. However, this recipe should be called as it is configured in Sylius-Standard composer.

I have just tested creating Sylius project for version 1.12 with composer create-project sylius/sylius-standard Project "~1.12.0" and had neither the interface nor the state machine problem πŸ€”.

Can you check it again and confirm if the problem still exists and what specific steps are needed to reproduce?

maximehuran commented 2 months ago

My bad the other error is in PHP 8.2 / Sylius 1.12.

The case with the interface is on PHP 8.1 / Sylius 1.12

Here is a good one : https://github.com/monsieurbiz/SyliusPluginMaker/actions/runs/9501591688/job/26187956455 And another one : https://github.com/monsieurbiz/SyliusCmsPagePlugin/actions/runs/9347998261/job/25726191502

About the second link, it is interesting to see the other version are all green

image image

But we also need to force Paypal 1.5 version on Sylius 1.12 with PHP 8.2

By forcing it it's ok : PHP 8.1 / Sylius 1.12 : https://github.com/monsieurbiz/SyliusRichEditorPlugin/actions/runs/9503080016/job/26192663441?pr=229 PHP 8.2 / Sylius 1.12 : https://github.com/monsieurbiz/SyliusRichEditorPlugin/actions/runs/9503080016/job/26192664143?pr=229

image

GSadee commented 2 months ago

The first build you've mentioned is also for PHP 8.2, so the problem is not necessary to be connected with PHP version.

If I see correctly in your builds, Symfony recipes are not made and that could be a problem, because php-http/discovery is not fully configured.

Screenshot from my local installation of Sylius:

image
GSadee commented 2 months ago

After thinking about the problem you encountered with the dependencies in Sylius-Standard and the required use of flex, I thought it would be good to clean it up there, so I have prepared a PR that could potentially solve your problem: https://github.com/Sylius/Sylius-Standard/pull/1002

maximehuran commented 2 months ago

Tested Sylius-standard on 1.12.x-dev

It seems to drop PHP 8.0 support ?

Sylius 1.12 - PHP 8.0 : https://github.com/monsieurbiz/SyliusRichEditorPlugin/actions/runs/9563476286/job/26362044086?pr=230 Sylius 1.12 - PHP 8.1 : https://github.com/monsieurbiz/SyliusRichEditorPlugin/actions/runs/9563476286/job/26362044659?pr=230 Sylius 1.12 - PHP 8.2 : https://github.com/monsieurbiz/SyliusRichEditorPlugin/actions/runs/9563476286/job/26362045253?pr=230

On PHP 8.1 and 8.2 everything seems ok πŸ‘Œ

GSadee commented 2 months ago

Thank you for your feedback, I've just released new patches of Sylius-Standard, which should resolve your problems.

About PHP 8.0, yes, I've dropped the support for that version as Sylius-Standard is a project template, we would like to encourage the use of the latest dependencies and PHP 8.0 is no longer supported.

I'm closing the issue, but of course feel free to comment or create another one if needed πŸ˜ƒ

maximehuran commented 2 months ago

Thank you @GSadee