Last major update: 25.08.2020
- Что такое авторизация/аутентификация
- Где хранить токены
- Как ставить куки ?
- Процесс логина
- Процесс рефреш токенов
- Кража токенов/Механизм контроля токенов
A commit should be a wrapper for related changes. For example, fixing two different bugs should produce two separate commits. Small commits make it easier for other developers to understand the changes and roll them back if something went wrong. With tools like the staging area and the ability to stage only parts of a file, Git makes it easy to create very granular commits.
Committing often keeps your commits small and, again, helps you commit only related changes. Moreover, it allows you to share your code more frequently with others. That way it‘s easier for everyone to integrate changes regularly and avoid having merge conflicts. Having large commits and sharing them infrequently, in contrast, makes it hard to solve conflicts.
TLDR: The cascade={"remove"}
is like a "software" onDelete="CASCADE"
, and will remove objects from the database only when an explicit call to $em->remove()
occurs. Thus, it could result in more than one object being deleted. orphanRemoval
can remove objects from the database even if there was no explicit call to ->remove()
.
I answered this question a few times to different people so I will try to sum things up in this Gist.
Let's take two entities A
and B
as an example. I will use a OneToOne relationship in this example but it works exactly the same with OneToMany relationships.
class A
#!/usr/bin/env sh | |
# Example: ./download_minio.sh example.url.com username password bucket-name minio/path/to/file.txt.zst /download/path/to/file.txt.zst | |
if [ -z $1 ]; then | |
echo "You have NOT specified a MINIO URL!" | |
exit 1 | |
fi | |
if [ -z $2 ]; then |
sudo apt install php7.2-xdebug | |
sudo find / -name 'xdebug.so' | |
sudo gedit /etc/php/7.2/fpm/php.ini | |
sudo gedit /etc/php/7.2/cli/php.ini | |
sudo gedit /etc/php/7.2/cli/conf.d/20-xdebug.ini | |
[Xdebug] | |
; путь к файлу so, который мы временно сохаринили на шаге раньше | |
zend_extension=/usr/lib/php/20170718/xdebug.so | |
; остальные обязательные параметры | |
xdebug.profiler_enable_trigger=1 |
This is proof-of-concept implementation of laravel's like form requests.
Most of Symfony developers uses forms to map request data to some Data Transfer Object. This object then passes to validator and system start to work with validated data converted to be compatible with application model.