Skip to content

Commit 672251b

Browse files
Adapting fixtures.
1 parent adab177 commit 672251b

File tree

4 files changed

+33
-40
lines changed

4 files changed

+33
-40
lines changed

fixtures/members.yml

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
App\Entity\Member:
22
bwadmin:
33
Username: 'bwadmin'
4-
BirthDate: <dateTimeBetween('1970-01-01', '1970-01-01')>
4+
BirthDate: <dateTime('1970-01-01')>
55
email: <email()>
6-
LastLogin: <dateTimeBetween('1970-01-01', '1970-01-01')>
6+
LastLogin: <dateTime('now')>
77
LastSwitchToActive: null
88
Status: 'Active'
99
city: '@NewBerlin'
@@ -42,9 +42,9 @@ App\Entity\Member:
4242
registration_key: ''
4343
member_{1..5}:
4444
Username: 'member-<current()>'
45-
BirthDate: <dateTimeBetween('1970-01-01', '2006-01-01')>
45+
BirthDate: <dateTimeBetween('-80years', '-18years')>
4646
email: 'member-<current()>\@bewelcome.org'
47-
LastLogin: <dateTime()>
47+
LastLogin: <dateTimeBetween('-12years', 'now')>
4848
LastSwitchToActive: null
4949
Status: '<randomElement(["Active", "OutOfRemind"])>'
5050
city: '@NewBerlin'
@@ -83,9 +83,9 @@ App\Entity\Member:
8383
registration_key: ''
8484
member_{6..10}:
8585
Username: 'member-<current()>'
86-
BirthDate: <dateTimeBetween('1970-01-01', '2006-01-01')>
86+
BirthDate: <dateTimeBetween('-80years', '-18years')>
8787
email: 'member-<current()>\@bewelcome.org'
88-
LastLogin: <dateTimeBetween('2023-01-01', '2024-05-01')>
88+
LastLogin: <dateTimeBetween('-12years', 'now')>
8989
LastSwitchToActive: null
9090
Status: 'Active'
9191
city: '@NewJayapura'
@@ -125,9 +125,9 @@ App\Entity\Member:
125125
registration_key: ''
126126
member_banned:
127127
Username: 'member-banned'
128-
BirthDate: <dateTimeBetween('1970-01-01', '2006-01-01')>
128+
BirthDate: <dateTimeBetween('-80years', '-18years')>
129129
email: 'member-banned\@bewelcome.org'
130-
LastLogin: <dateTimeBetween('2023-01-01', '2024-05-01')>
130+
LastLogin: <dateTimeBetween('-12years', 'now')>
131131
LastSwitchToActive: null
132132
Status: 'Banned'
133133
city: '@NewJayapura'
@@ -167,9 +167,9 @@ App\Entity\Member:
167167
registration_key: ''
168168
member_suspended:
169169
Username: 'member-suspended'
170-
BirthDate: <dateTimeBetween('1970-01-01', '2006-01-01')>
170+
BirthDate: <dateTimeBetween('-80years', '-18years')>
171171
email: 'member-suspended\@bewelcome.org'
172-
LastLogin: <dateTimeBetween('2023-01-01', '2024-05-01')>
172+
LastLogin: <dateTimeBetween('-12years', 'now')>
173173
LastSwitchToActive: null
174174
Status: 'TakenOut'
175175
city: '@NewJayapura'

fixtures/rights.yml

