Skip to content

Commit

Permalink
Merge pull request #1870 from Catrobat/release/v3.12.1
Browse files Browse the repository at this point in the history
Release v3.12.1 into master
  • Loading branch information
dmetzner authored Jul 28, 2021
2 parents c013e39 + 000ccc7 commit b85263e
Show file tree
Hide file tree
Showing 16 changed files with 158 additions and 154 deletions.
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# https://symfony.com/doc/current/best_practices/configuration.html#infrastructure-related-configuration

# Define the App Environment
APP_VERSION='3.12.0'
APP_VERSION='3.12.1'
APP_ENV=dev
APP_DEBUG=0
APP_NAME="PocketCode Share"
Expand Down
242 changes: 124 additions & 118 deletions composer.lock

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions migrations/2021/Version20210627093636.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,12 @@ public function up(Schema $schema): void
// this up() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE achievement CHANGE ltm_code title_ltm_code VARCHAR(255) NOT NULL');
$this->addSql('ALTER TABLE tags ADD internal_title VARCHAR(255) NOT NULL, ADD title_ltm_code VARCHAR(255) NOT NULL, ADD enabled TINYINT(1) DEFAULT \'1\' NOT NULL, DROP en, DROP de, DROP it, DROP fr');
$this->addSql('CREATE UNIQUE INDEX UNIQ_6FBC9426276CE3C2 ON tags (internal_title)');
}

