Skip to content
This repository was archived by the owner on Jan 6, 2026. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 6 additions & 10 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
- name: 'Setup PHP'
uses: shivammathur/setup-php@v2
with:
php-version: 8.1
php-version: 8.2
ini-values: memory_limit=-1
coverage: none
tools: composer:v2
Expand All @@ -66,7 +66,7 @@ jobs:
- name: 'Setup PHP'
uses: shivammathur/setup-php@v2
with:
php-version: 8.1
php-version: 8.2
ini-values: memory_limit=-1
coverage: none
tools: composer:v2
Expand All @@ -86,17 +86,13 @@ jobs:
fail-fast: false
matrix:
php-version:
- '7.3'
- '7.4'
- '8.0'
- '8.1'
- '8.2'
symfony-version:
- '5.0'
- '5.1'
- '5.2'
- '5.3'
- '5.4'
- '6.0'
- '6.1'
- '6.2'
steps:
- name: 'Checkout Code'
uses: actions/checkout@v2
Expand Down Expand Up @@ -131,7 +127,7 @@ jobs:
- name: 'Setup PHP'
uses: shivammathur/setup-php@v2
with:
php-version: 8.1
php-version: 8.2
ini-values: memory_limit=-1
coverage: pcov
tools: composer:v2
Expand Down
5 changes: 3 additions & 2 deletions EventListener/JmsSerializerSubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
use Fresh\VichUploaderSerializationBundle\Annotation\VichSerializableClass;
use Fresh\VichUploaderSerializationBundle\Annotation\VichSerializableField;
use Fresh\VichUploaderSerializationBundle\Exception\IncompatibleUploadableAndSerializableFieldAnnotationException;
use Generator;
use JMS\Serializer\EventDispatcher\Events;
use JMS\Serializer\EventDispatcher\EventSubscriberInterface;
use JMS\Serializer\EventDispatcher\ObjectEvent;
Expand Down Expand Up @@ -74,9 +75,9 @@ public function __construct(StorageInterface $storage, RequestContext $requestCo
}

/**
* @return iterable|array[]
* @return array<array<string, string>, array<string, string>>
*/
public static function getSubscribedEvents(): iterable
public static function getSubscribedEvents(): Generator
{
yield ['event' => Events::PRE_SERIALIZE, 'method' => 'onPreSerialize'];
yield ['event' => Events::POST_SERIALIZE, 'method' => 'onPostSerialize'];
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2015-2021 Artem Henvald
Copyright (c) 2015-2023 Artem Henvald

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
[JMSSerializerBundle](https://github.com/schmittjoh/JMSSerializerBundle "JMSSerializerBundle").
Allows to generate full or relative URIs to entity fields mapped with `@Vich` and `@JMS` annotations during the serialization.

[![Scrutinizer Quality Score](https://img.shields.io/scrutinizer/g/fre5h/VichUploaderSerializationBundle.svg?style=flat-square)](https://scrutinizer-ci.com/g/fre5h/VichUploaderSerializationBundle/)
[![Build Status](https://img.shields.io/github/workflow/status/fre5h/VichUploaderSerializationBundle/CI/main?style=flat-square)](https://github.com/fre5h/VichUploaderSerializationBundle/actions?query=workflow%3ACI+branch%3Amain+)
[![Scrutinizer Quality Score](https://img.shields.io/github/actions/workflow/status/fre5h/VichUploaderSerializationBundle/ci.yaml?branch=main&style=flat-square)](https://scrutinizer-ci.com/g/fre5h/VichUploaderSerializationBundle/)
[![Build Status](https://img.shields.io/github/actions/workflow/status/fre5h/VichUploaderSerializationBundle/ci.yaml?branch=main&style=flat-square)](https://github.com/fre5h/VichUploaderSerializationBundle/actions?query=workflow%3ACI+branch%3Amain+)
[![CodeCov](https://img.shields.io/codecov/c/github/fre5h/VichUploaderSerializationBundle.svg?style=flat-square)](https://codecov.io/github/fre5h/VichUploaderSerializationBundle)
[![License](https://img.shields.io/packagist/l/fresh/vich-uploader-serialization-bundle.svg?style=flat-square)](https://packagist.org/packages/fresh/vich-uploader-serialization-bundle)
[![Latest Stable Version](https://img.shields.io/packagist/v/fresh/vich-uploader-serialization-bundle.svg?style=flat-square)](https://packagist.org/packages/fresh/vich-uploader-serialization-bundle)
Expand All @@ -15,12 +15,12 @@ Allows to generate full or relative URIs to entity fields mapped with `@Vich` an

## Requirements 🧐

* PHP 7.3, 7.4, 8.0, 8.1
* Symfony 5.0, 5.1, 5.2, 5.3, 5.4, 6.0
* PHP >=8.0
* Symfony >= 6.0

## Installation 🌱

```composer req fresh/vich-uploader-serialization-bundle='~3.2'```
```composer req fresh/vich-uploader-serialization-bundle='~3.3'```

## Usage 🧑‍🎓

Expand Down
31 changes: 16 additions & 15 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,25 +22,26 @@
"issues": "https://github.com/fre5h/VichUploaderSerializationBundle/issues"
},
"require": {
"php": ">=7.3.0",
"doctrine/cache": "^1.11",
"doctrine/common": "^2.11|^3.0",
"doctrine/persistence": "^1.3|^2.0",
"jms/serializer-bundle": "^3.7",
"monolog/monolog": "^2.0",
"symfony/config": "^5.0",
"symfony/dependency-injection": "^5.0",
"symfony/property-access": "^5.0",
"symfony/routing": "^5.0",
"vich/uploader-bundle": "^1.16"
"php": ">=8.0.0",
"doctrine/cache": "^2.1",
"doctrine/common": "^3.2",
"doctrine/persistence": "2.2",
"jms/serializer-bundle": "^5.0",
"monolog/monolog": "^2.3",
"symfony/config": "^6.0",
"symfony/dependency-injection": "^6.0",
"symfony/property-access": "^6.0",
"symfony/routing": "^6.0",
"vich/uploader-bundle": "^1.18"
},
"require-dev": {
"escapestudios/symfony2-coding-standard": "^3.12",
"phpstan/phpstan": "^0.12",
"phpstan/phpstan-doctrine":"^0.12",
"phpstan/phpstan-phpunit": "^0.12",
"phpstan/phpstan": "^1.2",
"phpstan/phpstan-doctrine": "^1.0",
"phpstan/phpstan-phpunit": "^1.0",
"phpstan/phpstan-symfony": "^1.0",
"phpunit/phpunit": "^9.5",
"symfony/yaml": "^5.0"
"symfony/yaml": "^6.0"
},
"autoload": {
"psr-4": {
Expand Down
7 changes: 5 additions & 2 deletions phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@ includes:
- 'vendor/phpstan/phpstan-phpunit/extension.neon'
- 'vendor/phpstan/phpstan-phpunit/rules.neon'
- 'vendor/phpstan/phpstan-doctrine/extension.neon'
- 'vendor/phpstan/phpstan-symfony/extension.neon'
parameters:
level: 8
excludes_analyse:
level: 9
excludePaths:
- '%rootDir%/../../../Tests/*'
- '%rootDir%/../../../vendor/*'
- './vendor/*'
fileExtensions:
- 'php'
checkGenericClassInNonGenericObjectType: false