PHP, YII2 and the formation of large excel-files

Beginning


 
One accounting and reporting system supported by our company began to grow very quickly in the amount of data stored. The system is written in PHP using the Yii2 framework. Initially, the reports were built through the library PhpSpreadsheet, which replaced the already long deprecated, PhpExcel.
 
 
Among the different types of reporting was one very large - in fact the complete set of all data stored in the database should be uploaded into one excel table. At the initial stage, there were no problems, but when the volume began to exceed many hundreds of thousands of records, the ...[/h]
Yii / PHP
+ 0 -

Almost OCR for getting the VPNBook password. PHP + Mikrotik

Recently VPNBook began to publish the password instead of direct text in the form of an image. "Well, it's like that," I thought, and began to look for ways to solve this problem. Recognize the "picture" VPNBook password in PHP. And, of course, the script for Mikrotik.
 
Customize the automatic obtaining of a password for VPN on Mikrotik ". Prior to the problem, the password for VPNBook could simply be extracted from the html page, for example, as:
 
 
preg_match ('/Password:
([^<]+) /', $ homepage, $ matches);
print ($ matches[1])

 
And recently the password has become a "picture". And ...
+ 0 -

Different prices for warehouses in multi-warehouse. Completion of 1C-Bitrix

There was an online store and a b2b platform from one company on the 1c-Bitrix system. The company grew and its warehouses appeared and added warehouses of partners that needed to be displayed. There was a need to display balances in several warehouses.
 
And what does Bitrix tell us: Please go to the editorial office of "Business" and everything will be fine and immediately. The editorial board went over and it turned out that the multi-value and multi-folding in 1C-Bitrix live a separate life. The first is needed to display different prices for different user groups, and the second one is used ...
+ 0 -

What's wrong with the popular articles telling that foo is faster than bar?

Translator's note:
I also thought that the time of the articles "What is faster - double or single quotes?" passed 10 years ago. But here is a similar article ("What performance tricks actually work") recently gathered on Reddit a relatively high rating and even got in PHP digest on Habré. Accordingly, I decided to translate the article with a critical analysis of these and similar "tests".
 
There are many articles (and even entire sites) devoted to launching a variety of tests comparing the performance of various syntactic constructions, and claiming on this basis that one is faster than ...
+ 0 -

Step-by-Step Creating a Bundle for Symfony 4

Step-by-Step Creating a Bundle for Symfony 4About a year ago, our company set a course for the separation of a huge monolith on Magento 1 for microservices. As a basis, only the Symfony 4 released was released. During this time I developed several projects on this framework, but I found it particularly interesting to develop bundles, re-used components for Symfony. Under the step, a step-by-step guide to developing the HealthCheck Bundle to obtain the status /health of the micro service under Syfmony 4.? in which I tried to touch on the most interesting and complex (for me at one time) moments.
...
+ 0 -

Learn wordpress (and not only) to draw quickly Youtube players

Learn wordpress (and not only) to draw quickly Youtube players
 
I remembered the site of an old buddy who had one hip-hop in the site tape, about 6 years ago he spit on the speed of loading pages: "Yes, yes, yes, I need to remake, but there's nothing complicated there " but went now - everything is as before :-) Despite simple technical solutions, I admit that not only do I have such a friend. So this is a small technical note.
 
 
stackoverflow.com/questions/10066638/get-youtube-information-via-json-for-single-video-not-feed-in-jаvascript/23253789#23253789 ...
+ 0 -

The outdated code is a third-party code of

The outdated code is a third-party code of
 
 
In the TDD community there is a council that says that We should not use mock objects for types that do not own . I think this is good advice, and I try to follow it. Of course, there are people who say that we should not use mock objects at all. Regardless of what opinion you hold, the advice "not to imitate what is not yours" - also contains a hidden meaning. People often miss him by seeing the word "mock" and falling into a rage.
 
Guzzle HTTP client , instead of using Guzzle directly.
 
 
Why? Well, to begin with, Guzzle has a much more powerful ...
+ 0 -

Open lesson "Basic concepts of databases"

Hello! We present to your attention the next open lesson "Basic concepts of databases", which we conducted within the framework of the course "Backend developer on PHP" . The webinar was led by the second teacher of the course - Oleg Kozintsev , who analyzed in the lesson the description of the conceptual schemas of the domain using the ER-model, the history of SQL, its standards and compatibility and analyzed the relational model in detail.
 
 
+ 0 -

A local web server under Linux, with automatic host elevation and switching versions of PHP

Most likely some parts of this article are already familiar to many hobblers, but in connection with the purchase of a new working laptop I decided to collect all the grains together and organize a convenient tool for development. I often have to work with a lot of small projects, with different versions of PHP, often translate old projects into new versions. In the distant past, when I was a Windows user, I used OpenServer. But with the transition to Linux, I lacked the simplicity of creating hosts and switching versions that were in it. Therefore, we had to make an even more convenient solution ...
+ 0 -

The experience of the Rambler Group: how we started to fully control the formation and behavior of front-line React components

The experience of the Rambler Group: how we started to fully control the formation and behavior of front-line React components
 
There are a lot of ways to create a modern web application, but before each team there is inevitably the same set of questions: how to allocate front and back duties, how to minimize the appearance of duplicate logic - for example, when validating data, what libraries to use, how to provide reliable and transparent transport between the front and back and document the code.
 
 
In our opinion, we managed to implement a good example of a balanced in complexity and profit solution, which we successfully use in production based on Symfony and React. For details of ...
+ 0 -