Skip to content

Commit feefa7e

Browse files
Merge pull request #560 from liberusoftware/copilot/fix-mysql-install-tests
Fix Docker build failure and TranslationServiceTest cache bleed
2 parents 6eccf87 + eaec781 commit feefa7e

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,13 +126,13 @@ COPY --chown=${USER}:${USER} --from=composer-deps /app/vendor ./vendor
126126
# Copy composer files (needed for autoloader generation)
127127
COPY --chown=${USER}:${USER} composer.json composer.lock ./
128128

129-
# Generate optimized autoloader with vendor already in place
129+
# Copy application code first so autoloader can resolve all files
130+
COPY --chown=${USER}:${USER} . .
131+
132+
# Generate optimized autoloader now that all app files are present
130133
RUN composer dump-autoload --classmap-authoritative --no-dev && \
131134
composer clear-cache
132135

133-
# Copy application code
134-
COPY --chown=${USER}:${USER} . .
135-
136136
# Create necessary Laravel directories
137137
RUN mkdir -p \
138138
storage/framework/sessions \

tests/Unit/TranslationServiceTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@
5656
});
5757

5858
test('translation service handles API failures gracefully', function () {
59+
Cache::flush();
60+
5961
$service = new TranslationService();
6062

6163
Http::fake([

0 commit comments

Comments
 (0)