Nette Framework 2.1.0 finally released!

5 years ago

David Grudl
founder | 6753
+
0
-

After two years of development we are very proud to announce the availability of Nette Framework 2.1.0!

New release has many innovations (see migration guide):

Application & Presenter

  • PresenterFactory: configurable mapping Presenter name → Class name
  • Route: new pseudo-variables %basePath%, %tld% and %domain%
  • Presenter: new method sendJson()

Caching

  • added SQLite storage (Nette/Caching/Storages/SQLiteStorage)

Database (NDB)

  • complete refactoring, a ton of bug fixes
  • lazy connection
  • much better (dibi-like) SQL preprocessor
  • Selection, ActiveRow: insert() & update() methods return row instances with refetched data
  • Selection: added placeholder support select(), group(), having(), order() methods
  • SqlLiteral: added placeholder support
  • Selection: added WHERE conditions consider NOT for IN operator
  • new driver for Sqlsrv
  • Sqlite supports multi-inserts

Debugger

  • Bar: you can see bar after redirect
  • Dumper: colored and clickable dumps in HTML or terminal
  • Debugger: full stack trace on fatal errors (requires Xdebug)

Dependency Injection (DI)

  • auto-generated factories and accessors via interface
  • adding compiler extensions via config file
  • configurable presenters via config file
  • annotation @inject
  • bullet syntax for anonymous services

Forms

  • setOmitted: excludes value from $form->getValues() result
  • implemented full validation scopes
  • Form::getOwnErrors() returns only errors attached to form
  • Radiolist::getLabel(…, $key) returns label for single item
  • added ChoiceControl, MultiChoiceControl and CheckboxList
  • SelectBox and CheckboxList: allowes to disable single items
  • UploadControl allowes multiple files upload
  • validators Form::INTEGER, NUMERIC and FLOAT converts values to integer or float
  • validator Form::URL prepends http:// to value
  • Form::getHttpData($htmlName) returns data for single field
  • supports Twitter Bootstrap 2 & 3 (see examples)
  • removed dependency on Environment
  • improved toggles
  • data-nette-rules attribute is JSON

Latte

  • supports <tag attr=$val> without quotes
  • new macro n:name for <form> <input> <select> <textarea>
  • partially rendered radiolists using {input name:$key} and {label name:$key}
  • new modifier |safeurl which allowes only http(s), ftp and mailto protocols
  • safeurl is automatically used for href, src, action and formaction attributes (can be bypassed by |nosafeurl modifier)
  • new modifier |noescape which is preferred over exclamation mark
  • {foreach ...|nointerator} bypasses creating variable $iterator
  • new macro n:ifcontent
  • {include block} can be written without hash

Http

  • added new SessionPanel
  • RequestFactory: new method setProxy()

Utils

  • new utility class FileSystem
  • new utility class Callback
  • Arrays: new method isList()
  • Arrays: method flatten() supports key preserving
  • Strings: new methods findPrefix() and normalizeNewLines()
  • Json: supports pretty output
  • Validators: new method isType()

Mailing

  • SmtpMailer: persistent connection

Others

  • minified version is PHAR file
  • ObjectMixin: magic methods setProperty(), getProperty(), isProperty() and addProperty() by @method
  • SafeStream: supports ftruncate (requires PHP 5.4+)

Nette Framework also comes with updated documentation. How to get started? Try Quick Start tutorial.

5 years ago

crempa
Member | 199
+
0
-

Great news, thank you!

5 years ago

Jan Suchánek
Member | 403
+
0
-

It's great! Thank you!

5 years ago

Milo
Moderator | 1036
+
0
-

@David Grudl Many thanks for a great job!

5 years ago

Šaman
Member | 2248
+
0
-

Thanx, DGX!

What about czech documentation and quick start? There are updated too, or english vesion is better?

5 years ago

Filip Procházka
Moderator | 4693
+
0
-

Czech quickstart was updated too. Documentation was updated by @dg (what was missing).

Last edited by Filip Procházka (2014-01-02 11:36)

5 years ago

David Grudl
founder | 6753
+
0
-

Quick start is updated and updating of documentation is still in progress.

5 years ago

Vojtěch Dobeš
Member | 1317
+
0
-

Thank you very much, great work!

5 years ago

thunderbuff
Member | 165
+
0
-

Yes! THX

5 years ago

uestla
Member | 731
+
0
-

Worth waiting, thanks!

5 years ago

hrach
Member | 1791
+
0
-

:heart:

5 years ago

MartyIX
Member | 219
+
0
-

Thanks! :-)

5 years ago

David Grudl
founder | 6753
+
0
-

5 years ago

Jan Tvrdík
Nette guru | 2541
+
0
-

Wow, the forms are even better than I thought! Well done =)

Last edited by Jan Tvrdík (2014-01-05 01:05)

5 years ago

Felix
Member | 849
+
0
-

Good job!

5 years ago

screenas
Member | 5
+
0
-

great job! (:

5 years ago

greeny
Member | 406
+
0
-

Is that typo?

{foreach …|nointerator} bypasses creating variable $iterator

5 years ago

Jan Tvrdík
Nette guru | 2541
+
0
-

No Ok, it is a hard to spot typo

Last edited by Jan Tvrdík (2014-01-08 12:06)

5 years ago

jasir
Member | 748
+
0
-

Jan Tvrdík wrote:

No

No? I think it is typo.

5 years ago

Jelen
Member | 13
+
0
-

Thanks a lot :-)