-
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
529 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: Bug Report | ||
description: 🐛 File a bug report | ||
title: "🐛 " | ||
labels: ["type:bug", "status:to be verified"] | ||
assignees: | ||
- roxblnfk | ||
body: | ||
- type: markdown | ||
attributes: | ||
value: | | ||
Thanks for taking the time to fill out this bug report! | ||
- type: checkboxes | ||
id: search-done | ||
attributes: | ||
label: No duplicates 🥲. | ||
options: | ||
- label: I have searched for a similar issue in our bug tracker and didn't find any solutions. | ||
required: true | ||
- type: textarea | ||
id: what-happened | ||
attributes: | ||
label: What happened? | ||
description: Also tell us, what did you expect to happen? Please write only in English. | ||
placeholder: Tell us what you see! | ||
value: "A bug happened!" | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: version | ||
attributes: | ||
label: Version | ||
description: What version of our software are you running? | ||
value: "annotated v3.0.0, orm v2.0.0, PHP 8.1" | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: schema | ||
attributes: | ||
label: ORM Schema | ||
description: Please provide a relevant part of the ORM Schema. You can get schema using [schema-renderer](https://github.com/cycle/schema-renderer) | ||
render: shell |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
blank_issues_enabled: false | ||
|
||
contact_links: | ||
- name: ❓ Start a discussion or ask a question. | ||
url: https://github.com/cycle/orm/discussions | ||
about: Please ask and answer questions here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: Feauture request | ||
description: 💡 Suggest an idea for this project | ||
title: "💡 " | ||
labels: ["type:feature"] | ||
assignees: | ||
- roxblnfk | ||
body: | ||
- type: markdown | ||
attributes: | ||
value: | | ||
Thanks for taking the time to share your idea! | ||
- type: textarea | ||
id: idea | ||
attributes: | ||
label: I have an idea! | ||
description: Clear and concise description of your idea. Please write only in English. | ||
placeholder: Tell us what you see! | ||
value: "I have an idea, listen to me!!" | ||
validations: | ||
required: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
checks: | ||
php: true | ||
|
||
filter: | ||
paths: | ||
- "src/*" | ||
|
||
tools: | ||
external_code_coverage: | ||
timeout: 600 # Timeout in seconds. | ||
runs: 2 # How many code coverage submissions Scrutinizer will wait | ||
|
||
build: | ||
nodes: | ||
analysis: | ||
environment: | ||
php: 8.0 | ||
|
||
tests: | ||
override: | ||
- php-scrutinizer-run |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Cycle\Annotated\Tests\Fixtures\Fixtures18; | ||
|
||
use Cycle\Annotated\Annotation\Column; | ||
use Cycle\Annotated\Annotation\Entity; | ||
use Cycle\Annotated\Annotation\Relation\HasOne; | ||
use Cycle\Annotated\Annotation\Relation\ManyToMany; | ||
|
||
#[Entity( | ||
table: 'FlightBooking' | ||
)] | ||
class Booking | ||
{ | ||
#[Column(type: 'primary', name: 'id_booking')] | ||
protected ?int $bid = null; | ||
|
||
#[Column(type: 'bigInteger', name: 'reserv_id_column')] | ||
private int $reserv_id; | ||
|
||
// Without manual declaration | ||
#[HasOne(target: Reservation::class, fkCreate: false)] | ||
protected Reservation $reservation0; | ||
|
||
// Use property names | ||
#[HasOne(target: Reservation::class, innerKey: 'reserv_id', outerKey: 'rid', fkCreate: false)] | ||
protected Reservation $reservation1; | ||
|
||
// Use column names | ||
#[HasOne(target: Reservation::class, innerKey: 'reserv_id_column', outerKey: 'id_reservation', fkCreate: false)] | ||
protected Reservation $reservation2; | ||
|
||
// Without manual declaration | ||
#[ManyToMany(target: Reservation::class, through: Pivot::class, fkCreate: false)] | ||
protected array $reservations0; | ||
|
||
// Use property names | ||
#[ManyToMany( | ||
target: Reservation::class, | ||
through: Pivot::class, | ||
innerKey: 'reserv_id', | ||
outerKey: 'booking_id', | ||
throughInnerKey: 'booking_reservation_rid', | ||
throughOuterKey: 'booking_bid', | ||
fkCreate: false, | ||
)] | ||
protected array $reservations1; | ||
|
||
// Use column names | ||
#[ManyToMany( | ||
target: Reservation::class, | ||
through: Pivot::class, | ||
innerKey: 'reserv_id_column', | ||
outerKey: 'booking_id_column', | ||
throughInnerKey: 'booking_reservation_id_column', | ||
throughOuterKey: 'reserv_id_column', | ||
fkCreate: false, | ||
)] | ||
protected array $reservations2; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Cycle\Annotated\Tests\Fixtures\Fixtures18; | ||
|
||
use Cycle\Annotated\Annotation\Column; | ||
use Cycle\Annotated\Annotation\Entity; | ||
|
||
#[Entity( | ||
table: 'Pivotable' | ||
)] | ||
class Pivot | ||
{ | ||
#[Column(type: 'primary', name: 'id_pivot')] | ||
protected ?int $pid = null; | ||
|
||
#[Column(type: 'bigInteger', name: 'reserv_id_column')] | ||
private int $booking_bid; | ||
|
||
#[Column(type: 'bigInteger', name: 'booking_reservation_id_column')] | ||
private int $booking_reservation_rid; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Cycle\Annotated\Tests\Fixtures\Fixtures18; | ||
|
||
use Cycle\Annotated\Annotation\Column; | ||
use Cycle\Annotated\Annotation\Entity; | ||
use Cycle\Annotated\Annotation\Relation\HasMany; | ||
|
||
#[Entity( | ||
role: 'booking_reservation', | ||
table: 'FlightReservation' | ||
)] | ||
class Reservation | ||
{ | ||
#[Column(type: 'primary', name: 'id_reservation')] | ||
protected ?int $rid = null; | ||
|
||
#[Column(type: 'bigInteger', name: 'booking_id_column')] | ||
private int $booking_id; | ||
|
||
// #[BelongsTo(target: Booking::class, innerKey: 'id', outerKey: 'FlightRezervationId', fkCreate: false)] | ||
// private ?Booking $booking = null; | ||
|
||
// Without manual declaration | ||
#[HasMany(target: Segment::class, fkCreate: false)] | ||
private array $segments0 = []; | ||
|
||
// Use property names | ||
#[HasMany(target: Segment::class, innerKey: 'rid', outerKey: 'parent_id', fkCreate: false)] | ||
private array $segments1 = []; | ||
|
||
// Use column names | ||
#[HasMany(target: Segment::class, innerKey: 'id_reservation', outerKey: 'parent_id_column', fkCreate: false)] | ||
private array $segments2 = []; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Cycle\Annotated\Tests\Fixtures\Fixtures18; | ||
|
||
use Cycle\Annotated\Annotation\Column; | ||
use Cycle\Annotated\Annotation\Entity; | ||
|
||
#[Entity( | ||
table: 'FlightSegment' | ||
)] | ||
class Segment | ||
{ | ||
#[Column(name: 'id_segment', type: 'primary')] | ||
protected ?int $sid = null; | ||
|
||
#[Column(name: 'parent_id_column', type: 'bigInteger')] | ||
protected ?int $parent_id = null; | ||
} |
Oops, something went wrong.