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

[FEATURE] Respect ContainerInterface in StandardVariableProvider #1002

Merged
merged 8 commits into from
Sep 10, 2024

Conversation

o-ba
Copy link
Member

@o-ba o-ba commented Sep 9, 2024

No description provided.

@o-ba
Copy link
Member Author

o-ba commented Sep 9, 2024

Resolves #1001

composer.json Outdated
@@ -10,7 10,8 @@
"license": ["LGPL-3.0-or-later"],
"require": {
"php": "^8.2",
"ext-mbstring": "*"
"ext-mbstring": "*",
"psr/container": "^2.0"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure about this dependency. I don't think it's necessary for the code to work, is it?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No it's not necessary for the instanceof check. However, phpstan will fail if the interface is not present. Therefore I would suggest to add it as dev dependency.

Side note: psr/container is already present in fluid because it's a dependency of symfony/service-contracts, which is required by symfony/console, which is required by friendsofphp/php-cs-fixer.

@s2b
Copy link
Contributor

s2b commented Sep 9, 2024

I like the change overall. Sure, it's special handling for one specific kind of object, but it's a PSR standard after all and it can make life easier without much downside.

(and I think I would classify this as a feature)

@o-ba o-ba changed the title [TASK] Respect ContainerInterface in StandardVariableProvider [FEATURE] Respect ContainerInterface in StandardVariableProvider Sep 10, 2024
@s2b s2b merged commit a5d7bd3 into TYPO3:main Sep 10, 2024
4 checks passed
@o-ba o-ba deleted the o-ba-patch-1 branch September 10, 2024 17:22
@lolli42
Copy link
Member

lolli42 commented Sep 12, 2024

late comment on this: i think its fine to have the psr/container depedency since i'm pretty sure we'll add functionality based on it at least within view helper invoker soon, anyways.

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

Successfully merging this pull request may close these issues.

4 participants