twigphp / Twig

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

depecation Twig_Node::getLine and Twig_TokenStream::getFilename() #2217

Closed EmyJ closed 7 years ago

EmyJ commented 7 years ago

We are getting this deprecation since upgrading to twig 1.27.

The Twig_TokenStream::getFilename() method is deprecated since version 1.27 and will be removed in 2.0. Use getSourceContext() instead.

The Twig_Node::getLine method is deprecated since version 1.27 and will be removed in 2.0. Use getTemplateName() instead.

Here is the output of composer show

atoum/atoum 2.8.2 Simple modern and intuitive unit testing framework for PHP 5.3+ atoum/atoum-bundle 1.4.1 Bundle around atoum unit testing framework behat/transliterator v1.1.0 String transliterator cocur/slugify v2.3 Converts a string into a slug. doctrine/annotations v1.3.0 Docblock Annotations Parser doctrine/cache v1.6.1 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/data-fixtures v1.2.1 Data Fixtures for all Doctrine Object Managers 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/doctrine-fixtures-bundle 2.3.0 Symfony DoctrineFixturesBundle 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 excelwebzone/recaptcha-bundle dev-master fff64c4 This bundle provides easy reCAPTCHA form field integration fp/openid-bundle dev-master 09dfd53 Symfony2 OpenID security extension friendsofsymfony/user-bundle dev-master 7271c17 Symfony FOSUserBundle fzaninotto/faker v1.6.0 Faker is a PHP library that generates fake data for you. gedmo/doctrine-extensions dev-master 1c60a8a Doctrine2 behavioral extensions hwi/oauth-bundle dev-master 429ae3f Support for authenticating users using both OAuth1.0a and OAuth2 in Symfony2. incenteev/composer-parameter-handler v2.1.2 Composer script handling your ignored parameter file ircmaxell/password-compat v1.0.4 jdorn/sql-formatter v1.2.17 a PHP SQL highlighting library knplabs/knp-menu 2.2.0 An object oriented menu library knplabs/knp-menu-bundle 2.1.3 This bundle provides an integration of the KnpMenu library kriswallsmith/assetic v1.3.2 Asset Management for PHP kriswallsmith/buzz v0.15 Lightweight HTTP client lightopenid/lightopenid dev-master 9d42dc2 monolog/monolog 1.21.0 Sends your logs to files, sockets, inboxes, databases and various web services pagerfanta/pagerfanta v1.0.3 Pagination for PHP 5.3 paragonie/random_compat v2.0.3 PHP 5.x polyfill for random_bytes() and randomint() from PHP 7 psr/log 1.0.2 Common interface for logging libraries sensio/distribution-bundle v4.0.12 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 v2.5.3 This bundle generates code for you sensiolabs/security-checker v3.0.2 A security checker for your composer.lock sonata-project/admin-bundle 3.9.0 The missing Symfony Admin Generator sonata-project/block-bundle 3.2.0 Symfony SonataBlockBundle sonata-project/cache 1.0.7 Cache library sonata-project/core-bundle 3.1.1 Symfony SonataCoreBundle sonata-project/doctrine-orm-admin-bundle 3.1.1 Symfony Sonata / Integrate Doctrine ORM into the SonataAdminBundle sonata-project/exporter 1.7.0 Lightweight Exporter library swiftmailer/swiftmailer v5.4.3 Swiftmailer, free feature-rich PHP mailer symfony/assetic-bundle v2.8.0 Integrates Assetic into Symfony2 symfony/icu 1.0.x-dev fdba214 Contains an excerpt of the ICU data and classes to load it. symfony/monolog-bundle 2.11.1 Symfony MonologBundle 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-php54 v1.2.0 Symfony polyfill backporting some PHP 5.4+ features to lower PHP versions symfony/polyfill-php55 v1.2.0 Symfony polyfill backporting some PHP 5.5+ features to lower PHP versions 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/security-acl v3.0.0 Symfony Security Component - ACL (Access Control List) symfony/swiftmailer-bundle v2.4.0 Symfony SwiftmailerBundle symfony/symfony v2.8.13 The Symfony PHP framework twig/extensions v1.4.1 Common additional features for Twig that do not directly belong in core twig/twig v1.27.0 Twig, the flexible, fast, and secure template language for PHP white-october/pagerfanta-bundle dev-master 394c0a2 Bundle to use Pagerfanta with Symfony2 widop/google-analytics 1.0.0 Google certificate-based authentication in server-to-server interactions with google analytics widop/google-analytics-bundle 1.1.0 Google certificate-based authentication in server-to-server interactions with google analytics widop/http-adapter 1.0.2 Issue HTTP request. widop/http-adapter-bundle 1.1.1 Issue HTTP request.

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

stof commented 7 years ago

well, the message itself tells you what the replacement is.

Btw, Assetic and AsseticBundle are known to trigger these warnings. The update to the new API is in progress