#yii2

2025-04-27

Внедряем метрики OpenTelemetry в PHP проект на Yii2

Сегодня поговорим о том, как внедрить метрики в формате OpenTelemetry в PHP монолит, построенный на фреймворке Yii2. Спойлер: как оказалось, на этой задаче можно пару раз разочароваться в бытии разработчика сломать голову на способе сбора, отправке, промежуточных звеньях и сломанных гистограммах.

habr.com/ru/articles/904654/

#yii2 #opentelemetry

2025-02-06

Переход на Symfony в заскорузлом Yii2 монолите: подробный разбор

Полгода назад мне посчастливилось решать интересную и нетипичную задачу по затаскиванию Symfony в Yii2 монолит. В данном материале я подробно и пошагово распишу весь процесс решения этой задачи с пояснениями, почему были выбраны именно такие решения и как это работает.

habr.com/ru/articles/880196/

#symfony #yii2 #php #монолит #фреймфорки

Blonder 🇨🇴 :verified:blonder413@mastodon.la
2025-01-28

llevo mucho tiempo sin usar #yii2 creo que ya estoy obsoleto

2024-07-06

Some inconsistencies in #Yii2 drive me nuts. I need to perform some DB actions on different databases in a loop. I don't want to switch the DB connection of the base ActiveRecord class as I may want to do a select from one DB and a save to another DB on same model. So I saw `ActiveQuery::one/all` methods have the optional parameter of the DB connection. That's awesome, but `findOne` which is used all over doesn't bother having a `Connection` paramater and respectively doesn't pass it. DAMN

tuxsoultuxsoul
2024-03-20

lanzo curso de y ofrezco consultoria sobre , comparte, evita que mi terminal se ponga triste y considere pasarse a windows. aprende desarrollo web y apoya mi trabajo independiente, acepto criptomonedas ...

2024-02-13

neoacevedo/yii2-auditing mantiene un historial de cambios de los modelos de su aplicación en #yii2 dando información sobre posibles discrepancias o anomalías en la información que puedan indicar actividades sospechosas.
Registra:
- Cambios en atributos de modelos.
- Usuario que realizó el cambio.
- Fecha y hora del cambio.

Registro de cambios:
24.01.26
- Ajuste en el evento DELETE: Validar si el ID del usuario autenticado es numérico y si no lo es extraer el ID numérico del string.

Más info: github.com/neoacevedo/yii2-aud

#yii2 #auditoria #seguridad #seguimiento #php #desarrollo #aplicaciones #yiiframework

2023-11-18

Help!
Recomment me a project written with #yii2 with proper unit tests written? I'm having trouble to properly organize my code to write good unit tests. The system I'm working is mainly CRUD-like without much data processing logic just small checks here and there (an admin basically) and I'm not sure to what extend am I not getting the practice of applying SRP (respectivery inabiity to split my code from the active record there) and to what extend is the framework confusing me. TIA!!!!

2023-10-12

Has anyone made #yii2 and #codeception unit tests work with no actual DB without mocking objects and etc? I know Laravel can fake it well and I haven't tried Symfony on this, TBH. The current solution (still decent) is it shoves all data changes in a transaction that gets cancelled at the end of a test. Still imperfect as all auto-increment values stay. We use a shared dev DB... don't ask...

2023-05-15

The only worst thing than #yii2 validation being inside the AR model, is that you can do FE validations and conditions inside the model. I see it's more compact and not so "abstracted" like Symfony, where you create a separate class for everything, but boy this is awful. But this is still better than we've seen in code bases not that long ago :)

2023-02-24

#yii2 apparently has a config to set all cache files and folders permissions by passing `fileMode` or `dirMode` in the `cache` component config. But this info is in... wait for it... the source code :) and you get there through the API docs. IDK why is this project so hard to work with. Official #documentation give almost no info aside of the basic scenario. Even it took me 25 minutes of browsing to see how to contribute to #yii3 and eventually I gave up. Sad

Yii Frameworkyii@phpc.social
2019-01-31

We are happy to announce the release of #yii 2.0.16 yiiframework.com/news/196/yii- #yii2 #php

Client Info

Server: https://mastodon.social
Version: 2025.04
Repository: https://github.com/cyevgeniy/lmst