Nette Framework 2.2.4 released

Notice: This thread is very old.
David Grudl
Nette Core | 8082
+
+13
-

Nette Framework 2.2.4 has just been released and is now available for download. Feel free to update!

Forms

  • CsrfProtection: token is expired after regenerateId() (i.e. after logout) security fix!
  • CsrfProtection: ignores setValue(), is not erased by Form::setValues
  • UI\Form: calling setAction() bypasses creation of ‘do’ element (forum) warning: this is BC break, you should pass parameter do manually
  • DefaultFormRenderer: support for setOption(‘id’) for groups
  • RadioList: added item label prototype
  • Container: added addMultiUpload()
  • TextBase: added setMaxLength()
  • TextInput: removed empty value=""
  • TextBase::setEmptyValue() can contain space at the end of the value
  • fixes in netteForms.js

Tracy

  • fixed double calling Debugger::enable(), Debugger: $logSeverity in development mode, CSS
  • BlueScreen: collapsePaths is set to /vendor dir
  • create-phar: minification for JS & CSS
  • Debugger: removed error message in non-HTML production mode
  • TracyBridge initialization moved from NetteExtension to Configurator

Others

  • supported $configurator->addConfig(array(...configuration...))
  • Template: added __call() for BC
  • Route: %domain% and %tld% works with IP
  • SqlPreprocessor: fixed non-associative array detection
  • Http\Response: Added missing HTTP status codes as constants
  • Url::isEqual: fixed comparing of indexed arrays
  • UserPanel: is rendered only when headers are not sent
  • DateTime: createFromFormat returns FALSE on failure
  • Latte: implemented {elseifset #block}
  • Latte: allows load templates from phar file
  • Database: strings in Tracy Bar are correctly escaped
  • Http: fixes in phpDoc

For the details you can have a look at the diffs: application, bootstrap, caching, database, di, forms, http, mail, neon, security, utils, latte, tracy.

mcmatak
Member | 489
+
0
-

after update whole website stopped working

[2014–11–10 17–54–32] PHP Deprecated: Function (null)() is deprecated in Unknown:0 @ http://www.artedio.cz/…modra/p-5012
[2014–11–10 17–59–50] PHP Deprecated: Function FrontModule\WwwArtedioModule\ProductPresenter::() is deprecated in Unknown:0 @ http://www.artedio.cz/…orway/p-1658
[2014–11–10 18–01–22] PHP Deprecated: Function (null)() is deprecated in Unknown:0 @ http://www.artedio.cz/basket/adress/?…

but i dont know what is problem, no line, no name of deprecated function

i think that problem could by somewhere here?
public function registerHelperLoader($loader)
{
//trigger_error(__METHOD__ . ‘() is deprecated, use dynamic getLatte()->addFilter().’, E_USER_DEPRECATED);

i downgrade to 2.2.0 and now i see

[2014–11–10 18–38–18] PHP User Deprecated: Nette\Bridges\ApplicationLatte\Template::registerHelperLoader() is deprecated, use dynamic getLatte()->addFilter(). in /srv/yourmall.cz/www/vendor/nette/application/src/Bridges/ApplicationLatte/Template.php:110 @ http://www.yourmall.cz/…ranel/p-5051

so what is right and how it should be correct? in 2.2.4 is not this function deprecated

mcmatak
Member | 489
+
0
-

$callback = ‘System\Templates\TemplateHelpers::loader’;
$latte = $template->getLatte();
$latte->addFilter(NULL, function($name) use ($callback, $latte) {
if ($res = call_user_func($callback, $name)) {
$latte->addFilter($name, $res);
}
});
//$template->registerHelperLoader(‘System\Templates\TemplateHelpers::loader’);

this problem i fixed like this, but still 2–3 request from 10 finishes with unknown deprecated function on uknown line

i downgraded to 2.2.3 and 1/20 req finishes with offer to download page, not render the page, but it could be internet problem, no exception is generated

Pavel Macháň
Member | 282
+
0
-

Warning:
Function () is deprecated

Error on line

<span class="fa fa-times-circle text-danger"></span><?php } ?></td>

I haven't full Tracy log now :(

Milo
Nette Core | 1283
+
0
-

@mcmatak That's strange. I didn't find such error message in Nette. It usually continues by dot (like is deprecated.) or by recommendation (like is deprecated; use bla bla).

Do you use some addon?

@PavelMacháň Is it the same error as @mcmatak have? If not, trace would be useful, or more lines than you post.

Anyway, deprecated messages should not kill the web in production mode. Tracy shows self in development mode only.

Pavel Macháň
Member | 282
+
0
-

Milo wrote:

@PavelMacháň Is it the same error as @mcmatak have? If not, trace would be useful, or more lines than you post.

@Milo Tracy log

Last edited by Pavel Macháň (2014-11-11 14:40)

Milo
Nette Core | 1283
+
0
-

@PavelMacháň Again, it's strange :) I didn't find such error in Nette. What is the content of variable $user? And $user->createdAt? Which version of PHP do you use?

Pavel Macháň
Member | 282
+
0
-

Milo wrote:

@PavelMacháň Again, it's strange :) I didn't find such error in Nette. What is the content of variable $user? And $user->createdAt? Which version of PHP do you use?

@Milo Win7, Apache 2.4, PHP 5.4.21
$user is LeanMapper Entity and createdAt is \Datetime

Last edited by Pavel Macháň (2014-11-11 16:39)

Milo
Nette Core | 1283
+
0
-

@PavelMacháň @mcmatak This errors messages are from PHP (search for () is deprecated). Maybe they are bugs. Hard to say what cause it when function name is missing.

I don't know how to help any further.

blindAlley
Member | 31
+
0
-

@PavelMacháň – It seems like some strange internal PHP deprecated message, not Nette message. It definitely needs more investigation. I suspect some changes in Latte or Template – maybe __call(), maybe others. Try to make some changes in compiled PHP template to find what is wrong.

Last edited by blindAlley (2014-11-12 14:22)

Milo
Nette Core | 1283
+
0
-

I opened a new topic for this bug.

David Grudl
Nette Core | 8082
+
0
-

Fixed in Nette 2.2.6 and 2.1.8.