+19-19
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
App\Entity\Right:
22
Admin:
3-
created: '2006-11-03 00:00:00'
3+
created: <datetime('2006-11-03 00:00:00')>
44
Name: 'Admin'
55
Description: >-
66
this is the admin right. It provide access to everything except the abuse managment cryptation routines
77
Level 10 is for full admin
88
Words:
9-
created: '2007-02-13 00:00:00'
9+
created: <datetime('2007-02-13 00:00:00')>
1010
Name: 'Words'
1111
Description: >-
1212
This right is for translation,
@@ -19,7 +19,7 @@ App\Entity\Right:
1919
"eng" stands for engineering which is the reference language used by programmers, its english
2020
but has to be fixed by english native people in en
2121
Group:
22-
created: '2006-11-28 00:00:00'
22+
created: <datetime('2006-11-28 00:00:00')>
2323
Name: 'Group'
2424
Description: >-
2525
'this allow for specific rights on groups
@@ -31,23 +31,23 @@ App\Entity\Right:
3131
The Scope define the groups where the members as right with a dot comma separation : like \"Sports\";\"Cookers\"
3232
Scope=\"All\" mean all group'
3333
Rights:
34-
created: '2006-12-05 00:00:00'
34+
created: <datetime('2006-12-05 00:00:00')>
3535
Name: 'Rights'
3636
Description: >-
3737
'This allow to access AdminRights (level 1 minimum needed)
3838
3939
scope allow for defining specific rights (dot comma separated like \"Accepter\";\"Checker\")
4040
All mean all rights'
4141
Checker:
42-
created: '2007-08-18 00:00:00'
42+
created: <datetime('2007-08-18 00:00:00')>
4343
Name: 'Checker'
4444
Description: >-
4545
'This right allow a volunteer to check and managed Spam
4646
4747
no yet definition for scope (may be in future language)
4848
no yet definition for level'
4949
Logs:
50-
created: '2008-01-02 00:00:00'
50+
created: <datetime('2008-01-02 00:00:00')>
5151
Name: 'Logs'
5252
Description: >-
5353
'This right allows to view logs.
@@ -57,34 +57,34 @@ App\Entity\Right:
5757
if Scope has OwnLogsRestriction, the member can only see his own logs
5858
'
5959
Comments:
60-
created: '2007-01-12 00:00:00'
60+
created: <datetime('2007-01-12 00:00:00')>
6161
Name: 'Comments'
6262
Description: >-
6363
'This right allow to manage comments. Level is 1 for active Scope can be \"AdminComment\",\"AdminAbuser\",\"DeleteComment\",\"UdpateComment\" AdminComment Scope allow to mark a comments as Checked wether it is a normal comment or a \'AdminCommentMustCheck\' comment AdminAbuser Scope allow to mark a comments as Checked wether it is a normal comment or a \'AdminAbuserMustCheck\' comment DeleteComment allows for deleting a comment UpdateComment allows for updating a comment'
6464
Faq:
65-
created: '2007-01-13 00:00:00'
65+
created: <datetime('2007-01-13 00:00:00')>
6666
Name: 'Faq'
6767
Description: >-
6868
'This right allow for editing and creating new Faq Level needed is one Scope is not used'
6969
Flags:
70-
created: '2007-02-24 00:00:00'
70+
created: <datetime('2007-02-24 00:00:00')>
7171
Name: 'Flags'
7272
Description: >-
7373
'This allow to add specific Flags on members Scope is \"All\" or the list of permitted Flags to allow (not yet available, use \"All\")'
7474
MassMail:
75-
created: '2007-07-10 00:00:00'
75+
created: <datetime('2007-07-10 00:00:00')>
7676
Name: 'MassMail'
7777
Description: >-
7878
This is the right which allow to send MassMail to several members using the adminmassmails.php page
7979
It require scope test to check the effect of a massmail (without sending it) It require scope enqueue
8080
to enqueue it and scope Send to send it for true Scope (todo) will allow specific massmails
8181
Treasurer:
82-
created: '2007-11-25 00:00:00'
82+
created: <datetime('2007-11-25 00:00:00')>
8383
Name: 'Treasurer'
8484
Description: >-
8585
'This Right is for BV treasurer, it allow to see more details on the donations page'
8686
ForumModerator:
87-
created: '2008-02-16 00:00:00'
87+
created: <datetime('2008-02-16 00:00:00')>
8888
Name: 'ForumModerator'
8989
Description: >-
9090
'This is the right needed for forum moderators
@@ -93,7 +93,7 @@ App\Entity\Right:
9393
\"SeeSubscriptions\" which allows to see other members subscriptions
9494
\"Delete\" which allow for deleting posts'
9595
SafetyTeam:
96-
created: '2008-08-14 00:00:00'
96+
created: <datetime('2008-08-14 00:00:00')>
9797
Name: 'SafetyTeam'
9898
Description: >-
9999
'This gives specific right for the safety team
@@ -102,7 +102,7 @@ App\Entity\Right:
102102
- a link to updatemandatory on each profile
103103
- the capability to see any profile regardless its status'
104104
Poll:
105-
created: '2010-05-30 00:00:00'
105+
created: <datetime('2010-05-30 00:00:00')>
106106
Name: 'Poll'
107107
Description: >-
108108
'This is the right which allow to admin poll
@@ -111,29 +111,29 @@ App\Entity\Right:
111111
create : which allow to create a poll
112112
update : which allows to update a poll -regardless of its status-'
113113
Wiki:
114-
created: '2009-09-24 00:00:00'
114+
created: <datetime('2009-09-24 00:00:00')>
115115
Name: 'wiki'
116116
Description: >-
117117
'This right provides access to wiki admin feature
118118
119119
Scope has not been defined. Try to set it to \"All\" and Level to 1'
120120
Profile:
121-
created: '2013-02-25 00:00:00'
121+
created: <datetime('2013-02-25 00:00:00')>
122122
Name: 'Profile'
123123
Description: >-
124124
'This right allows a volunteer to edit a profile'
125125
CommunityNews:
126-
created: '2014-04-20 00:00:00'
126+
created: <datetime('2014-04-20 00:00:00')>
127127
Name: 'CommunityNews'
128128
Description: >-
129129
'Allows a member to post a new community news. (Filters the tag list accordingly.)'
130130
NewMembersBeWelcome:
131-
created: '2014-08-11 21:43:08'
131+
created: <datetime('2014-08-11 21:43:08')>
132132
Name: 'NewMembersBeWelcome'
133133
Description: >-
134134
'Members with that right have access to the New Members BeWelcome Tool. Level = 1, Scope = \"All\"'
135135
ManageSubscriptions:
136-
created: '2018-06-17 14:04:03'
136+
created: <datetime('2018-06-17 14:04:03')>
137137
Name: 'ManageSubscriptions'
138138
Description: >-
139139
'Members with this right can change subscriptionssettings for a member. Level = 1, Scope = \"All\"'

fixtures/user.yml

-7
This file was deleted.

src/Entity/Word.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ public function getUpdated(): Carbon
133133
return new Carbon($this->updated);
134134
}
135135

136-
public function setMajorUpdate(?Carbon $majorUpdate): self
136+
public function setMajorUpdate(?DateTime $majorUpdate): self
137137
{
138138
$this->majorUpdate = $majorUpdate;
139139

@@ -210,14 +210,14 @@ public function getTranslationPriority(): int
210210
return $this->translationPriority;
211211
}
212212

213-
public function setIsArchived(bool $isArchived): self
213+
public function setIsArchived(?bool $isArchived): self
214214
{
215215
$this->isArchived = $isArchived;
216216

217217
return $this;
218218
}
219219

220-
public function getIsArchived(): bool
220+
public function getIsArchived(): ?bool
221221
{
222222
return $this->isArchived;
223223
}
@@ -248,7 +248,7 @@ public function onPrePersist(): void
248248
}
249249

250250
#[ORM\PreUpdate]
251-
public function onPreUpdate()
251+
public function onPreUpdate(): void
252252
{
253253
$this->updated = new Carbon('now');
254254
}

0 commit comments

Comments
 (0)