-
Notifications
You must be signed in to change notification settings - Fork 37
Open
Description
@vitorbrandao Hi! Do you have plans to add sf5 support?
I faced some problems trying to adopt it for sf5.
- There is no tempting section in framework config, so you need use SmartyEngin directly
- templating:
- engines: ['smarty']- There is not
kernel.root_dirvar. Now we havekernel.project_dir. And default folder is templates - Small change we need in \NoiseLabs\Bundle\SmartyBundle\Extension\SecurityExtension
- return $this->authorizationChecker->isGranted($role, $object);
+ try {
+ return $this->authorizationChecker->isGranted($role, $object);
+ } catch (AuthenticationCredentialsNotFoundException $e) {
+ return false;
+ }- EngineInterface namespace changed;
- use Symfony\Bundle\FrameworkBundle\Templating\EngineInterface;
+ use Symfony\Component\Templating\EngineInterface;Symfony\Bundle\FrameworkBundle\CacheWarmer\TemplateFinderInterfaceremoved without replacement- The biggest problem FileLocator interface changed. Now we can't inject anything in FileLocator except $kernel
class FileLocatorFactory
{
/**
* @param KernelInterface $kernel A KernelInterface instance
* @param null|string $path The path the global resource directory
* @param array $paths An array of paths where to look for resources
*/
public static function createFileLocator(KernelInterface $kernel, ?string $path, array $paths, array $extraTemplatePaths): FileLocator
{
return new FileLocator($kernel, /**$path, array_merge($paths, $extraTemplatePaths)*/);
}
}- Small problems with tests. They can be easily solved except this problem with FileLocator
Metadata
Metadata
Assignees
Labels
No labels