Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ XDEBUG_CONFIG=main
# Sometimes we need to use different xdebug versions, list of versions can be found here - https://pecl.php.net/package/xdebug
XDEBUG_VERSION=3.3.1
# MySQL version, recommend values: 8.2|8.1|8.0
MYSQL_VERSION=8.2
MYSQL_VERSION=5.7
# MySQL INNODB_USE_NATIVE_AIO possible values: 1|0. Set to 0 when AIO interface is not supported on OSX. https://dev.mysql.com/doc/refman/8.0/en/innodb-parameters.html#sysvar_innodb_use_native_aio
INNODB_USE_NATIVE_AIO=1
# Sometimes AWS MySQL RDS has SQL_MODE="NO_ENGINE_SUBSTITUTION" (https://github.com/awsdocs/amazon-rds-user-guide/issues/160) but MySQL default described here - https://dev.mysql.com/doc/refman/8.0/en/server-system-variables.html#sysvar_sql_mode
Expand Down
27 changes: 27 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,9 @@ endif
report-prepare:
@make exec cmd="mkdir -p reports/coverage"

test-coverage:
@php bin/phpunit --coverage-html reports/coverage

report-clean:
@make exec-by-root cmd="rm -rf reports/*"

Expand Down Expand Up @@ -381,3 +384,27 @@ composer-require-checker: ## Checks the defined dependencies against your code

composer-unused: ## Shows unused packages by scanning and comparing package namespaces against your code
@make exec-bash cmd="XDEBUG_MODE=off php ./vendor/bin/composer-unused"

dump:
@docker compose exec -T mysql mysqldump -u "root" -psecret instabot_dev | gzip > ./var/backups/instabot_dev_$(shell date +%Y_%m_%d_%H_%M_%S).gz
@echo "The database has been dumped in var/backups"

dump-test:
@docker compose exec -T mysql mysqldump -u "root" -psecret instabot_test | gzip > ./var/backups/instabot_$(shell date +%Y_%m_%d_%H_%M_%S).gz
@echo "The database has been dumped in var/backups"

restore: unset-db
@gunzip < $(FILE) | docker compose exec -T mysql mysql -u"root" -p"secret" instabot_dev
@echo "The dev database has been restored"

restore-test: unset-db-test
@gunzip < $(FILE) | docker compose exec -T mysql mysql -u"root" -p"secret" instabot
@echo "The test database has been restored"

unset-db:
@docker compose exec -T mysql mysql -u"root" -p"secret" -e "DROP DATABASE IF EXISTS instabot_dev;"
@docker compose exec -T mysql mysql -u"root" -p"secret" -e "CREATE DATABASE instabot_dev;"

unset-db-test:
@docker compose exec -T mysql mysql -u"root" -p"secret" -e "DROP DATABASE IF EXISTS instabot;"
@docker compose exec -T mysql mysql -u"root" -p"secret" -e "CREATE DATABASE instabot;"
4 changes: 4 additions & 0 deletions assets/styles/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
min-height: 90vh;
}

.grecaptcha-badge {
display: none;
}

.alert-success {
border-color: var(--fallback-su,oklch(var(--su)/0.2));
--tw-text-opacity: 1;
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"symfony/web-link": "6.4.*",
"symfony/webpack-encore-bundle": "^2.1",
"symfony/yaml": "6.4.*",
"symfonycasts/verify-email-bundle": "^1.16",
"symfonycasts/reset-password-bundle": "^1.21",
"twig/extra-bundle": "^2.12|^3.0",
"twig/twig": "^2.12|^3.0"
},
Expand Down
46 changes: 23 additions & 23 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion config/bundles.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@
Symfony\Bundle\MonologBundle\MonologBundle::class => ['all' => true],
Symfony\Bundle\MakerBundle\MakerBundle::class => ['dev' => true],
Symfony\WebpackEncoreBundle\WebpackEncoreBundle::class => ['all' => true],
SymfonyCasts\Bundle\VerifyEmail\SymfonyCastsVerifyEmailBundle::class => ['all' => true],
SymfonyCasts\Bundle\ResetPassword\SymfonyCastsResetPasswordBundle::class => ['all' => true],
];
2 changes: 2 additions & 0 deletions config/packages/reset_password.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
symfonycasts_reset_password:
request_password_repository: App\Repository\ResetPasswordRequestRepository
8 changes: 6 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,16 @@ services:
platform: linux/x86_64
container_name: ${COMPOSE_PROJECT_NAME}-mysql
restart: 'no'
command: --innodb-use-native-aio=${INNODB_USE_NATIVE_AIO:-1} --sql_mode=${SQL_MODE:-"ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION"}
# command: --innodb-use-native-aio=${INNODB_USE_NATIVE_AIO:-1} --sql_mode=${SQL_MODE:-"ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION"}
environment:
MYSQL_ROOT_USER: root
MYSQL_USER: instabot
MYSQL_ROOT_PASSWORD: secret
MYSQL_DATABASE: instabot
ports:
- "3306:3306"
volumes:
- ./var/mysql-data:/var/lib/mysql:delegated
- mysql:/var/lib/mysql:delegated
- ./docker/dev/init-db.sql:/docker-entrypoint-initdb.d/init-db.sql
networks:
- symfony
Expand All @@ -75,3 +76,6 @@ services:
networks:
symfony:
name: symfony

volumes:
mysql: {}
2 changes: 1 addition & 1 deletion docker/dev/init-db.sql
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# create dev database
CREATE DATABASE IF NOT EXISTS `instabot`;
CREATE DATABASE IF NOT EXISTS `instabot_dev`;
3 changes: 1 addition & 2 deletions docker/dev/xdebug-main.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
zend_extension=xdebug

xdebug.mode = debug
;xdebug.client_port = 10000
#xdebug.client_host = 172.17.0.1
xdebug.idekey = PHPSTORM
xdebug.start_with_request = yes
xdebug.file_link_format = phpstorm://open?%f:%l
Expand All @@ -14,3 +12,4 @@ xdebug.remote_handler=dbgp
xdebug.client_port=9003
xdebug.log="/app/var/log/xdebug.log"
xdebug.client_host=host.docker.internal
xdebug.php_ide_config="serverName=instabot"
31 changes: 0 additions & 31 deletions migrations/Version20240304180643.php

This file was deleted.

31 changes: 0 additions & 31 deletions migrations/Version20240310174436.php

This file was deleted.

31 changes: 0 additions & 31 deletions migrations/Version20240311212637.php

This file was deleted.

31 changes: 0 additions & 31 deletions migrations/Version20240311215213.php

This file was deleted.

35 changes: 0 additions & 35 deletions migrations/Version20240316151139.php

This file was deleted.

Loading