Last time I had a task to optimize a cache deletion in a legacy code which seemed weird and it begged for refactoring. So I started it and ran into some unexpected behaviour in the PHP Memcache library methods. Before I go forward here is the original method: What does the original method do? First… Continue reading Definition of Success
Mock global functions with PHPUnit
I have worked on many different PHP-based projects and sometimes I need to modify old and not clean codes. There I have faced untested codes. However, not just there could need to mock global functions. Sometimes we need that for PHP built-in functions also. The code For example, you have a similar class:src/DateGetter.php As you… Continue reading Mock global functions with PHPUnit
Revive old PHP docker image apt packages
How can you revive jessie or stretch package manager in official PHP docker images which show a similar message:
Err http://security.debian.org jessie/updates/main amd64 Packages
404 Not Found
How NOT to use a secure password?!
I would like to start with a little historical perspective to explain why I changed or wanted to change my passwords on more than 50 websites. As of March 16, 2021, LastPass has changed how to use its free plan. TL;DR It will not be possible to keep passwords synchronized between PC and mobile devices… Continue reading How NOT to use a secure password?!