mirror of
https://github.com/symfony/ux-dropzone.git
synced 2026-03-23 23:52:08 +01:00
Add support for Symfony 8
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
# CHANGELOG
|
||||
|
||||
## 2.29.0
|
||||
|
||||
- Add Symfony 8 support
|
||||
|
||||
## 2.20
|
||||
|
||||
- Enable file replacement via "drag-and-drop"
|
||||
|
||||
@@ -29,17 +29,17 @@
|
||||
},
|
||||
"require": {
|
||||
"php": ">=8.1",
|
||||
"symfony/config": "^5.4|^6.0|^7.0",
|
||||
"symfony/dependency-injection": "^5.4|^6.0|^7.0",
|
||||
"symfony/form": "^5.4|^6.0|^7.0",
|
||||
"symfony/http-kernel": "^5.4|^6.0|^7.0",
|
||||
"symfony/options-resolver": "^5.4|^6.0|^7.0"
|
||||
"symfony/config": "^5.4|^6.0|^7.0|^8.0",
|
||||
"symfony/dependency-injection": "^5.4|^6.0|^7.0|^8.0",
|
||||
"symfony/form": "^5.4|^6.0|^7.0|^8.0",
|
||||
"symfony/http-kernel": "^5.4|^6.0|^7.0|^8.0",
|
||||
"symfony/options-resolver": "^5.4|^6.0|^7.0|^8.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"symfony/framework-bundle": "^5.4|^6.0|^7.0",
|
||||
"symfony/phpunit-bridge": "^5.4|^6.0|^7.0",
|
||||
"symfony/twig-bundle": "^5.4|^6.0|^7.0",
|
||||
"symfony/var-dumper": "^5.4|^6.0|^7.0",
|
||||
"symfony/framework-bundle": "^5.4|^6.0|^7.0|^8.0",
|
||||
"symfony/phpunit-bridge": "^5.4|^6.0|^7.0|^8.0",
|
||||
"symfony/twig-bundle": "^5.4|^6.0|^7.0|^8.0",
|
||||
"symfony/var-dumper": "^5.4|^6.0|^7.0|^8.0",
|
||||
"twig/twig": "^2.14.7|^3.0.4"
|
||||
},
|
||||
"extra": {
|
||||
|
||||
@@ -43,7 +43,7 @@ replacement of the native FileType class::
|
||||
|
||||
class CommentFormType extends AbstractType
|
||||
{
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
public function buildForm(FormBuilderInterface $builder, array $options): void
|
||||
{
|
||||
$builder
|
||||
// ...
|
||||
@@ -136,7 +136,7 @@ Then in your form, add your controller as an HTML attribute::
|
||||
|
||||
class CommentFormType extends AbstractType
|
||||
{
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
public function buildForm(FormBuilderInterface $builder, array $options): void
|
||||
{
|
||||
$builder
|
||||
// ...
|
||||
|
||||
@@ -45,7 +45,7 @@ class DropzoneExtension extends Extension implements PrependExtensionInterface
|
||||
}
|
||||
}
|
||||
|
||||
public function load(array $configs, ContainerBuilder $container)
|
||||
public function load(array $configs, ContainerBuilder $container): void
|
||||
{
|
||||
$container
|
||||
->setDefinition('form.dropzone', new Definition(DropzoneType::class))
|
||||
|
||||
@@ -22,7 +22,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
*/
|
||||
class DropzoneType extends AbstractType
|
||||
{
|
||||
public function configureOptions(OptionsResolver $resolver)
|
||||
public function configureOptions(OptionsResolver $resolver): void
|
||||
{
|
||||
$resolver->setDefaults([
|
||||
'attr' => [
|
||||
@@ -31,12 +31,12 @@ class DropzoneType extends AbstractType
|
||||
]);
|
||||
}
|
||||
|
||||
public function getParent()
|
||||
public function getParent(): string
|
||||
{
|
||||
return FileType::class;
|
||||
}
|
||||
|
||||
public function getBlockPrefix()
|
||||
public function getBlockPrefix(): string
|
||||
{
|
||||
return 'dropzone';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user