What are the Slack Archives?

It’s a history of our time together in the Slack Community! There’s a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.

Because this space is not active, you won’t be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..

ok, so the above issue was fixed, how do you add an authentication provider to Zed module? speaking

UK5DS29L2
UK5DS29L2 Posts: 546 πŸ§‘πŸ»β€πŸš€ - Cadet
edited January 2021 in Help

ok, so the above issue was fixed, how do you add an authentication provider to Zed module? speaking about

InvalidArgumentException: You must at least add one authentication provider. in file vendor/symfony/security-core/Authentication/AuthenticationProviderManager.php on line 51

EDIT: turning off the debug and in Zed it makes this issue go away, but I'm pretty sure I'd like to have the debug toolbar working

Comments

  • Valerii Trots
    Valerii Trots SRE @ Spryker Sprykee Posts: 1,654 ✨ - Novice
  • UK5DS29L2
    UK5DS29L2 Posts: 546 πŸ§‘πŸ»β€πŸš€ - Cadet

    no, seems the authentication providers must be somehow defined now (but they weren't in earlier release)

  • UK5DS29L2
    UK5DS29L2 Posts: 546 πŸ§‘πŸ»β€πŸš€ - Cadet
    edited January 2021

    the thread you pointed at seems to be unrelated

  • Stanislav Matveyev
    Stanislav Matveyev Tech Lead @ Spryker Sprykee Posts: 211 πŸ§‘πŸ»β€πŸš€ - Cadet

    Hi there, to fix this issue check your \Pyz\Zed\Application\ApplicationDependencyProvider

    WebProfilerApplicationPlugin
    

    should be after SecurityApplicationPlugin

  • UK5DS29L2
    UK5DS29L2 Posts: 546 πŸ§‘πŸ»β€πŸš€ - Cadet

    πŸ€”

  • UK5DS29L2
    UK5DS29L2 Posts: 546 πŸ§‘πŸ»β€πŸš€ - Cadet

    I don't see SecurityApplicationPlugin in here

  • Stanislav Matveyev
    Stanislav Matveyev Tech Lead @ Spryker Sprykee Posts: 211 πŸ§‘πŸ»β€πŸš€ - Cadet
    edited January 2021

    if you already installed security-gui instead of auth module - yes

  • UK5DS29L2
    UK5DS29L2 Posts: 546 πŸ§‘πŸ»β€πŸš€ - Cadet

    I didn't. That's not what's in this release

  • UK5DS29L2
    UK5DS29L2 Posts: 546 πŸ§‘πŸ»β€πŸš€ - Cadet
    edited January 2021

    so should I just go through suite composer.lock from 1.7 and change my composer.json to lock them to X.Y.Z ?

  • UK5DS29L2
    UK5DS29L2 Posts: 546 πŸ§‘πŸ»β€πŸš€ - Cadet

    because right now it doesn't look like composer.json from 1.7 is pointing at stable set of packages, but maybe composer.lock does

  • Stanislav Matveyev
    Stanislav Matveyev Tech Lead @ Spryker Sprykee Posts: 211 πŸ§‘πŸ»β€πŸš€ - Cadet
    edited January 2021

    ok, in this case you don't need Zed SecurityApplicationPlugin, but I don't know what to suggest you with your issue InvalidArgumentException: You must at least add one authentication provider.

  • UK5DS29L2
    UK5DS29L2 Posts: 546 πŸ§‘πŸ»β€πŸš€ - Cadet

    I'm so frustrated with this. This release was supposed to provide a stable set of packages and it does anything but that

  • UK5DS29L2
    UK5DS29L2 Posts: 546 πŸ§‘πŸ»β€πŸš€ - Cadet

    we have literally spent at least weeks of work on doing trial and error with 1.7 and it doesn't look like we're anywhere close to getting this running.

  • UK5DS29L2
    UK5DS29L2 Posts: 546 πŸ§‘πŸ»β€πŸš€ - Cadet

    I'm giving it a last chance by binding the composer.json to versions from 1.7 composer.lock. Not how that should work, but hell, we have used everything else

  • Stanislav Matveyev
    Stanislav Matveyev Tech Lead @ Spryker Sprykee Posts: 211 πŸ§‘πŸ»β€πŸš€ - Cadet

    Your project is not a copy of modules and enabled plugins of suite, right? Suite is working and tested.

  • UK5DS29L2
    UK5DS29L2 Posts: 546 πŸ§‘πŸ»β€πŸš€ - Cadet

    it is working and tested on versions from composer.lock MAYBE

  • UK5DS29L2
    UK5DS29L2 Posts: 546 πŸ§‘πŸ»β€πŸš€ - Cadet

    that's not what you're using if you want to get bugfixes

  • UK5DS29L2
    UK5DS29L2 Posts: 546 πŸ§‘πŸ»β€πŸš€ - Cadet

    if you run a composer update on 1.7 is suddenly no longer works, because composer.json points at versions no longer compatible with each other

  • Stanislav Matveyev
    Stanislav Matveyev Tech Lead @ Spryker Sprykee Posts: 211 πŸ§‘πŸ»β€πŸš€ - Cadet

    Do you have some enabled Silex services in Pyz? \Silex\ServiceProviderInterface

  • UK5DS29L2
    UK5DS29L2 Posts: 546 πŸ§‘πŸ»β€πŸš€ - Cadet

    I did a diff on the whole project and updated the code of all suite files then made sure no missing class is used.
    If Silex is used in 1.7, we're using silex. If it's not, we're not

  • UK5DS29L2
    UK5DS29L2 Posts: 546 πŸ§‘πŸ»β€πŸš€ - Cadet

    we're as close to core as we can get, everything else is a plugin but it's not the plugin code we have issues with, but the shop itself. Not even homepage works out of the box with the latest packages from composer.json

  • UK5DS29L2
    UK5DS29L2 Posts: 546 πŸ§‘πŸ»β€πŸš€ - Cadet

    which is why I'm going to give it a last try and lock everything to versions from lock 1.7. Not how composer should be used, but it's not like we have a choice

  • Stanislav Matveyev
    Stanislav Matveyev Tech Lead @ Spryker Sprykee Posts: 211 πŸ§‘πŸ»β€πŸš€ - Cadet

    I agree that composer update should not break the site completely.

  • UK5DS29L2
    UK5DS29L2 Posts: 546 πŸ§‘πŸ»β€πŸš€ - Cadet
    edited January 2021

    shop-suite v1.7, composer.lock, spryker/translator (https://raw.githubusercontent.com/spryker-shop/suite/1.7/composer.lock):

    {
                "name": "spryker/translator",
                "version": "1.7.0",
    

    HOWEVER this yields:
    ErrorException - FATAL ERROR - Declaration of
    Spryker\Zed\Translator\Communication\Plugin\Validator\TranslatorValidatorPlugin::extend(Symfony\Component\Validator\ValidatorBuilderInterface $validatorBuilder, Spryker\Service\Container\ContainerInterface $container): Symfony\Component\Validator\ValidatorBuilderInterface
    must be compatible with
    Spryker\Shared\ValidatorExtension\Dependency\Plugin\ValidatorPluginInterface::extend(Symfony\Component\Validator\ValidatorBuilder $validatorBuilder, Spryker\Service\Container\ContainerInterface $container): Symfony\Component\Validator\ValidatorBuilder

    Why? Because "spryker/validator-extension" is already loaded by:

       {
                "name": "spryker/validator-extension",
                "version": "1.0.0",
    

    I believe because being loaded by and it is a dependency of

            {
                "name": "spryker/validator",
                "version": "1.1.0",
    

    which can be seen at
    https://github.com/spryker/validator/blob/1.1.0/composer.json#L13

    This however, requires to bump spryker/translator to 1.8 (because this is fixed in 1.8)
    https://github.com/spryker/translator/compare/1.7.0...1.8.0#diff-a54591607da18710b6b2419110c5140a474d2786b011411baae8cce06a015f69R35
    but 1.8 is nowhere to be found in https://raw.githubusercontent.com/spryker-shop/suite/1.7/composer.lock, because 1.7 is

  • UK5DS29L2
    UK5DS29L2 Posts: 546 πŸ§‘πŸ»β€πŸš€ - Cadet

    I'd love to know how did you test this release for stability

  • UK5DS29L2
    UK5DS29L2 Posts: 546 πŸ§‘πŸ»β€πŸš€ - Cadet

    this wouldn't work even if I didn't run composer update