Skip to content

Commit

Permalink
Upgrade Symfony version
Browse files Browse the repository at this point in the history
  • Loading branch information
m-adamski committed Feb 2, 2024
1 parent 453fdba commit 1933665
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .php-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
8.1
8.2
18 changes: 9 additions & 9 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,18 @@
}
],
"require": {
"php": ">=8.1",
"php": ">=8.2",
"ext-json": "*",
"ext-mbstring": "*",
"giggsey/libphonenumber-for-php": "^8.12",
"symfony/form": "^6.0",
"symfony/framework-bundle": "^6.0",
"symfony/intl": "^6.0",
"symfony/twig-bundle": "^6.0",
"symfony/validator": "^6.0"
"giggsey/libphonenumber-for-php": "^8.13",
"symfony/form": "^7.0",
"symfony/framework-bundle": "^7.0",
"symfony/intl": "^7.0",
"symfony/twig-bundle": "^7.0",
"symfony/validator": "^7.0"
},
"require-dev": {
"kint-php/kint": "^4.0"
"kint-php/kint": "^5.0"
},
"config": {
"sort-packages": true
Expand All @@ -38,7 +38,7 @@
},
"extra": {
"branch-alias": {
"dev-master": "3.0.x-dev"
"dev-master": "4.0.x-dev"
}
}
}
4 changes: 2 additions & 2 deletions src/Form/PhoneNumberType.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public function __construct() {
/**
* {@inheritDoc}
*/
public function buildForm(FormBuilderInterface $builder, array $options) {
public function buildForm(FormBuilderInterface $builder, array $options): void {
$builder
->add("country", ChoiceType::class, [
"label" => false,
Expand All @@ -41,7 +41,7 @@ public function buildForm(FormBuilderInterface $builder, array $options) {
/**
* {@inheritDoc}
*/
public function configureOptions(OptionsResolver $resolver) {
public function configureOptions(OptionsResolver $resolver): void {
$resolver->setDefaults([
"countries" => [],
"countries_renderer" => null,
Expand Down
6 changes: 1 addition & 5 deletions src/Validator/PhoneNumber.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,7 @@

use Symfony\Component\Validator\Constraint;

/**
* @Annotation
* @Target({"PROPERTY", "METHOD", "ANNOTATION"})
*/
#[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)]
#[\Attribute]
class PhoneNumber extends Constraint {
public string $message = "Phone number is not valid";
}
2 changes: 1 addition & 1 deletion src/Validator/PhoneNumberValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
use Symfony\Component\Validator\ConstraintValidator;

class PhoneNumberValidator extends ConstraintValidator {
public function validate($value, Constraint $constraint) {
public function validate($value, Constraint $constraint): void {
$phoneNumberUtil = PhoneNumberUtil::getInstance();

if (null === $value || "" === $value) {
Expand Down

0 comments on commit 1933665

Please sign in to comment.