Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[HttpKernel] Inherit projectDir in the temporary kernel#22889

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed

Conversation

@aschempp
Copy link
Contributor

QA
Branch?master
Bug fix?yes
New feature?no
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed tickets-
LicenseMIT
Doc PR-

Contrary to all other directories defined in the kernel, thegetProjectDir method is not copied to the temporary kernel. This can lead to issues if the method is overridden inAppKernel. Unfortunately, the method is not (and obviously cannot be) in theKernelInterface, somethod_exists was my only option to see if it can be called.

@jvasseur
Copy link
Contributor

This look like a duplicate of#22872

@aschempp
Copy link
ContributorAuthor

You're right, though#22872 does not correctly handle theKernelInterface, because the method must not necessarily be there…?

@nicolas-grekas
Copy link
Member

FrameworkBundle 3.3 has a lowest dep on HttpKernel 3.3, which always has the method, so the check is not required.
Closing as duplicate, thanks for the PR anyway.

@aschempp
Copy link
ContributorAuthor

FrameworkBundle 3.3 has a lowest dep on HttpKernel 3.3, which always has the method, so the check is not required.

Well but my kernelcould implement the interface and not extend theKernel class. I agree that is rather theoretical, but according to the current code the method should expect aKernel instance and not aKernelInterface.

@nicolas-grekas
Copy link
Member

nicolas-grekas commentedMay 24, 2017
edited
Loading

Hum, you're right. If you care enough about it, I invite you to open a PR against branch 3.3 with the corresponding patch :)

@aschempp
Copy link
ContributorAuthor

Which one would you prefer, the method check or expect the class?

@nicolas-grekas
Copy link
Member

method check to allow having the feature without extending the Kernel class I think

@aschemppaschempp deleted the cache-clear-projectdir branchMay 25, 2017 07:01
@aschempp
Copy link
ContributorAuthor

see#22921

@stof
Copy link
Member

@nicolas-grekas I also suggest deprecating having a kernel not implementing it, so that we can add the method in the interface in 4.0 (which will be fine as deprecation, as most people should be extending Kernel anyway, or should just be using HttpKernelInterface otherwise)

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

5 participants

@aschempp@jvasseur@nicolas-grekas@stof@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp