@@ -0,0 +1,7 @@ | |||
#!/bin/sh | |||
CLASS_NAME="$(echo "yes" | "$PHP" ./bin/console doctrine:migration:diff -e dev | grep -o "Version[0-9]*" | tail -n 1)" | |||
if [ -n "$CLASS_NAME" ]; then | |||
echo "yes" | "$PHP" ./bin/console doctrine:migration:exec --up "DoctrineMigrations\\$CLASS_NAME" -e dev | |||
fi |
@@ -4,7 +4,7 @@ | |||
"minimum-stability": "dev", | |||
"prefer-stable": true, | |||
"require": { | |||
"php": ">=7.2.5", | |||
"php": ">=7.4", | |||
"ext-ctype": "*", | |||
"ext-iconv": "*", | |||
"artgris/filemanager-bundle": "^2.2", | |||
@@ -15,6 +15,7 @@ | |||
"doctrine/orm": "^2.8", | |||
"easycorp/easyadmin-bundle": "^3.3", | |||
"friendsofsymfony/ckeditor-bundle": "^2.3", | |||
"knplabs/knp-paginator-bundle": "^5.6", | |||
"liip/imagine-bundle": "^2.6", | |||
"phpdocumentor/reflection-docblock": "^5.2", | |||
"sensio/framework-extra-bundle": "^5.1", |
@@ -4,7 +4,7 @@ | |||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", | |||
"This file is @generated automatically" | |||
], | |||
"content-hash": "a80de57add3021cd7f7928bd1bd49bc8", | |||
"content-hash": "4d58bc3a1393620ce158f45fdeecb5c2", | |||
"packages": [ | |||
{ | |||
"name": "artgris/filemanager-bundle", | |||
@@ -2186,6 +2186,159 @@ | |||
}, | |||
"time": "2020-11-03T22:35:03+00:00" | |||
}, | |||
{ | |||
"name": "knplabs/knp-components", | |||
"version": "v3.0.2", | |||
"source": { | |||
"type": "git", | |||
"url": "https://github.com/KnpLabs/knp-components.git", | |||
"reference": "7db2eb032591ded5809455af8a4dfdfda079041c" | |||
}, | |||
"dist": { | |||
"type": "zip", | |||
"url": "https://api.github.com/repos/KnpLabs/knp-components/zipball/7db2eb032591ded5809455af8a4dfdfda079041c", | |||
"reference": "7db2eb032591ded5809455af8a4dfdfda079041c", | |||
"shasum": "" | |||
}, | |||
"require": { | |||
"php": "^7.3 || ^8.0", | |||
"symfony/event-dispatcher-contracts": "^1.1 || ^2.0", | |||
"symfony/http-foundation": "^4.4 || ^5.1" | |||
}, | |||
"require-dev": { | |||
"doctrine/mongodb-odm": "^2.0", | |||
"doctrine/orm": "^2.7", | |||
"doctrine/phpcr-odm": "^1.2", | |||
"ext-pdo_sqlite": "*", | |||
"jackalope/jackalope-doctrine-dbal": "^1.2", | |||
"phpunit/phpunit": "^9.5", | |||
"ruflin/elastica": "^7.0", | |||
"symfony/http-kernel": "^4.4 || ^5.1", | |||
"symfony/property-access": "^4.4 || ^5.1" | |||
}, | |||
"suggest": { | |||
"doctrine/common": "to allow usage pagination with Doctrine ArrayCollection", | |||
"doctrine/mongodb-odm": "to allow usage pagination with Doctrine ODM MongoDB", | |||
"doctrine/orm": "to allow usage pagination with Doctrine ORM", | |||
"doctrine/phpcr-odm": "to allow usage pagination with Doctrine ODM PHPCR", | |||
"propel/propel1": "to allow usage pagination with Propel ORM", | |||
"ruflin/elastica": "to allow usage pagination with ElasticSearch Client", | |||
"solarium/solarium": "to allow usage pagination with Solarium Client", | |||
"symfony/property-access": "To allow sorting arrays" | |||
}, | |||
"type": "library", | |||
"extra": { | |||
"branch-alias": { | |||
"dev-master": "3.x-dev" | |||
} | |||
}, | |||
"autoload": { | |||
"psr-4": { | |||
"Knp\\Component\\": "src/Knp/Component" | |||
} | |||
}, | |||
"notification-url": "https://packagist.org/downloads/", | |||
"license": [ | |||
"MIT" | |||
], | |||
"authors": [ | |||
{ | |||
"name": "KnpLabs Team", | |||
"homepage": "https://knplabs.com" | |||
}, | |||
{ | |||
"name": "Symfony Community", | |||
"homepage": "https://github.com/KnpLabs/knp-components/contributors" | |||
} | |||
], | |||
"description": "Knplabs component library", | |||
"homepage": "http://github.com/KnpLabs/knp-components", | |||
"keywords": [ | |||
"components", | |||
"knp", | |||
"knplabs", | |||
"pager", | |||
"paginator" | |||
], | |||
"support": { | |||
"issues": "https://github.com/KnpLabs/knp-components/issues", | |||
"source": "https://github.com/KnpLabs/knp-components/tree/v3.0.2" | |||
}, | |||
"time": "2021-03-16T13:52:01+00:00" | |||
}, | |||
{ | |||
"name": "knplabs/knp-paginator-bundle", | |||
"version": "v5.6.0", | |||
"source": { | |||
"type": "git", | |||
"url": "https://github.com/KnpLabs/KnpPaginatorBundle.git", | |||
"reference": "a11cd180826e9475e1079b3b64c27a1c33c48917" | |||
}, | |||
"dist": { | |||
"type": "zip", | |||
"url": "https://api.github.com/repos/KnpLabs/KnpPaginatorBundle/zipball/a11cd180826e9475e1079b3b64c27a1c33c48917", | |||
"reference": "a11cd180826e9475e1079b3b64c27a1c33c48917", | |||
"shasum": "" | |||
}, | |||
"require": { | |||
"knplabs/knp-components": "^2.4 || ^3.0", | |||
"php": "^7.3 || ^8.0", | |||
"symfony/config": "^4.4 || ^5.0", | |||
"symfony/dependency-injection": "^4.4 || ^5.0", | |||
"symfony/event-dispatcher": "^4.4 || ^5.0", | |||
"symfony/http-foundation": "^4.4 || ^5.0", | |||
"symfony/http-kernel": "^4.4 || ^5.0", | |||
"symfony/routing": "^4.4 || ^5.0", | |||
"symfony/translation": "^4.4 || ^5.0", | |||
"twig/twig": "^2.0 || ^3.0" | |||
}, | |||
"require-dev": { | |||
"phpunit/phpunit": "^8.5 || ^9.4", | |||
"symfony/expression-language": "^4.4 || ^5.0", | |||
"symfony/templating": "^4.4 || ^5.0" | |||
}, | |||
"type": "symfony-bundle", | |||
"extra": { | |||
"branch-alias": { | |||
"dev-master": "5.x-dev" | |||
} | |||
}, | |||
"autoload": { | |||
"psr-4": { | |||
"Knp\\Bundle\\PaginatorBundle\\": "src" | |||
} | |||
}, | |||
"notification-url": "https://packagist.org/downloads/", | |||
"license": [ | |||
"MIT" | |||
], | |||
"authors": [ | |||
{ | |||
"name": "KnpLabs Team", | |||
"homepage": "http://knplabs.com" | |||
}, | |||
{ | |||
"name": "Symfony Community", | |||
"homepage": "http://github.com/KnpLabs/KnpPaginatorBundle/contributors" | |||
} | |||
], | |||
"description": "Paginator bundle for Symfony to automate pagination and simplify sorting and other features", | |||
"homepage": "http://github.com/KnpLabs/KnpPaginatorBundle", | |||
"keywords": [ | |||
"bundle", | |||
"knp", | |||
"knplabs", | |||
"pager", | |||
"pagination", | |||
"paginator", | |||
"symfony" | |||
], | |||
"support": { | |||
"issues": "https://github.com/KnpLabs/KnpPaginatorBundle/issues", | |||
"source": "https://github.com/KnpLabs/KnpPaginatorBundle/tree/v5.6.0" | |||
}, | |||
"time": "2021-06-11T09:38:48+00:00" | |||
}, | |||
{ | |||
"name": "laminas/laminas-code", | |||
"version": "4.3.0", |
@@ -21,4 +21,5 @@ return [ | |||
EasyCorp\Bundle\EasyAdminBundle\EasyAdminBundle::class => ['all' => true], | |||
Symfony\WebpackEncoreBundle\WebpackEncoreBundle::class => ['all' => true], | |||
Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle::class => ['dev' => true, 'test' => true], | |||
Knp\Bundle\PaginatorBundle\KnpPaginatorBundle::class => ['all' => true], | |||
]; |
@@ -1,37 +0,0 @@ | |||
<?php | |||
declare(strict_types=1); | |||
namespace DoctrineMigrations; | |||
use Doctrine\DBAL\Schema\Schema; | |||
use Doctrine\Migrations\AbstractMigration; | |||
/** | |||
* Auto-generated Migration: Please modify to your needs! | |||
*/ | |||
final class Version20210617103752 extends AbstractMigration | |||
{ | |||
public function getDescription(): string | |||
{ | |||
return ''; | |||
} | |||
public function up(Schema $schema): void | |||
{ | |||
// this up() migration is auto-generated, please modify it to your needs | |||
$this->addSql('ALTER TABLE news DROP is_sent'); | |||
$this->addSql('ALTER TABLE reminder ADD section_id INT DEFAULT NULL, ADD crud_action VARCHAR(64) DEFAULT NULL, ADD crud_controller_fqcn VARCHAR(255) DEFAULT NULL, DROP entity_name, DROP entity_action'); | |||
$this->addSql('ALTER TABLE reminder ADD CONSTRAINT FK_40374F40D823E37A FOREIGN KEY (section_id) REFERENCES section (id)'); | |||
$this->addSql('CREATE INDEX IDX_40374F40D823E37A ON reminder (section_id)'); | |||
} | |||
public function down(Schema $schema): void | |||
{ | |||
// this down() migration is auto-generated, please modify it to your needs | |||
$this->addSql('ALTER TABLE news ADD is_sent TINYINT(1) DEFAULT NULL'); | |||
$this->addSql('ALTER TABLE reminder DROP FOREIGN KEY FK_40374F40D823E37A'); | |||
$this->addSql('DROP INDEX IDX_40374F40D823E37A ON reminder'); | |||
$this->addSql('ALTER TABLE reminder ADD entity_action VARCHAR(255) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, DROP section_id, DROP crud_action, CHANGE crud_controller_fqcn entity_name VARCHAR(255) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`'); | |||
} | |||
} |
@@ -0,0 +1,49 @@ | |||
<?php | |||
namespace App\Command; | |||
use Symfony\Component\Console\Command\Command; | |||
use Symfony\Component\Console\Input\InputArgument; | |||
use Symfony\Component\Console\Input\InputInterface; | |||
use Symfony\Component\Console\Input\InputOption; | |||
use Symfony\Component\Console\Output\OutputInterface; | |||
use Symfony\Component\Console\Style\SymfonyStyle; | |||
use Lc\CaracoleBundle\Repository\Reminder\ReminderRepositoryQuery; | |||
use Lc\SovBundle\Repository\Reminder\ReminderStore; | |||
class TestCommand extends Command | |||
{ | |||
protected static $defaultName = 'app:test'; | |||
protected static $defaultDescription = 'Add a short description for your command'; | |||
protected ReminderRepositoryQuery $query; | |||
protected ReminderStore $store; | |||
public function __construct( | |||
ReminderRepositoryQuery $query, | |||
ReminderStore $store | |||
) | |||
{ | |||
$this->query = $query; | |||
$this->store = $store; | |||
parent::__construct(); | |||
} | |||
protected function configure(): void | |||
{ | |||
$this | |||
->addArgument('arg1', InputArgument::OPTIONAL, 'Argument description') | |||
->addOption('option1', null, InputOption::VALUE_NONE, 'Option description') | |||
; | |||
} | |||
protected function execute(InputInterface $input, OutputInterface $output): int | |||
{ | |||
$result = $this->store->getFoo(); | |||
dump($result); | |||
return Command::SUCCESS; | |||
} | |||
} |
@@ -2,7 +2,7 @@ | |||
namespace App\Entity\Reminder; | |||
use Lc\CaracoleBundle\Repository\Reminder\ReminderRepository; | |||
use Lc\SovBundle\Repository\Reminder\ReminderRepository; | |||
use Doctrine\ORM\Mapping as ORM; | |||
use Lc\CaracoleBundle\Model\Reminder\ReminderModel; | |||
@@ -1,50 +0,0 @@ | |||
<?php | |||
namespace App\Repository; | |||
use App\Entity\Reminder; | |||
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository; | |||
use Doctrine\Persistence\ManagerRegistry; | |||
/** | |||
* @method Reminder|null find($id, $lockMode = null, $lockVersion = null) | |||
* @method Reminder|null findOneBy(array $criteria, array $orderBy = null) | |||
* @method Reminder[] findAll() | |||
* @method Reminder[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null) | |||
*/ | |||
class ReminderRepository extends ServiceEntityRepository | |||
{ | |||
public function __construct(ManagerRegistry $registry) | |||
{ | |||
parent::__construct($registry, Reminder::class); | |||
} | |||
// /** | |||
// * @return Reminder[] Returns an array of Reminder objects | |||
// */ | |||
/* | |||
public function findByExampleField($value) | |||
{ | |||
return $this->createQueryBuilder('r') | |||
->andWhere('r.exampleField = :val') | |||
->setParameter('val', $value) | |||
->orderBy('r.id', 'ASC') | |||
->setMaxResults(10) | |||
->getQuery() | |||
->getResult() | |||
; | |||
} | |||
*/ | |||
/* | |||
public function findOneBySomeField($value): ?Reminder | |||
{ | |||
return $this->createQueryBuilder('r') | |||
->andWhere('r.exampleField = :val') | |||
->setParameter('val', $value) | |||
->getQuery() | |||
->getOneOrNullResult() | |||
; | |||
} | |||
*/ | |||
} |
@@ -139,6 +139,12 @@ | |||
"imagine/imagine": { | |||
"version": "1.2.4" | |||
}, | |||
"knplabs/knp-components": { | |||
"version": "v3.0.2" | |||
}, | |||
"knplabs/knp-paginator-bundle": { | |||
"version": "v5.6.0" | |||
}, | |||
"laminas/laminas-code": { | |||
"version": "4.2.2" | |||
}, |