twigphp / Twig

Twig, the flexible, fast, and secure template language for PHP
https://twig.symfony.com/
BSD 3-Clause "New" or "Revised" License
8.2k stars 1.26k forks source link

Deprecation "filename strategy" #2208

Closed emil-nasso closed 8 years ago

emil-nasso commented 8 years ago

We are getting this deprecation since upgrading to twig 1.27.

Using "filename" as the default strategy is deprecated since version 1.27. Use "name" instead.

I'm not sure how to fix this. I don't think the deprecation documentation mentions it. Anyone know how to fix it?

matiux commented 8 years ago

I have the same "problem"

xabbuh commented 8 years ago

Which other packages do you have installed (i.e. what's the output of composer show)?

matiux commented 8 years ago

this is my list:

andres-montanez/magallanes 1.0.6 A Deployment Tool for PHP Applications behat/transliterator v1.1.0 String transliterator doctrine/annotations v1.3.0 Docblock Annotations Parser doctrine/cache v1.6.0 Caching library offering an object-oriented API for many cache backends doctrine/collections v1.3.0 Collections Abstraction library doctrine/common v2.6.1 Common Library for Doctrine projects doctrine/dbal v2.5.5 Database Abstraction Layer doctrine/doctrine-bundle 1.6.4 Symfony DoctrineBundle doctrine/doctrine-cache-bundle 1.3.0 Symfony Bundle for Doctrine Cache doctrine/inflector v1.1.0 Common String Manipulations with regard to casing and singular/plural rules. doctrine/instantiator 1.0.5 A small, lightweight utility to instantiate objects in PHP without invoking their constructors doctrine/lexer v1.0.1 Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers. doctrine/orm v2.5.5 Object-Relational-Mapper for PHP gedmo/doctrine-extensions v2.4.24 Doctrine2 behavioral extensions hamcrest/hamcrest-php v1.2.2 This is the PHP port of Hamcrest Matchers incenteev/composer-parameter-handler v2.1.2 Composer script handling your ignored parameter file jdorn/sql-formatter v1.2.17 a PHP SQL highlighting library jms/metadata 1.5.1 Class/method/property metadata management in PHP jms/parser-lib 1.0.0 A library for easily creating recursive-descent parsers. jms/serializer 1.3.1 Library for (de-)serializing data of any complexity; supports XML, JSON, and YAML. jms/serializer-bundle 1.1.0 Allows you to easily serialize, and deserialize data of any complexity josegonzalez/dotenv 2.0.0 dotenv file parsing for PHP lcobucci/jwt 3.2.0 A simple library to work with JSON Web Token and JSON Web Signature m1/env 2.1.0 Env is a lightweight library bringing .env file parser compatibility to PHP. In short - it enables you to read .env files with PHP. mockery/mockery 0.9.5 Mockery is a simple yet flexible PHP mock object framework for use in unit testing with PHPUnit, PHPSpec or any other testing framework. Its core goal is to offer a test double... monolog/monolog 1.21.0 Sends your logs to files, sockets, inboxes, databases and various web services myclabs/deep-copy 1.5.4 Create deep copies (clones) of your objects paragonie/random_compat v2.0.3 PHP 5.x polyfill for random_bytes() and randomint() from PHP 7 phpcollection/phpcollection 0.5.0 General-Purpose Collection Library for PHP phpdocumentor/reflection-common 1.0 Common reflection classes used by phpdocumentor to reflect the code structure phpdocumentor/reflection-docblock 3.1.1 With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock. phpdocumentor/type-resolver 0.2
phpoption/phpoption 1.5.0 Option Type for PHP phpspec/prophecy v1.6.1 Highly opinionated mocking framework for PHP 5.3+ phpunit/php-code-coverage 4.0.1 Library that provides collection, processing, and rendering functionality for PHP code coverage information. phpunit/php-file-iterator 1.4.1 FilterIterator implementation that filters files based on a list of suffixes. phpunit/php-text-template 1.2.1 Simple template engine. phpunit/php-timer 1.0.8 Utility class for timing phpunit/php-token-stream 1.4.8 Wrapper around PHP's tokenizer extension. phpunit/phpunit 5.5.7 The PHP Unit Testing framework. phpunit/phpunit-mock-objects 3.4.0 Mock Object library for PHPUnit psr/cache 1.0.1 Common interface for caching libraries psr/log 1.0.2 Common interface for logging libraries sebastian/code-unit-reverse-lookup 1.0.0 Looks up which function or method a line of code belongs to sebastian/comparator 1.2.0 Provides the functionality to compare PHP values for equality sebastian/diff 1.4.1 Diff implementation sebastian/environment 1.3.8 Provides functionality to handle HHVM/PHP environments sebastian/exporter 1.2.2 Provides the functionality to export PHP variables for visualization sebastian/global-state 1.1.1 Snapshotting of global state sebastian/object-enumerator 1.0.0 Traverses array structures and object graphs to enumerate all referenced objects sebastian/recursion-context 1.0.2 Provides functionality to recursively process PHP variables sebastian/resource-operations 1.0.0 Provides a list of PHP built-in functions that operate on resources sebastian/version 2.0.0 Library that helps with managing the version number of Git-hosted PHP projects sensio/distribution-bundle v5.0.13 Base bundle for Symfony Distributions sensio/framework-extra-bundle v3.0.16 This bundle provides a way to configure your controllers with annotations sensio/generator-bundle v3.0.11 This bundle generates code for you sensiolabs/security-checker v4.0.0 A security checker for your composer.lock stof/doctrine-extensions-bundle v1.2.2 Integration of the gedmo/doctrine-extensions with Symfony2 swiftmailer/swiftmailer v5.4.3 Swiftmailer, free feature-rich PHP mailer symfony/monolog-bundle 2.11.1 Symfony MonologBundle symfony/phpunit-bridge v3.1.5 Symfony PHPUnit Bridge symfony/polyfill-apcu v1.2.0 Symfony polyfill backporting apcu
* functions to lower PHP versions symfony/polyfill-intl-icu v1.2.0 Symfony polyfill for intl's ICU-related data and classes symfony/polyfill-mbstring v1.2.0 Symfony polyfill for the Mbstring extension symfony/polyfill-php56 v1.2.0 Symfony polyfill backporting some PHP 5.6+ features to lower PHP versions symfony/polyfill-php70 v1.2.0 Symfony polyfill backporting some PHP 7.0+ features to lower PHP versions symfony/polyfill-util v1.2.0 Symfony utilities for portability of PHP codes symfony/swiftmailer-bundle v2.3.11 Symfony SwiftmailerBundle symfony/symfony v3.1.5 The Symfony PHP framework twig/twig v1.27.0 Twig, the flexible, fast, and secure template language for PHP vlucas/phpdotenv v2.4.0 Loads environment variables from .env to getenv(), $_ENV and $_SERVER automagically. webmozart/assert 1.1.0 Assertions to validate method input/output with nice error messages.

xabbuh commented 8 years ago

In your case, the next Symfony patch release 3.1.6 should make the deprecations go away.

johnprice99 commented 8 years ago

if you can't wait for the patch from Symfony - you can change the default strategy in your config.yml file under the twig setting: autoescape: "name"