Cut over-engineering found by a repo-wide audit
- Config: auth, services, logging, queue and database only repeated the
framework's own files and are gone; the others keep only the keys that
differ (app version, cache serializable_classes, session cookie name,
Markdown mail theme, the shares disk, three Octane values, Livewire's
pagination theme and payload guards).
- Email verification is removed: User never implemented MustVerifyEmail,
so it was never enforced, and SealShare has a single admin and no
registration. CreateNewUser goes with it.
- FileEncryptionService::encryptFile() and generateSalt() were only used
by tests; tests build files with encryptTestFile() in tests/Pest.php.
- The expiration options are defined once, as Share::EXPIRATIONS. "30 Days"
now lasts 30 days instead of a calendar month, and Admin settings only
save a default expiration that is one of the options.
- One-caller helpers are inlined, the uploader reads chunk responses with
XHR's responseType, and starter-kit leftovers are removed.
- Docker: PHP reads the PHP_* limits from the environment itself
(${VAR:-default} in uploads.ini); both entrypoints stop writing the ini.
docker-compose.yml shares the app and scheduler variables through one
anchor. The dev image installs gd for the screenshot publisher and fake
test images.
- Development runs in Docker only: the composer dev script, concurrently,
laravel/pail, laravel/sail, autoprefixer and the shell-quote override
are gone.
- phpunit.xml forces the test environment with <server> entries, so tests
run in the dev container no longer use its real database.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
a62edbcefb
commit
4530298398
+6
-5
@@ -48,6 +48,9 @@ RUN install-php-extensions \
|
||||
pcntl \
|
||||
zip
|
||||
|
||||
# PHP limits, read from PHP_* environment variables by PHP itself
|
||||
COPY docker/php/uploads.ini /usr/local/etc/php/conf.d/99-uploads.ini
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# ============================================
|
||||
@@ -56,8 +59,9 @@ WORKDIR /app
|
||||
# Holds only the tools: the checkout is mounted at /app, and its entrypoint runs from there.
|
||||
FROM base AS dev
|
||||
|
||||
# For the dev packages: Pest's browser plugin needs sockets
|
||||
RUN install-php-extensions sockets
|
||||
# For the dev packages: Pest's browser plugin needs sockets; the screenshot publisher and fake test
|
||||
# images need gd (the app itself never processes images, so production goes without)
|
||||
RUN install-php-extensions sockets gd
|
||||
|
||||
# Node.js for the Vite dev server
|
||||
RUN apk add --no-cache nodejs npm
|
||||
@@ -93,9 +97,6 @@ ENV APP_NAME="SealShare" \
|
||||
BCRYPT_ROUNDS="12" \
|
||||
OCTANE_SERVER="frankenphp"
|
||||
|
||||
# Copy PHP ini for upload limits
|
||||
COPY docker/php/uploads.ini /usr/local/etc/php/conf.d/99-uploads.ini
|
||||
|
||||
# Copy application code
|
||||
COPY . .
|
||||
|
||||
|
||||
Reference in New Issue
Block a user