Skip to content

Commit b04b205

Browse files
committed
Upgrade symfony 3.4
1 parent b46bc70 commit b04b205

2 files changed

Lines changed: 19 additions & 19 deletions

File tree

README.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ How to run tests?
3636
-----------------
3737

3838
```
39-
39+
4040
php bin/phpunit
4141
4242
```
@@ -50,25 +50,25 @@ Smart codes have to be bound to a payload this can be done by implementing the P
5050
```
5151
use Intracto\SmartCodeBundle\Entity\PayloadInterface;
5252
use Intracto\SmartCodeBundle\Entity\SmartCodeInterface;
53-
53+
5454
class Payload implements PayloadInterface
5555
{
5656
5757
...
58-
58+
5959
/**
6060
* @ORM\OneToMany(targetEntity="Intracto\SmartCodeBundle\Entity\SmartCodeInterface", mappedBy="payload")
6161
*
6262
* @var SmartCodes[]|ArrayCollection
6363
*/
6464
protected $smartCodes;
65-
65+
6666
...
6767
}
6868
```
6969

7070
Now you can get started with the generation. To generate Smart codes you can use the SmartCodeGenerator
71-
or create your own by implementing the SmartCodeGeneratorInterface.
71+
or create your own by implementing the SmartCodeGeneratorInterface.
7272

7373
This service will allow you to call the function:
7474

@@ -77,7 +77,7 @@ This service will allow you to call the function:
7777
```
7878

7979
As you can see this has 2 parameters, the first is your payload that you created in step 1 and the 2nd is a model
80-
containing all your options.
80+
containing all your options.
8181

8282
```
8383
class SmartCodeOptions
@@ -87,7 +87,7 @@ containing all your options.
8787
protected $expiresAt;
8888
protected $startsAt;
8989
protected $batch;
90-
90+
9191
...
9292
}
9393
```
@@ -100,16 +100,16 @@ containing all your options.
100100

101101
The last thing you would probably want to do is to be able to use these smart codes you just generated.
102102
This is possible via the SmartCodeAction service, which you can also overwrite by implementing the SmartCodeActionInterface.
103-
103+
104104
This class has 2 required functions:
105105

106106
```
107107
public function register(SubjectInterface $subject, SmartCodeInterface $smartCode);
108-
108+
109109
public function unregister(SubjectInterface $subject, SmartCodeInterface $smartCode);
110110
```
111111

112-
To register or unregister a certain smart code you would need a subject that is going to be using this code.
112+
To register or unregister a certain smart code you would need a subject that is going to be using this code.
113113
To make such a subject you can implement the SubjectInterface.
114114

115115
```
@@ -118,9 +118,9 @@ To make such a subject you can implement the SubjectInterface.
118118
119119
class User implements SubjectInterface
120120
{
121-
121+
122122
...
123-
123+
124124
/**
125125
* @ORM\ManyToMany(targetEntity="Intracto\SmartCodeBundle\Entity\SmartCodeInterface", inversedBy="subjects")
126126
* @ORM\JoinTable(name="user_smartcode",
@@ -131,9 +131,9 @@ To make such a subject you can implement the SubjectInterface.
131131
* @var SmartCode[]|ArrayCollection
132132
*/
133133
protected $smartCodes;
134-
134+
135135
...
136-
136+
137137
}
138138
139139
```

composer.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@
1313
],
1414

1515
"require": {
16-
"php": ">=5.3.9",
17-
"doctrine/orm": "~2.2",
18-
"symfony/framework-bundle": "~2.3",
19-
"symfony/validator": "~2.3"
16+
"php": ">=7.2",
17+
"doctrine/orm": "~2.4",
18+
"symfony/framework-bundle": "~3.4",
19+
"symfony/validator": "~3.4"
2020
},
2121

2222
"config": {
@@ -32,4 +32,4 @@
3232
},
3333

3434
"target-dir": "Intracto/SmartCodeBundle"
35-
}
35+
}

0 commit comments

Comments
 (0)