laravel-validated-dto
laravel-validated-dto copied to clipboard
Exception: Serialization of 'Closure' is not allowed
If you need to serialize an DTO, or an object where an DTO is embedded, you will get a
Exception: Serialization of 'Closure' is not allowed
as Validation logic contains Closures, that cannot get serialized.
Proposal to fix it: https://github.com/WendellAdriel/laravel-validated-dto/pull/101
Hey @patriziotomato Thanks a lot, I'll check the PR
Any idea why I get this, while using make test ?
FAILED Tests\Unit\ValidatedDTOTest > it validates that ValidatedDTO can be instantiated with file validation rules LogicException
GD extension is not installed.
Hey @patriziotomato That's weird, I didn't face this before. But you can try adding this to the Dockerfile, although I'm not 100% sure this is still the correct way of installing the extension on the PHP Alpine image 😅
# Install system dependencies
RUN apk add --no-cache --update \
curl \
openssl \
libpng-dev \
libjpeg-turbo-dev \
freetype-dev \
libzip-dev \
unzip
# Install the GD extension
RUN docker-php-ext-configure gd --with-freetype --with-jpeg && docker-php-ext-install gd
If it doesn't work, let me know
This fix was released on v4.2.1