Skip to content

[DependencyInjection] routing[https]: fix php configuration #18797

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

Merged
merged 1 commit into from
Sep 12, 2023

Conversation

kaznovac
Copy link
Contributor

fix using of nonexisting $container->setParameter method

fix using of nonexisting `$container->setParameter` method
@javiereguiluz
Copy link
Member

There are many occurrences of setParameter() in the docs. Also, I see this method defined in the container interface:

https://github.com/symfony/symfony/blob/73a6b4b8ad315d294fe18c03012019694863daa9/src/Symfony/Component/DependencyInjection/ContainerInterface.php#L71

And in the container implementation:

https://github.com/symfony/symfony/blob/73a6b4b8ad315d294fe18c03012019694863daa9/src/Symfony/Component/DependencyInjection/Container.php#L133-L136

So maybe there's a confusion? Why do you say that this method doesn't exist? Thanks!

@carsonbot carsonbot changed the title routing[https]: fix php configuration [DependencyInjection] routing[https]: fix php configuration Aug 30, 2023
@kaznovac
Copy link
Contributor Author

That's not the Container class being passed to the php configuration closures.

This one is: https://github.com/symfony/symfony/blob/a0fb29ec8b434f3b1cadfb93419d569805891d99/src/Symfony/Component/DependencyInjection/Loader/Configurator/ContainerConfigurator.php
See the PhpFileLoader (particularly the executeCallback method):
https://github.com/symfony/symfony/blob/a0fb29ec8b434f3b1cadfb93419d569805891d99/src/Symfony/Component/DependencyInjection/Loader/PhpFileLoader.php

That being the case I could say that all of the mentions to use the setParameter method in the php configuration are if fact incorrect.

How would you like to proceed?
I'd like to merge this one and open the ticket for fixing the others when I or someone else has time to donate

@kaznovac
Copy link
Contributor Author

kaznovac commented Sep 9, 2023

@javiereguiluz the entry doc for configuring symfony has the correct information (just select the PHP format)
https://symfony.com/doc/current/configuration.html

how should we proceed?

@javiereguiluz
Copy link
Member

Yes, it looks like the right class is Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator; as you said.

So, let's merge this PR and we can fix the others in a different PR. Thanks!

@javiereguiluz javiereguiluz added this to the 6.3 milestone Sep 12, 2023
@javiereguiluz
Copy link
Member

It's merged now. Thanks Marko!

@kaznovac
Copy link
Contributor Author

Thanks, and you're welcome @javiereguiluz :)

When I get some free time I'll see to contribute on this matter...

@kaznovac kaznovac deleted the patch-2 branch September 12, 2023 10:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants