Skip to content

Commit 361d987

Browse files
authored
Merge pull request #1970 from shlinkio/develop
Release 3.7.3
2 parents 26c2aaf + 6017db2 commit 361d987

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+41
-17
lines changed

CHANGELOG.md

Lines changed: 18 additions & 0 deletions

CONTRIBUTING.md

Lines changed: 6 additions & 4 deletions

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
"phpunit/phpunit": "^10.4",
7676
"roave/security-advisories": "dev-master",
7777
"shlinkio/php-coding-standard": "~2.3.0",
78-
"shlinkio/shlink-test-utils": "^3.8",
78+
"shlinkio/shlink-test-utils": "^3.8.1",
7979
"symfony/var-dumper": "^6.3",
8080
"veewee/composer-run-parallel": "^1.3"
8181
},
@@ -116,7 +116,7 @@
116116
],
117117
"cs": "phpcs -s",
118118
"cs:fix": "phpcbf",
119-
"stan": "APP_ENV=test php vendor/bin/phpstan analyse module/*/src module/*/test* module/*/config config docker/config data/migrations --level=8",
119+
"stan": "APP_ENV=test php vendor/bin/phpstan analyse module/*/src module/*/test* module/*/config module/*/migrations config docker/config --level=8",
120120
"test": [
121121
"@parallel test:unit test:db",
122122
"@parallel test:api test:cli"

config/autoload/router.global.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@
1111
'base_path' => EnvVars::BASE_PATH->loadFromEnv(''),
1212

1313
'fastroute' => [
14-
FastRouteRouter::CONFIG_CACHE_ENABLED => true,
14+
// Disabling config cache for cli, ensures it's never used for openswoole/RoadRunner, and also that console
15+
// commands don't generate a cache file that's then used by php-fpm web executions
16+
FastRouteRouter::CONFIG_CACHE_ENABLED => PHP_SAPI !== 'cli',
1517
FastRouteRouter::CONFIG_CACHE_FILE => 'data/cache/fastroute_cached_routes.php',
1618
],
1719
],

config/cli-config.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
return (static function () {
1212
$migrationsConfig = [
1313
'migrations_paths' => [
14-
'ShlinkMigrations' => 'data/migrations',
14+
'ShlinkMigrations' => 'module/Core/migrations',
1515
],
1616
'table_storage' => [
1717
'table_name' => 'migrations',

config/test/bootstrap_api_tests.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@
2929
});
3030

3131
$testHelper->createTestDb(
32-
['bin/cli', 'db:create'],
33-
['bin/cli', 'db:migrate'],
34-
['bin/doctrine', 'orm:schema-tool:drop'],
35-
['bin/doctrine', 'dbal:run-sql'],
32+
createDbCommand: ['bin/cli', 'db:create'],
33+
migrateDbCommand: ['bin/cli', 'db:migrate'],
34+
dropSchemaCommand: ['bin/doctrine', 'orm:schema-tool:drop'],
35+
runSqlCommand: ['bin/doctrine', 'dbal:run-sql'],
3636
);
3737
ApiTest\ApiTestCase::setApiClient($httpClient);
3838
ApiTest\ApiTestCase::setSeedFixturesCallback(fn () => $testHelper->seedFixtures($em, $config['data_fixtures'] ?? []));

config/test/bootstrap_db_tests.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
/** @var ContainerInterface $container */
1010
$container = require __DIR__ . '/../container.php';
1111
$container->get(Helper\TestHelper::class)->createTestDb(
12-
['bin/cli', 'db:create'],
13-
['bin/cli', 'db:migrate'],
14-
['bin/doctrine', 'orm:schema-tool:drop'],
15-
['bin/doctrine', 'dbal:run-sql'],
12+
createDbCommand: ['bin/cli', 'db:create'],
13+
migrateDbCommand: ['bin/cli', 'db:migrate'],
14+
dropSchemaCommand: ['bin/doctrine', 'orm:schema-tool:drop'],
15+
runSqlCommand: ['bin/doctrine', 'dbal:run-sql'],
1616
);
1717
DbTest\DatabaseTestCase::setEntityManager($container->get('em'));

docker/docker-entrypoint.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ set -e
33

44
cd /etc/shlink
55

6+
# Create data directories if they do not exist. This allows data dir to be mounted as an empty dir if needed
7+
mkdir -p data/cache data/locks data/log data/proxies
8+
69
flags="--no-interaction --clear-db-cache"
710

811
# Skip downloading GeoLite2 db file if the license key env var was not defined or skipping was explicitly set

phpcs.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
<!-- Paths to check -->
1313
<file>bin</file>
1414
<file>module</file>
15-
<file>data/migrations</file>
1615
<file>config</file>
1716
<file>docker/config</file>
1817
<file>public/index.php</file>

0 commit comments

Comments
 (0)