public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE achievement CHANGE title_ltm_code ltm_code VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`');
$this->addSql('DROP INDEX UNIQ_6FBC9426276CE3C2 ON tags');
$this->addSql('ALTER TABLE tags ADD en VARCHAR(255) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, ADD de VARCHAR(255) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, ADD it VARCHAR(255) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, ADD fr VARCHAR(255) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, DROP internal_title, DROP title_ltm_code, DROP enabled');
}
}
6 changes: 3 additions & 3 deletions src/Catrobat/Listeners/ThemeRequestListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ public function __construct(ParameterBagInterface $parameter_bag, RouterInterfac
$this->parameter_bag = $parameter_bag;
$this->router = $router;
$this->app_request = $app_request;
$this->routing_theme = $parameter_bag->get('umbrellaTheme');
$this->flavor = $parameter_bag->get('defaultFlavor');
$this->routing_theme = (string) $parameter_bag->get('umbrellaTheme');
$this->flavor = (string) $parameter_bag->get('defaultFlavor');
}

public function onKernelRequest(RequestEvent $event): void
Expand All @@ -44,7 +44,7 @@ public function onKernelRequest(RequestEvent $event): void
$requested_theme = $this->app_request->getThemeDefinedInRequest();

// URI should not contain a flavor but the umbrella theme
$this->routing_theme = $this->parameter_bag->get('umbrellaTheme');
$this->routing_theme = (string) $this->parameter_bag->get('umbrellaTheme');

if ('' === $requested_theme) { // - @deprecated
// However, we still support legacy theming
Expand Down
2 changes: 1 addition & 1 deletion src/Catrobat/Services/ApkRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class ApkRepository

public function __construct(ParameterBagInterface $parameter_bag)
{
$apk_dir = $parameter_bag->get('catrobat.apk.dir');
$apk_dir = (string) $parameter_bag->get('catrobat.apk.dir');
Utils::verifyDirectoryExists($apk_dir);
$this->dir = $apk_dir;
}
Expand Down
6 changes: 3 additions & 3 deletions src/Catrobat/Services/ExtractedFileRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ public function __construct(ParameterBagInterface $parameter_bag, CatrobatFileEx
ProgramManager $program_manager, ProgramFileRepository $program_file_repo,
LoggerInterface $logger)
{
$local_extracted_path = $parameter_bag->get('catrobat.file.extract.dir');
$web_extracted_path = $parameter_bag->get('catrobat.file.extract.path');
$local_storage_path = $parameter_bag->get('catrobat.file.storage.dir');
$local_extracted_path = (string) $parameter_bag->get('catrobat.file.extract.dir');
$web_extracted_path = (string) $parameter_bag->get('catrobat.file.extract.path');
$local_storage_path = (string) $parameter_bag->get('catrobat.file.storage.dir');

Utils::verifyDirectoryExists($local_extracted_path);
Utils::verifyDirectoryExists($local_storage_path);
Expand Down
8 changes: 4 additions & 4 deletions src/Catrobat/Services/ImageRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ class ImageRepository

public function __construct(ParameterBagInterface $parameter_bag, ?UrlHelper $urlHelper = null)
{
$example_dir = $parameter_bag->get('catrobat.exampleimage.dir');
$example_path = $parameter_bag->get('catrobat.exampleimage.path');
$example_dir = (string) $parameter_bag->get('catrobat.exampleimage.dir');
$example_path = (string) $parameter_bag->get('catrobat.exampleimage.path');

$featured_dir = $parameter_bag->get('catrobat.featuredimage.dir');
$featured_path = $parameter_bag->get('catrobat.featuredimage.path');
$featured_dir = (string) $parameter_bag->get('catrobat.featuredimage.dir');
$featured_path = (string) $parameter_bag->get('catrobat.featuredimage.path');

Utils::verifyDirectoryExists($example_dir);
Utils::verifyDirectoryExists($featured_dir);
Expand Down
8 changes: 4 additions & 4 deletions src/Catrobat/Services/MediaPackageFileRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ public function __construct(ParameterBagInterface $parameter_bag, ManagerRegistr

$this->parameter_bag = $parameter_bag;

/** @var string $dir Directory where media package files are stored */
$dir = $parameter_bag->get('catrobat.mediapackage.dir');
/** Directory where media package files are stored */
$dir = (string) $parameter_bag->get('catrobat.mediapackage.dir');

/** @var string $path Path where files in $dir can be accessed via web */
$path = $parameter_bag->get('catrobat.mediapackage.path');
/** Path where files in $dir can be accessed via web */
$path = (string) $parameter_bag->get('catrobat.mediapackage.path');
$thumb_dir = $dir.'thumbs/';
if (!is_dir($thumb_dir)) {
mkdir($thumb_dir);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ public function __construct(ProgramManager $project_manager, UserManager $user_m
$this->project_file_repository = $project_file_repository;
$this->apk_repository = $apk_repository;
$this->user_data_fixtures = $user_data_fixtures;
$this->FIXTURE_DIR = $parameter_bag->get('catrobat.test.directory.source');
$this->GENERATED_FIXTURE_DIR = $parameter_bag->get('catrobat.test.directory.target');
$this->EXTRACT_DIR = $parameter_bag->get('catrobat.file.extract.dir');
$this->FIXTURE_DIR = (string) $parameter_bag->get('catrobat.test.directory.source');
$this->GENERATED_FIXTURE_DIR = (string) $parameter_bag->get('catrobat.test.directory.target');
$this->EXTRACT_DIR = (string) $parameter_bag->get('catrobat.file.extract.dir');
Utils::verifyDirectoryExists($this->FIXTURE_DIR);
Utils::verifyDirectoryExists($this->EXTRACT_DIR);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Commands/CSVUserSimilaritiesCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function __construct(ProgramRemixRepository $program_remix_repository,
$this->program_like_repository = $program_like_repository;
$this->entity_manager = $entity_manager;
$this->user_manager = $user_manager;
$this->app_root_dir = $parameter_bag->get('kernel.project_dir');
$this->app_root_dir = (string) $parameter_bag->get('kernel.project_dir');
}

protected function configure(): void
Expand Down
4 changes: 2 additions & 2 deletions src/Commands/GenerateTestDataCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ public function __construct(Filesystem $filesystem, CatrobatFileExtractor $extra
{
parent::__construct();
$this->filesystem = $filesystem;
$this->source = $parameter_bag->get('catrobat.test.directory.source');
$this->target_directory = realpath($parameter_bag->get('catrobat.test.directory.target')).'/';
$this->source = (string) $parameter_bag->get('catrobat.test.directory.source');
$this->target_directory = realpath((string) $parameter_bag->get('catrobat.test.directory.target')).'/';
$this->extractor = $extractor;
$this->compressor = $compressor;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Commands/Maintenance/CleanApkCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
$this->output = $output;

$this->output->writeln('Deleting APKs');
$apk_dir = $this->parameter_bag->get('catrobat.apk.dir');
$apk_dir = (string) $this->parameter_bag->get('catrobat.apk.dir');
CommandHelper::emptyDirectory($apk_dir, 'Emptying apk directory', $output);

$query = $this->entity_manager
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function __construct(ProgramManager $program_manager,
$this->extracted_file_repository = $extracted_file_repository;
$this->program_manager = $program_manager;
$this->entity_manager = $entity_manager;
$this->compressed_path = $parameter_bag->get('catrobat.file.storage.dir');
$this->compressed_path = (string) $parameter_bag->get('catrobat.file.storage.dir');
if (!$this->compressed_path) {
throw new Exception('Invalid extract path given');
}
Expand Down
2 changes: 1 addition & 1 deletion src/Commands/MigrateRemixGraphsCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public function __construct(Filesystem $filesystem, UserManager $user_manager,
$this->program_manager = $program_manager;
$this->remix_manager = $remix_manager;
$this->entity_manager = $entity_manager;
$this->app_root_dir = $parameter_bag->get('kernel.project_dir');
$this->app_root_dir = (string) $parameter_bag->get('kernel.project_dir');
$this->output = null;
$this->migration_file_lock = null;
$this->file_extractor = $file_extractor;
Expand Down
16 changes: 8 additions & 8 deletions src/Commands/Reset/PurgeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,35 +47,35 @@ protected function execute(InputInterface $input, OutputInterface $output): int
$progress->start();

$progress->setMessage('Deleting Screenshots');
CommandHelper::emptyDirectory($this->parameter_bag->get('catrobat.screenshot.dir'));
CommandHelper::emptyDirectory((string) $this->parameter_bag->get('catrobat.screenshot.dir'));
$progress->advance();

$progress->setMessage('Deleting Thumbnails');
CommandHelper::emptyDirectory($this->parameter_bag->get('catrobat.thumbnail.dir'));
CommandHelper::emptyDirectory((string) $this->parameter_bag->get('catrobat.thumbnail.dir'));
$progress->advance();

$progress->setMessage('Deleting Catrobat Files');
CommandHelper::emptyDirectory($this->parameter_bag->get('catrobat.file.storage.dir'));
CommandHelper::emptyDirectory((string) $this->parameter_bag->get('catrobat.file.storage.dir'));
$progress->advance();

$progress->setMessage('Deleting Extracted Catrobat Files');
CommandHelper::emptyDirectory($this->parameter_bag->get('catrobat.file.extract.dir'));
CommandHelper::emptyDirectory((string) $this->parameter_bag->get('catrobat.file.extract.dir'));
$progress->advance();

$progress->setMessage('Deleting Featured Images');
CommandHelper::emptyDirectory($this->parameter_bag->get('catrobat.featuredimage.dir'));
CommandHelper::emptyDirectory((string) $this->parameter_bag->get('catrobat.featuredimage.dir'));
$progress->advance();

$progress->setMessage('Deleting APKs');
CommandHelper::emptyDirectory($this->parameter_bag->get('catrobat.apk.dir'));
CommandHelper::emptyDirectory((string) $this->parameter_bag->get('catrobat.apk.dir'));
$progress->advance();

$progress->setMessage('Deleting Media Packages');
CommandHelper::emptyDirectory($this->parameter_bag->get('catrobat.mediapackage.dir'));
CommandHelper::emptyDirectory((string) $this->parameter_bag->get('catrobat.mediapackage.dir'));
$progress->advance();

$progress->setMessage('Deleting Templates');
CommandHelper::emptyDirectory($this->parameter_bag->get('catrobat.template.dir'));
CommandHelper::emptyDirectory((string) $this->parameter_bag->get('catrobat.template.dir'));
$progress->advance();

$progress->setMessage('Dropping Database');
Expand Down
2 changes: 1 addition & 1 deletion src/Entity/Tag.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class Tag
protected Collection $programs;

/**
* @ORM\Column(name="internal_title", type="string", nullable=false, unique=true)
* @ORM\Column(name="internal_title", type="string", nullable=false)
*/
protected string $internal_title = '';

Expand Down

0 comments on commit b85263e

Please sign in to comment.