8000 [FrameworkBundle] Deprecate absolute template paths by jakzal · Pull Request #18034 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[FrameworkBundle] Deprecate absolute template paths #18034

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
Mar 15, 2016

Conversation

jakzal
Copy link
Contributor
@jakzal jakzal commented Mar 6, 2016
Q A
Branch master
Bug fix? no
New feature? no
BC breaks? no
Deprecations? yes
Tests pass? yes
Fixed tickets #17999
License MIT
Doc PR -

$isAbsolute = (bool) preg_match('#^(?:/|[a-zA-Z]:)#', $file);

if ($isAbsolute) {
@trigger_error('Absolute template path support is deprecated since Symfony 3.1 and will throw an exception in 4.0.', E_USER_DEPRECATED);
Copy link
Member

Choose a reason for hiding this comment

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

Instead of:

... and will throw an exception in 4.0

I think we usually write it like this:

... and it will be removed in 4.0

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated.

@jakzal jakzal force-pushed the templating-deprecate-absolute-paths branch from 274cd46 to 6bb73ae Compare March 7, 2016 11:10

* As it was never an officially supported feature,
the support for absolute template paths has been deprecated
and will be removed in Symfony 4.0.
Copy link
Member

Choose a reason for hiding this comment

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

The positions of the line breaks look a bit weird.

@xabbuh
Copy link
Member
xabbuh commented Mar 7, 2016

👍

set_error_handler(function ($type, $msg) use (&$deprecations) {
if (E_USER_DEPRECATED === $type) {
$deprecations[] = $msg;
}
Copy link
Member

Choose a reason for hiding this comment

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

just for safety, maybe we should do something in the "else" case? like forwarding to the previous error handler?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure. To be honest I copied this one from other test. Perhaps we should fix in in all ocurences? I won't be able to look into this before evening today.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@nicolas-grekas is throwing an exception like I did just now acceptable?

@jakzal jakzal force-pushed the templating-deprecate-absolute-paths branch from 6bb73ae to 85a9d67 Compare March 8, 2016 10:23
@nicolas-grekas
Copy link
Member

👍 (failures unrelated)

@fabpot
Copy link
Member
fabpot commented Mar 15, 2016

Thank you @jakzal.

@fabpot fabpot merged commit 85a9d67 into symfony:master Mar 15, 2016
fabpot added a commit that referenced this pull request Mar 15, 2016
…akzal)

This PR was merged into the 3.1-dev branch.

Discussion
----------

[FrameworkBundle] Deprecate absolute template paths

| Q             | A
| ------------- | ---
| Branch        | master
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | yes
| Tests pass?   | yes
| Fixed tickets | #17999
| License       | MIT
| Doc PR        | -

Commits
-------

85a9d67 [FrameworkBundle] Deprecate absolute template paths
@jakzal jakzal deleted the templating-deprecate-absolute-paths branch March 15, 2016 13:43
@fabpot fabpot mentioned this pull request May 13, 2016
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.

6 participants
0