Skip to content

Commit 4397bf4

Browse files
committed
another tests fixed
1 parent 138b462 commit 4397bf4

File tree

4 files changed

+24
-80
lines changed

4 files changed

+24
-80
lines changed

Tests/Functional/Entity/Job.php

+17-67
Original file line numberDiff line numberDiff line change
@@ -6,97 +6,47 @@
66
use Doctrine\ORM\Mapping as ORM;
77
use Enqueue\JobQueue\Job as BaseJob;
88

9-
/**
10-
* @ORM\Entity
11-
* @ORM\Table(name="enqueue_job_queue")
12-
*/
9+
#[ORM\Entity]
10+
#[ORM\Table(name: 'enqueue_job_queue')]
1311
class Job extends BaseJob
1412
{
15-
/**
16-
* @var int
17-
*
18-
* @ORM\Column(name="id", type="integer")
19-
* @ORM\Id
20-
* @ORM\GeneratedValue(strategy="AUTO")
21-
*/
13+
#[ORM\Column(name: 'id', type: 'integer')]
14+
#[ORM\Id]
15+
#[ORM\GeneratedValue(strategy: 'AUTO')]
2216
protected $id;
2317

24-
/**
25-
* @var string
26-
*
27-
* @ORM\Column(name="owner_id", type="string", nullable=true)
28-
*/
18+
#[ORM\Column(name: 'owner_id', type: 'string', nullable: true)]
2919
protected $ownerId;
3020

31-
/**
32-
* @var string
33-
*
34-
* @ORM\Column(name="name", type="string", nullable=false)
35-
*/
21+
#[ORM\Column(name: 'name', type: 'string', nullable: false)]
3622
protected $name;
3723

38-
/**
39-
* @var string
40-
*
41-
* @ORM\Column(name="status", type="string", nullable=false)
42-
*/
24+
#[ORM\Column(name: 'status', type: 'string', nullable: false)]
4325
protected $status;
4426

45-
/**
46-
* @var bool
47-
*
48-
* @ORM\Column(name="interrupted", type="boolean")
49-
*/
27+
#[ORM\Column(name: 'interrupted', type: 'boolean')]
5028
protected $interrupted;
5129

52-
/**
53-
* @var bool;
54-
*
55-
* @ORM\Column(name="`unique`", type="boolean")
56-
*/
30+
#[ORM\Column(name: '`unique`', type: 'boolean')]
5731
protected $unique;
5832

59-
/**
60-
* @var Job
61-
*
62-
* @ORM\ManyToOne(targetEntity="Job", inversedBy="childJobs")
63-
* @ORM\JoinColumn(name="root_job_id", referencedColumnName="id", onDelete="CASCADE")
64-
*/
33+
#[ORM\ManyToOne(targetEntity: 'Job', inversedBy: 'childJobs')]
34+
#[ORM\JoinColumn(name: 'root_job_id', referencedColumnName: 'id', onDelete: 'CASCADE')]
6535
protected $rootJob;
6636

67-
/**
68-
* @var Job[]
69-
*
70-
* @ORM\OneToMany(targetEntity="Job", mappedBy="rootJob")
71-
*/
37+
#[ORM\OneToMany(mappedBy: 'rootJob', targetEntity: 'Job')]
7238
protected $childJobs;
7339

74-
/**
75-
* @var \DateTime
76-
*
77-
* @ORM\Column(name="created_at", type="datetime", nullable=false)
78-
*/
40+
#[ORM\Column(name: 'created_at', type: 'datetime', nullable: false)]
7941
protected $createdAt;
8042

81-
/**
82-
* @var \DateTime
83-
*
84-
* @ORM\Column(name="started_at", type="datetime", nullable=true)
85-
*/
43+
#[ORM\Column(name: 'started_at', type: 'datetime', nullable: true)]
8644
protected $startedAt;
8745

88-
/**
89-
* @var \DateTime
90-
*
91-
* @ORM\Column(name="stopped_at", type="datetime", nullable=true)
92-
*/
46+
#[ORM\Column(name: 'stopped_at', type: 'datetime', nullable: true)]
9347
protected $stoppedAt;
9448

95-
/**
96-
* @var array
97-
*
98-
* @ORM\Column(name="data", type="json", nullable=true)
99-
*/
49+
#[ORM\Column(name: 'data', type: 'json', nullable: true)]
10050
protected $data;
10151

10252
public function __construct()

Tests/Functional/Entity/JobUnique.php

+4-8
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,11 @@
44

55
use Doctrine\ORM\Mapping as ORM;
66

7-
/**
8-
* @ORM\Entity
9-
* @ORM\Table(name="enqueue_job_queue_unique")
10-
*/
7+
#[ORM\Entity]
8+
#[ORM\Table(name: 'enqueue_job_queue_unique')]
119
class JobUnique
1210
{
13-
/**
14-
* @ORM\Id
15-
* @ORM\Column(name="name", type="string", nullable=false)
16-
*/
11+
#[ORM\Id]
12+
#[ORM\Column(name: 'name', type: 'string', nullable: false)]
1713
protected $name;
1814
}

Tests/Functional/app/AppKernel.php

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
<?php
22

3-
Doctrine\Common\Annotations\AnnotationRegistry::registerLoader('class_exists');
4-
53
use Symfony\Component\Config\Loader\LoaderInterface;
64
use Symfony\Component\HttpKernel\Kernel;
75

@@ -10,8 +8,8 @@ class AppKernel extends Kernel
108
public function registerBundles(): iterable
119
{
1210
$bundles = [
13-
new \Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
14-
new \Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
11+
new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
12+
new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
1513
];
1614

1715
return $bundles;

Tests/Functional/app/config/config.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ doctrine:
2525
mappings:
2626
TestEntity:
2727
mapping: true
28-
type: annotation
28+
type: attribute
2929
dir: '%kernel.project_dir%/Tests/Functional/Entity'
3030
alias: 'EnqueueJobQueue'
3131
prefix: 'Enqueue\JobQueue\Tests\Functional\Entity'

0 commit comments

Comments
 (0)