-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
renamed some classes and Twig functions to more descriptive names (refs #6871) #6925
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
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,30 +16,30 @@ | |
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; | ||
|
||
/** | ||
* Adds services tagged kernel.content_renderer_strategy as HTTP content rendering strategies. | ||
* Adds services tagged kernel.fragment_renderer as HTTP content rendering strategies. | ||
* | ||
* @author Fabien Potencier <[email protected]> | ||
*/ | ||
class HttpRenderingStrategyPass implements CompilerPassInterface | ||
class FragmentRendererPass implements CompilerPassInterface | ||
{ | ||
public function process(ContainerBuilder $container) | ||
{ | ||
if (false === $container->hasDefinition('http_content_renderer')) { | ||
if (false === $container->hasDefinition('fragment.handler')) { | ||
return; | ||
} | ||
|
||
$definition = $container->getDefinition('http_content_renderer'); | ||
foreach (array_keys($container->findTaggedServiceIds('kernel.content_renderer_strategy')) as $id) { | ||
$definition = $container->getDefinition('fragment.handler'); | ||
foreach (array_keys($container->findTaggedServiceIds('kernel.fragment_renderer')) as $id) { | ||
// We must assume that the class value has been correctly filled, even if the service is created by a factory | ||
$class = $container->getDefinition($id)->getClass(); | ||
|
||
$refClass = new \ReflectionClass($class); | ||
$interface = 'Symfony\Component\HttpKernel\RenderingStrategy\RenderingStrategyInterface'; | ||
$interface = 'Symfony\Component\HttpKernel\Fragment\FragmentRendererInterface'; | ||
if (!$refClass->implementsInterface($interface)) { | ||
throw new \InvalidArgumentException(sprintf('Service "%s" must implement interface "%s".', $id, $interface)); | ||
} | ||
|
||
$definition->addMethodCall('addStrategy', array(new Reference($id))); | ||
$definition->addMethodCall('addRenderer', array(new Reference($id))); | ||
} | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,19 +9,19 @@ | |
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Symfony\Bundle\FrameworkBundle\RenderingStrategy; | ||
namespace Symfony\Bundle\FrameworkBundle\Fragment; | ||
|
||
use Symfony\Component\DependencyInjection\ContainerInterface; | ||
use Symfony\Component\HttpFoundation\Request; | ||
use Symfony\Component\HttpKernel\UriSigner; | ||
use Symfony\Component\HttpKernel\RenderingStrategy\HIncludeRenderingStrategy; | ||
use Symfony\Component\HttpKernel\Fragment\HIncludeFragmentRenderer; | ||
|
||
/** | ||
* Implements the Hinclude rendering strategy. | ||
* | ||
* @author Fabien Potencier <[email protected]> | ||
*/ | ||
class ContainerAwareHIncludeRenderingStrategy extends HIncludeRenderingStrategy | ||
class ContainerAwareHIncludeFragmentRenderer extends HIncludeFragmentRenderer | ||
{ | ||
private $container; | ||
|
||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 0 additions & 37 deletions
37
src/Symfony/Bundle/FrameworkBundle/Resources/config/content_generator.xml
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would it make sense to make fragments a child of templating ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the sub-framework is actually independent of the templating layer (except for the HInclude renderer where it is optional).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even if it is independent, does it makes sense to use it w/o the templating layer activated in the context of this bundle ? - It might be simpler for users to understand.