-
-
Notifications
You must be signed in to change notification settings - Fork 409
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bug #1115 [make:crud] fix broken controller with custom repository (j…
…rushlow) This PR was merged into the 1.0-dev branch. Discussion ---------- [make:crud] fix broken controller with custom repository fixes #1113 Commits ------- 1560455 [make:crud] fix broken controller with custom repository
- Loading branch information
Showing
15 changed files
with
470 additions
and
64 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
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,30 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of the Symfony MakerBundle package. | ||
* | ||
* (c) Fabien Potencier <fabien@symfony.com> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Symfony\Bundle\MakerBundle\Tests\Maker; | ||
|
||
use Doctrine\ORM\Mapping\Driver\AttributeReader; | ||
use Symfony\Bundle\MakerBundle\Test\MakerTestRunner; | ||
|
||
/** | ||
* @author Jesse Rushlow <jr@rushlow.dev> | ||
* | ||
* @internal | ||
*/ | ||
trait TestHelpersTrait | ||
{ | ||
// @legacy - remove when annotations are no longer supported | ||
protected function useAttributes(MakerTestRunner $runner): bool | ||
{ | ||
return \PHP_VERSION_ID >= 80000 | ||
&& $runner->doesClassExist(AttributeReader::class); | ||
} | ||
} |
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,35 @@ | ||
<?php | ||
|
||
namespace App\Entity; | ||
|
||
use App\Repository\SweetFoodRepository; | ||
use Doctrine\ORM\Mapping as ORM; | ||
|
||
#[ORM\Entity(repositoryClass: SweetFoodRepository::class)] | ||
class SweetFood | ||
{ | ||
#[ORM\Id] | ||
#[ORM\GeneratedValue] | ||
#[ORM\Column(type: 'integer')] | ||
private $id; | ||
|
||
#[ORM\Column(type: 'string', length: 255)] | ||
private $title; | ||
|
||
public function getId() | ||
{ | ||
return $this->id; | ||
} | ||
|
||
public function getTitle(): string | ||
{ | ||
return $this->title; | ||
} | ||
|
||
public function setTitle(string $title): self | ||
{ | ||
$this->title = $title; | ||
|
||
return $this; | ||
} | ||
} |
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
Oops, something went wrong.