First of all I would like to ask about work. You work at Stay.com . I suspect that remotely. You are also actively participating in conferences, working on Yii. How do you manage to combine? Is this not full time? Or is something akin to the once Google “20% on their projects”?Yes, I work at Stay.com . Basically, remotely. This is fulltime. Yii doing either in his spare time, or when not very strong loading on the main project.
Is the Yii version on the working draft? ;-) Is it difficult to keep up with a fresh version?1.1.17 + some patches from master. On 2.0, it does not work out yet. Project rewriting is a resource-intensive task. The project is not small. There are many current tasks.
What do you do in php-fig ? Only vote for PSR? Is it useful for ordinary PHP developers (not those who do frameworks) to know PSR? If useful, then what.In addition to voting and discussions, I was engaged in PSR-12. The new replacement coding style PSR-2. We started cheerfully, but since it’s about PHP 7, and the seven haven’t been actively used yet, we decided to wait a bit until you can collect normal statistics.
PHP has been developing fast. New version, a bunch of different rfc. And if some changes are just a harmonious development of the language, then such PHP7 features like scalar type hinting and return types greatly brought PHP closer to statically typed languages. Watching the controversy, it seemed to me that PHP developers were divided into two camps. Some welcome new trends. Others don't like turning PHP into Java (C #). The argument of the latter is that PHP has always had its own niche, different from Java and it has always been a dynamically-typed language. What do you think about this?PHP development is OpenSource, where collective voting decides everything. Judging by the latest results, there are not so many ardent opponents of change among those who have the right to vote. I welcome explicit typification, but I am not going to use it fanatically. Everything has its place. return types in 7.0 are practically useless for me because of nullable types.
In addition to the previous question, it looks like PHP is experiencing some kind of growth problem. Added return types without nullable types . And from the latter - intersection types and union types , which will make it possible to write such code:PHP is a legacy of decisions made a long time ago. Breaking compatibility immediately and a lot can not be: users will not understand. Therefore, such solutions-patches are obtained. Some of them are strange, some quite fit.Personally, I have the feeling that with such rfc patches they want to close the underlying problems of PHP - problems with basic interfaces, and an array that does not support these interfaces. As a modern framework, Yii will work on PHP7 (right? Does it already work?), But do you want Yii to use these PHP7 features? Yes, BC will prevent this in the current version. But if we talk about future versions?
function RecordsToList(Array | (Countable & Traversable) $input): String { ... }
In general, what do you think, when mainstream frameworks start breaking their compatibility with PHP 5. *? What can PHP7 lure?After 2.5 years: secure.php.net/supported-versions.php
I wrote my latest projects on laravel. And there they use two approaches for Inversion of Control - Service locator in the form of pseudostatic facade classes and DI in the form of Constructor injection, Controller action injection, etc. Those. the same action can almost always be done in two ways. For example:Automatic injections have long been, documented and actively used by those to whom it is close. It is planned to more actively recommend such an approach in official documentation.orMail::send(....)
public function __construct(Mailer $mailer) { $this->mailer = $mailer; } ... public function doSomeAction(...) { $this->mailer->send(...) }
Despite the fact that almost everywhere facades are used in the documentation as a simpler option, experienced laravel developers advise using injections. The code with them is much less associated (low coupling) and, I hope, someday and in the help for beginners will recommend them. As far as I know, in Yii, the main option for IoC is the Service locator. But there are some options for DI there too (used only inside the framework?). Are you going to introduce automatic dependency injection in Yii as the main IoC method?
Question from Grikdotnet :The microkernel will be somewhere in 2.2 - 2.3. The modularity is not scored. Firstly, it is already in some form: bootstrap, redis, etc. Secondly, in 2.1 from a kernel according to the plan practically everything connected with the client-side will move.
Why is it scored on modularity and when will it be a microkernel?
It's time to go to DevConf. You report security . From the description I did not immediately understand for whom he was. For admins or programmers?For programmers. Admina will be small.
You are one of the organizers of the Yii-hakaton, which will be held as part of DevConf. Share information. Is there already a list of topics?Topics will be determined depending on the number of people willing to participate. There are two types of tasks. The first is what will be of interest to the whole community: I finished the official extension for queues and other issues with github, jointly parsing and documenting the possibilities, making improvements on the new yiiframework.com. The second is ideas expressed in the community: a blogger with a tutorial on its creation (approximately as it was for 1.1), separate extensions, fruitful discussions on the topic of the now fashionable DDD and service layer, the results of which will be in the form of articles or sections of the manual.
Source: https://habr.com/ru/post/301114/
All Articles