├── src ├── Entity │ ├── .gitignore │ ├── Customer.php │ ├── Product.php │ └── Order.php ├── Controller │ ├── .gitignore │ └── OrderController.php ├── Migrations │ ├── .gitignore │ ├── Version20200731200057.php │ └── Version20200731121119.php ├── Repository │ └── .gitignore └── Kernel.php ├── .dockerignore ├── .github └── FUNDING.yml ├── config ├── packages │ ├── prod │ │ ├── routing.yaml │ │ ├── jms_serializer.yaml │ │ └── doctrine.yaml │ ├── test │ │ └── framework.yaml │ ├── doctrine_migrations.yaml │ ├── dev │ │ └── jms_serializer.yaml │ ├── routing.yaml │ ├── jms_serializer.yaml │ ├── framework.yaml │ ├── fos_rest.yaml │ ├── doctrine.yaml │ └── cache.yaml ├── routes │ ├── dev │ │ └── framework.yaml │ └── annotations.yaml ├── routes.yaml ├── bundles.php └── services.yaml ├── .env.test ├── docker ├── php │ ├── xdebug.ini │ ├── docker-entrypoint.sh │ ├── php.ini │ ├── php-cli.ini │ ├── php.prod.ini │ └── php-cli.prod.ini └── nginx │ └── conf.d │ └── default.conf ├── tests ├── Controller │ └── OrderControllerTest.php └── bootstrap.php ├── .gitignore ├── bin ├── phpunit └── console ├── Makefile ├── docker-compose_prod.yml ├── public └── index.php ├── phpunit.xml.dist ├── docker-compose.yml ├── .env ├── README.md ├── composer.json ├── Dockerfile ├── Dockerfile_prod └── symfony.lock /src/Entity/.gitignore: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/Controller/.gitignore: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/Migrations/.gitignore: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/Repository/.gitignore: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.dockerignore: -------------------------------------------------------------------------------- 1 | vendor 2 | var 3 | .git 4 | Makefile 5 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | patreon: capcoding 4 | -------------------------------------------------------------------------------- /config/packages/prod/routing.yaml: -------------------------------------------------------------------------------- 1 | framework: 2 | router: 3 | strict_requirements: null 4 | -------------------------------------------------------------------------------- /config/packages/test/framework.yaml: -------------------------------------------------------------------------------- 1 | framework: 2 | test: true 3 | session: 4 | storage_id: session.storage.mock_file 5 | -------------------------------------------------------------------------------- /config/routes/dev/framework.yaml: -------------------------------------------------------------------------------- 1 | _errors: 2 | resource: '@FrameworkBundle/Resources/config/routing/errors.xml' 3 | prefix: /_error 4 | -------------------------------------------------------------------------------- /config/routes.yaml: -------------------------------------------------------------------------------- 1 | order_show: 2 | path: /api/v1/orders/{id} 3 | controller: App\Controller\OrderController::showAction 4 | methods: [GET] 5 | -------------------------------------------------------------------------------- /config/packages/doctrine_migrations.yaml: -------------------------------------------------------------------------------- 1 | doctrine_migrations: 2 | migrations_paths: 3 | 'DoctrineMigrations': '%kernel.project_dir%/src/Migrations' 4 | -------------------------------------------------------------------------------- /.env.test: -------------------------------------------------------------------------------- 1 | # define your env variables for the test env here 2 | KERNEL_CLASS='App\Kernel' 3 | APP_SECRET='$ecretf0rt3st' 4 | SYMFONY_DEPRECATIONS_HELPER=999999 5 | PANTHER_APP_ENV=panther 6 | -------------------------------------------------------------------------------- /config/routes/annotations.yaml: -------------------------------------------------------------------------------- 1 | controllers: 2 | resource: ../../src/Controller/ 3 | type: annotation 4 | 5 | kernel: 6 | resource: ../../src/Kernel.php 7 | type: annotation 8 | -------------------------------------------------------------------------------- /config/packages/prod/jms_serializer.yaml: -------------------------------------------------------------------------------- 1 | jms_serializer: 2 | visitors: 3 | json_serialization: 4 | options: 5 | - JSON_UNESCAPED_SLASHES 6 | - JSON_PRESERVE_ZERO_FRACTION 7 | -------------------------------------------------------------------------------- /config/packages/dev/jms_serializer.yaml: -------------------------------------------------------------------------------- 1 | jms_serializer: 2 | visitors: 3 | json_serialization: 4 | options: 5 | - JSON_PRETTY_PRINT 6 | - JSON_UNESCAPED_SLASHES 7 | - JSON_PRESERVE_ZERO_FRACTION 8 | -------------------------------------------------------------------------------- /docker/php/xdebug.ini: -------------------------------------------------------------------------------- 1 | zend_extension=xdebug.so 2 | xdebug.remote_enable=1 3 | xdebug.remote_port=9002 4 | xdebug.remote_connect_back=0 5 | xdebug.profiler_enable_trigger=1 6 | xdebug.idekey=docker 7 | xdebug.remote_host=docker.for.mac.localhost 8 | xdebug.remote_autostart=1 9 | -------------------------------------------------------------------------------- /config/packages/routing.yaml: -------------------------------------------------------------------------------- 1 | framework: 2 | router: 3 | utf8: true 4 | 5 | # Configure how to generate URLs in non-HTTP contexts, such as CLI commands. 6 | # See https://symfony.com/doc/current/routing.html#generating-urls-in-commands 7 | #default_uri: http://localhost 8 | -------------------------------------------------------------------------------- /tests/Controller/OrderControllerTest.php: -------------------------------------------------------------------------------- 1 | assertTrue(true); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /tests/bootstrap.php: -------------------------------------------------------------------------------- 1 | bootEnv(dirname(__DIR__).'/.env'); 11 | } 12 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ###> symfony/framework-bundle ### 2 | /.env.local 3 | /.env.local.php 4 | /.env.*.local 5 | /config/secrets/prod/prod.decrypt.private.php 6 | /public/bundles/ 7 | /src/.preload.php 8 | /var/ 9 | /vendor/ 10 | ###< symfony/framework-bundle ### 11 | 12 | ###> symfony/phpunit-bridge ### 13 | .phpunit 14 | .phpunit.result.cache 15 | /phpunit.xml 16 | ###< symfony/phpunit-bridge ### 17 | 18 | .idea 19 | -------------------------------------------------------------------------------- /config/bundles.php: -------------------------------------------------------------------------------- 1 | ['all' => true], 5 | Doctrine\Bundle\DoctrineBundle\DoctrineBundle::class => ['all' => true], 6 | Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle::class => ['all' => true], 7 | JMS\SerializerBundle\JMSSerializerBundle::class => ['all' => true], 8 | FOS\RestBundle\FOSRestBundle::class => ['all' => true], 9 | ]; 10 | -------------------------------------------------------------------------------- /bin/phpunit: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env php 2 | /dev/null 2>&1; do 13 | (>&2 echo "Waiting for PostgreSql to be ready...") 14 | sleep 1 15 | done 16 | fi 17 | 18 | exec "$@" 19 | -------------------------------------------------------------------------------- /config/packages/jms_serializer.yaml: -------------------------------------------------------------------------------- 1 | jms_serializer: 2 | visitors: 3 | xml_serialization: 4 | format_output: '%kernel.debug%' 5 | # metadata: 6 | # auto_detection: false 7 | # directories: 8 | # any-name: 9 | # namespace_prefix: "My\\FooBundle" 10 | # path: "@MyFooBundle/Resources/config/serializer" 11 | # another-name: 12 | # namespace_prefix: "My\\BarBundle" 13 | # path: "@MyBarBundle/Resources/config/serializer" 14 | -------------------------------------------------------------------------------- /docker/php/php.ini: -------------------------------------------------------------------------------- 1 | apc.enable_cli = 1 2 | date.timezone = ${PHP_DATE_TIMEZONE} 3 | opcache.enable_cli = 1 4 | session.auto_start = Off 5 | short_open_tag = Off 6 | 7 | # http://symfony.com/doc/current/performance.html 8 | opcache.interned_strings_buffer = 16 9 | opcache.max_accelerated_files = 20000 10 | opcache.memory_consumption = 256 11 | ;opcache.validate_timestamps=0 12 | ;opcache.preload=/path/to/project/src/preload.php 13 | realpath_cache_size = 4096K 14 | realpath_cache_ttl = 600 15 | 16 | post_max_size = 6M 17 | upload_max_filesize = 5M 18 | -------------------------------------------------------------------------------- /docker/php/php-cli.ini: -------------------------------------------------------------------------------- 1 | apc.enable_cli = 1 2 | date.timezone = ${PHP_DATE_TIMEZONE} 3 | opcache.enable_cli = 1 4 | session.auto_start = Off 5 | short_open_tag = Off 6 | 7 | # http://symfony.com/doc/current/performance.html 8 | opcache.interned_strings_buffer = 16 9 | opcache.max_accelerated_files = 20000 10 | opcache.memory_consumption = 256 11 | ;opcache.validate_timestamps=0 12 | ;opcache.preload=/path/to/project/src/preload.php 13 | realpath_cache_size = 4096K 14 | realpath_cache_ttl = 600 15 | 16 | post_max_size = 6M 17 | upload_max_filesize = 5M 18 | -------------------------------------------------------------------------------- /docker/php/php.prod.ini: -------------------------------------------------------------------------------- 1 | apc.enable_cli = 1 2 | date.timezone = ${PHP_DATE_TIMEZONE} 3 | opcache.enable_cli = 1 4 | session.auto_start = Off 5 | short_open_tag = Off 6 | 7 | # http://symfony.com/doc/current/performance.html 8 | opcache.interned_strings_buffer = 16 9 | opcache.max_accelerated_files = 20000 10 | opcache.memory_consumption = 256 11 | opcache.validate_timestamps=0 12 | ;opcache.preload=/path/to/project/src/preload.php 13 | realpath_cache_size = 4096K 14 | realpath_cache_ttl = 600 15 | 16 | post_max_size = 6M 17 | upload_max_filesize = 5M 18 | -------------------------------------------------------------------------------- /docker/php/php-cli.prod.ini: -------------------------------------------------------------------------------- 1 | apc.enable_cli = 1 2 | date.timezone = ${PHP_DATE_TIMEZONE} 3 | opcache.enable_cli = 1 4 | session.auto_start = Off 5 | short_open_tag = Off 6 | 7 | # http://symfony.com/doc/current/performance.html 8 | opcache.interned_strings_buffer = 16 9 | opcache.max_accelerated_files = 20000 10 | opcache.memory_consumption = 256 11 | opcache.validate_timestamps=0 12 | ;opcache.preload=/path/to/project/src/preload.php 13 | realpath_cache_size = 4096K 14 | realpath_cache_ttl = 600 15 | 16 | post_max_size = 6M 17 | upload_max_filesize = 5M 18 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | up: 2 | docker-compose up -d 3 | 4 | down: 5 | docker-compose down 6 | 7 | rebuild: 8 | docker-compose down -v --remove-orphans 9 | docker-compose rm -vsf 10 | docker-compose up -d --build 11 | 12 | db: 13 | docker-compose exec php ./bin/console doctrine:database:drop --force 14 | docker-compose exec php ./bin/console doctrine:database:create 15 | docker-compose exec php ./bin/console doctrine:migrations:migrate -n 16 | 17 | prod: 18 | docker-compose -f docker-compose_prod.yml up -d 19 | 20 | prod_build: 21 | docker-compose -f docker-compose_prod.yml build 22 | -------------------------------------------------------------------------------- /src/Controller/OrderController.php: -------------------------------------------------------------------------------- 1 | getDoctrine()->getRepository(Order::class)->findAll(); 16 | 17 | $order = reset($orders); 18 | 19 | return $this->handleView($this->view($order)); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /config/packages/framework.yaml: -------------------------------------------------------------------------------- 1 | # see https://symfony.com/doc/current/reference/configuration/framework.html 2 | framework: 3 | secret: '%env(APP_SECRET)%' 4 | #csrf_protection: true 5 | #http_method_override: true 6 | 7 | # Enables session support. Note that the session will ONLY be started if you read or write from it. 8 | # Remove or comment this section to explicitly disable session support. 9 | session: 10 | handler_id: null 11 | cookie_secure: auto 12 | cookie_samesite: lax 13 | 14 | #esi: true 15 | #fragments: true 16 | php_errors: 17 | log: true 18 | -------------------------------------------------------------------------------- /config/packages/fos_rest.yaml: -------------------------------------------------------------------------------- 1 | # Read the documentation: https://symfony.com/doc/master/bundles/FOSRestBundle/index.html 2 | fos_rest: 3 | # param_fetcher_listener: true 4 | # allowed_methods_listener: true 5 | # routing_loader: true 6 | # view: 7 | # view_response_listener: true 8 | # exception: 9 | # codes: 10 | # App\Exception\MyException: 403 11 | # messages: 12 | # App\Exception\MyException: Forbidden area. 13 | format_listener: 14 | rules: 15 | - { path: ^/api, prefer_extension: true, fallback_format: json, priorities: [ json, html ] } 16 | -------------------------------------------------------------------------------- /config/packages/prod/doctrine.yaml: -------------------------------------------------------------------------------- 1 | doctrine: 2 | orm: 3 | auto_generate_proxy_classes: false 4 | metadata_cache_driver: 5 | type: pool 6 | pool: doctrine.system_cache_pool 7 | query_cache_driver: 8 | type: pool 9 | pool: doctrine.system_cache_pool 10 | result_cache_driver: 11 | type: pool 12 | pool: doctrine.result_cache_pool 13 | 14 | framework: 15 | cache: 16 | pools: 17 | doctrine.result_cache_pool: 18 | adapter: cache.app 19 | doctrine.system_cache_pool: 20 | adapter: cache.system 21 | -------------------------------------------------------------------------------- /docker-compose_prod.yml: -------------------------------------------------------------------------------- 1 | version: '3.8' 2 | 3 | services: 4 | php: 5 | build: 6 | context: . 7 | target: app_php 8 | dockerfile: Dockerfile_prod 9 | image: sf-docker/php:latest 10 | restart: on-failure 11 | environment: 12 | APP_ENV: prod 13 | PHP_DATE_TIMEZONE: ${PHP_DATE_TIMEZONE:-UTC} 14 | DATABASE_URL: 'postgres://sf_user:mysecretpassword@192.168.178.21/prod_db' 15 | 16 | nginx: 17 | build: 18 | context: . 19 | target: app_nginx 20 | dockerfile: Dockerfile_prod 21 | image: sf-docker/nginx:latest 22 | restart: on-failure 23 | depends_on: 24 | - php 25 | ports: 26 | - "8080:80" 27 | -------------------------------------------------------------------------------- /config/packages/doctrine.yaml: -------------------------------------------------------------------------------- 1 | doctrine: 2 | dbal: 3 | url: '%env(resolve:DATABASE_URL)%' 4 | 5 | # IMPORTANT: You MUST configure your server version, 6 | # either here or in the DATABASE_URL env var (see .env file) 7 | #server_version: '5.7' 8 | orm: 9 | auto_generate_proxy_classes: true 10 | naming_strategy: doctrine.orm.naming_strategy.underscore_number_aware 11 | auto_mapping: true 12 | mappings: 13 | App: 14 | is_bundle: false 15 | type: annotation 16 | dir: '%kernel.project_dir%/src/Entity' 17 | prefix: 'App\Entity' 18 | alias: App 19 | -------------------------------------------------------------------------------- /config/packages/cache.yaml: -------------------------------------------------------------------------------- 1 | framework: 2 | cache: 3 | # Unique name of your app: used to compute stable namespaces for cache keys. 4 | #prefix_seed: your_vendor_name/app_name 5 | 6 | # The "app" cache stores to the filesystem by default. 7 | # The data in this cache should persist between deploys. 8 | # Other options include: 9 | 10 | # Redis 11 | #app: cache.adapter.redis 12 | #default_redis_provider: redis://localhost 13 | 14 | # APCu (not recommended with heavy random-write workloads as memory fragmentation can cause perf issues) 15 | #app: cache.adapter.apcu 16 | 17 | # Namespaced pools use the above "app" backend by default 18 | #pools: 19 | #my.dedicated.cache: null 20 | -------------------------------------------------------------------------------- /docker/nginx/conf.d/default.conf: -------------------------------------------------------------------------------- 1 | server { 2 | root /app/public; 3 | 4 | location ~ ^/api/ { 5 | try_files $uri @rewriteapp; 6 | } 7 | 8 | location ~ ^/_profiler/ { 9 | try_files $uri @rewriteapp; 10 | } 11 | 12 | location @rewriteapp { 13 | rewrite ^(.*)$ /index.php/$1 last; 14 | } 15 | 16 | location ~ ^/index\.php(/|$) { 17 | fastcgi_pass php:9000; 18 | 19 | fastcgi_split_path_info ^(.+\.php)(/.*)$; 20 | include fastcgi_params; 21 | fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name; 22 | fastcgi_param DOCUMENT_ROOT $realpath_root; 23 | internal; 24 | } 25 | 26 | location ~ \.php$ { 27 | return 404; 28 | } 29 | 30 | client_max_body_size 6m; 31 | 32 | error_log /dev/stderr; 33 | access_log /dev/stdout main; 34 | } 35 | -------------------------------------------------------------------------------- /public/index.php: -------------------------------------------------------------------------------- 1 | bootEnv(dirname(__DIR__).'/.env'); 11 | 12 | if ($_SERVER['APP_DEBUG']) { 13 | umask(0000); 14 | 15 | Debug::enable(); 16 | } 17 | 18 | if ($trustedProxies = $_SERVER['TRUSTED_PROXIES'] ?? false) { 19 | Request::setTrustedProxies(explode(',', $trustedProxies), Request::HEADER_X_FORWARDED_ALL ^ Request::HEADER_X_FORWARDED_HOST); 20 | } 21 | 22 | if ($trustedHosts = $_SERVER['TRUSTED_HOSTS'] ?? false) { 23 | Request::setTrustedHosts([$trustedHosts]); 24 | } 25 | 26 | $kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']); 27 | $request = Request::createFromGlobals(); 28 | $response = $kernel->handle($request); 29 | $response->send(); 30 | $kernel->terminate($request, $response); 31 | -------------------------------------------------------------------------------- /phpunit.xml.dist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | tests 21 | 22 | 23 | 24 | 25 | 26 | src 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3.8' 2 | 3 | services: 4 | postgres: 5 | image: postgres:12.4-alpine 6 | restart: on-failure 7 | environment: 8 | POSTGRES_DB: test 9 | POSTGRES_USER: sf_user 10 | POSTGRES_PASSWORD: random_password 11 | PGDATA: /var/lib/postgresql/data 12 | volumes: 13 | - db-data:/var/lib/postgresql/data:rw 14 | ports: 15 | - "5432:5432" 16 | 17 | php: 18 | build: 19 | context: . 20 | target: app_php 21 | image: sf-docker/php:dev 22 | restart: on-failure 23 | environment: 24 | APP_ENV: dev 25 | APP_DEBUG: 1 26 | PHP_DATE_TIMEZONE: ${PHP_DATE_TIMEZONE:-UTC} 27 | XDEBUG_CONFIG: remote_host=docker.for.mac.localhost 28 | PHP_IDE_CONFIG: serverName=localhost 29 | depends_on: 30 | - postgres 31 | volumes: 32 | - .:/app:rw,cached 33 | - var:/app/var 34 | 35 | nginx: 36 | build: 37 | context: . 38 | target: app_nginx 39 | image: sf-docker/nginx:dev 40 | restart: on-failure 41 | depends_on: 42 | - php 43 | volumes: 44 | - ./public:/app/public:ro 45 | ports: 46 | - "8080:80" 47 | 48 | volumes: 49 | db-data: 50 | var: 51 | -------------------------------------------------------------------------------- /bin/console: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env php 2 | getParameterOption(['--env', '-e'], null, true)) { 24 | putenv('APP_ENV='.$_SERVER['APP_ENV'] = $_ENV['APP_ENV'] = $env); 25 | } 26 | 27 | if ($input->hasParameterOption('--no-debug', true)) { 28 | putenv('APP_DEBUG='.$_SERVER['APP_DEBUG'] = $_ENV['APP_DEBUG'] = '0'); 29 | } 30 | 31 | (new Dotenv())->bootEnv(dirname(__DIR__).'/.env'); 32 | 33 | if ($_SERVER['APP_DEBUG']) { 34 | umask(0000); 35 | 36 | if (class_exists(Debug::class)) { 37 | Debug::enable(); 38 | } 39 | } 40 | 41 | $kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']); 42 | $application = new Application($kernel); 43 | $application->run($input); 44 | -------------------------------------------------------------------------------- /config/services.yaml: -------------------------------------------------------------------------------- 1 | # This file is the entry point to configure your own services. 2 | # Files in the packages/ subdirectory configure your dependencies. 3 | 4 | # Put parameters here that don't need to change on each machine where the app is deployed 5 | # https://symfony.com/doc/current/best_practices/configuration.html#application-related-configuration 6 | parameters: 7 | 8 | services: 9 | # default configuration for services in *this* file 10 | _defaults: 11 | autowire: true # Automatically injects dependencies in your services. 12 | autoconfigure: true # Automatically registers your services as commands, event subscribers, etc. 13 | 14 | # makes classes in src/ available to be used as services 15 | # this creates a service per class whose id is the fully-qualified class name 16 | App\: 17 | resource: '../src/' 18 | exclude: 19 | - '../src/DependencyInjection/' 20 | - '../src/Entity/' 21 | - '../src/Kernel.php' 22 | - '../src/Tests/' 23 | - '../src/Migrations/' 24 | 25 | # controllers are imported separately to make sure services can be injected 26 | # as action arguments even if you don't extend any base controller class 27 | App\Controller\: 28 | resource: '../src/Controller/' 29 | tags: ['controller.service_arguments'] 30 | 31 | # add more service definitions when explicit configuration is needed 32 | # please note that last definitions always *replace* previous ones 33 | -------------------------------------------------------------------------------- /src/Kernel.php: -------------------------------------------------------------------------------- 1 | import('../config/{packages}/*.yaml'); 17 | $container->import('../config/{packages}/'.$this->environment.'/*.yaml'); 18 | 19 | if (is_file(\dirname(__DIR__).'/config/services.yaml')) { 20 | $container->import('../config/{services}.yaml'); 21 | $container->import('../config/{services}_'.$this->environment.'.yaml'); 22 | } elseif (is_file($path = \dirname(__DIR__).'/config/services.php')) { 23 | (require $path)($container->withPath($path), $this); 24 | } 25 | } 26 | 27 | protected function configureRoutes(RoutingConfigurator $routes): void 28 | { 29 | $routes->import('../config/{routes}/'.$this->environment.'/*.yaml'); 30 | $routes->import('../config/{routes}/*.yaml'); 31 | 32 | if (is_file(\dirname(__DIR__).'/config/routes.yaml')) { 33 | $routes->import('../config/{routes}.yaml'); 34 | } elseif (is_file($path = \dirname(__DIR__).'/config/routes.php')) { 35 | (require $path)($routes->withPath($path), $this); 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/Entity/Customer.php: -------------------------------------------------------------------------------- 1 | id; 44 | } 45 | 46 | /** 47 | * @return string 48 | */ 49 | public function getEmail(): string 50 | { 51 | return $this->email; 52 | } 53 | 54 | /** 55 | * @param string $email 56 | */ 57 | public function setEmail(string $email): void 58 | { 59 | $this->email = $email; 60 | } 61 | 62 | /** 63 | * @return string 64 | */ 65 | public function getPhoneNumber(): string 66 | { 67 | return $this->phoneNumber; 68 | } 69 | 70 | /** 71 | * @param string $phoneNumber 72 | */ 73 | public function setPhoneNumber(string $phoneNumber): void 74 | { 75 | $this->phoneNumber = $phoneNumber; 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /.env: -------------------------------------------------------------------------------- 1 | # In all environments, the following files are loaded if they exist, 2 | # the latter taking precedence over the former: 3 | # 4 | # * .env contains default values for the environment variables needed by the app 5 | # * .env.local uncommitted file with local overrides 6 | # * .env.$APP_ENV committed environment-specific defaults 7 | # * .env.$APP_ENV.local uncommitted environment-specific overrides 8 | # 9 | # Real environment variables win over .env files. 10 | # 11 | # DO NOT DEFINE PRODUCTION SECRETS IN THIS FILE NOR IN ANY OTHER COMMITTED FILES. 12 | # 13 | # Run "composer dump-env prod" to compile .env files for production use (requires symfony/flex >=1.2). 14 | # https://symfony.com/doc/current/best_practices.html#use-environment-variables-for-infrastructure-configuration 15 | 16 | ###> symfony/framework-bundle ### 17 | APP_ENV=dev 18 | APP_SECRET=2570182730eda74bfff1c16e54fd7fc1 19 | #TRUSTED_PROXIES=127.0.0.0/8,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16 20 | #TRUSTED_HOSTS='^(localhost|example\.com)$' 21 | ###< symfony/framework-bundle ### 22 | 23 | ###> doctrine/doctrine-bundle ### 24 | # Format described at https://www.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url 25 | # For an SQLite database, use: "sqlite:///%kernel.project_dir%/var/data.db" 26 | # For a PostgreSQL database, use: "postgresql://db_user:db_password@127.0.0.1:5432/db_name?serverVersion=11&charset=utf8" 27 | # IMPORTANT: You MUST configure your server version, either here or in config/packages/doctrine.yaml 28 | DATABASE_URL=postgres://sf_user:random_password@postgres/test 29 | ###< doctrine/doctrine-bundle ### 30 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Create Symfony 5 project with Docker and Postgres 2 | 3 | Watch full tutorial [here](https://youtu.be/4UrPI6Y3BWA) 4 | 5 | # Other video tutorials 6 | 7 | ## Code faster with Github Copilot 8 | 9 | There is a [video](https://youtu.be/qyxJXNNvd70) 10 | 11 | ## Create a classic website using Symfony 5 12 | 13 | There is a [video](https://youtu.be/svAxl6U8akQ) 14 | 15 | ## Delay "heavy" tasks in Symfony with component Messenger 16 | 17 | There is a [video](https://youtu.be/UHlA5nHdCmw) 18 | 19 | ## Delay heavy tasks in Symfony with kernel.terminate event to decrease response time 20 | 21 | There is a [video](https://youtu.be/HrQme9KUlUg) 22 | 23 | ## Design pattern "Chain of responsibility" (Symfony implementation) 24 | 25 | There is a [video](https://youtu.be/3KQlubIv684) 26 | 27 | ## How to use data transfer objects (DTO) in Symfony API application 28 | 29 | There is a [branch](https://github.com/Cap-Coding/symfony_api/tree/data_transfer_objects) and here is a [video](https://youtu.be/XxIhzgGv214) 30 | 31 | ## How to build simple CRUD API service with Symfony 5 (for beginners) 32 | 33 | There is a [branch](https://github.com/Cap-Coding/symfony_api/tree/crud_api) and here is a [video](https://youtu.be/tbXpX4dAqjg) 34 | 35 | ## How to use Symfony Form Events in API service 36 | 37 | There is a [video](https://youtu.be/lLwx96DA_Ww) 38 | 39 | ## How to use object factories with Symfony Forms 40 | 41 | There is a [video](https://youtu.be/chgvsi6TWM8) 42 | 43 | ## Dockerize WordPress 44 | 45 | There is a [video](https://youtu.be/coqucs1UhMY) 46 | 47 | ## Get trusted SSL certificate (https) for free with Let's Encrypt and Certbot 48 | 49 | There is a [video](https://youtu.be/nFDk43tAKFQ) 50 | -------------------------------------------------------------------------------- /src/Migrations/Version20200731200057.php: -------------------------------------------------------------------------------- 1 | abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.'); 23 | 24 | $this->addSql("INSERT INTO app_customer VALUES (nextval('app_customer_id_seq'), 'test@email.com', '+49123456789')"); 25 | $this->addSql("INSERT INTO app_product VALUES (nextval('app_product_id_seq'), 'JFND123SQ', 'Test product', 'This is great test product.', 3490)"); 26 | $this->addSql("INSERT INTO app_product VALUES (nextval('app_product_id_seq'), 'GPND392XS', 'Another test product', 'Another descriptions.', 1599)"); 27 | $this->addSql("INSERT INTO app_order VALUES (nextval('app_order_id_seq'), 1, now(), 'This is a test order')"); 28 | $this->addSql("INSERT INTO app_order VALUES (nextval('app_order_id_seq'), 1, now(), 'This is also a test order')"); 29 | $this->addSql('INSERT INTO order_product VALUES (1, 1)'); 30 | $this->addSql('INSERT INTO order_product VALUES (1, 2)'); 31 | $this->addSql('INSERT INTO order_product VALUES (2, 1)'); 32 | $this->addSql('INSERT INTO order_product VALUES (2, 2)'); 33 | } 34 | 35 | public function down(Schema $schema) : void 36 | { 37 | $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.'); 38 | 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "project", 3 | "license": "proprietary", 4 | "require": { 5 | "php": ">=7.2.5", 6 | "ext-ctype": "*", 7 | "ext-iconv": "*", 8 | "composer/package-versions-deprecated": "^1.11", 9 | "doctrine/doctrine-bundle": "^2.1", 10 | "doctrine/doctrine-migrations-bundle": "^3.0", 11 | "doctrine/orm": "^2.7", 12 | "friendsofsymfony/rest-bundle": "^3.0", 13 | "jms/serializer-bundle": "^3.7", 14 | "symfony/console": "5.3.*", 15 | "symfony/dotenv": "5.3.*", 16 | "symfony/flex": "^1.3.1", 17 | "symfony/framework-bundle": "5.3.*", 18 | "symfony/yaml": "5.3.*" 19 | }, 20 | "require-dev": { 21 | "roave/security-advisories": "dev-latest" 22 | , 23 | "symfony/phpunit-bridge": "^5.3" 24 | }, 25 | "config": { 26 | "optimize-autoloader": true, 27 | "preferred-install": { 28 | "*": "dist" 29 | }, 30 | "sort-packages": true 31 | }, 32 | "autoload": { 33 | "psr-4": { 34 | "App\\": "src/" 35 | } 36 | }, 37 | "autoload-dev": { 38 | "psr-4": { 39 | "App\\Tests\\": "tests/" 40 | } 41 | }, 42 | "replace": { 43 | "paragonie/random_compat": "2.*", 44 | "symfony/polyfill-ctype": "*", 45 | "symfony/polyfill-iconv": "*", 46 | "symfony/polyfill-php72": "*", 47 | "symfony/polyfill-php71": "*", 48 | "symfony/polyfill-php70": "*", 49 | "symfony/polyfill-php56": "*" 50 | }, 51 | "scripts": { 52 | "auto-scripts": { 53 | "cache:clear": "symfony-cmd", 54 | "assets:install %PUBLIC_DIR%": "symfony-cmd" 55 | }, 56 | "post-install-cmd": [ 57 | "@auto-scripts" 58 | ], 59 | "post-update-cmd": [ 60 | "@auto-scripts" 61 | ] 62 | }, 63 | "conflict": { 64 | "symfony/symfony": "*" 65 | }, 66 | "extra": { 67 | "symfony": { 68 | "allow-contrib": false, 69 | "require": "5.3.*" 70 | } 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | ARG PHP_VERSION=7.4.25 2 | ARG NGINX_VERSION=1.18 3 | 4 | FROM php:${PHP_VERSION}-fpm-alpine AS app_php 5 | 6 | ARG WORKDIR=/app 7 | 8 | RUN docker-php-source extract \ 9 | && apk add --update --virtual .build-deps autoconf g++ make pcre-dev icu-dev openssl-dev libxml2-dev libmcrypt-dev git libpng-dev \ 10 | # Install pgsql goodness 11 | && apk add postgresql-dev \ 12 | && docker-php-ext-install pgsql pdo_pgsql \ 13 | && apk del postgresql-libs libsasl db \ 14 | # Instaling pecl modules 15 | && pecl install apcu xdebug \ 16 | # Enable pecl modules 17 | && docker-php-ext-enable apcu opcache \ 18 | # Installing intl 19 | && apk add icu-libs icu \ 20 | && docker-php-ext-install intl \ 21 | # Post run 22 | && runDeps="$( \ 23 | scanelf --needed --nobanner --format '%n#p' --recursive /usr/local/lib/php/extensions \ 24 | | tr ',' '\n' \ 25 | | sort -u \ 26 | | awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \ 27 | )" \ 28 | && apk add --no-cache --virtual .app-phpexts-rundeps $runDeps \ 29 | && pecl clear-cache \ 30 | && docker-php-source delete \ 31 | && apk del --purge .build-deps \ 32 | && rm -rf /tmp/pear \ 33 | && rm -rf /var/cache/apk/* 34 | 35 | COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer 36 | COPY docker/php/php.ini $PHP_INI_DIR/conf.d/php.ini 37 | COPY docker/php/php-cli.ini $PHP_INI_DIR/conf.d/php-cli.ini 38 | COPY docker/php/xdebug.ini $PHP_INI_DIR/conf.d/xdebug.ini 39 | 40 | RUN mkdir -p ${WORKDIR} 41 | WORKDIR ${WORKDIR} 42 | 43 | # https://getcomposer.org/doc/03-cli.md#composer-allow-superuser 44 | ENV COMPOSER_ALLOW_SUPERUSER=1 45 | 46 | # prevent the reinstallation of vendors at every changes in the source code 47 | COPY composer.json composer.lock symfony.lock ./ 48 | RUN set -eux; \ 49 | composer install --prefer-dist --no-autoloader --no-scripts --no-progress; \ 50 | composer clear-cache 51 | 52 | RUN set -eux \ 53 | && mkdir -p var/cache var/log \ 54 | && composer dump-autoload --classmap-authoritative 55 | 56 | VOLUME ${WORKDIR}/var 57 | 58 | COPY docker/php/docker-entrypoint.sh /usr/local/bin/docker-entrypoint 59 | RUN chmod +x /usr/local/bin/docker-entrypoint 60 | 61 | ENTRYPOINT ["docker-entrypoint"] 62 | CMD ["php-fpm"] 63 | 64 | 65 | FROM nginx:${NGINX_VERSION}-alpine AS app_nginx 66 | 67 | COPY docker/nginx/conf.d/default.conf /etc/nginx/conf.d/ 68 | 69 | WORKDIR /app/public 70 | -------------------------------------------------------------------------------- /src/Entity/Product.php: -------------------------------------------------------------------------------- 1 | id; 58 | } 59 | 60 | /** 61 | * @return string 62 | */ 63 | public function getCode(): string 64 | { 65 | return $this->code; 66 | } 67 | 68 | /** 69 | * @param string $code 70 | */ 71 | public function setCode(string $code): void 72 | { 73 | $this->code = $code; 74 | } 75 | 76 | /** 77 | * @return string 78 | */ 79 | public function getTitle(): string 80 | { 81 | return $this->title; 82 | } 83 | 84 | /** 85 | * @param string $title 86 | */ 87 | public function setTitle(string $title): void 88 | { 89 | $this->title = $title; 90 | } 91 | 92 | /** 93 | * @return string 94 | */ 95 | public function getDescription(): string 96 | { 97 | return $this->description; 98 | } 99 | 100 | /** 101 | * @param string $description 102 | */ 103 | public function setDescription(string $description): void 104 | { 105 | $this->description = $description; 106 | } 107 | 108 | /** 109 | * @return int 110 | */ 111 | public function getPrice(): int 112 | { 113 | return $this->price; 114 | } 115 | 116 | /** 117 | * @param int $price 118 | */ 119 | public function setPrice(int $price): void 120 | { 121 | $this->price = $price; 122 | } 123 | } 124 | -------------------------------------------------------------------------------- /Dockerfile_prod: -------------------------------------------------------------------------------- 1 | ARG PHP_VERSION=7.4.14 2 | ARG NGINX_VERSION=1.18 3 | 4 | FROM php:${PHP_VERSION}-fpm-alpine AS app_php 5 | 6 | ARG WORKDIR=/app 7 | 8 | RUN docker-php-source extract \ 9 | && apk add --update --virtual .build-deps autoconf g++ make pcre-dev icu-dev openssl-dev libxml2-dev libmcrypt-dev git libpng-dev \ 10 | # Install pgsql goodness 11 | && apk add postgresql-dev \ 12 | && docker-php-ext-install pgsql pdo_pgsql \ 13 | && apk del postgresql-libs libsasl db \ 14 | # Instaling pecl modules 15 | && pecl install apcu \ 16 | # Enable pecl modules 17 | && docker-php-ext-enable apcu opcache \ 18 | # Installing intl 19 | && apk add icu-libs icu \ 20 | && docker-php-ext-install intl \ 21 | # Post run 22 | && runDeps="$( \ 23 | scanelf --needed --nobanner --format '%n#p' --recursive /usr/local/lib/php/extensions \ 24 | | tr ',' '\n' \ 25 | | sort -u \ 26 | | awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \ 27 | )" \ 28 | && apk add --no-cache --virtual .app-phpexts-rundeps $runDeps \ 29 | && pecl clear-cache \ 30 | && docker-php-source delete \ 31 | && apk del --purge .build-deps \ 32 | && rm -rf /tmp/pear \ 33 | && rm -rf /var/cache/apk/* 34 | 35 | COPY --from=composer:1 /usr/bin/composer /usr/local/bin/composer 36 | COPY docker/php/php.prod.ini $PHP_INI_DIR/conf.d/php.ini 37 | COPY docker/php/php-cli.prod.ini $PHP_INI_DIR/conf.d/php-cli.ini 38 | 39 | RUN mkdir -p ${WORKDIR} 40 | WORKDIR ${WORKDIR} 41 | 42 | # https://getcomposer.org/doc/03-cli.md#composer-allow-superuser 43 | ENV COMPOSER_ALLOW_SUPERUSER=1 44 | RUN set -eux; \ 45 | composer global require "hirak/prestissimo:^0.3" --prefer-dist --no-progress --no-suggest --classmap-authoritative; \ 46 | composer clear-cache 47 | 48 | # prevent the reinstallation of vendors at every changes in the source code 49 | COPY composer.json composer.lock symfony.lock ./ 50 | RUN set -eux; \ 51 | composer install --prefer-dist --no-autoloader --no-scripts --no-progress --no-suggest; \ 52 | composer clear-cache 53 | 54 | COPY .env ./ 55 | COPY bin bin/ 56 | COPY config config/ 57 | COPY src src/ 58 | COPY public public/ 59 | 60 | RUN set -eux \ 61 | && mkdir -p var/cache var/log \ 62 | && composer dump-autoload --classmap-authoritative \ 63 | && APP_SECRET='' composer run-script post-install-cmd 64 | 65 | COPY docker/php/docker-entrypoint.sh /usr/local/bin/docker-entrypoint 66 | RUN chmod +x /usr/local/bin/docker-entrypoint 67 | 68 | RUN chown www-data:www-data -R ${WORKDIR}/var/* ${WORKDIR}/vendor/* 69 | USER www-data 70 | 71 | ENTRYPOINT ["docker-entrypoint"] 72 | CMD ["php-fpm"] 73 | 74 | 75 | FROM nginx:${NGINX_VERSION}-alpine AS app_nginx 76 | 77 | COPY docker/nginx/conf.d/default.conf /etc/nginx/conf.d/ 78 | 79 | WORKDIR /app/public 80 | 81 | COPY --from=app_php /app/public public/ 82 | -------------------------------------------------------------------------------- /src/Migrations/Version20200731121119.php: -------------------------------------------------------------------------------- 1 | addSql('CREATE SEQUENCE app_customer_id_seq INCREMENT BY 1 MINVALUE 1 START 1'); 23 | $this->addSql('CREATE SEQUENCE app_order_id_seq INCREMENT BY 1 MINVALUE 1 START 1'); 24 | $this->addSql('CREATE SEQUENCE app_product_id_seq INCREMENT BY 1 MINVALUE 1 START 1'); 25 | $this->addSql('CREATE TABLE app_customer (id INT NOT NULL, email VARCHAR(255) NOT NULL, phone_number VARCHAR(255) NOT NULL, PRIMARY KEY(id))'); 26 | $this->addSql('CREATE TABLE app_order (id INT NOT NULL, customer_id INT DEFAULT NULL, created_at TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, comment TEXT DEFAULT NULL, PRIMARY KEY(id))'); 27 | $this->addSql('CREATE INDEX IDX_23FA1E559395C3F3 ON app_order (customer_id)'); 28 | $this->addSql('CREATE TABLE order_product (order_id INT NOT NULL, product_id INT NOT NULL, PRIMARY KEY(order_id, product_id))'); 29 | $this->addSql('CREATE INDEX IDX_2530ADE68D9F6D38 ON order_product (order_id)'); 30 | $this->addSql('CREATE INDEX IDX_2530ADE64584665A ON order_product (product_id)'); 31 | $this->addSql('CREATE TABLE app_product (id INT NOT NULL, code VARCHAR(100) NOT NULL, title VARCHAR(255) NOT NULL, description VARCHAR(255) NOT NULL, price INT NOT NULL, PRIMARY KEY(id))'); 32 | $this->addSql('ALTER TABLE app_order ADD CONSTRAINT FK_23FA1E559395C3F3 FOREIGN KEY (customer_id) REFERENCES app_customer (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); 33 | $this->addSql('ALTER TABLE order_product ADD CONSTRAINT FK_2530ADE68D9F6D38 FOREIGN KEY (order_id) REFERENCES app_order (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE'); 34 | $this->addSql('ALTER TABLE order_product ADD CONSTRAINT FK_2530ADE64584665A FOREIGN KEY (product_id) REFERENCES app_product (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE'); 35 | } 36 | 37 | public function down(Schema $schema) : void 38 | { 39 | $this->addSql('ALTER TABLE app_order DROP CONSTRAINT FK_23FA1E559395C3F3'); 40 | $this->addSql('ALTER TABLE order_product DROP CONSTRAINT FK_2530ADE68D9F6D38'); 41 | $this->addSql('ALTER TABLE order_product DROP CONSTRAINT FK_2530ADE64584665A'); 42 | $this->addSql('DROP SEQUENCE app_customer_id_seq CASCADE'); 43 | $this->addSql('DROP SEQUENCE app_order_id_seq CASCADE'); 44 | $this->addSql('DROP SEQUENCE app_product_id_seq CASCADE'); 45 | $this->addSql('DROP TABLE app_customer'); 46 | $this->addSql('DROP TABLE app_order'); 47 | $this->addSql('DROP TABLE order_product'); 48 | $this->addSql('DROP TABLE app_product'); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/Entity/Order.php: -------------------------------------------------------------------------------- 1 | products = new ArrayCollection(); 57 | } 58 | 59 | /** 60 | * @return int|null 61 | */ 62 | public function getId(): ?int 63 | { 64 | return $this->id; 65 | } 66 | 67 | /** 68 | * @return Customer 69 | */ 70 | public function getCustomer(): Customer 71 | { 72 | return $this->customer; 73 | } 74 | 75 | /** 76 | * @param Customer $customer 77 | */ 78 | public function setCustomer(Customer $customer): void 79 | { 80 | $this->customer = $customer; 81 | } 82 | 83 | /** 84 | * @return \DateTime 85 | */ 86 | public function getCreatedAt(): \DateTime 87 | { 88 | return $this->createdAt; 89 | } 90 | 91 | /** 92 | * @param \DateTime $createdAt 93 | */ 94 | public function setCreatedAt(\DateTime $createdAt): void 95 | { 96 | $this->createdAt = $createdAt; 97 | } 98 | 99 | /** 100 | * @return Collection 101 | */ 102 | public function getProducts(): Collection 103 | { 104 | return $this->products; 105 | } 106 | 107 | /** 108 | * @param Product $product 109 | */ 110 | public function addProduct(Product $product): void 111 | { 112 | if ($this->products->contains($product)) { 113 | return; 114 | } 115 | 116 | $this->products->add($product); 117 | } 118 | 119 | /** 120 | * @return string 121 | */ 122 | public function getComment(): string 123 | { 124 | return $this->comment; 125 | } 126 | 127 | /** 128 | * @param string $comment 129 | */ 130 | public function setComment(string $comment): void 131 | { 132 | $this->comment = $comment; 133 | } 134 | } 135 | -------------------------------------------------------------------------------- /symfony.lock: -------------------------------------------------------------------------------- 1 | { 2 | "composer/package-versions-deprecated": { 3 | "version": "1.11.99" 4 | }, 5 | "doctrine/annotations": { 6 | "version": "1.0", 7 | "recipe": { 8 | "repo": "github.com/symfony/recipes", 9 | "branch": "master", 10 | "version": "1.0", 11 | "ref": "a2759dd6123694c8d901d0ec80006e044c2e6457" 12 | }, 13 | "files": [ 14 | "config/routes/annotations.yaml" 15 | ] 16 | }, 17 | "doctrine/cache": { 18 | "version": "1.10.2" 19 | }, 20 | "doctrine/collections": { 21 | "version": "1.6.7" 22 | }, 23 | "doctrine/common": { 24 | "version": "3.0.2" 25 | }, 26 | "doctrine/dbal": { 27 | "version": "2.10.4" 28 | }, 29 | "doctrine/deprecations": { 30 | "version": "v0.5.3" 31 | }, 32 | "doctrine/doctrine-bundle": { 33 | "version": "2.0", 34 | "recipe": { 35 | "repo": "github.com/symfony/recipes", 36 | "branch": "master", 37 | "version": "2.0", 38 | "ref": "a9f2463b9f73efe74482f831f03a204a41328555" 39 | }, 40 | "files": [ 41 | "config/packages/doctrine.yaml", 42 | "config/packages/prod/doctrine.yaml", 43 | "src/Entity/.gitignore", 44 | "src/Repository/.gitignore" 45 | ] 46 | }, 47 | "doctrine/doctrine-migrations-bundle": { 48 | "version": "2.2", 49 | "recipe": { 50 | "repo": "github.com/symfony/recipes", 51 | "branch": "master", 52 | "version": "2.2", 53 | "ref": "baaa439e3e3179e69e3da84b671f0a3e4a2f56ad" 54 | }, 55 | "files": [ 56 | "config/packages/doctrine_migrations.yaml", 57 | "migrations/.gitignore" 58 | ] 59 | }, 60 | "doctrine/event-manager": { 61 | "version": "1.1.1" 62 | }, 63 | "doctrine/inflector": { 64 | "version": "1.4.3" 65 | }, 66 | "doctrine/instantiator": { 67 | "version": "1.3.1" 68 | }, 69 | "doctrine/lexer": { 70 | "version": "1.2.1" 71 | }, 72 | "doctrine/migrations": { 73 | "version": "3.0.1" 74 | }, 75 | "doctrine/orm": { 76 | "version": "v2.7.3" 77 | }, 78 | "doctrine/persistence": { 79 | "version": "2.0.0" 80 | }, 81 | "doctrine/reflection": { 82 | "version": "1.2.1" 83 | }, 84 | "doctrine/sql-formatter": { 85 | "version": "1.1.1" 86 | }, 87 | "friendsofphp/proxy-manager-lts": { 88 | "version": "v1.0.5" 89 | }, 90 | "friendsofsymfony/rest-bundle": { 91 | "version": "2.2", 92 | "recipe": { 93 | "repo": "github.com/symfony/recipes-contrib", 94 | "branch": "master", 95 | "version": "2.2", 96 | "ref": "cad41ef93d6150067ae2bb3c7fd729492dff6f0a" 97 | }, 98 | "files": [ 99 | "config/packages/fos_rest.yaml" 100 | ] 101 | }, 102 | "jms/metadata": { 103 | "version": "2.3.0" 104 | }, 105 | "jms/serializer": { 106 | "version": "3.9.0" 107 | }, 108 | "jms/serializer-bundle": { 109 | "version": "3.0", 110 | "recipe": { 111 | "repo": "github.com/symfony/recipes-contrib", 112 | "branch": "master", 113 | "version": "3.0", 114 | "ref": "384cec52df45f3bfd46a09930d6960a58872b268" 115 | }, 116 | "files": [ 117 | "config/packages/dev/jms_serializer.yaml", 118 | "config/packages/jms_serializer.yaml", 119 | "config/packages/prod/jms_serializer.yaml" 120 | ] 121 | }, 122 | "laminas/laminas-code": { 123 | "version": "3.4.1" 124 | }, 125 | "laminas/laminas-eventmanager": { 126 | "version": "3.3.0" 127 | }, 128 | "laminas/laminas-zendframework-bridge": { 129 | "version": "1.1.1" 130 | }, 131 | "ocramius/proxy-manager": { 132 | "version": "2.8.0" 133 | }, 134 | "php": { 135 | "version": "7.4" 136 | }, 137 | "phpstan/phpdoc-parser": { 138 | "version": "1.2.0" 139 | }, 140 | "psr/cache": { 141 | "version": "1.0.1" 142 | }, 143 | "psr/container": { 144 | "version": "1.0.0" 145 | }, 146 | "psr/event-dispatcher": { 147 | "version": "1.0.0" 148 | }, 149 | "psr/log": { 150 | "version": "1.1.3" 151 | }, 152 | "roave/security-advisories": { 153 | "version": "dev-latest" 154 | }, 155 | "symfony/cache": { 156 | "version": "v5.1.5" 157 | }, 158 | "symfony/cache-contracts": { 159 | "version": "v2.2.0" 160 | }, 161 | "symfony/config": { 162 | "version": "v5.1.5" 163 | }, 164 | "symfony/console": { 165 | "version": "5.1", 166 | "recipe": { 167 | "repo": "github.com/symfony/recipes", 168 | "branch": "master", 169 | "version": "5.1", 170 | "ref": "c6d02bdfba9da13c22157520e32a602dbee8a75c" 171 | }, 172 | "files": [ 173 | "bin/console" 174 | ] 175 | }, 176 | "symfony/dependency-injection": { 177 | "version": "v5.1.5" 178 | }, 179 | "symfony/deprecation-contracts": { 180 | "version": "v2.2.0" 181 | }, 182 | "symfony/doctrine-bridge": { 183 | "version": "v5.1.5" 184 | }, 185 | "symfony/dotenv": { 186 | "version": "v5.1.5" 187 | }, 188 | "symfony/error-handler": { 189 | "version": "v5.1.5" 190 | }, 191 | "symfony/event-dispatcher": { 192 | "version": "v5.1.5" 193 | }, 194 | "symfony/event-dispatcher-contracts": { 195 | "version": "v2.2.0" 196 | }, 197 | "symfony/filesystem": { 198 | "version": "v5.1.5" 199 | }, 200 | "symfony/finder": { 201 | "version": "v5.1.5" 202 | }, 203 | "symfony/flex": { 204 | "version": "1.0", 205 | "recipe": { 206 | "repo": "github.com/symfony/recipes", 207 | "branch": "master", 208 | "version": "1.0", 209 | "ref": "c0eeb50665f0f77226616b6038a9b06c03752d8e" 210 | }, 211 | "files": [ 212 | ".env" 213 | ] 214 | }, 215 | "symfony/framework-bundle": { 216 | "version": "5.1", 217 | "recipe": { 218 | "repo": "github.com/symfony/recipes", 219 | "branch": "master", 220 | "version": "5.1", 221 | "ref": "e1b2770f2404d8307450a49cabfc3b2ff3184792" 222 | }, 223 | "files": [ 224 | "config/packages/cache.yaml", 225 | "config/packages/framework.yaml", 226 | "config/packages/test/framework.yaml", 227 | "config/routes/dev/framework.yaml", 228 | "config/services.yaml", 229 | "public/index.php", 230 | "src/Controller/.gitignore", 231 | "src/Kernel.php" 232 | ] 233 | }, 234 | "symfony/http-client-contracts": { 235 | "version": "v2.4.0" 236 | }, 237 | "symfony/http-foundation": { 238 | "version": "v5.1.5" 239 | }, 240 | "symfony/http-kernel": { 241 | "version": "v5.1.5" 242 | }, 243 | "symfony/orm-pack": { 244 | "version": "v2.0.0" 245 | }, 246 | "symfony/password-hasher": { 247 | "version": "v5.3.8" 248 | }, 249 | "symfony/phpunit-bridge": { 250 | "version": "4.3", 251 | "recipe": { 252 | "repo": "github.com/symfony/recipes", 253 | "branch": "master", 254 | "version": "4.3", 255 | "ref": "6d0e35f749d5f4bfe1f011762875275cd3f9874f" 256 | }, 257 | "files": [ 258 | ".env.test", 259 | "bin/phpunit", 260 | "phpunit.xml.dist", 261 | "tests/bootstrap.php" 262 | ] 263 | }, 264 | "symfony/polyfill-intl-grapheme": { 265 | "version": "v1.18.1" 266 | }, 267 | "symfony/polyfill-intl-normalizer": { 268 | "version": "v1.18.1" 269 | }, 270 | "symfony/polyfill-mbstring": { 271 | "version": "v1.18.1" 272 | }, 273 | "symfony/polyfill-php73": { 274 | "version": "v1.18.1" 275 | }, 276 | "symfony/polyfill-php80": { 277 | "version": "v1.18.1" 278 | }, 279 | "symfony/polyfill-php81": { 280 | "version": "v1.23.0" 281 | }, 282 | "symfony/routing": { 283 | "version": "5.1", 284 | "recipe": { 285 | "repo": "github.com/symfony/recipes", 286 | "branch": "master", 287 | "version": "5.1", 288 | "ref": "b4f3e7c95e38b606eef467e8a42a8408fc460c43" 289 | }, 290 | "files": [ 291 | "config/packages/prod/routing.yaml", 292 | "config/packages/routing.yaml", 293 | "config/routes.yaml" 294 | ] 295 | }, 296 | "symfony/security-core": { 297 | "version": "v5.1.5" 298 | }, 299 | "symfony/service-contracts": { 300 | "version": "v2.2.0" 301 | }, 302 | "symfony/stopwatch": { 303 | "version": "v5.1.5" 304 | }, 305 | "symfony/string": { 306 | "version": "v5.1.5" 307 | }, 308 | "symfony/var-dumper": { 309 | "version": "v5.1.5" 310 | }, 311 | "symfony/var-exporter": { 312 | "version": "v5.1.5" 313 | }, 314 | "symfony/yaml": { 315 | "version": "v5.1.5" 316 | }, 317 | "webimpress/safe-writer": { 318 | "version": "2.1.0" 319 | }, 320 | "willdurand/jsonp-callback-validator": { 321 | "version": "v1.1.0" 322 | }, 323 | "willdurand/negotiation": { 324 | "version": "v2.3.1" 325 | } 326 | } 327 | --------------------------------------------------------------------------------