Skip to content

Commit 105cfc2

Browse files
author
Khobosha
committed
Initial commit
0 parents  commit 105cfc2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+6957
-0
lines changed

.directory

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[Dolphin]
2+
Timestamp=2022,3,16,12,24,48
3+
Version=4
4+
5+
[Settings]
6+
HiddenFilesShown=true

.docker/Dockerfile

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Use image which contains apache with php
2+
FROM php:8.1.2-apache
3+
RUN apt-get update && apt-get upgrade -y
4+
# Install packages needed to install php extensions
5+
RUN apt-get install git zlib1g-dev libxml2-dev libzip-dev zip unzip -y
6+
# Install PHP extensions
7+
RUN docker-php-ext-install zip intl mysqli pdo pdo_mysql opcache
8+
# Install NPM
9+
RUN apt-get install npm -y
10+
# Upgrade npm to latest version
11+
RUN npm install -g npm
12+
# Install node manager - n
13+
RUN npm install -g n
14+
# Install latest stable node version
15+
RUN n stable
16+
# Install latest stable Yarn
17+
RUN npm install --global yarn
18+
# Install XDEBUG
19+
RUN pecl install xdebug-3.1.3 && docker-php-ext-enable xdebug
20+
# Install composer command
21+
RUN curl -sS https://getcomposer.org/installer | php && mv composer.phar /usr/local/bin/composer
22+
# Install symfony command
23+
RUN curl -sS https://get.symfony.com/cli/installer | bash && mv /root/.symfony/bin/symfony /usr/local/bin/symfony
24+
# Set umask to 0000 (newly created files will have 777 permissions)
25+
RUN echo "umask 0000" >> /root/.bashrc
+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
error_reporting=E_ALL

.docker/php/conf.d/xdebug.ini

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
zend_extension=xdebug
2+
3+
[xdebug]
4+
xdebug.mode=develop,debug
5+
xdebug.client_host=192.168.2.1
6+
xdebug.start_with_request=yes

.docker/virtualhost.conf

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<VirtualHost *:80>
2+
ServerAdmin webmaster@localhost
3+
DocumentRoot /var/www/html/public
4+
DirectoryIndex /index.php
5+
6+
<Directory /var/www/html/public>
7+
AllowOverride None
8+
Order Allow,Deny
9+
Allow from All
10+
11+
FallbackResource /index.php
12+
</Directory>
13+
14+
<Directory /var/www/html/public/bundles>
15+
FallbackResource disabled
16+
</Directory>
17+
ErrorLog ${APACHE_LOG_DIR}/error.log
18+
CustomLog ${APACHE_LOG_DIR}/access.log combined
19+
</VirtualHost>

.env

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
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=38f25d1ee72d7bce75a1df7c5aa74c62
19+
###< symfony/framework-bundle ###
20+
21+
###> doctrine/doctrine-bundle ###
22+
# Format described at https://www.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url
23+
# IMPORTANT: You MUST configure your server version, either here or in config/packages/doctrine.yaml
24+
#
25+
# DATABASE_URL="sqlite:///%kernel.project_dir%/var/data.db"
26+
# DATABASE_URL="mysql://db_user:[email protected]:3306/db_name?serverVersion=5.7&charset=utf8mb4"
27+
DATABASE_URL="postgresql://symfony:[email protected]:5432/app?serverVersion=13&charset=utf8"
28+
###< doctrine/doctrine-bundle ###

.gitignore

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
.idea
2+
3+
###> symfony/framework-bundle ###
4+
/.env.local
5+
/.env.local.php
6+
/.env.*.local
7+
/config/secrets/prod/prod.decrypt.private.php
8+
/public/bundles/
9+
/var/
10+
/vendor/
11+
###< symfony/framework-bundle ###

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# symfony-api-sample

bin/console

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/usr/bin/env php
2+
<?php
3+
4+
use App\Kernel;
5+
use Symfony\Bundle\FrameworkBundle\Console\Application;
6+
7+
if (!is_file(dirname(__DIR__).'/vendor/autoload_runtime.php')) {
8+
throw new LogicException('Symfony Runtime is missing. Try running "composer require symfony/runtime".');
9+
}
10+
11+
require_once dirname(__DIR__).'/vendor/autoload_runtime.php';
12+
13+
return function (array $context) {
14+
$kernel = new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);
15+
16+
return new Application($kernel);
17+
};

composer.json

+85
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
{
2+
"type": "project",
3+
"license": "proprietary",
4+
"minimum-stability": "stable",
5+
"prefer-stable": true,
6+
"require": {
7+
"php": ">=8.0.2",
8+
"ext-ctype": "*",
9+
"ext-iconv": "*",
10+
"doctrine/annotations": "^1.13",
11+
"doctrine/doctrine-bundle": "^2.5",
12+
"doctrine/doctrine-migrations-bundle": "^3.2",
13+
"doctrine/orm": "^2.11",
14+
"phpdocumentor/reflection-docblock": "^5.3",
15+
"phpstan/phpdoc-parser": "^1.2",
16+
"sensio/framework-extra-bundle": "^6.2",
17+
"symfony/console": "6.0.*",
18+
"symfony/dotenv": "6.0.*",
19+
"symfony/flex": "^2",
20+
"symfony/framework-bundle": "6.0.*",
21+
"symfony/property-access": "6.0.*",
22+
"symfony/property-info": "6.0.*",
23+
"symfony/proxy-manager-bridge": "6.0.*",
24+
"symfony/runtime": "6.0.*",
25+
"symfony/serializer": "6.0.*",
26+
"symfony/validator": "6.0.*",
27+
"symfony/yaml": "6.0.*"
28+
},
29+
"config": {
30+
"allow-plugins": {
31+
"composer/package-versions-deprecated": true,
32+
"symfony/flex": true,
33+
"symfony/runtime": true
34+
},
35+
"optimize-autoloader": true,
36+
"preferred-install": {
37+
"*": "dist"
38+
},
39+
"sort-packages": true
40+
},
41+
"autoload": {
42+
"psr-4": {
43+
"App\\": "src/"
44+
}
45+
},
46+
"autoload-dev": {
47+
"psr-4": {
48+
"App\\Tests\\": "tests/"
49+
}
50+
},
51+
"replace": {
52+
"symfony/polyfill-ctype": "*",
53+
"symfony/polyfill-iconv": "*",
54+
"symfony/polyfill-php72": "*",
55+
"symfony/polyfill-php73": "*",
56+
"symfony/polyfill-php74": "*",
57+
"symfony/polyfill-php80": "*"
58+
},
59+
"scripts": {
60+
"auto-scripts": {
61+
"cache:clear": "symfony-cmd",
62+
"assets:install %PUBLIC_DIR%": "symfony-cmd"
63+
},
64+
"post-install-cmd": [
65+
"@auto-scripts"
66+
],
67+
"post-update-cmd": [
68+
"@auto-scripts"
69+
]
70+
},
71+
"conflict": {
72+
"symfony/symfony": "*"
73+
},
74+
"extra": {
75+
"symfony": {
76+
"allow-contrib": false,
77+
"require": "6.0.*"
78+
}
79+
},
80+
"require-dev": {
81+
"doctrine/doctrine-fixtures-bundle": "^3.4",
82+
"fakerphp/faker": "^1.19",
83+
"symfony/maker-bundle": "^1.38"
84+
}
85+
}

0 commit comments

Comments
 (0)