Skip to content
This repository has been archived by the owner on Dec 5, 2024. It is now read-only.

Commit

Permalink
feat(bookmark): import (#412)
Browse files Browse the repository at this point in the history
  • Loading branch information
koromerzhin authored Oct 19, 2021
1 parent bfdf05a commit bc2e992
Show file tree
Hide file tree
Showing 235 changed files with 5,458 additions and 2,838 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ PHP_EXEC := ${DOCKER_EXECPHP} php -d memory_limit=-1
SYMFONY_EXEC := ${DOCKER_EXECPHP} symfony console
COMPOSER_EXEC := ${DOCKER_EXECPHP} symfony composer

COMMANDS_SUPPORTED_COMMANDS := libraries workflow-png tests messenger linter install git env encore composer bdd setbdd
COMMANDS_SUPPORTED_COMMANDS := libraries workflow-png tests messenger linter install git env encore composer bdd setbdd geocode
COMMANDS_SUPPORTS_MAKE_ARGS := $(findstring $(firstword $(MAKECMDGOALS)), $(COMMANDS_SUPPORTED_COMMANDS))
ifneq "$(COMMANDS_SUPPORTS_MAKE_ARGS)" ""
COMMANDS_ARGS := $(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS))
Expand Down Expand Up @@ -146,7 +146,7 @@ endif

.PHONY: geocode
geocode: isdocker ### Geocode
$(SYMFONY_EXEC) $(COMMANDS_ARGS)
$(SYMFONY_EXEC) labstag:geocode:install $(COMMANDS_ARGS)

.PHONY: install
install: apps/.env ### installation
Expand Down
1 change: 1 addition & 0 deletions apps/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
"symfony/process": "5.3.7",
"symfony/property-access": "5.3.8",
"symfony/property-info": "5.3.8",
"symfony/proxy-manager-bridge": "5.3.*",
"symfony/rate-limiter": "5.3.4",
"symfony/runtime": "5.3.4",
"symfony/security-bundle": "5.3.8",
Expand Down
70 changes: 69 additions & 1 deletion apps/composer.lock

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

46 changes: 27 additions & 19 deletions apps/config/packages/messenger.yaml
Original file line number Diff line number Diff line change
@@ -1,22 +1,30 @@
framework:
messenger:
# Uncomment this (and the failed transport below) to send failed messages to this transport for later handling.
# failure_transport: failed
messenger:
buses:
command_bus:
middleware:
# each time a message is handled, the Doctrine connection
# is "pinged" and reconnected if it's closed. Useful
# if your workers run for a long time and the database
# connection is sometimes lost
- doctrine_ping_connection
# Uncomment this (and the failed transport below) to send failed messages to this transport for later handling.
# failure_transport: failed

transports:
# https://symfony.com/doc/current/messenger.html#transport-configuration
async:
dsn: "%env(MESSENGER_TRANSPORT_DSN)%"
retry_strategy:
max_retries: 0
delay: 5000
failed: doctrine://default
sync: "sync://"
# async: '%env(MESSENGER_TRANSPORT_DSN)%'
# failed: 'doctrine://default?queue_name=failed'
# sync: 'sync://'
transports:
# https://symfony.com/doc/current/messenger.html#transport-configuration
async:
dsn: "%env(MESSENGER_TRANSPORT_DSN)%"
retry_strategy:
max_retries: 0
delay: 5000
failed: doctrine://default
sync: "sync://"
# async: '%env(MESSENGER_TRANSPORT_DSN)%'
# failed: 'doctrine://default?queue_name=failed'
# sync: 'sync://'

routing:
# Route your messages to the transports
Labstag\Queue\Message\ServiceMethodMessage: async
# 'App\Message\YourMessage': async
routing:
# Route your messages to the transports
Labstag\Queue\Message\ServiceMethodMessage: async
# 'App\Message\YourMessage': async
35 changes: 35 additions & 0 deletions apps/migrations/2021/10/Version20211007141816.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?php

declare(strict_types=1);

namespace DoctrineMigrations;

use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;

/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20211007141816 extends AbstractMigration
{
public function getDescription(): string
{
return '';
}

public function up(Schema $schema): void
{
// this up() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE bookmark ADD icon LONGTEXT DEFAULT NULL, CHANGE content content LONGTEXT DEFAULT NULL, CHANGE meta_description meta_description LONGTEXT DEFAULT NULL, CHANGE meta_keywords meta_keywords LONGTEXT DEFAULT NULL');
$this->addSql('ALTER TABLE edito CHANGE meta_description meta_description VARCHAR(255) DEFAULT NULL, CHANGE meta_keywords meta_keywords VARCHAR(255) DEFAULT NULL');
$this->addSql('ALTER TABLE post CHANGE meta_description meta_description VARCHAR(255) DEFAULT NULL, CHANGE meta_keywords meta_keywords VARCHAR(255) DEFAULT NULL');
}

public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE bookmark DROP icon, CHANGE content content LONGTEXT CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE meta_description meta_description VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE meta_keywords meta_keywords VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`');
$this->addSql('ALTER TABLE edito CHANGE meta_description meta_description VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE meta_keywords meta_keywords VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`');
$this->addSql('ALTER TABLE post CHANGE meta_description meta_description VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE meta_keywords meta_keywords VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`');
}
}
31 changes: 14 additions & 17 deletions apps/src/Controller/Admin/AttachmentController.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,26 +22,23 @@ public function indexOrTrash(AttachmentRepository $repository): Response
{
return $this->listOrTrash(
$repository,
[
'trash' => 'findTrashForAdmin',
'all' => 'findAllForAdmin',
],
'admin/attachment/index.html.twig',
[
'empty' => 'api_action_empty',
'trash' => 'admin_attachment_trash',
'list' => 'admin_attachment_index',
],
[
'list' => 'admin_attachment_index',
'delete' => 'api_action_delete',
'destroy' => 'api_action_destroy',
'restore' => 'api_action_restore',
'workflow' => 'api_action_workflow',
]
'admin/attachment/index.html.twig'
);
}

protected function getUrlAdmin(): array
{
return [
'delete' => 'api_action_delete',
'destroy' => 'api_action_destroy',
'empty' => 'api_action_empty',
'list' => 'admin_attachment_index',
'restore' => 'api_action_restore',
'trash' => 'admin_attachment_trash',
'workflow' => 'api_action_workflow',
];
}

protected function setBreadcrumbsPageAdminAttachment(): array
{
return [
Expand Down
Loading

0 comments on commit bc2e992

Please sign in to comment.