Symfony 5.1
This commit is contained in:
@@ -3,3 +3,4 @@ KERNEL_CLASS=App\Kernel
|
|||||||
APP_SECRET=$ecretf0rt3st
|
APP_SECRET=$ecretf0rt3st
|
||||||
SYMFONY_DEPRECATIONS_HELPER=999999
|
SYMFONY_DEPRECATIONS_HELPER=999999
|
||||||
DATABASE_URL=mysql://user:pass@127.0.0.1:3306/test_db?serverVersion=8
|
DATABASE_URL=mysql://user:pass@127.0.0.1:3306/test_db?serverVersion=8
|
||||||
|
MESSENGER_TRANSPORT_DSN=doctrine://default
|
||||||
|
|||||||
@@ -8,31 +8,31 @@
|
|||||||
"ext-json": "*",
|
"ext-json": "*",
|
||||||
"beberlei/assert": "^3.2",
|
"beberlei/assert": "^3.2",
|
||||||
"lstrojny/functional-php": "^1.11",
|
"lstrojny/functional-php": "^1.11",
|
||||||
"ramsey/uuid": "^3.9",
|
"ramsey/uuid": "^4.0",
|
||||||
"ramsey/uuid-doctrine": "^1.6",
|
"ramsey/uuid-doctrine": "^1.6",
|
||||||
"symfony/asset": "5.0.*",
|
"symfony/asset": "5.1.*",
|
||||||
"symfony/console": "5.0.*",
|
"symfony/console": "5.1.*",
|
||||||
"symfony/dotenv": "5.0.*",
|
"symfony/dotenv": "5.1.*",
|
||||||
"symfony/expression-language": "5.0.*",
|
"symfony/expression-language": "5.1.*",
|
||||||
"symfony/flex": "^1.3.1",
|
"symfony/flex": "^1.3.1",
|
||||||
"symfony/framework-bundle": "5.0.*",
|
"symfony/framework-bundle": "5.1.*",
|
||||||
"symfony/http-client": "5.0.*",
|
"symfony/http-client": "5.1.*",
|
||||||
"symfony/orm-pack": "^1.0",
|
"symfony/orm-pack": "^1.0",
|
||||||
"symfony/process": "5.0.*",
|
"symfony/process": "5.1.*",
|
||||||
"symfony/yaml": "5.0.*",
|
"symfony/yaml": "5.1.*",
|
||||||
"webonyx/graphql-php": "^0.13.8",
|
"webonyx/graphql-php": "^0.13.8",
|
||||||
"api-platform/core": "2.5.*",
|
"api-platform/core": "2.5.*",
|
||||||
"nelmio/cors-bundle": "2.0.*",
|
"nelmio/cors-bundle": "2.0.*",
|
||||||
"symfony/security-bundle": "5.0.*",
|
"symfony/security-bundle": "5.1.*",
|
||||||
"symfony/twig-bundle": "5.0.*",
|
"symfony/twig-bundle": "5.1.*",
|
||||||
"symfony/messenger": "5.0.*",
|
"symfony/messenger": "5.1.*",
|
||||||
"symfony/validator": "5.0.*"
|
"symfony/validator": "5.1.*"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"bunny/bunny": "^0.2",
|
"bunny/bunny": "^0.4",
|
||||||
"dama/doctrine-test-bundle": "^6.3",
|
"dama/doctrine-test-bundle": "^6.3",
|
||||||
"doctrine/doctrine-fixtures-bundle": "^3.3",
|
"doctrine/doctrine-fixtures-bundle": "^3.3",
|
||||||
"elasticsearch/elasticsearch": "^6.0",
|
"elasticsearch/elasticsearch": "^7.0",
|
||||||
"fzaninotto/faker": "^1.9",
|
"fzaninotto/faker": "^1.9",
|
||||||
"infection/infection": "^0.16.0",
|
"infection/infection": "^0.16.0",
|
||||||
"keyvanakbary/mimic": "^1.0",
|
"keyvanakbary/mimic": "^1.0",
|
||||||
@@ -40,14 +40,13 @@
|
|||||||
"phpunit/phpunit": "^9.0",
|
"phpunit/phpunit": "^9.0",
|
||||||
"predis/predis": "^1.1",
|
"predis/predis": "^1.1",
|
||||||
"spatie/async": "^1.1",
|
"spatie/async": "^1.1",
|
||||||
"symfony/browser-kit": "5.0.*",
|
"symfony/browser-kit": "5.1.*",
|
||||||
"symfony/debug-pack": "^1.0",
|
"symfony/debug-pack": "^1.0",
|
||||||
"symfony/maker-bundle": "^1.14",
|
"symfony/maker-bundle": "^1.14",
|
||||||
"symfony/profiler-pack": "^1.0",
|
"symfony/profiler-pack": "^1.0",
|
||||||
"theofidry/psysh-bundle": "^4.3",
|
"theofidry/psysh-bundle": "^4.3",
|
||||||
"twig/twig": "^2.4",
|
|
||||||
"vimeo/psalm": "^3.9",
|
"vimeo/psalm": "^3.9",
|
||||||
"weirdan/doctrine-psalm-plugin": "^0.10.0",
|
"weirdan/doctrine-psalm-plugin": "^0.11",
|
||||||
"zumba/json-serializer": "^2.1"
|
"zumba/json-serializer": "^2.1"
|
||||||
},
|
},
|
||||||
"config": {
|
"config": {
|
||||||
@@ -102,7 +101,7 @@
|
|||||||
"extra": {
|
"extra": {
|
||||||
"symfony": {
|
"symfony": {
|
||||||
"allow-contrib": true,
|
"allow-contrib": true,
|
||||||
"require": "5.0.*"
|
"require": "5.1.*"
|
||||||
},
|
},
|
||||||
"src-dir": "src/App"
|
"src-dir": "src/App"
|
||||||
}
|
}
|
||||||
|
|||||||
2995
composer.lock
generated
2995
composer.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -5,7 +5,7 @@ doctrine:
|
|||||||
# IMPORTANT: You MUST configure your server version,
|
# IMPORTANT: You MUST configure your server version,
|
||||||
# either here or in the DATABASE_URL env var (see .env file)
|
# either here or in the DATABASE_URL env var (see .env file)
|
||||||
#server_version: '5.7'
|
#server_version: '5.7'
|
||||||
schema_filter: '~^(?!messenger_messages)~'
|
schema_filter: '~^(?!messenger_messages|user_followers)~'
|
||||||
orm:
|
orm:
|
||||||
auto_generate_proxy_classes: true
|
auto_generate_proxy_classes: true
|
||||||
naming_strategy: doctrine.orm.naming_strategy.underscore_number_aware
|
naming_strategy: doctrine.orm.naming_strategy.underscore_number_aware
|
||||||
|
|||||||
37
migrations/Version20200601223645.php
Normal file
37
migrations/Version20200601223645.php
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
<?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 Version20200601223645 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->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.');
|
||||||
|
|
||||||
|
$this->addSql('CREATE TABLE architecture_followers (user_id BINARY(16) NOT NULL COMMENT \'(DC2Type:uuid_binary)\', followers INT NOT NULL, PRIMARY KEY(user_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
|
||||||
|
$this->addSql('ALTER TABLE authors DROP following');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function down(Schema $schema) : void
|
||||||
|
{
|
||||||
|
// this down() migration is auto-generated, please modify it to your needs
|
||||||
|
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.');
|
||||||
|
|
||||||
|
$this->addSql('DROP TABLE architecture_followers');
|
||||||
|
$this->addSql('ALTER TABLE authors ADD following LONGTEXT CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci` COMMENT \'(DC2Type:array)\'');
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -14,7 +14,7 @@
|
|||||||
<ignoreFiles>
|
<ignoreFiles>
|
||||||
<directory name="vendor"/>
|
<directory name="vendor"/>
|
||||||
<directory name="src/CheeperSpaghetti/"/>
|
<directory name="src/CheeperSpaghetti/"/>
|
||||||
<file name="src/CheeperLayered/CheepController.php"/>
|
<directory name="src/CheeperLayered/"/>
|
||||||
<file name="src/App/Kernel.php"/>
|
<file name="src/App/Kernel.php"/>
|
||||||
</ignoreFiles>
|
</ignoreFiles>
|
||||||
</projectFiles>
|
</projectFiles>
|
||||||
|
|||||||
@@ -12,6 +12,8 @@ use Ramsey\Uuid\UuidInterface;
|
|||||||
* @ORM\Entity(
|
* @ORM\Entity(
|
||||||
* repositoryClass=DoctrineFollowersRepository::class
|
* repositoryClass=DoctrineFollowersRepository::class
|
||||||
* )
|
* )
|
||||||
|
*
|
||||||
|
* @ORM\Table(name="architecture_followers")
|
||||||
*/
|
*/
|
||||||
class Followers
|
class Followers
|
||||||
{
|
{
|
||||||
|
|||||||
52
symfony.lock
52
symfony.lock
@@ -22,6 +22,9 @@
|
|||||||
"beberlei/assert": {
|
"beberlei/assert": {
|
||||||
"version": "v3.2.7"
|
"version": "v3.2.7"
|
||||||
},
|
},
|
||||||
|
"brick/math": {
|
||||||
|
"version": "0.8.15"
|
||||||
|
},
|
||||||
"bunny/bunny": {
|
"bunny/bunny": {
|
||||||
"version": "v0.2.4"
|
"version": "v0.2.4"
|
||||||
},
|
},
|
||||||
@@ -137,9 +140,18 @@
|
|||||||
"doctrine/reflection": {
|
"doctrine/reflection": {
|
||||||
"version": "v1.1.0"
|
"version": "v1.1.0"
|
||||||
},
|
},
|
||||||
|
"doctrine/sql-formatter": {
|
||||||
|
"version": "1.1.0"
|
||||||
|
},
|
||||||
"elasticsearch/elasticsearch": {
|
"elasticsearch/elasticsearch": {
|
||||||
"version": "v6.7.2"
|
"version": "v6.7.2"
|
||||||
},
|
},
|
||||||
|
"ezimuel/guzzlestreams": {
|
||||||
|
"version": "3.0.1"
|
||||||
|
},
|
||||||
|
"ezimuel/ringphp": {
|
||||||
|
"version": "1.1.2"
|
||||||
|
},
|
||||||
"felixfbecker/advanced-json-rpc": {
|
"felixfbecker/advanced-json-rpc": {
|
||||||
"version": "v3.1.1"
|
"version": "v3.1.1"
|
||||||
},
|
},
|
||||||
@@ -152,12 +164,6 @@
|
|||||||
"fzaninotto/faker": {
|
"fzaninotto/faker": {
|
||||||
"version": "v1.9.1"
|
"version": "v1.9.1"
|
||||||
},
|
},
|
||||||
"guzzlehttp/ringphp": {
|
|
||||||
"version": "1.1.1"
|
|
||||||
},
|
|
||||||
"guzzlehttp/streams": {
|
|
||||||
"version": "3.0.0"
|
|
||||||
},
|
|
||||||
"hamcrest/hamcrest-php": {
|
"hamcrest/hamcrest-php": {
|
||||||
"version": "v2.0.0"
|
"version": "v2.0.0"
|
||||||
},
|
},
|
||||||
@@ -173,9 +179,6 @@
|
|||||||
"infection/infection": {
|
"infection/infection": {
|
||||||
"version": "0.16.1"
|
"version": "0.16.1"
|
||||||
},
|
},
|
||||||
"jdorn/sql-formatter": {
|
|
||||||
"version": "v1.2.17"
|
|
||||||
},
|
|
||||||
"justinrainbow/json-schema": {
|
"justinrainbow/json-schema": {
|
||||||
"version": "5.2.9"
|
"version": "5.2.9"
|
||||||
},
|
},
|
||||||
@@ -310,6 +313,9 @@
|
|||||||
"psy/psysh": {
|
"psy/psysh": {
|
||||||
"version": "v0.10.4"
|
"version": "v0.10.4"
|
||||||
},
|
},
|
||||||
|
"ramsey/collection": {
|
||||||
|
"version": "1.0.1"
|
||||||
|
},
|
||||||
"ramsey/uuid": {
|
"ramsey/uuid": {
|
||||||
"version": "3.9.3"
|
"version": "3.9.3"
|
||||||
},
|
},
|
||||||
@@ -379,6 +385,9 @@
|
|||||||
"spatie/async": {
|
"spatie/async": {
|
||||||
"version": "1.3.0"
|
"version": "1.3.0"
|
||||||
},
|
},
|
||||||
|
"symfony/amqp-messenger": {
|
||||||
|
"version": "v5.1.0"
|
||||||
|
},
|
||||||
"symfony/asset": {
|
"symfony/asset": {
|
||||||
"version": "v5.0.7"
|
"version": "v5.0.7"
|
||||||
},
|
},
|
||||||
@@ -425,9 +434,15 @@
|
|||||||
"symfony/dependency-injection": {
|
"symfony/dependency-injection": {
|
||||||
"version": "v5.0.4"
|
"version": "v5.0.4"
|
||||||
},
|
},
|
||||||
|
"symfony/deprecation-contracts": {
|
||||||
|
"version": "v2.1.2"
|
||||||
|
},
|
||||||
"symfony/doctrine-bridge": {
|
"symfony/doctrine-bridge": {
|
||||||
"version": "v5.0.5"
|
"version": "v5.0.5"
|
||||||
},
|
},
|
||||||
|
"symfony/doctrine-messenger": {
|
||||||
|
"version": "v5.1.0"
|
||||||
|
},
|
||||||
"symfony/dom-crawler": {
|
"symfony/dom-crawler": {
|
||||||
"version": "v5.0.5"
|
"version": "v5.0.5"
|
||||||
},
|
},
|
||||||
@@ -520,9 +535,6 @@
|
|||||||
"config/packages/messenger.yaml"
|
"config/packages/messenger.yaml"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"symfony/mime": {
|
|
||||||
"version": "v5.0.4"
|
|
||||||
},
|
|
||||||
"symfony/monolog-bridge": {
|
"symfony/monolog-bridge": {
|
||||||
"version": "v5.0.8"
|
"version": "v5.0.8"
|
||||||
},
|
},
|
||||||
@@ -543,8 +555,11 @@
|
|||||||
"symfony/orm-pack": {
|
"symfony/orm-pack": {
|
||||||
"version": "v1.0.8"
|
"version": "v1.0.8"
|
||||||
},
|
},
|
||||||
"symfony/polyfill-intl-idn": {
|
"symfony/polyfill-intl-grapheme": {
|
||||||
"version": "v1.14.0"
|
"version": "v1.17.0"
|
||||||
|
},
|
||||||
|
"symfony/polyfill-intl-normalizer": {
|
||||||
|
"version": "v1.17.0"
|
||||||
},
|
},
|
||||||
"symfony/polyfill-mbstring": {
|
"symfony/polyfill-mbstring": {
|
||||||
"version": "v1.14.0"
|
"version": "v1.14.0"
|
||||||
@@ -552,6 +567,9 @@
|
|||||||
"symfony/polyfill-php73": {
|
"symfony/polyfill-php73": {
|
||||||
"version": "v1.14.0"
|
"version": "v1.14.0"
|
||||||
},
|
},
|
||||||
|
"symfony/polyfill-php80": {
|
||||||
|
"version": "v1.17.0"
|
||||||
|
},
|
||||||
"symfony/process": {
|
"symfony/process": {
|
||||||
"version": "v5.0.5"
|
"version": "v5.0.5"
|
||||||
},
|
},
|
||||||
@@ -564,6 +582,9 @@
|
|||||||
"symfony/property-info": {
|
"symfony/property-info": {
|
||||||
"version": "v5.0.5"
|
"version": "v5.0.5"
|
||||||
},
|
},
|
||||||
|
"symfony/redis-messenger": {
|
||||||
|
"version": "v5.1.0"
|
||||||
|
},
|
||||||
"symfony/routing": {
|
"symfony/routing": {
|
||||||
"version": "4.2",
|
"version": "4.2",
|
||||||
"recipe": {
|
"recipe": {
|
||||||
@@ -611,6 +632,9 @@
|
|||||||
"symfony/stopwatch": {
|
"symfony/stopwatch": {
|
||||||
"version": "v5.0.5"
|
"version": "v5.0.5"
|
||||||
},
|
},
|
||||||
|
"symfony/string": {
|
||||||
|
"version": "v5.1.0"
|
||||||
|
},
|
||||||
"symfony/translation-contracts": {
|
"symfony/translation-contracts": {
|
||||||
"version": "v2.0.1"
|
"version": "v2.0.1"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ trait RefreshDatabase
|
|||||||
$container = $kernel->getContainer();
|
$container = $kernel->getContainer();
|
||||||
|
|
||||||
$process = new Process(
|
$process = new Process(
|
||||||
['php', 'bin/console', 'doctrine:schema:drop', '--force'],
|
['php', 'bin/console', 'doctrine:database:drop', '--force', '--if-exists'],
|
||||||
$container->getParameter('kernel.project_dir'),
|
$container->getParameter('kernel.project_dir'),
|
||||||
['APP_ENV' => 'test']
|
['APP_ENV' => 'test']
|
||||||
);
|
);
|
||||||
@@ -32,7 +32,29 @@ trait RefreshDatabase
|
|||||||
}
|
}
|
||||||
|
|
||||||
$process = new Process(
|
$process = new Process(
|
||||||
['php', 'bin/console', 'doctrine:schema:create'],
|
['php', 'bin/console', 'doctrine:database:create'],
|
||||||
|
$container->getParameter('kernel.project_dir'),
|
||||||
|
['APP_ENV' => 'test']
|
||||||
|
);
|
||||||
|
|
||||||
|
$process->run();
|
||||||
|
if (!$process->isSuccessful()) {
|
||||||
|
throw new ProcessFailedException($process);
|
||||||
|
}
|
||||||
|
|
||||||
|
$process = new Process(
|
||||||
|
['php', 'bin/console', 'doctrine:migrations:migrate', '--no-interaction', '--all-or-nothing'],
|
||||||
|
$container->getParameter('kernel.project_dir'),
|
||||||
|
['APP_ENV' => 'test']
|
||||||
|
);
|
||||||
|
|
||||||
|
$process->run();
|
||||||
|
if (!$process->isSuccessful()) {
|
||||||
|
throw new ProcessFailedException($process);
|
||||||
|
}
|
||||||
|
|
||||||
|
$process = new Process(
|
||||||
|
['php', 'bin/console', 'messenger:setup-transports'],
|
||||||
$container->getParameter('kernel.project_dir'),
|
$container->getParameter('kernel.project_dir'),
|
||||||
['APP_ENV' => 'test']
|
['APP_ENV' => 'test']
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -25,14 +25,13 @@ class AsyncProjectorTest extends TestCase
|
|||||||
*/
|
*/
|
||||||
public function itShouldProjectIntoElasticsearch(): void
|
public function itShouldProjectIntoElasticsearch(): void
|
||||||
{
|
{
|
||||||
/*
|
$this->markTestSkipped('It\'s not stable. Sometimes fails and sometimes don\'t.');
|
||||||
* Execute receiver and emitter at the same time
|
|
||||||
*/
|
|
||||||
//Wait to kill the event receiver
|
//Wait to kill the event receiver
|
||||||
$pool = Pool::create()->timeout(3);
|
$pool = Pool::create()->timeout(3);
|
||||||
|
|
||||||
$pool[] = async(function () {
|
$pool[] = async(function () {
|
||||||
sleep(1);//wait for the connection to be ready
|
sleep(2);//wait for the connection to be ready
|
||||||
|
|
||||||
//snippet event-receiver
|
//snippet event-receiver
|
||||||
$client = \Elasticsearch\ClientBuilder::create()->build();
|
$client = \Elasticsearch\ClientBuilder::create()->build();
|
||||||
|
|||||||
Reference in New Issue
Block a user