Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[3.0] [FrameworkBundle] removed request service occurrences. #12460

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
Jan 2, 2015

Conversation

hhamon
Copy link
Contributor

@hhamon hhamon commented Nov 11, 2014

Q A
Bug fix? no
New feature? no
BC breaks? yes
Deprecations? no
Tests pass? no
Fixed tickets ~
License MIT
Doc PR ~

@piotrpasich
Copy link

👍

1 similar comment
@mickaelandrieu
Copy link
Contributor

👍

@@ -56,7 +56,7 @@
</service>

<service id="templating.asset.request_aware_package" class="Symfony\Component\Templating\Asset\PackageInterface" factory-service="templating.asset.package_factory" factory-method="getPackage" abstract="true">
<argument type="service" id="request" strict="false" />
<argument type="expression" strict="false">service('request_stack').getCurrentRequest()</argument>
Copy link
Member

Choose a reason for hiding this comment

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

strict=false is not needed anymore, given that there is no scope issue anymore

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thanks I'm gonna change it.

@hhamon hhamon force-pushed the remove-request-service branch from 6fa6e98 to 1933691 Compare November 23, 2014 10:51
@hhamon hhamon changed the title [WIP] [FrameworkBundle] removed request service occurrences. [3.0] [FrameworkBundle] removed request service occurrences. Dec 10, 2014
@hhamon hhamon force-pushed the remove-request-service branch 5 times, most recently from b120c3c to 1b18f88 Compare January 2, 2015 09:40
@hhamon
Copy link
Contributor Author

hhamon commented Jan 2, 2015

Tests are finally green! Ping @symfony/deciders @symfony/mergers.

@@ -44,7 +44,7 @@
</service>

<service id="templating.asset.path_package" class="%templating.asset.path_package.class%" abstract="true">
<argument type="service" id="request" />
<argument type="expression">service('request_stack').getCurrentRequest()</argument>
Copy link
Member

Choose a reason for hiding this comment

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

I think using getMasterRequest() is more correct here (same below).

@hhamon hhamon force-pushed the remove-request-service branch from 1b18f88 to 74d7cc3 Compare January 2, 2015 12:42
@hhamon
Copy link
Contributor Author

hhamon commented Jan 2, 2015

@fabpot done ;)

<service id="service_container" synthetic="true" />

<service id="kernel" synthetic="true" />

<service id="filesystem" class="%filesystem.class%"></service>
<service id="filesystem" class="%filesystem.class%"/>
Copy link

Choose a reason for hiding this comment

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

Missing space

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed thanks.

@hhamon hhamon force-pushed the remove-request-service branch from 74d7cc3 to 5fe3e61 Compare January 2, 2015 13:44
@hhamon hhamon force-pushed the remove-request-service branch from 5fe3e61 to 2120554 Compare January 2, 2015 13:53
@fabpot
Copy link
Member

fabpot commented Jan 2, 2015

Thank you @hhamon.

@fabpot fabpot merged commit 2120554 into symfony:master Jan 2, 2015
fabpot added a commit that referenced this pull request Jan 2, 2015
…ences. (hhamon)

This PR was merged into the 3.0-dev branch.

Discussion
----------

[3.0] [FrameworkBundle] removed request service occurrences.

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

Commits
-------

2120554 Removed request service occurrences.
@hhamon hhamon deleted the remove-request-service branch January 2, 2015 14:05
<factory service="templating.asset.package_factory" method="getPackage" />
<argument type="service" id="request" strict="false" />
<service id="templating.asset.request_aware_package" class="Symfony\Component\Templating\Asset\PackageInterface" factory-service="templating.asset.package_factory" factory-method="getPackage" abstract="true">
<argument type="expression">service('request_stack').getMasterRequest()</argument>
Copy link
Member

Choose a reason for hiding this comment

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

This will break if the master request is not available (in the CLI for instance). It would be better to inject the RequestStack itself.

@fabpot fabpot mentioned this pull request Nov 16, 2015
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