Hurray! The revolutionary Nette 3 is here!

by David Grudl 8 days ago in Nette

The Nette team is proud to announce the final release of Nette 3.0.0. We’ve been working on this release for two years and now we are happy to say: it is finished.

Nette is the world's first full-stack framework that uses major benefits of PHP 7.1:

  • full usage of scalar type hints
  • full usage of return type hints
  • all files have declare(strict_types=1)


Nette Tester 2.2.0 is out

by Miloslav Hůla about a month ago in Tester

I didn't write blog article about releasing the 2.1.0. The main purpose for that release was to drop support for PHP below 7.1. Nobody complained so it looks like as a good step.

New in Tester

The 2.1.0 version brought one small feature. The --coverage-src parameter is repeatable, so you can mark separated directories for coverage report.

The 2.2.0 version brings few minor fixes and mainly two new features.

New Tester\Expect objects allows you to test “random” items in more complex data structures. You can use them in $expected parameter of Assert::equal() and Assert::notEqual() methods. For example, you test a method which creates a new user and returns its attributes as an array:

use Tester\Expect;

    'id' => 123,
    'username' => 'milo',
    'password' => Expect::match('%h%'),  # random string, hash, but must match some pattern
    'created_at' => Expect::type(DateTimeImmutable::class),  # check type only, not exact value
], User::create(123, 'milo', 'RandomPaSsWoRd'));

Until now, you had to unset these “random” items before assertion or test array items one by one. The usage of Expect is clearer with less effort to type.

You can read more about Expect in documentation.

The second new feature is support for PCOV. I didn't find what that acronym (or is it a word?) means, but it is an PHP extension especially written to provide code coverage functionality. So it is fast. Now, Tester supports three code coverage engines and question arose about which one to choose when more available. I defined following priority:

  1. PCOV, because it is a specialized tool
  2. PHPDBG SAPI, because I suppose that the code coverage is the only reason to run it
  3. Xdebug

Many thanks to all contributors!

Nette Pro – Magazine 10/2017

by Honza Černý about a year ago in Nette

Speed ​​up your websites

As you know, Nette Framework has excellent support for easy AJAX websites. So it's a shame that lots of sites built on Nette does not use this opportunity to speed up the web. The library of Vojta Dobeše nette.ajax.js which is currently a little bit old. Another help recently came up the Nittro, which grew up to version 2. Recently we have the Naja library.

Is it possible to try Nette Database without the whole framework, but with the beauty of DI and Tracy? Yes. New example in git repository


Nette Pro – Magazine 9/2017

by Honza Černý about a year ago in Nette

Support for PHP 7.2 is here!

For all who doesn't know about new type of versions of Nette Framewor 2.4, there is no planed 2.4.x version. All packages have their maintenance version, but Framework doesn’t have. There is build from (2017–08–29) with release notes, that is full compatible with incomming PHP version 7.2

We spent summer together at an extraordinary meeting Nette Camp and two excursions to Czech breweries. Definitely follow up the events next year. It's an interesting way to meet in an offline world. In September, the 90th anniversary Last Saturday is waiting for us.